9 Zero-downtime deployments

This chapter covers

  • Customizing resource lifecycles with the create_before_destroy flag
  • Performing Blue/Green deployments with Terraform
  • Combining Terraform with Ansible
  • Generating SSH key pairs with the TLS provider
  • Installing software on VMs with remote-exec provisioners

Traditionally, there has been a window of time during software deployments when servers are incapable of serving production traffic. This window is typically scheduled for early morning off-hours to minimize downtime, but it still impacts availability. Zero-downtime deployment (ZDD) is the practice of keeping services always running and available to customers, even during software updates. If a ZDD is executed well, users should not be aware ...

Get Terraform in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.