The deployment infrastructure
The following diagram shows the deployment architecture of the aws-code-pipeline
microservice application. We will create a load balancer that will face any HTTP request on port 80
, and then route requests to the healthy EC2 instance. We will create two EC2 instances and use the CodeDeploy service to deploy the application to these instances one at a time:
Figure 9.18 – A sample microservice deployment architecture
EC2 instances need to have the code deploy agent for the CodeDeploy service to communicate and deploy the application to the instance. EC2 instances also need to assume a role to connect to the S3 bucket to download the application ZIP file instructed by the CodeDeploy service.
We have developed a Terraform template to create the required infrastructure for this chapter. Complete the following steps to create the required infrastructure. We assume that you have the Terraform command line interface (CLI...