Welcome to the second article in our Cevo DevOps 101 series, where we break down the what, why, and how of modern DevOps practices. This time, we’re going to pick up where we left off in the Continuous Delivery article, and cover Continuous Deployment.
What is Continuous Deployment?
In a nutshell, Continuous Deployment is where products are deployed to production as soon as they are ready.
In our last article, we talked about a company where Sam was the only person who knew how to deploy to production. In his absence, the team deployed the wrong thing to production, and chaos ensued. We introduced the concept of an artifact and storing it in the artifact repository for deployment. From now on, the team can be sure that what they tested is what they’re deploying.
What we didn’t cover was how to get that artifact deployed. It might be a case of copying that artifact to a server, and running a single command to deploy the new version. But what if it’s not quite that simple? What if there’s more than one server to be deployed to, and deployment takes multiple steps that only sometimes need to be run? The natural first step is to automate the deployment. Get computers to do what they’re best at. Work out all the steps, and all deployment environments, and turn this into a single, repeatable process.
Once this process is stabilised, most teams realise that they can attach this automated deployment process to their continuous integration pipeline, and have the latest version automatically deployed to an internal-only accessible environment where it can be reviewed by the rest of the team, commonly called staging.
And just like that, the team has continuous deployment, albeit to staging.
So what’s the benefit?
Even in staging, there’s already value in this. The Quality Assurance team (QA) no longer waits days or weeks to get access to the latest version. Instead, it’s always available. The development team and the QA team are always in sync.
With a new version being released to staging multiple times a day, the QA team is not able to manually verify each build before the next build arrives on the staging environment. If the QA team has already automated some or all of their testing, the tighter feedback loop of more frequent builds means that those automated tests will be more valuable than ever, and the QA team and the business will push for automating as much of the testing as is humanly possible.
Where QA has yet to embrace automated testing, they can either make the case for implementing it, or instead, opt for a pre-release server, with a frozen build that’s manually tested and gated to production. Unfortunately the latter means that Continuous Deployment will continue to be out of reach.
Meanwhile, the teams that have invested in automated testing are finding the fast feedback cycle of testing every building is driving higher and higher quality builds. Typically at this point, management will allow a “gated” continuous deployment model. Under this, once a build has passed all the various automated tests, a product owner can deploy a version to production simply by clicking go. In theory, they’ll take some time to do a once over of the latest version, and then click deploy.
In reality, after the first few releases, the product owner starts to realise they can trust the team and the automation they’ve built, and just hits the deploy button anyway.
At this point, you can remove the button, and just release straight to production when the build passes.
Congratulations – you now have continuous deployment!
In the interests of the narrative, we’ve skipped a step. All those environments need to be built and configured. Traditionally configured by hand as required, modern cloud environments are increasingly built by automation. This is where Infrastructure as Code comes in, which we’ll cover in the next article in this series.
If you’re looking for guidance in Continuous Integration, Delivery, and Deployment, please get in touch.
Cevo is the trusted leader at the forefront of continuous delivery technologies, helping our customers stay competitive through innovative solutions and building capability on the AWS platform. Contact us today to learn more about how we can help your CI/CD practice.