This is a DevOps project based on aws
and terraform
that automates staging on demand and blue-green deployment upon change in master branch of a Github repository
CI/CD pipeline that consists of four parts:
- Source Listen to changes of given branch
- Build docker build and docker push to ECR
- Test Create a staging env and run the service
- Deploy Create production env and start blue/green deployment
- Bootstrap by configurating and maintaining these AWS cloud infrastructure (blue infra) manaully.
- Application Load Balancer listens to two target groups for blue/green infra, and use Terraform to launch and destroy auto-scaling group that attaches to each target group.
- Customize the settings of auto-scaling group, launch config in
.tf
- Create staging instance and run the service
- Destroy staging instance upon approval
- Create green infrastructure
- Reroute traffic to green when all green targets are healthy
- Import existing blue infra and destroy them
- Create new blue infrastructure
- Reroute traffic to new blue infra, and destroy green infra when all blue targets are healthy