Creating a CI/CD pipeline to deploy to ECS
As we know, having the ability to continuously deploy code across our environments is a very powerful tool as it helps to break out those traditional Dev versus Ops silos and improve the velocity at which new code is being released. We created a pipeline that allows us to automatically deploy new changes from our Hello World application to our Auto Scaling Groups for staging and production. We will create a similar pipeline but, this time, it will deploy changes to ECS. Our ECS infrastructure will be as follows:
Reusing the CloudFormation templates produced in the previous section will create a production environment identical to the staging one. Note that the ecr
repository is meant to be unique for a given application, and therefore will share it across our environments. In addition, we will follow the best practices learned inChapter 3, Treating Your Infrastructure As Code, and create our pipeline through a CloudFormation stack. Our first step...