2or3 / ecs-blue-green-demo

This repository provides AWS CloudFormation templates for AWS ECS with Blue/Green Deployment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ecs-blue-green-demo

This repository provides AWS CloudFormation templates for AWS ECS with Blue/Green Deployment.

Set up environment and deploy application

The Makefile is provided, so, you can set up the environment by executing the make command.
See the Makefile for command details.

Create VPC, Subnet, Network...

$ make deploy-vpc-subnet profile=$(profile)
$ make deploy-nat-instance profile=$(profile)
$ make deploy-network profile=$(profile)
$ make deploy-security-group profile=$(profile)
$ make deploy-load-balancer profile=$(profile)

Create ECR repository and push docker images

$ make deploy-ecs-ecr profile=$(profile)
$ make push-docker-images profile=$(profile) 

Create ECS cluster and service

$ make deploy-ecs-cluster profile=$(profile)
$ make deploy-ecs-service profile=$(profile)

Register GitHub private access token into Secrets Manager

$ make deploy-secrets-github profile=$(profile) access-token=$(access-token)

Create CodeDeploy application and deploy group

$ make deploy-code-deploy profile=$(profile)

Create CodePipeline

$ make deploy-code-pipeline profile=$(profile)

Screenshots

code-pipeline

code-deploy-blue-green

Confirm the application is running

$ curl -L -X GET -I 'http://${Load Balancer DNS}' # e.g http://ecs-blue-green-demo-app-xxxxxxxxx.{region}.elb.amazonaws.com
HTTP/1.1 200 OK
Date: Thu, 11 Feb 2021 13:45:13 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: nginx
X-Powered-By: PHP/7.4.15

About

This repository provides AWS CloudFormation templates for AWS ECS with Blue/Green Deployment.

License:MIT License


Languages

Language:Makefile 88.0%Language:Dockerfile 11.7%Language:PHP 0.4%