Upgrade to Pro — share decks privately, control downloads, hide ads and more …

M****services on AWS ECS

M****services on AWS ECS

Presentation from AWS User Group (2015.09.24) in Warsaw by Maciej Winnicki from X-Team.

AWS User Group Poland

September 24, 2015
Tweet

More Decks by AWS User Group Poland

Other Decks in Technology

Transcript

  1. What is AWS EC2 Container Service? How does it work?

    Service discovery Configuration Deployment Scaling What is missing?
  2. … is a highly scalable, fast, container management service that

    makes it easy to run, stop, and manage Docker containers on a cluster of Amazon EC2 instances. http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html “
  3. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task
  4. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Task
  5. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Task Task
  6. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Task Task
  7. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Task Task Docker container Docker container
  8. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Task Task Docker container Docker container Task Definition {“containerDefinitions": [ { "name": "web", "image": "nginx", "cpu": 99, "memory": 100, "portMappings": [ { "containerPort": 80, "hostPort": 80 } ] } ]}
  9. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task
  10. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Service 1 Task Service 1 Task Service 1
  11. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Service 1 Task Service 1 Task Service 1 ELB
  12. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Scheduler Task Service 1 Task Service 1 Task Service 1 ELB :80 :8001 :8001 :8001
  13. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent AWS ECS Task Service 1 Task Service 1 Task Service 1 ELB Key/Value Store Cluster Management Engine Agent Communication Service API http://www.allthingsdistributed.com/2015/07/under-the-hood-of-the-amazon-ec2-container-service.html
  14. ECS Cluster AZ EC2 ECS Agent EC2 ECS Agent AZ

    EC2 ECS Agent EC2 ECS Agent
  15. ECS Cluster (c4.xlarge) AZ EC2 ECS Agent EC2 ECS Agent

    AZ EC2 ECS Agent EC2 ECS Agent Stateful cluster (non-ECS, m4.xlarge) EC2 w/ EBS EC2 w/ EBS EC2 w/ EBS MongoDB MongoDB ElasticSearch ElasticSearch
  16. ECS Cluster AZ EC2 ECS Agent Consul EC2 ECS Agent

    Consul AZ EC2 ECS Agent Consul EC2 ECS Agent Consul Stateful cluster EC2 w/ EBS EC2 w/ EBS EC2 w/ EBS MongoDB MongoDB ElasticSearch ElasticSearch Consul Consul Consul
  17. ECS Cluster AZ EC2 ECS Agent Consul (Server) EC2 ECS

    Agent Consul (Server) AZ EC2 ECS Agent Consul (Server) EC2 ECS Agent Consul Stateful cluster EC2 w/ EBS EC2 w/ EBS EC2 w/ EBS MongoDB MongoDB ElasticSearch ElasticSearch Consul Consul Consul Docker container Docker container Consul DNS
  18. ECS Cluster AZ EC2 ECS Agent Consul (Server) EC2 ECS

    Agent Consul (Server) AZ EC2 ECS Agent Consul (Server) EC2 ECS Agent Consul Stateful cluster EC2 w/ EBS EC2 w/ EBS EC2 w/ EBS MongoDB MongoDB ElasticSearch ElasticSearch Consul Consul Consul Registrator New task Consul Docker (socket) Register new task/service
  19. 20

  20. JSON file for local development Consul Key/Value for any other

    environment Dynamic feature flags stored in Consul K/V
  21. Cluster EC2 EC2 EC2 EC2 ECS Agent ECS Agent ECS

    Agent ECS Agent Task (Service 1) Task (Service 1) Task (Service 1) ELB HAProxy