You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/well-architected-framework/docs/docs/define-and-automate-processes/deploy/zero-downtime-deployments/infrastructure.mdx
description: Implement blue/green deployment strategies for infrastructure changes to ensure zerodowntime and enable rapid rollback capabilities.
2
+
page_title: Deploy blue green infrastructure for zero-downtime
3
+
description: Learn how to implement bluegreen deployment strategies for zero-downtime infrastructure changes.
4
4
---
5
5
6
-
# Zero-downtime infrastructure deployments
6
+
# Deploy blue green infrastructure
7
7
8
-
Properly managing changes to your infrastructure, such as updating network policies or upgrading your Kubernetes cluster, is important to ensure the reliability of your upgraded application and achieve zero-downtime deployments.
8
+
Infrastructure changes like server or network policy updates can cause costly downtime if not managed correctly. Blue green deployment strategies lower this risk by maintaining two identical production environments, allowing you to test changes before switching traffic. This guide explains what blue green infrastructure is and how Terraform can help you implement it.
9
9
10
-
Blue/green deployment limits downtime and reduces risk by maintaining two identical production environments — one live, one idle. You deploy to the idle environment, test thoroughly, then switch traffic over. If problems occur, you can roll back immediately by switching traffic back.
10
+
## What is blue green infrastructure
11
11
12
-
## Blue/green infrastructure
12
+
Bluegreen deployments require two identical application infrastructure environments, a method for deploying your application to your two environments, and a way to route your traffic between them.
13
13
14
-
Blue/green deployments require two identical application infrastructure environments, a method for deploying your application to your two environments, and a way to route your traffic between them.
15
-
16
-
The following diagram shows a basic blue/green deployment. The blue environment is the infrastructure where your current application runs. The green environment is identical, except that you have upgraded it to host the new version of the application.
14
+
The following diagram shows a basic blue green deployment. The blue environment is the infrastructure where your current application runs. The green environment is identical, except that you have upgraded it to host the new version of the application.
17
15
18
16

19
17
@@ -22,7 +20,9 @@ You set up the blue and green environments as similar as possible. Infrastructur
22
20
IaC makes your operations more cost-effective by allowing you to easily build and remove resources when you do not need them. Using IaC also lets you spin up your green environment whenever you need it. Instead of letting your blue and green environments persist indefinitely or allocating time to build them, you
23
21
deploy your green infrastructure environment when you want to deploy your new software application. Once your green environment is stable, you can tear down your blue environment.
24
22
25
-
HashiCorp's Terraform is an infrastructure as code tool that can help you deploy and manage blue/green infrastructure environments. By using Terraform modules, you can consistently deploy identical infrastructure using the same code but in different environments through variables. You can also define feature toggles in your Terraform code to create a blue and green deployment environment simultaneously. You can then test your application in your new green environment, and then, when you are ready, set the toggle in your code to destroy your blue environment.
23
+
## Using Terraform for blue green deployments
24
+
25
+
HashiCorp's Terraform is an infrastructure as code tool that can help you deploy and manage blue green infrastructure environments. By using Terraform modules, you can consistently deploy identical infrastructure using the same code but in different environments through variables. You can also define feature toggles in your Terraform code to create a blue and green deployment environment simultaneously. You can then test your application in your new green environment, and then, when you are ready, set the toggle in your code to destroy your blue environment.
0 commit comments