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 helloworld 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, therefore, will share it across our environments.

In addition, we will follow the best practices learned in Chapter 3, Treating Your Infrastructure As Code, and create our pipeline through a CloudFormation stack.

Our first step will be to create an ECS cluster for production.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset