(app313) new launch: amazon ec2 container service in action | aws re:invent 2014
DESCRIPTION
Container technology, particularly Docker, is all the rage these days. At AWS, our customers have been running Linux containers at scale for several years, and we are increasingly seeing customers adopt Docker, especially as they build loosely coupled distributed applications. However, to do so they have to run their own cluster management solutions, deal with configuration management, and manage their containers and associated metadata. We believe that those capabilities should be a core building block technology, just like EC2. Today, we are announcing the preview of Amazon EC2 Container Service, a new AWS service that makes is easy to run and manage Docker-enabled distributed applications using powerful APIs that allow you to launch and stop containers, get complete cluster state information, and manage linked containers. In this session we will discuss why we built the EC2 Container Service, some of the core concepts, and walk you through how you can use the service for your applications.TRANSCRIPT
![Page 1: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/1.jpg)
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
November 13, 2014 | Las Vegas
APP313
Amazon EC2 Container Service Highly Scalable, High Performance Container Management Service
Deepak Singh (@mndoci), Amazon Web ServicesDan Gerdesmeier, Amazon Web Services
![Page 2: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/2.jpg)
Welcome
![Page 4: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/4.jpg)
![Page 5: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/5.jpg)
+
![Page 7: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/7.jpg)
Why are customers running Docker in the
cloud?
![Page 8: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/8.jpg)
Environment fidelity
![Page 9: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/9.jpg)
Easy deployments
![Page 10: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/10.jpg)
Better fleet management
![Page 11: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/11.jpg)
Distributed applications
![Page 12: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/12.jpg)
We want to make running Docker-enabled applications in the cloud awesome
Image: colinaut
![Page 14: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/14.jpg)
Cluster management
Configuration management
Scaling
SecurityAvailabilityContainer sprawl
Image: RaSeLaSeD - ll Pinguino
![Page 15: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/15.jpg)
Elastic Load Balancing
ENIs
Auto Scaling
Security Groups
IAM
Image: xmatt
Tagging
Multi-AZ
Amazon EBS
![Page 18: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/18.jpg)
What is Amazon EC2 Container Service?
Image: nolifebeforecoffee
![Page 20: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/20.jpg)
Cluster management service
![Page 21: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/21.jpg)
Manages your containers
![Page 22: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/22.jpg)
Manages cluster state
![Page 23: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/23.jpg)
Schedules containers onto your cluster
![Page 24: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/24.jpg)
Scalable
![Page 25: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/25.jpg)
High performance
![Page 26: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/26.jpg)
Secure
![Page 27: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/27.jpg)
Your containers, your instances
![Page 28: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/28.jpg)
VPC
![Page 29: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/29.jpg)
Security Groups
![Page 30: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/30.jpg)
Network ACLs
![Page 31: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/31.jpg)
Components
![Page 32: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/32.jpg)
Tasks Containers
Clusters Container Instances
![Page 33: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/33.jpg)
Task: A grouping of related containers
Nginx Web Server Rails Application
MySQL Database
Log Collector
![Page 34: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/34.jpg)
Task Definition{ “family” : “my-website”, “version” : “1.0” “containers” : [ <<CONTAINER DEFINTIONS>> ] }
![Page 35: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/35.jpg)
Container Definition
• Names and identifies your image • Includes default runtime attributes for your container
– Environment Variables – Port Mappings – Container entry point and commands – Resource constraints – Etc..
![Page 36: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/36.jpg)
Example{ “name” : “webServer”, “image” : “nginx:latest” “cpu” : 512, “memory” : 128, “portMappings” : [ { “containerPort” : 9443, “hostPort” : 443 }], “links” : [“rails”], “essential” : true }
![Page 37: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/37.jpg)
Tasks Containers
Clusters Container Instances
![Page 38: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/38.jpg)
Cluster
• Provides a pool of resources for your Tasks • A grouping of Container Instances • Starts empty, dynamically scalable
![Page 39: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/39.jpg)
Container Instance
• An instance on which Tasks are scheduled • Runs AMI with ECS Agent installed • Registers into cluster on launch
![Page 40: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/40.jpg)
Demo
![Page 41: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/41.jpg)
The following are in lieu of the demo which is available on Youtube. The demo shows a more complex use case
![Page 42: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/42.jpg)
$ aws ecs create-cluster default { "cluster_arn": "arn:aws:ecs:us-west-2:956941867282:cluster/c1a329a8-ec8a-41dc-82f6-294434861bd1", "cluster_name": "default", "status": "ACTIVE" }
![Page 43: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/43.jpg)
![Page 44: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/44.jpg)
$ aws ecs list-container-instances –c default arn:aws:ecs:us-west-2:956941867282:container-instance/01be44c0-4d45-4c1f-b2ae-1fce16c35ab6 arn:aws:ecs:us-west-2:956941867282:container-instance/1c81279b-4b39-4985-b76d-224e0385b219 arn:aws:ecs:us-west-2:956941867282:container-instance/04c11c0e-94df-4334-b55c-200cd5d08007 arn:aws:ecs:us-west-2:956941867282:container-instance/a0c6fef9-4b7a-46b2-a89f-6340fc204958 arn:aws:ecs:us-west-2:956941867282:container-instance/eb974a8-23b6-4f15-88c5-f6ee4f10cdb1
![Page 45: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/45.jpg)
$ cat wordpress.json { "containers" : [ { "image" : "tutum/wordpress-stackable", "name" : "wordpress", "cpu" : 10, "memory" : 50, "links" : ["db"], "environment" : [{ "name" : "DB_USER", "value" : "root"}, { "name" : "DB_PASS", "value" : "pass" }], "portMappings" : [{ "containerPort" : 80, "hostPort" : 80}] }, { "image" : "mysql", "name" : "db", "cpu" : 10, "memory" : 50, "environment" : [{ "name" : "MYSQL_ROOT_PASSWORD", "value" : "pass"}], } ] }
![Page 46: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/46.jpg)
$ aws register-task-definition wordpress:1.0 –-file wordpress.json { “family” : “wordpress”, “version” : “1.0”, "containers" : [ { "image" : "tutum/wordpress-stackable", "name" : "wordpress", "cpu" : 100, "memory" : 100, "links" : ["db"], "environment" : [{ "name" : "DB_USER", "value" : "root"}, { "name" : "DB_PASS", "value" : "pass" }], "portMappings" : [{ "containerPort" : 80, "hostPort" : 80}] }, { "image" : "mysql", "name" : "db", "cpu" : 100, "memory" : 100, "environment" : [{ "name" : "MYSQL_ROOT_PASSWORD", "value" : "pass"}], } ] }
![Page 47: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/47.jpg)
$ aws ecs run-task wordpress:1.0 { "tasks": [ { "task_arn": "arn:aws:ecs:us-west-2:956941867282:task/29da33da-1d71-454f-b036-df0da0284266", "task_definition_arn": "arn:aws:ecs:us-west-2:956941867282:task-definition/7fc71808-5102-47d3-9f76-0bded26a932b", "container_instance_arn": "arn:aws:ecs:us-west-2:956941867282:container-instance/01be44c0-4d45-4c1f-b2ae-1fce16c35ab6", "overrides": {}, "last_status": "PENDING", "desired_status": "RUNNING", "containers": [ { "arn": "arn:aws:ecs:us-west-2:956941867282:container/1b33848e-1933-43b5-b9c7-4581efb70504", "task_arn": "arn:aws:ecs:us-west-2:956941867282:task/29da33da-1d71-454f-b036-df0da0284266", "name": "wordpress", "last_status": "PENDING", "exit_code": 0 }, { "arn": "arn:aws:ecs:us-west-2:956941867282:container/89c0d451-75d3-41c2-9b82-84b4e3affa47", "task_arn": "arn:aws:ecs:us-west-2:956941867282:task/29da33da-1d71-454f-b036-df0da0284266", "name": "db", "last_status": "PENDING", "exit_code": 0 } ] } ] }
![Page 48: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/48.jpg)
$ aws ecs describe-container-instance { "container_instance_arn": "arn:aws:ecs:us-west-2:956941867282:container-instance/31ccf300-2b6f-4919-81d4-0b6e61aae089", "ec2_instance_id": "i-a7d37cad", "ec2_instance_type": "t2.micro", "remaining_resources": [ { "name": "CPU", "integer_value": 824 }, { "name": "MEMORY", "integer_value": 796 } ], "registered_resources": [ { "name": "CPU", "integer_value": 1024 }, { "name": "MEMORY", "integer_value": 996 } ], "status": "ACTIVE" }
![Page 49: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/49.jpg)
wordpress
![Page 50: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/50.jpg)
Coming Soon !Elastic Load Balancing integration Amazon CloudWatch integration Amazon CloudWatch Logs integration AWS CloudFormation support Support for Tagging AWS Management Console Partner AMIs (including CoreOS)
![Page 51: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/51.jpg)
Pricing
![Page 52: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/52.jpg)
Pricing
No additional charge You only pay for the AWS resources you consume
![Page 54: (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014](https://reader036.vdocuments.site/reader036/viewer/2022081519/558ecf711a28ab761c8b4648/html5/thumbnails/54.jpg)
Please give us your feedback on this presentation
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
Join the conversation on Twitter with #reinvent
APP313