Skip to content

taraspos/ecs-cloudformation-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archesaurus demo

Steps

  1. Provision

    1. Create the templates/parent.config.yml, by making copy of parent.example.config.yml and setting the existing VpcID, SubnetId (at least two subntes) awless list subnets

    2. Create "users" stack, which will create AWS user and credentials for Travis CI

       make users
      
    3. Create "parent" stack, which will create ALB, ECS Cluster and ASG, etc

       make parent
      
    4. Build Docker image and create "app" stack, which will create ECS Service, Target Group, ALB Listener, etc

       make archersaurus
      
    5. Set the rollback trigger for "app" stack (this command is not aviliable in the latest (0.1.9) awless yet and require custom build from my fork)

       make set_rollback_trigger
      
    6. Deploy ecs-drain-lambda for instance drain automation

  2. ECS AMI Update process

    1. Get lastet ECS AMI Id. Example

    2. Update the AMI IDs map in the templates/parent.yml

    3. Update parent stack

       make parent_update
      
    4. Watch the ECS instance being drained in the UI on the ECS page and in the CloudWatch logs of deployed ecs-drain-lambda

  3. Deploying the app with TravisCI

    1. Fork this repository and configure TravisCI build

    2. Get the name of created ECR repository

       make repos
      

      and copy ECR repo url from output

    3. Get AWS User credentials from create "users" stack

       make show_users_stack
      

      and copy the credentials from output

    4. Configure Travis CI, by setting secret env variables for the project

      • AWS_REGION

      • AWS_ACCESS_KEY_ID

      • AWS_SECRET_ACCESS_KEY

      • ECR_REPO

    5. Push some changes and see that Travis Picked up the build, see the build progress

  4. Verifying rollback logic

    1. In the templates/archersaurus.yml uncomment the # Command: ["crash"] line and push changes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published