Skip to content

Flupinochan/ECS-BlueGreenDeployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

★Caution

It costs quite a bit of money, so please remove it as soon as you are done verifying it!

  1. Create an IAM Role to create the stack in CloudFormation
    If you put an AdministratorAccess policy on it, there is no problem
  2. Create a CloudFormation Stack named VPC-Stack from 1VPC-CloudFormation.yml
  3. Create a CloudFormation Stack named SG-Stack from 2SG-CloudFormation.yml
  4. Create a CloudFormation Stack named RDS-Stack from 3RDS-CloudFormation.yml
  5. Create a CloudFormation Stack named EFS-Stack from 4EFS-CloudFormation.yml
  6. Upload wordpress contents to EFS
    ※Please refer to the UploadWordpressToEFS.txt manual
  7. Create a CloudFormation Stack named ECR-CodeCommitBuild-Stack from 5ECR-CodeCommitBuild-CloudFormation.yml
  8. Upload code to CodeCommit
    ※Please refer to the UploadCodeToCodeCommit.txt manual
  9. Create a ECS Images
    ※In the AWS Management Console (CodeBuild), select the wordpress-codebuild project and run build to create the ECS image
  10. Create a CloudFormation Stack named ALB-Stack from 6ALB-CloudFormation.yml
  11. Create a CloudFormation Stack named ECS-Stack from 7ECS-CloudFormation.yml
    ★Caution
    Initial ECS Cluster creation always fails
    Delete the CloudFormation Stack named ECS-Stack and re-create it
  12. After building the ECS, you will be able to access wordpress. Try accessing the ALB DNS name
  13. Create a CloudFormation Stack named CodePipeline-Stack from 8CodePipeline-CloudFormation.yml
    Blue/Green Deployment is executed
    Look at CodePipeline, number of ECS tasks, target groups, ECS Exec, etc
  14. Delete the CloudFormation Stacks in the reverse order in which they were created
    ★Caution
    Deleting ECS-Stack will always fail
    ECS Cluster should be ignored and ECS-Stack should be deleted with the retain attribute
    After removing ALB-Stack, please manually remove ECS Cluster
    The reason is that there are container instances in ECS Cluster
    and ECS Cluster cannot be deleted until after ALB-Stack is deleted
    Flowchart

About

Everything is built with CloudFormation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published