Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Patrick Shumate, Solutions Architect, AWS
July 26, 2017
Getting Started with Docker on AWS
Agenda
Why containers?
Amazon ECS
Benefits
Running services
Demo
Why containers?
Agility
What are containers?
OS virtualization
Process isolation
Images
AutomationServer
Guest OS
Bins/Libs Bins/Libs
App2App1
Container advantages
Portable
Flexible
Fast
Efficient
Server
Guest OS
Bins/Libs Bins/Libs
App2App1
Monolithic vs. microservices
webserver
.package
Order UI
Order Service
Inventory
Service
Shipping
Service
Order UI
Inventory
Service
Order
Service
Shipping
Service
Containers are natural for microservices
Simple to model
Any app, any language
Image is the version
Test and deploy same artifact
Stateless servers decrease change risk
Server
Guest OS
Bins/Libs Bins/Libs
App2App1
Going from this…
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
.. to this—is hard!
Amazon ECS
Amazon EC2 Container Service (ECS) is a highly
scalable, high performance container management
service that supports Docker containers and allows you
to easily run applications on a managed cluster of
Amazon EC2 instances.
Amazon ECS
AMAZON EC2 INSTANCES
LOAD
BALANCER
Internet
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
LOAD
BALANCER
Amazon ECS—cluster
LOAD
BALANCER
Internet
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
LOAD
BALANCER
AMAZON EC2 INSTANCES
Amazon ECS—task
LOAD
BALANCER
Internet
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
LOAD
BALANCER
AMAZON EC2 INSTANCES
Amazon ECS—service
LOAD
BALANCER
Internet
ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
LOAD
BALANCER
AMAZON EC2 INSTANCES
Amazon ECS—scheduling
Amazon ECS—scheduling
Amazon ECS—scheduling
Amazon ECS—scheduling
Benefits
Amazon ECS benefits
• Fully managed elastic service—you don’t need
to run anything, and the service scales as your
microservices architecture grows
• Shared state optimistic scheduling
• Deep integration with other AWS services
• Application Load Balancing
• Amazon Elastic Block Store
• Amazon Virtual Private Cloud
• Amazon CloudWatch
• AWS Identity and Access Management
• AWS CloudTrail
Routing via Application Load Balancer
Path-based routing
Allows you to define rules that route traffic to different target groups based on the path of a URL.
e.g. example.com/test , example.com/test/test1
Dynamic Port Mapping
Provides the ability to load-balance across multiple ports on the same Amazon EC2 instance. This functionality
specifically targets the use of containers and is integrated into Amazon ECS.
HTTP/2
WebSockets
Detailed Logging
Deploying containers on ECS—choose a scheduler
Batch Jobs
ECS task scheduler
Run tasks once
Batch jobs
RunTask (random)
StartTask (placed)
Long-Running Apps
ECS service scheduler
Health management
Scale-up and scale-down
AZ aware
Grouped containers
Running services
Create a cluster
$ aws ecs create-cluster --cluster-name "my_cluster"
Register a task definition
$ aws ecs register-task-definition --cli-input-json
file://task-defintion.json
Task definition
{
"taskDefinition": {
"status": "INACTIVE",
"family": "curler",
"volumes": [],
"taskDefinitionArn": "arn:aws:ecs:us-west-2:<aws_account_id>:task-definition/curler:1",
"containerDefinitions": [
{
"environment": [],
"name": "curler",
"mountPoints": [],
"image": "curl:latest",
"cpu": 100,
"portMappings": [],
"entryPoint": [],
"memory": 256,
"command": [
"curl -v http://example.com/"
],
"essential": true,
"volumesFrom": []
}
],
"revision": 1
}
}
Create a service
$ aws ecs create-service --service-name ecs-simple-
service --task-definition ecs-demo --desired-count 10
Demo
Thank you!

More Related Content

SRV201 Getting Started with Docker on AWS