9 Making changes

 

This chapter covers

  • Determining when to use patterns like blue-green deployments to update infrastructure
  • Establishing immutability to create environments across multiple regions with IaC
  • Determining change strategies for updating stateful infrastructure

In previous chapters, we started with helpful practices and patterns for modularizing, decoupling, testing, and deploying infrastructure changes. However, you also need to manage changes to infrastructure with infrastructure as code techniques. In this chapter, you’ll learn how to change IaC with strategies that apply immutability to minimize the impact of potential failure.

Let’s return to Datacenter for Veggies and its struggles to modularize IaC from chapter 5. The company acquires Datacenter for Carnivorous Plants as a subsidiary. Its carnivorous plants, like Venus flytraps, require particular growing conditions.

As a result, Datacenter for Carnivorous Plants needs global networking and network-optimized servers and components. Most teams configure their IaC but realize that their code can’t handle such a widespread change. They ask you, a Datacenter for Veggies engineer with some experience in IaC, to help them.

9.1 Pre-change practices

9.1.1 Following a checklist

9.1.2 Adding reliability

9.2 Blue-green deployment

9.2.1 Deploying the green infrastructure

9.2.2 Deploying high-level dependencies to the green infrastructure

9.2.3 Using a canary deployment to the green infrastructure

9.2.4 Performing regression testing

9.2.5 Deleting the blue infrastructure

9.2.6 Additional considerations