Continuous Delivery Patterns and Anti-Patterns
Continuous Delivery Patterns and Anti-Patterns
Continuous Delivery Patterns and Anti-Patterns
CONTENTS
öö BENEFITS
Continuous Delivery öö
öö
CONFIGURATION MANAGEMENT
öö
TESTING
DEPLOYMENT PIPELINE
between an idea and usable software through the automation testing, deploying, and releasing – are visible to all team
of the entire software delivery process: code commit, build, test, members promoting collaboration.
DZO N E .CO M/ RE FCA RDZ
Critical Considerations
for Continuous Delivery
Standardize + automate
software delivery from
beginning to end.
1
Get to continuous delivery faster with
Puppet Pipelines.
• Enable self-service builds and deployments for your developers
• Get deep visibility into your delivery pipeline & the status of every deployment
• Define continuous delivery pipelines for your cloud-native and traditional
apps in under 15 minutes
• Practice Makes Perfect: Through the deployment Store configuration information in secure remotely
pipeline, the final deployment into production is being Pattern accessible locations such as a database, directory,
rehearsed every single time the software is deployed to any or registry.
target environments.
Anti-
Open text passwords and/or single machine or share.
patterns
DZO N E .CO M/ RE FCA RDZ
CONFIGURATION MANAGEMENT
Configuration Management is “the process by which all artifacts
relevant to your project, and the relationships between them, are REPOSITORY (3), (1)
stored, retrieved, uniquely identified, and modified.” (1)
All source files — executable code, configuration, host
Note: Each pattern is cited with a number in parentheses that Pattern environment, and data — are committed to a version
corresponds to the source in the References section. control repository.
CONFIGURABLE THIRD-PARTY SOFTWARE (1) Some files are checked in, others, such as environment
Anti- configuration or data changes, are not. Binaries –
Evaluate and use third-party software that can be patterns which can be recreated through the build and
Pattern
easily configured, deployed, and automated. deployment process – are checked in.
Forcing the developer to define and configure Scheduled builds, nightly builds, building periodically,
Anti-
Anti- environment variables. Making the developer install building exclusively on developer’s machines, or not
patterns
patterns numerous tools in order for the build/deployment building at all.
to work.
CONTINUOUS INTEGRATION (CI) Write build scripts that are decoupled from IDEs.
BUILD THRESHOLD (5)
Pattern These build scripts are executed by a CI system so that
Fail a build when a project rule is violated – such software is built at every change.
Pattern least once a day but preferably after each task to in real time.
TESTING
CONTINUOUS FEEDBACK (6) AUTOMATE TESTS
Send automated feedback from CI system to all cross- Automate the verification and validation of software
Pattern
functional team members. Pattern to include unit, component, capacity, functional, and
deployment tests
Notifications are not sent; notifications are ignored;
Anti-
CI system spams everyone with information they Anti- Manual testing of units, components, deployment,
patterns
cannot use. patterns and other types of tests.
Building and testing software with every change Component: Automating tests with dependencies to other
Pattern components and heavyweight dependencies such as the database
committed to a project’s version control repository.
or file system.
Anti-patterns Running tests on one machine or for anyone to modify the delivery system reducing
Anti- patterns
instance. Running dependent tests that cannot be run cross-functional team effectiveness.
patterns
in parallel.
DEPLOYMENT PIPELINE
FAIL FAST (6)
A deployment pipeline is an automated
Pattern implementation of your application’s build, test, Fail the build as soon as possible. Design scripts
deploy, and release process. Pattern so that processes that usually fail run first. These
processes should be run as part of the commit stage.
Deployments require human intervention (other than
Anti-
approval or clicking a button). Deployments are not Anti- Common build mistakes are not uncovered until late
patterns
production ready. patterns in the deployment process.
Create a map illustrating the process from check in to The commit build provides feedback on common build
Pattern the version control system to the software release to Pattern problems as quickly as possible — usually in under
identify process bottlenecks. 10 minutes.
Throwing everything into the commit stage process, Anti- Production is taken down while the new release is
Anti- such as running every type of automated static patterns applied to production instance(s).
patterns analysis tool or running load tests such that feedback
is delayed.
Anti-
UNIFIED DEPLOYMENT (5) Software is deployed regardless of number of active users.
patterns
Anti-
or even for a specific machine. Manual configuration
patterns
after deployment for each target environment. Manually undoing changes applied in a recent
Anti-
deployment. Shutting down production instances
patterns
while changes are undone.
DEPLOYING AND RELEASING APPLICATIONS
BINARY INTEGRITY (5)
SELF-SERVICE DEPLOYMENT (1)
Build your binaries once, while deploying the binaries
Pattern
to multiple target environments, as necessary. Any Cross-Functional Team member selects the
Pattern version and environment to deploy the latest
Anti- Software is built in every stage of the deployment working software.
patterns pipeline.
near real-time alerting. the Isolate Test Data pattern. Each developer uses
Pattern
this lightweight DML to populate his local database
Pattern
staff. All changes are versioned and applied
Use scripts to apply incremental changes in each
through automation. Pattern
target environment to a database schema and data.
INCREMENTAL DEVELOPMENT
BRANCH BY ABSTRACTION (2)
TRANSIENT ENVIRONMENTS
Deploy new features or services to production but Atlassian JIRA, Jama, CA Rally, Aha!,
Pattern Product Planning
limit access dynamically for testing purposes. CollabNet VersionOne, Pivotal
Waiting until a feature is fully complete before GitHub, GitLab, Atlassian Bitbucket,
Anti- Source Code
patterns committing the source code. Microsoft Team Foundation Server,
Management
Perforce, Subversion
Infrastructure
Puppet Enterprise, Chef, Ansible
Amazon.com has an interesting take on this approach. They call it Automation
“You build it, you run it”. Developers take the software they’ve written
all the way to production. Cloud Provisioning &
HashiCorp Terraform, Puppet, Ansible
Orchestration
ROOT-CAUSE ANALYSIS (1)
DZone, Inc.
DZone communities deliver over 6 million pages each 150 Preston Executive Dr. Cary, NC 27513
month to more than 3.3 million software developers, 888.678.0399 919.678.0300
architects and decision makers. DZone offers something for
Copyright © 2018 DZone, Inc. All rights reserved. No part of this publication
everyone, including news, tutorials, cheat sheets, research
may be reproduced, stored in a retrieval system, or transmitted, in any form
guides, feature articles, source code and more. "DZone is a or by means electronic, mechanical, photocopying, or otherwise, without
developer’s dream," says PC Magazine. prior written permission of the publisher.