15 Automating deployment: CodeDeploy, CloudFormation, and Packer

 

About 20 years ago, we rented our first virtual machine. Our goal was to deploy WordPress, a content management system. To do so, we logged in to the machine using SSH, downloaded WordPress, installed the scripting language PHP and the web server Apache, edited the configuration files, and started the web server.

To this day, the following steps for deploying software—whether open source, proprietary, or homegrown—have remained the same:

  1. Fetch source code or binaries
  2. Install dependencies
  3. Edit configuration files
  4. Start services

These activities are also summarized under the term configuration management. The two main reasons for why automating deployments is a must-have in the cloud follow:

  • To ensure high availability and scalability, you need to configure an Auto Scaling group to launch EC2 instances automatically. A new machine could spin up at any time, so deploying changes manually is not an option.
  • Manual changes are error prone and expensive to reproduce. Automating increases reliability and reduces the costs per deployment.

From what we have learned from our consulting clients, organizations that implement automated deployments have a higher chance of success in the cloud.

15.1 In-place deployment with AWS CodeDeploy

 
 

15.2 Rolling update with AWS CloudFormation and user data

 
 
 
 

15.3 Deploying customized AMIs created by Packer

 
 

15.3.1 Tips and tricks for Packer and CloudFormation

 
 

15.4 Comparing approaches

 
 

Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest