chapter nine

9 Continuous Delivery (CD)

 

This chapter covers

  • Determining the basic CD steps
  • Deploying the sample application to production
  • Using Environments to guard deployments
  • Implementing various deployment strategies
  • Separating Infrastructure and application code

Continuous delivery is the DevOps practice where we deploy our software to production fully automated. In DevOps we strive for a continuous flow of value to the end customer, so that also means into production. The holy grail here is that every commit to the version control repository will end up in production in the shortest time possible with as few human interactions as possible while delivering a stable, high-quality product.

9.1 CD Workflow Steps

The steps involved in moving to production vary strongly based on the product you build and the technologies used. But in general, you can state there are a set of generic steps you always want to take before users are exposed to new functionality. There are situations where everything is done in production, including testing the software. Although this is technically production, they keep the same safety measures in place as when you would go through a set of environments that are not exposed to the users. In general, the steps to move your software to production are:

9.1.1 Steps to deploy our GloboTicket application

9.1.2 Triggering the deployment

9.1.3 Get the deployment artifacts

9.1.4 Deploy

9.1.5 Verify the Deployment

9.2 Using Environments

9.2.1 What is an Environment

9.2.2 Manual approval

9.2.3 Environment Variables

9.2.4 Dealing With Secrets

9.3 Deployment strategies

9.3.1 Deploy to on-premise

9.3.2 Deploy to Cloud

9.3.3 OpenID Connect (OIDC)

9.3.4 Using Health Endpoints

9.3.5 Deployment vs. Release

9.3.6 Zero Downtime Deployments

9.3.7 Red Green Deployments

9.3.8 Ring-based deployments

9.4 Summary