What is Continuous Delivery?
Continuous delivery, also known as CD, refers to the ability to automate software deployment so that it’s always ready to be released into the production environment at any time. In practice, this involves dividing software releases into small chunks and performing build and unit tests continuously on all code, which results in increased release velocity.
Why implement continuous delivery practices — what’s the advantage? By deploying code and application updates more frequently, each individual update is lower risk, and can lead to zero-downtime deployments that are undetectable to end users. When software updates or bug fixes can be released incrementally as they’re produced — without waiting for the result of large waterfall-style releases — it allows organizations to deliver value to end users much more rapidly. The software performance and overall quality end up being much higher, as quality assurance and performance testing can be carried out continuously throughout the development process.
Continuous delivery relies heavily on automation, removing repetitive manual tasks and replacing them with tools that perform them much more rapidly, and conforming to a standard set of rules that eliminate errors. By connecting multiple layers of automation, software organizations can build a deployment pipeline that continuously delivers software packages from development to operations.
Best practices for successful continuous delivery
Companies implementing continuous delivery strategies can seek to optimize processes across multiple points in the software delivery lifecycle. Some key areas that are typically focused on include:
- Continuous integration: This refers to the practice of build automation by performing integration and other testing immediately upon check-in of code into a version control repository. Older practices might involve a daily (or even less frequently) test run to make sure all code submitted by developers in that time period worked properly with the rest of the code base. Continuous integration, on the other hand, is always ensuring that every code update works well with the rest of the code base, and that every check-in results in releasable code. Some popular tools for continuous integration include Jenkins, Bamboo, and TeamCity.
- Configuration automation: To ensure that software delivery functions smoothly and efficiently, all environments used for development, testing, and production deployment should be functionally identical. This has led to the notion of “configuration as code” — the use of software practices to automatically configure and deliver the same environment for use in different phases of the software delivery lifecycle. Just as code can be stored in version control repositories, so can environment configurations. Popular tools for configuration automation include Chef, Puppet, and Ansible.
- Application release automation: Once the code is tested and the environments are configured properly, there’s value in automating the process of packaging and deploying an application or update in a standard way across different environments (including managing libraries and dependencies). Popular tools in this space include Automic and Octopus Deploy.
- Monitoring and analytics: While most organizations are familiar with the value of monitoring tools and likely already use some combination of them for their IT operations, creating a feedback loop back into the software development process is vital for ensuring high-quality software releases. Keeping a close eye on software performance to identify problem areas – ideally, before they impact customers – allows you to be ultra-responsive to user concerns, and release rolling fixes immediately rather than wait for the next big release. There are many tools out there for different types of monitoring, but some popular ones include New Relic, AppDynamics, and Nagios.
How does continuous delivery relate to DevOps?
DevOps and continuous delivery are different but closely related concepts. DevOps is a mindset and a process by which development and operations align their incentives and practices to create a high-performing IT organization, all the way from coding to deployment of code into production. Continuous delivery refers to specific techniques for delivering software more rapidly and efficiently in smaller chunks – by adopting DevOps best practices and team structures, it’s easier to get organizational buy-in for building a continuous delivery process. And without building a continuous delivery process, you can’t fully implement DevOps.
Continuous delivery vs continuous deployment
By implementing continuous delivery, you ensure that your code is always deployable to production at any time. However, ensuring deployability is different from actually deploying it. Continuous deployment takes the pipeline that is set up by continuous delivery, and automatically deploys changes into the production environment once they’ve passed the suite of unit, build, and security tests automatically triggered by a code check-in.
Continuous delivery vs continuous integration
As mentioned above, continuous integration is one of the components of a full continuous delivery process. In order to be able to delivery software code continuously, it must be of deployable quality at all times – that means it must be continuously integrated into the full codebase. Though the name just refers to integration, continuous integration processes should involve a full set of test suites, including unit, build, and security tests, so that any problems are identified immediately upon code check-in.
How does incident management support Continuous Delivery?
The ultimate goal of a continuous delivery process is to delight the end user by providing value to them as rapidly as possible. Any interruption in their experience must be identified and resolved as rapidly as possible – ideally before any customer is impacted.
In an organization that follows DevOps and continuous delivery best practices, agile development teams are responsible for the code they’ve written even in production: “you code it, you ship it, you own it.” When an incident occurs, there must be a clear and well defined response and escalation process, and everyone involved must have access to all the pertinent diagnostic data. Then once a solution has been found, continuous delivery processes are vital in testing and deploying a fix as rapidly and safely as possible.
After an incident takes place, an important aspect of continuous delivery is continuous improvement: understanding what went wrong and how to do better next time. This is true both for the application problem itself, as well as for the process used in handling the incident. Typically this involves an incident post-mortem in which timelines are put together detailing every step of what went wrong and how it was handled, leading to concrete steps the team can take to improve.
How to get more out of Continuous Delivery
PagerDuty facilitates better continuous delivery by enabling you to ship code with confidence by making it easier to deal with unplanned work. By making it easier to adopt best practice, the end-to-end incident resolution lifecycle also enables you to learn from issues and constantly improve the resiliency of your systems and processes. Try it out now for yourself with a free 14-day trial.