Continuous Deployment
Continuous Deployment is the software development practice of automatically deploying all changes that pass through the established pipelines directly to production, without manual intervention. It extends continuous delivery by automating the release process.
Goal
The goal of continuous deployment is to minimise the lead time between making a change to software and that change being used by live users, in production.
Context
Every manual step in the deployment process delays the ability for teams to get quick feedback from customers. The delays reduce the accountability of the teams as they will blame the delays and it encourages the bad behaviour of batching changes together, which increases the risk of each release and makes it harder to evaluate the impact of each change.
Deployment Approaches
Deployment Approach | Description | Benefits | Considerations | Best Suited For |
---|---|---|---|---|
Blue/Green Deployment | Involves two identical environments. One hosts the current version (Blue) while the new version (Green) is deployed and tested. Traffic is switched to Green once it's verified. |
|
|
|
Staged (Rolling) Deployment | Gradually replaces instances of the old version of an application with the new version across several stages. |
|
|
|
Canary Deployment | Releases the new version to a small subset of users before rolling it out to the entire user base. This "canary" serves as an early indicator of issues. |
|
|
|
Feature Toggles | Uses feature flags to enable or disable features without deploying new code. This allows features to be tested in production environments. |
|
|
|
A/B Testing Deployment | Two or more versions are released to randomly selected users to test different features, designs, or functionality. |
|
|
|
Manual Intervention: Requiring manual approval for every deployment, slowing down the release process. | Failing to maintain a robust suite of automated tests: Since the code is deployed automatically, it is crucial to have a comprehensive set of automated tests to ensure the quality of the release. | Lack of monitoring and alerts for production: even with the best test suite in place, issues can still arise in production, and without proper monitoring and alerting, these issues can go unnoticed. |