Skip to content

Deploy an ECS application with Blue/Green deployment, using Terraform, CodePipeline, CodeBild, CodeCommit, and CodeDeploy

Notifications You must be signed in to change notification settings

Emmy-github-webdev/terraform-blue-green-ecs-fargate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Blue Green ECS Fargate

Deploy an ECS application with Blue/Green deployment, using Terraform, CodePipeline, CodeBild, CodeCommit, and CodeDeploy

Steps

  1. Create a codecommit repo
  2. Create a Elastic Container Registry and use the Dockerfile given at repo to create an image and push in to the registry.This image will be used to initially deploy our ECS service
  3. Create a file named buildspec.yml in our codecommit repo with the content
  4. Create a file named appspec.yml in our codecommit repo with the content
  5. Execute the terraform code to create the infrastructure
  6. Go to ECS console and copy the task definition json and place it in the codecommit repo as taskdef.json. Make sure to change

` “image”: “808658323399.dkr.ecr.us-east-1.amazonaws.com/springbootapp”

to

“image”: <IMAGE1_NAME> `

  • Start Codepipeline by pushin updated code to codecommit

CodePipeline started runing

  • CodeDeploy started shifting traffic

CodePipeline started runing

  • CodePipeline completed CodePipeline completed

  • Traffic successfully shifted to Blue target group

CodePipeline started runing

About

Deploy an ECS application with Blue/Green deployment, using Terraform, CodePipeline, CodeBild, CodeCommit, and CodeDeploy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published