Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation
Rate it:
Open Preview
6%
Flag icon
A deployment pipeline is, in essence, an automated implementation of your application’s build, deploy, test, and release process.
6%
Flag icon
The aim of the deployment pipeline is threefold. First, it makes every part of the process of building, deploying, testing, and releasing software
6%
Flag icon
visible to everybody involved, aiding collaboration. Second, it improves feedback so that problems are identified, and so resolved, as early in the process as possible. Finally, it enables teams to deploy and release any version of their software to any environment at will through a fully automated process.
7%
Flag icon
The remedy is to integrate the testing, deployment, and release activities into the development process.
7%
Flag icon
All aspects of each of your testing, staging, and production environments, specifically the configuration of any third-party elements of your system, should be applied from version control through an automated process.
7%
Flag icon
A working software application can be usefully decomposed
7%
Flag icon
into four components: executable code, configuration, host environment, and data. If any of them changes, it can lead to a change in the behavior of the application. Therefore we need to keep all four of these components under control and ensure that a change in any one of them is verified.
10%
Flag icon
The repeatability and reliability derive from two principles: automate almost everything, and keep everything you need to build, deploy, test, and release your application in version control.
10%
Flag icon
If It Hurts, Do It More Frequently, and Bring the Pain Forward
10%
Flag icon
documentation is painful, do it as you develop new features instead of leaving it to the end. Make documentation for a feature part of the definition of done, and automate the process as far as possible.
11%
Flag icon
The whole team should regularly gather together and hold a retrospective on the delivery process. This means that the team should reflect on what has gone well and what has gone badly, and discuss ideas on how to improve things.
11%
Flag icon
Somebody should be nominated to own each idea and ensure that it is acted upon. Then, the next time that the team gathers, they should report back on what happened. This is known as the Deming cycle: plan, do, study, act.
11%
Flag icon
Configuration management refers to the process by which all artifacts relevant to your project, and the relationships
11%
Flag icon
between them, are stored, retrieved, uniquely identified, and modified.
13%
Flag icon
Generally, we consider it bad practice to inject configuration information at build or packaging time.
14%
Flag icon
Treat your application’s configuration the same way you treat your code. Manage it properly, and test it. Here is a list of principles to consider when creating an application configuration system:
15%
Flag icon
When evaluating third-party products and services, start by
15%
Flag icon
asking the following questions: • Can we deploy it? • Can we version its configuration effectively? • How will it fit into our automated deployment strategy?
15%
Flag icon
In this sense, a change to your environment is just like a change to your software. It has to go through your build, deploy, test, and release process in exactly the same way as a change to the application’s code.
15%
Flag icon
Configuration management is the foundation of everything else in this book. It is impossible to do continuous integration, release management, and deployment pipelining without it. It
16%
Flag icon
James Shore describes the simplest way to get started with continuous integration in an article called “Continuous Integration on a Dollar a Day” [bAJpjp] using only an unused development machine, a rubber chicken, and a bell.
16%
Flag icon
Prerequisites for Continuous Integration
17%
Flag icon
Unit tests should run very fast—your whole suite, even for a large application, should be able to run in under ten minutes.
18%
Flag icon
Always Run All Commit Tests Locally before Committing, or Get Your CI Server to Do It for You
19%
Flag icon
We have two book recommendations for further reading on this topic: Steve Freeman and Nat Pryce’s Growing Object-Oriented Software, Guided by Tests, and Gerard Meszaros’ xUnit Test Patterns: Refactoring Test Code.
23%
Flag icon
To work out stories that follow the INVEST principles [ddVMFH] (they should be Independent, Negotiable, Valuable, Estimable, Small, and Testable), with acceptance criteria.
27%
Flag icon
The later stages in the pipeline that perform deployments to manual testing environments need to be activated on demand, which we describe in a later section in this chapter.
28%
Flag icon
In many organizations where automated functional testing is done at all, a common practice is to have a separate team dedicated to the production and maintenance of the test suite. As described at length in Chapter 4, “Implementing a Testing Strategy,” this is a bad idea. The
29%
Flag icon
Acceptance tests written without developer involvement also tend to be tightly coupled to the UI and thus brittle and badly factored, because the testers don’t have any insight into the UI’s underlying design and lack the skills to create abstraction layers or run acceptance tests against a public API.
29%
Flag icon
expressed in the language of the business (what Eric Evans calls the “ubiquitous language”3), not in the language of the technology of the application.
37%
Flag icon
Most importantly of all, avoid environment-specific scripts: Separate environment-specific configuration from the build scripts themselves.
38%
Flag icon
At some organizations, there are teams of specialists who are experts at the creation of effective, modular build pipelines and the management of the environments in which they run. We have both worked in this role. However,
38%
Flag icon
we consider it a failure if we get to the point where only those specialists can maintain the CI system.
38%
Flag icon
In larger or more widely spread teams, this isn’t always easy. Under these circumstances it is useful to have someone to play the role of a “build master.”
38%
Flag icon
There are some important principles and practices governing the design of a commit test suite. The vast majority of your commit tests should be comprised of unit tests, and it is these that we focus on in this section.
38%
Flag icon
The second important property is that they should cover a large proportion of the codebase (around 80% is a good rule of thumb),
39%
Flag icon
Second, UIs are designed to work at human timescales which, compared to computer timescales, are desperately slow.
44%
Flag icon
Acceptance testing relies on the ability to execute automated tests in a production-like environment. However, a vital property of such a test environment is that it is able to successfully support automated testing. Automated
44%
Flag icon
same as user acceptance testing. One of the differences is that automated acceptance tests should not run in an environment that includes integration to all external systems.
44%
Flag icon
Instead, your acceptance testing should be focused on providing a controllable environment in which the...
This highlight has been truncated due to consecutive passage length restrictions.
48%
Flag icon
1. Decide upon an architecture for your application. Pay particular attention to process and network boundaries and I/O in general.
48%
Flag icon
Understand and use patterns and avoid antipatterns that affect the stability and capacity of your system. Michael Nygard’s excellent volume Release It! describes these in detail.
51%
Flag icon
We also introduce two extremely powerful techniques that can be used to perform zero-downtime releases and rollbacks on even the largest of production systems: blue-green deployments and canary releasing.
55%
Flag icon
The People Who Do the Deployment Should Be Involved in Creating the Deployment Process
62%
Flag icon
copies of the environment for
66%
Flag icon
We recommend Scott Ambler and Pramod Sadalage’s excellent book Refactoring Databases, and the accompanying minibook Recipes for Continuous Database Integration, for more detail
66%
Flag icon
used is to autogenerate a list of database objects touched by each application through static analysis of the codebase. This list is generated as part of the build process for every application, and the results are made available to everybody else, so it is easy to work out if you are going to affect somebody else’s application.
72%
Flag icon
If your codebase is already large and monolithic, one way to start decomposing it into components is to use branching by abstraction, as described earlier in this chapter.
75%
Flag icon
Maven: The Definitive Guide written by Sonatype and published by O’Reilly. Meanwhile, we do want to cover some of the basic dependency refactorings you can do in Maven.
78%
Flag icon
It’s worth saying again: You
« Prev 1