SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Paul Maddox, Amazon Web Services
Ric Harvey, Ticketmaster
September 2017
Containers on AWS
AWS London Loft
@paulmaddox
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What to expect from this session
• Choices for container orchestration on AWS
• Amazon EC2 Container Service (Amazon ECS)
• Deployment
• Features
• Ops
• AWS and the Cloud Native Computing Foundation (CNCF)
• Kubernetes
• Deployment
• Features
• Ops
• Who’s using what?
• An inside view of Kubernetes on AWS by Ticketmaster
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Running containers in development is easy…
$ vi Dockerfile
$ docker build -t mykillerapp:0.0.1 .
$ docker run -it mykillerapp:0.0.1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Moving to production is harder…
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
AZ 1 AZ 2
AZ 3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Common questions
• How do I deploy my containers to hosts?
• How do I do zero downtime or blue green deployments?
• How do I keep my containers alive?
• How can my containers talk to each other?
• Linking? Service Discovery?
• How can I configure my containers at runtime?
• What about secrets?
• How do I best optimise my "pool of compute”?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Container Orchestration
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Our goal at AWS, is to be the best
place to run containers.
… whatever your choice of
orchestration engine is.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS
There is no software to:
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Load Balancing
MonitoringID & Access
NetworkingLogging
Auto Scaling
Deep integration
with the AWS platform
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security and compliance
Suitable for regulated workloads
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Key Components
Development cluster
Container instance Container instance
Container instance
Production cluster
Container instance Container instance
Container instance
Amazon EC2 Container Service
(Amazon ECS)
Container
Container
Volume
Task definition
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS: Deployment
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Creating a cluster
$ ecs-cli up --keypair my-key --capability-iam --size 3
[--verbose]
[--cluster cluster_name]
[--capability-iam |
--instance-role instance-profile-name]
[--size n]
[--azs availability_zone_1,availability_zone_2]
[--security-group security_group_id[,security_group_id[,...]]]
[--cidr ip_range]
[--port port_number]
[--subnets subnet_1,subnet_2]
[--vpc vpc_id]
[--instance-typeinstance_type]
[--image-id ami_id]
[--no-associate-public-ip-address]
[--force]
[--region region]
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deploying a service
$ cat > docker-compose.yml
version: '2'
services:
mykillerapp:
image: mykillerapp:0.0.1
cpu_shares: 100
mem_limit: 524288000
ports:
- "8080:80"
# Run it locally
$ docker-compose up
# Run it Amazon ECS
$ ecs-cli compose service up
[--role ""]
[--load-balancer-name ""]
[--container-name ""]
[--container-port ""]
[--target-group-arn ""]
# Check the status
$ ecs-cli ps
State Ports TaskDefinition
mykillerapp RUNNING. 0.0.0.0:8080->80/tcp mykillerapp:10
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS: Resource Optimisation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Binpacking Spread Affinity Distinct Instance
Placement Strategies
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Placement Constraints
Name Example
AMI ID attribute:ecs.ami-id == ami-eca289fb
Availability Zone attribute:ecs.availability-zone == us-east-1a
Instance Type attribute:ecs.instance-type == t2.small
Distinct Instances type=“distinctInstances”
Custom attribute:stack == prod
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS: Service Discovery
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Service Discovery (Load Balancers)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Service Discovery (DNS)
app1-tst  10.1.0.11
db1-tst  10.1.0.14
app2  10.1.0.16
db2  10.1.0.18
my-app  10.1.0.20
websrv1 10.1.0.1
websrv2 10.1.0.2
websrv3 10.1.0.4
app-dev1 10.1.0.9
app-dev2 10.1.0.5
app-dev3 10.1.0.8
db-dev 10.1.0.19
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS: Config / Secrets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Configuration / Secrets
•prod.app1.db-pass
•general.license-code
•prod.app2.user-name
ECS Cluster
EC2 Instance EC2 Instance
TASK A
TASK B
TASK B
EC2 System Manager –
Parameter Store
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS: Monitoring/logging
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS X-Ray: Identify performance bottlenecks
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS X-Ray: Identify performance bottlenecks
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring with CloudWatch
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring with CloudWatch
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Exporting metrics to other tooling
Prometheus:
https://github.com/slok/ecs-exporter
ElasticSearch:
http://docs.aws.amazon.com/AmazonCloudWatch/latest/log
s/CWL_ES_Stream.html
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Centralized Logging with CloudWatch Logs
{
"image": ”nginx:latest",
...
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": ”nginx",
"awslogs-region": "us-east-1"
}
}
{
• Defined within the task definition
• Available log drivers
• awslogs
• fluentd
• gelf
• journald
• json-file
• splunk
• Syslog
• Submit a pull request on ECS agent
GitHub repo if you would like others
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Centralized Logging with CloudWatch Logs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tip: Use Metric Filters with CloudWatch Logs
5
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS wrap-up
• Fully managed container orchestration
• Service discovery with load balancers or DNS
• Flexibility with ECS event stream
• Placement strategies / constraints
• Conf/secrets management with env vars + SSM Parameter
Store
• Monitoring with X-Ray, CloudWatch, or your own tooling
• Free! Just pay for the container instances (EC2)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS and the CNCF
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cloud Native Computing Foundation (CNCF)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Who’s using what?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Some great stories…
Amazon ECS Kubernetes on AWS
Kubernetes on
AWS
TheTicketmasterway
$ whoami
Contractor with a long history of AWS migrations
and linux systems. High traffic environments:
Channel 4, Ticketmaster
@ric_harvey
https://github.com/richarvey
Deployments
● Two deployment methods for kubernetes at Ticketmaster
○ Tectonic (large multi tenanted clusters)
○ KOPS (product specific clusters)
● Deployment Environments
○ Terraformed VPC’s
○ Everything tagged with a janitor process to clean up
○ Best practice such as only ELB’s in public subnets etc etc
Why Kubernetes and why KOPS?
Kubernetes
● Community
● Array of tools and features (kubectl exec for example)
● Simplified Orchestration for large amount of products
● Agile and fast deployments from product teams
KOPS
● Ability to deploy into existing VPC’s
● Cost savings with ETCD deployment (important wit lots of clusters)
● Rolling updates that just work
● Kubernetes community led project
Zero to
Kubernetes
10minuteclusterbuild
Internet
gateway
VPC NAT
gateway
Availability Zone Availability Zone Availability Zone
Public Subnet Public Subnet Public Subnet
Private Subnet Private Subnet Private Subnet
Classic Load
Balancer
VPC NAT
gateway
VPC NAT
gateway
Kubernetes
Cluster State
ASG
EBS
M
ASG
EBS
M
ASG
EBS
M
WWW
Integrating with
AWS
ClusterAddons
What to do Next
● Dashboard
● Cluster Autoscaler
● kube2IAM
● Logging to ElasticSearch Service via Fluentd
We’re Hiring
Links
● KOPS: https://github.com/kubernetes/kops
● Kube2IAM: https://github.com/jtblin/kube2iam
● Autoscaler: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
● Files for this Demo: https://github.com/richarvey/kops-contain-demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Summary
• AWS is a great choice to run your containers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you

Contenu connexe

Tendances

Dev/Test Environment Provisioning and Management on AWS
Dev/Test Environment Provisioning and Management on AWSDev/Test Environment Provisioning and Management on AWS
Dev/Test Environment Provisioning and Management on AWSShiva Narayanaswamy
 
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)Amazon Web Services
 
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & SecurityAmazon Web Services
 
DevOps on AWS: Deep Dive on Infrastructure as Code - Toronto
DevOps on AWS: Deep Dive on Infrastructure as Code - TorontoDevOps on AWS: Deep Dive on Infrastructure as Code - Toronto
DevOps on AWS: Deep Dive on Infrastructure as Code - TorontoAmazon Web Services
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceAmazon Web Services
 
Amazon Elastic Container Service (ECS)
Amazon Elastic Container Service (ECS)Amazon Elastic Container Service (ECS)
Amazon Elastic Container Service (ECS)Andrew Dixon
 
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)Amazon Web Services
 
Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교재현 신
 
Getting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSGetting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSAmazon Web Services
 
Amazon EC2 - Masterclass - Pop-up Loft Tel Aviv
Amazon EC2 - Masterclass - Pop-up Loft Tel AvivAmazon EC2 - Masterclass - Pop-up Loft Tel Aviv
Amazon EC2 - Masterclass - Pop-up Loft Tel AvivAmazon Web Services
 
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...Amazon Web Services
 
Building and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesBuilding and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesAmazon Web Services
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWSAmazon Web Services
 
Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Amazon Web Services
 

Tendances (20)

Amazon EC2:Masterclass
Amazon EC2:MasterclassAmazon EC2:Masterclass
Amazon EC2:Masterclass
 
Dev/Test Environment Provisioning and Management on AWS
Dev/Test Environment Provisioning and Management on AWSDev/Test Environment Provisioning and Management on AWS
Dev/Test Environment Provisioning and Management on AWS
 
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
 
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
 
DevOps on AWS: Deep Dive on Infrastructure as Code - Toronto
DevOps on AWS: Deep Dive on Infrastructure as Code - TorontoDevOps on AWS: Deep Dive on Infrastructure as Code - Toronto
DevOps on AWS: Deep Dive on Infrastructure as Code - Toronto
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container Service
 
AWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic ScaleAWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic Scale
 
Amazon Elastic Container Service (ECS)
Amazon Elastic Container Service (ECS)Amazon Elastic Container Service (ECS)
Amazon Elastic Container Service (ECS)
 
Aws cli
Aws cliAws cli
Aws cli
 
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
 
Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교Serverless with IAC - terraform과 cloudformation 비교
Serverless with IAC - terraform과 cloudformation 비교
 
Getting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSGetting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWS
 
Amazon EC2 - Masterclass - Pop-up Loft Tel Aviv
Amazon EC2 - Masterclass - Pop-up Loft Tel AvivAmazon EC2 - Masterclass - Pop-up Loft Tel Aviv
Amazon EC2 - Masterclass - Pop-up Loft Tel Aviv
 
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
 
Building and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized MicroservicesBuilding and Scaling Your First Containerized Microservices
Building and Scaling Your First Containerized Microservices
 
Containers State of the Union
Containers State of the UnionContainers State of the Union
Containers State of the Union
 
ECS and ECR deep dive
ECS and ECR deep diveECS and ECR deep dive
ECS and ECR deep dive
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017Getting Started with Docker on AWS - DevDay Los Angeles 2017
Getting Started with Docker on AWS - DevDay Los Angeles 2017
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 

En vedette

Centralized logging
Centralized loggingCentralized logging
Centralized loggingblessYahu
 
Amazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS LambdaAmazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS LambdaAmazon Web Services
 
AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017
AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017 AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017
AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017 Amazon Web Services
 
Agility and Control from AWS [FutureStack16]
Agility and Control from AWS [FutureStack16]Agility and Control from AWS [FutureStack16]
Agility and Control from AWS [FutureStack16]New Relic
 
Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...
Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...
Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...Amazon Web Services
 
Increasing MTBLS with New Relic [FutureStack16 NYC]
Increasing MTBLS with New Relic [FutureStack16 NYC]Increasing MTBLS with New Relic [FutureStack16 NYC]
Increasing MTBLS with New Relic [FutureStack16 NYC]New Relic
 
AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...
AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...
AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...Amazon Web Services
 
AWS Monitoring & Logging
AWS Monitoring & LoggingAWS Monitoring & Logging
AWS Monitoring & LoggingJason Poley
 
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...Amazon Web Services
 

En vedette (9)

Centralized logging
Centralized loggingCentralized logging
Centralized logging
 
Amazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS LambdaAmazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS Lambda
 
AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017
AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017 AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017
AWS Security Enabiling Fintech Pace Security AWS Summit SG 2017
 
Agility and Control from AWS [FutureStack16]
Agility and Control from AWS [FutureStack16]Agility and Control from AWS [FutureStack16]
Agility and Control from AWS [FutureStack16]
 
Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...
Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...
Voice of the Customer: Moving to a secure house in the cloud with cutting-edg...
 
Increasing MTBLS with New Relic [FutureStack16 NYC]
Increasing MTBLS with New Relic [FutureStack16 NYC]Increasing MTBLS with New Relic [FutureStack16 NYC]
Increasing MTBLS with New Relic [FutureStack16 NYC]
 
AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...
AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...
AWS re:Invent 2016: Enterprise Fundamentals: Design Your Account and VPC Arch...
 
AWS Monitoring & Logging
AWS Monitoring & LoggingAWS Monitoring & Logging
AWS Monitoring & Logging
 
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
 

Similaire à Containers on AWS: Choosing Amazon ECS or Kubernetes

Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Web Services
 
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateAmazon Web Services
 
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017Amazon Web Services
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersAmazon Web Services
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Amazon Web Services
 
CMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWSCMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWSAmazon Web Services
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveAmazon Web Services
 
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017Amazon Web Services
 
AWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECSAWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECSShimon Tolts
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupAmazon Web Services
 
Getting Started with Containers on AWS
Getting Started with Containers on AWSGetting Started with Containers on AWS
Getting Started with Containers on AWSAmazon Web Services
 
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...Amazon Web Services
 
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017Amazon Web Services
 
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017Amazon Web Services
 

Similaire à Containers on AWS: Choosing Amazon ECS or Kubernetes (20)

AWS 容器服務入門實務
AWS 容器服務入門實務AWS 容器服務入門實務
AWS 容器服務入門實務
 
Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)Amazon Amazon Elastic Container Service (Amazon ECS)
Amazon Amazon Elastic Container Service (Amazon ECS)
 
Introducing Amazon Fargate
Introducing Amazon FargateIntroducing Amazon Fargate
Introducing Amazon Fargate
 
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
 
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and FargateDeep Dive on Amazon Elastic Container Service (ECS) and Fargate
Deep Dive on Amazon Elastic Container Service (ECS) and Fargate
 
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
CON203_Driving Innovation with Containers
CON203_Driving Innovation with ContainersCON203_Driving Innovation with Containers
CON203_Driving Innovation with Containers
 
Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017Driving Innovation with Containers - CON203 - re:Invent 2017
Driving Innovation with Containers - CON203 - re:Invent 2017
 
CMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWSCMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWS
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep Dive
 
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
 
AWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECSAWS User Group 5/12 meetup - ECS
AWS User Group 5/12 meetup - ECS
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
 
Getting Started with Containers on AWS
Getting Started with Containers on AWSGetting Started with Containers on AWS
Getting Started with Containers on AWS
 
Building with Containers on AWS
Building with Containers on AWSBuilding with Containers on AWS
Building with Containers on AWS
 
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
Stack Mastery: Create and Optimize Advanced AWS CloudFormation Templates - DE...
 
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
 
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
NEW LAUNCH! Amazon EC2 Bare Metal Instances - CMP330 - re:Invent 2017
 

Plus de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Containers on AWS: Choosing Amazon ECS or Kubernetes

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Paul Maddox, Amazon Web Services Ric Harvey, Ticketmaster September 2017 Containers on AWS AWS London Loft @paulmaddox
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What to expect from this session • Choices for container orchestration on AWS • Amazon EC2 Container Service (Amazon ECS) • Deployment • Features • Ops • AWS and the Cloud Native Computing Foundation (CNCF) • Kubernetes • Deployment • Features • Ops • Who’s using what? • An inside view of Kubernetes on AWS by Ticketmaster
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Running containers in development is easy… $ vi Dockerfile $ docker build -t mykillerapp:0.0.1 . $ docker run -it mykillerapp:0.0.1
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Moving to production is harder… 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 AZ 1 AZ 2 AZ 3
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Common questions • How do I deploy my containers to hosts? • How do I do zero downtime or blue green deployments? • How do I keep my containers alive? • How can my containers talk to each other? • Linking? Service Discovery? • How can I configure my containers at runtime? • What about secrets? • How do I best optimise my "pool of compute”?
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Container Orchestration
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Our goal at AWS, is to be the best place to run containers. … whatever your choice of orchestration engine is.
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS There is no software to:
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Load Balancing MonitoringID & Access NetworkingLogging Auto Scaling Deep integration with the AWS platform
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Security and compliance Suitable for regulated workloads
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Key Components Development cluster Container instance Container instance Container instance Production cluster Container instance Container instance Container instance Amazon EC2 Container Service (Amazon ECS) Container Container Volume Task definition
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS: Deployment
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Creating a cluster $ ecs-cli up --keypair my-key --capability-iam --size 3 [--verbose] [--cluster cluster_name] [--capability-iam | --instance-role instance-profile-name] [--size n] [--azs availability_zone_1,availability_zone_2] [--security-group security_group_id[,security_group_id[,...]]] [--cidr ip_range] [--port port_number] [--subnets subnet_1,subnet_2] [--vpc vpc_id] [--instance-typeinstance_type] [--image-id ami_id] [--no-associate-public-ip-address] [--force] [--region region]
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deploying a service $ cat > docker-compose.yml version: '2' services: mykillerapp: image: mykillerapp:0.0.1 cpu_shares: 100 mem_limit: 524288000 ports: - "8080:80" # Run it locally $ docker-compose up # Run it Amazon ECS $ ecs-cli compose service up [--role ""] [--load-balancer-name ""] [--container-name ""] [--container-port ""] [--target-group-arn ""] # Check the status $ ecs-cli ps State Ports TaskDefinition mykillerapp RUNNING. 0.0.0.0:8080->80/tcp mykillerapp:10
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS: Resource Optimisation
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Binpacking Spread Affinity Distinct Instance Placement Strategies
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Placement Constraints Name Example AMI ID attribute:ecs.ami-id == ami-eca289fb Availability Zone attribute:ecs.availability-zone == us-east-1a Instance Type attribute:ecs.instance-type == t2.small Distinct Instances type=“distinctInstances” Custom attribute:stack == prod
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS: Service Discovery
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Service Discovery (Load Balancers)
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Service Discovery (DNS) app1-tst  10.1.0.11 db1-tst  10.1.0.14 app2  10.1.0.16 db2  10.1.0.18 my-app  10.1.0.20 websrv1 10.1.0.1 websrv2 10.1.0.2 websrv3 10.1.0.4 app-dev1 10.1.0.9 app-dev2 10.1.0.5 app-dev3 10.1.0.8 db-dev 10.1.0.19
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS: Config / Secrets
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Configuration / Secrets •prod.app1.db-pass •general.license-code •prod.app2.user-name ECS Cluster EC2 Instance EC2 Instance TASK A TASK B TASK B EC2 System Manager – Parameter Store
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS: Monitoring/logging
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS X-Ray: Identify performance bottlenecks
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS X-Ray: Identify performance bottlenecks
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring with CloudWatch
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring with CloudWatch
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Exporting metrics to other tooling Prometheus: https://github.com/slok/ecs-exporter ElasticSearch: http://docs.aws.amazon.com/AmazonCloudWatch/latest/log s/CWL_ES_Stream.html
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Centralized Logging with CloudWatch Logs { "image": ”nginx:latest", ... "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": ”nginx", "awslogs-region": "us-east-1" } } { • Defined within the task definition • Available log drivers • awslogs • fluentd • gelf • journald • json-file • splunk • Syslog • Submit a pull request on ECS agent GitHub repo if you would like others
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Centralized Logging with CloudWatch Logs
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Tip: Use Metric Filters with CloudWatch Logs 5
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS wrap-up • Fully managed container orchestration • Service discovery with load balancers or DNS • Flexibility with ECS event stream • Placement strategies / constraints • Conf/secrets management with env vars + SSM Parameter Store • Monitoring with X-Ray, CloudWatch, or your own tooling • Free! Just pay for the container instances (EC2)
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS and the CNCF
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cloud Native Computing Foundation (CNCF)
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Who’s using what?
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Some great stories… Amazon ECS Kubernetes on AWS
  • 42. $ whoami Contractor with a long history of AWS migrations and linux systems. High traffic environments: Channel 4, Ticketmaster @ric_harvey https://github.com/richarvey
  • 43. Deployments ● Two deployment methods for kubernetes at Ticketmaster ○ Tectonic (large multi tenanted clusters) ○ KOPS (product specific clusters) ● Deployment Environments ○ Terraformed VPC’s ○ Everything tagged with a janitor process to clean up ○ Best practice such as only ELB’s in public subnets etc etc
  • 44. Why Kubernetes and why KOPS? Kubernetes ● Community ● Array of tools and features (kubectl exec for example) ● Simplified Orchestration for large amount of products ● Agile and fast deployments from product teams KOPS ● Ability to deploy into existing VPC’s ● Cost savings with ETCD deployment (important wit lots of clusters) ● Rolling updates that just work ● Kubernetes community led project
  • 46.
  • 47. Internet gateway VPC NAT gateway Availability Zone Availability Zone Availability Zone Public Subnet Public Subnet Public Subnet Private Subnet Private Subnet Private Subnet Classic Load Balancer VPC NAT gateway VPC NAT gateway Kubernetes Cluster State ASG EBS M ASG EBS M ASG EBS M WWW
  • 49. What to do Next ● Dashboard ● Cluster Autoscaler ● kube2IAM ● Logging to ElasticSearch Service via Fluentd
  • 51. Links ● KOPS: https://github.com/kubernetes/kops ● Kube2IAM: https://github.com/jtblin/kube2iam ● Autoscaler: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler ● Files for this Demo: https://github.com/richarvey/kops-contain-demo
  • 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Summary • AWS is a great choice to run your containers
  • 53. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you