{"id":1930,"date":"2020-10-30T10:53:58","date_gmt":"2020-10-30T09:53:58","guid":{"rendered":"https:\/\/blog.besharp.it\/?p=1930"},"modified":"2021-05-10T15:48:31","modified_gmt":"2021-05-10T13:48:31","slug":"how-to-setup-a-continuous-deployment-pipeline-on-aws-for-ecs-blue-green-deployments","status":"publish","type":"post","link":"https:\/\/blog.besharp.it\/how-to-setup-a-continuous-deployment-pipeline-on-aws-for-ecs-blue-green-deployments\/","title":{"rendered":"How to setup a Continuous Deployment Pipeline on AWS for ECS Blue\/Green Deployments."},"content":{"rendered":"\n

Continuous Deployment is nowadays a well-known strategy for releasing software where any commit that passes the automated testing phase is automatically released into the production deployment.<\/span><\/p>\n\n\n\n

With Continuous Deployment, companies can eliminate DIY for Continuous Delivery and increase the focus on the product, make deployments frictionless without compromising security, and creating a flawless workflow across development, testing, and production environments.<\/p>\n\n\n\n

In our <\/span>last article<\/a>,<\/span> we talked about Microservices, their benefits, and how to set up a Blue\/Green Deployment on AWS for an ECS Service. <\/span><\/p>\n\n\n\n

Blue\/Green Deployment is a technique where both the old infrastructure (blue) and the new temporary infrastructure (green) co-exist. Once a new version is installed, it is possible to carry out integration\/validation tests on the green infrastructure before promoting it to production. If so, the traffic switch can be done with virtually no downtime. \n<\/p>\n\n\n\n

This time we want to take another step forward from our last article and, as promised, show how to make the process automatic, by defining a pipeline for Continuous Deployment to manage the entire release flow.<\/span>\n\nIn short, from a simple <\/span>git push,<\/span><\/i> we want to release the new software package in Blue\/Green mode through an ECS service.<\/span><\/p>\n\n\n\n

In the end, we\u2019ll also propose to you two bonus sections: how to automate testing on green environments and how it is possible to skip some initial infrastructure\u2019s boilerplate creation thanks to AWS CloudFormation.<\/span><\/p>\n\n\n\n

Are you ready? Let\u2019s dig in!<\/p>\n\n\n\n

Requirements<\/h1>\n\n\n\n

Before start preparing your pipeline some steps must be done in order to have everything in place, ready to be configured to your needs:\n<\/p>\n\n\n\n