In this video, we will cover automating the delivery of code to production using the CI/CD process. Let’s first start by getting an overview of CI/CD and understand some of the motivating factors behind transitioning to a CI/CD process, and the principles that drive successful CI/CD processes. Organizations need to deliver code to production. Developers collaborate to build and improve an application. That application is then pushed to production Where users can interact with it to perform business meaningful tasks Traditionally pushing an application to production has been a manual process. Organizations have been successful relying on manual deployment, but manual deployments come with a number of issues. Manual Deployments often require a significant coordination effort. For most organizations, no single person has all the correct privileges or knowledge to successfully deploy an application. In order to push code to production operations, development, QA, DBAs, and managers must all be available for running tasks, verifying success, and providing sign-off. Because so many individuals need to be available to perform a deployment, this often means time must be spent to coordinate availability. Manual deployments are often slow; Humans perform tasks on the scale of minutes. Deployments often require performing dozens of steps in serial, and together these steps may take several minutes, or even hours, to complete. Because it can take a long time for humans to complete tasks, there can be significant wait times. As an example: A QA engineer can’t verify a deployment is successful until an application has been deployed. Manual deployments come with considerable risk. As mentioned, deployments are made up of dozens of steps and each of these steps come with a risk of being done incorrectly, which could lead to a failed deployment. Manual deployments can be difficult to audit. Tracking who touched what resources, what was changed, and the previous values of those resources can be difficult or even impossible. This can be an issue when investigating what went wrong or fulfilling regulatory requirements. Manual deployments may not always have clean roll forward or rollback steps. If a task is performed incorrectly, it may not be clear what steps should be taken to resolve the problem, roll forward, or rollback, to a previously stable state. Manual deployments also have an issue of a non-linear increase in the cost and risks associated with running manual deployments. Deploying on a single application requires relatively little coordination and risk. Deploying two applications, can double the amount of coordination and risk. Deploying three applications though can quadruple the risk. Organizations have addressed this weakness by bundling as much functionality together as possible into a single artifact, i.e. the monolith. However, monoliths are ill-suited to take advantage of the resources and flexibility cloud platforms offer Let’s look now at how CI/CD addresses these issues. CI/CD is often discussed in modern software development as a single concept, but actually refers to three distinct concepts. CI refers to Continuous Integration. Continuous Integration covers: Building the code base as new changes are added, validating the changes meet requirements, and Merging the changes into the production branch, which in most cases would be the main, master, or trunk branch. Next would be Continuous Delivery. In Continuous delivery the code is packaged into a deployable artifact. This package is then deployed into a near production environment. Finally, there is Continuous Deployment. In continuous deployment the state of the production environment is also automatically orchestrated. The package created during the continuous delivery phase, is then deployed into production. Let’s take a look at what the CI/CD process looks like in practice. The event that typically triggers a new deployment is a git push. This event kicks off the build, test, merge of continuous integration. Upon successful completion of the continuous integration phase, the build process moves into the continuous delivery phase where the artifact is packaged and deployed to a near production environment. The build process then moves into the continuous deployment phase where the production environment is orchestrated, and the package deployed. Let us take a look at some of the key benefits provide from moving from a manual deployment process to an automated CI/CD process. An automated CI/CD process is repeatable. Computers excel at performing complex repetitive tasks. Whereas a human might forget to perform a step, perform it out of order, or with the incorrect values, computers will perform the same steps, in the same order, with the correct values every time. Automated deployments can also be designed with rollback and roll-forward steps. This can ensure a consistent state for future deployments. Auditable deployments are another key benefit provided by an automated CI/CD process. Because a deployment must be defined in tooling to allow it to be automated, these definitions can be reviewed to validate they are correct. Automated processes can also be configured to provide detailed logging and reporting about the steps being executed and the values being used to execute the steps. Auditability is critical in making it easier to investigate issues when problems arise and also fulfilling regulatory requirements. The final benefit we will look at is that CI/CD is much faster than a manual deployment process. Whereas humans perform tasks on the scale of minutes, computers perform actions on the order of seconds and milliseconds. Allowing an entire deployment process from initial commit to deployment to production to be completed in minutes, depending upon the complexity of the deployment pipeline. An automated process also dramatically reduces the time and effort between idea and delivery to customers. Complex coordination efforts aren’t required to execute deployments; allowing deployments to happen more often. Creating an automated CI/CD process does require a fairly substantial upfront cost. However, the cost of adding new applications and services in an environment where deployments are automated, scales much more slowly and linearly than when compared to manual deployments. Using an automated CI/CD process allows organizations to take advantage of the scale and agility cloud platforms offer. In this section we learned about: The weaknesses with relying on manual deployments. An overview of the CI/CD process. And The key benefits of CI/CD.