4. Tools you need
● Git
● Git bash (for windows only)
● Github account (with SSH key configured)
● Virtualbox
● Vagrant
● IntelliJ Idea or Eclipse.
5. Development Setup
● Fork workshop repository and clone on local machine.
● Login to aws and download access key csv.
● Generate Github token. (refer here)
● Copy and populate workshop_config.template to your user home.
● Build vagrant image.
● Ssh into vagrant
● Upload vagrant github ssh key to your github account.
7. Example details - Asgard Portal
Provides information about Asgard and its Gods - Odin & Thor.
A microservice will be deployed for every God.
We will have fun deploying these services.
14. Service Deployment
Exercise 4 - Odin service deployment on the ECS cluster.
Exercise 5 - Thor service deployment on ECS cluster.
15. Shortcomings of CD solution till now
Deployment pipelines per service - Issue if there are many services.
Provisioning a fully functional cluster will take time as all services have to be
deployed.
Different services with different needs (CPU/Memory) will need frequent change
to cluster.
Provisioning a new environment will require a new pipeline per service.
16. Platform Thinking
Solution that is adaptive.
Cluster owns the services.
Provisioning and restoring a cluster provisions the services.
Uniform way of mapping cluster and services.
19. Cluster Scaling
ECS is responsible for container scaling
ASG responsible for instance scaling
We need a way to scale cluster as containers are scaling.
Scaling speed mismatch between EC2 and ECS.
20. Ahead of time Cluster Scaling
Ref: https://engineering.depop.com/ahead-of-time-scheduling-on-ecs-ec2-d4ef124b1d9e
21. Exercise 8 - Cluster scaling
Add auto scaling policies and alarms to scale cluster
Try out certain scenarios.
27. Cons
This design requires new ALB and clusters for running different version of the
services.
DNS might require some time to propagate change (TTL time)
Misbehaving client might still send traffic to old load balancer even after switch
is complete.
28. Final Thoughts
ECS can provide path to transition to containerization.
Think platform and service team.
Let containers scale early.
Treat everything Disposable.
Adapt On-Demand and Self-Service model.
29. References & Credits
Ahead of time cluster scaling
https://engineering.depop.com/ahead-of-time-scheduling-on-ecs-ec2-
d4ef124b1d9e
How to Automate Container Instance Draining in Amazon ECS
https://aws.amazon.com/blogs/compute/how-to-automate-container-instance-
draining-in-amazon-ecs/