SlideShare une entreprise Scribd logo
1  sur  54
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
October 25th, 2016
Amazon EC2 Container
Service Deep Dive
Peter Dalbhanjan, Solutions Architect
Agenda
• ECS Infrastructure Setup
• ECS Infrastructure Management
• PaaS on ECS
• Q & A
Amazon ECS Benefits
• Easily Manage Clusters for any scale
• Flexible Container Placement
• Designed for use with other AWS Services
• Extensible
Amazon ECS Infrastructure
Setup
Amazon ECS Infrastructure Setup
• Amazon ECS Cluster
• AWS CloudFormation
• Amazon ECS CLI
• AWS OpsWorks
• Amazon ECR
ECS Cluster Setup with AWS CloudFormation
"Resources" : {
"ECSCluster": {
"Type": "AWS::ECS::Cluster"
},
"ECSAutoScalingGroup" : {
"Type" : "AWS::AutoScaling::AutoScalingGroup",
"Properties" : {
"VPCZoneIdentifier" : { "Ref" : "SubnetID" },
"LaunchConfigurationName" : { "Ref" : "ContainerInstances" },
"MinSize" : "1",
"MaxSize" : { "Ref" : "MaxSize" },
"DesiredCapacity" : { "Ref" : "DesiredCapacity" }
},
[…]
},
Autoscaling
Group
ECS
Cluster
"ContainerInstances": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Metadata" : {
"AWS::CloudFormation::Init" : {
"config" : {
"commands" : {
"01_add_instance_to_cluster" : {
"command" : { "Fn::Join": [ "", [ "#!/bin/bashn", "echo
ECS_CLUSTER=", { "Ref": "ECSCluster" }, " >> /etc/ecs/ecs.config" ] ] }
}
},
[…]
}
}
}
ECS Cluster Setup with AWS CloudFormation
Launch
Configuration
"taskdefinition": {
"Type": "AWS::ECS::TaskDefinition",
"Properties" : {
"ContainerDefinitions" : [
{ "Name": "simple-app",
"Cpu": "10",
"Essential": "true",
"Image":"httpd:2.4",
"Memory":"300",
"MountPoints": [{
"ContainerPath":
"/usr/local/apache2/htdocs",
"SourceVolume": "my-vol”
}],
"PortMappings": [
{ "HostPort": 80, "ContainerPort": 80 }
]
},
ECS Cluster Setup with AWS CloudFormation
{
"Name": "busybox",
"Cpu": 10,
"Command": [
"/bin/sh -c " while true; do echo '<html>
<head> <title>Amazon ECS Sample App</title>
<style>..... >
/usr/local/apache2/htdocs/index.html ; sleep 1;
done"”
],
"EntryPoint": [ "sh", "-c"],
"Essential": false,
"Image": "busybox",
"Memory": 200,
"VolumesFrom": [
{
"SourceContainer": "simple-app"
} ] } ],
ECS Cluster Setup with Amazon ECS CLI
• Simplifies creating,
updating, and monitoring
clusters and tasks
• Supports Docker
Compose
• Available on github
https://github.com/aws/a
mazon-ecs-cli
ECS Cluster Setup with Amazon ECS CLI
# Build cluster and container instances
$ ecs-cli scale --size 2 --capability-iam --keypair demo-user
# Create task definition and start tasks
$ ecs-cli compose up
# See running tasks
$ ecs-cli compose ps
# Start tasks as ECS service
$ ecs-cli compose --project-name wordpress-test service start
# See the progress of task state
$ ecs-cli compose --project-name wordpress-test service ps
ECS Cluster Setup with AWS OpsWorks
• Update OpsWorks IAM role to
allow ecs:* actions
• Add instances to layer (24/7,
time-based, load-based)
• Manage security updates,
user permission and access
Note:
• One ECS Cluster layer per
stack
• An ECS Cluster can only be
associated with one stack
Amazon ECR Setup
Amazon ECR Setup
• You have read and write access to the repositories you
create in your default registry, i.e.
<aws_account_id>.dkr.ecr.us-east-1.amazonaws.com
• Repository names can support namespaces, e.g. team-
a/web-app.
• Repositories can be controlled with both IAM user
access policies and repository policies.
Amazon ECR Setup
# Authenticate Docker to your Amazon ECR registry
> aws ecr get-login
> docker login -u AWS -p <password> -e none https://<aws_account_id>.dkr.ecr.us-
east-1.amazonaws.com
> docker login -u AWS -p <password> -e none https://<aws_account_id>.dkr.ecr.us-
east-1.amazonaws.com
# Create a repository called ecr-demo
> aws ecr create-repository --repository-name ecr-demo
# Push an image to your repository
> docker push <aws_account_id>.dkr.ecr.us-east-1.amazonaws.com/ecr-demo:v1
Amazon ECR Docker Credential Helper
• Available today - https://github.com/awslabs/amazon-
ecr-credential-helper
• Place the docker-credential-ecr-login binary on
your PATH
• Set the contents of ~/.docker/config.json file to be:
{ "credsStore": "ecr-login" }
• Push and pull images from ECR without docker login
Amazon ECS Infrastructure
Management
Amazon ECS Infrastructure Management
• Monitoring and Logging
• Automatic Scaling
• Service Discovery
• Security
Monitoring & Logging
Monitoring with Amazon CloudWatch
• Metric data sent to CloudWatch in 1-minute periods and
recorded for a period of two weeks
• Available metrics: CPUReservation, MemoryReservation,
CPUUtilization, MemoryUtilization
• Available dimensions: ClusterName, ServiceName
Monitoring with Amazon CloudWatch
Monitoring with Amazon CloudWatch
Monitoring with Amazon CloudWatch
Use the Amazon CloudWatch Monitoring Scripts to monitor
additional metrics, e.g. disk space:
# Edit crontab
> crontab -e
# Add command to report disk space utilization to CloudWatch every five minutes
*/5 * * * * <path_to>/mon-put-instance-data.pl --disk-space-util --disk-space-used --
disk-space-avail --disk-path=/ --from-cron
CloudWatch Logs with awslogs driver
Amazon CloudWatch Logs
Amazon CloudWatch Logs
Amazon CloudWatch Logs
Amazon CloudWatch Logs
Amazon S3
Amazon Kinesis
AWS Lambda
Amazon Elasticsearch Service
Amazon ECS Store
Stream
Process
Search
CloudWatch Logs driver
Configuring Logging in Task Definition
"containerDefinitions": [ {
"memory": 300,
"portMappings": [ {
"hostPort": 80,
"containerPort": 80 } ],
"entryPoint": [ "sh", "-c" ],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "awslogs-test",
"awslogs-region": "us-west-2",
"awslogs-stream-prefix": "nginx" }
},
"name": "simple-app",
"image": "httpd:2.4",
"command": [ "/bin/sh -c "echo 'Congratulations! Your application is now running on a container in
Amazon ECS.' > /usr/local/apache2/htdocs/index.html && httpd-foreground"" ], "cpu": 10 } ],
"family": "cw-logs-example"
}
Monitoring Amazon ECS with Datadog
Monitoring Amazon ECS with Sysdig Cloud
Scaling Amazon ECS
Setup ECS Cluster with AutoScaling
Create LaunchConfiguration
• Pick instance type depending
on resource requirements, e.g.
memory or CPU
• Use latest Amazon Linux ECS-
optimized AMI, other distros
available
Create AutoScaling group and set
to cluster initial size
AutoScaling your Amazon ECS Cluster
• Create CloudWatch alarm
on a metric, e.g.
MemoryReservation
• Configure scaling policies
to increase and decrease
the size of your cluster
AutoScaling your Amazon ECS services
AutoScaling your Amazon ECS services
Service Discovery
Service Discovery using ELB
• Automation built using
CloudWatch Events,
Lambda and Route53
private hosted zones
• Route53 is used as
service registry
• Lambda is used to
add/remove records based
on Service API’s from ECS
• Available on github
https://github.com/awslabs
/ecs-refarch-service-
discovery
Service Discovery using ELB
Service Discovery using DNS
• Install an agent
(ecssd_agent.go) on
container instances
• The agent registers service
name, IP and port into
Route53 private hosted
zone
• lambda_health_check.py
used for cleanup
• Available on github
https://github.com/awslabs/
service-discovery-ecs-dns
Service Discovery using DNS
Service Discovery with Weaveworks
• DNS interface for cross-host
container communication
• Gossip protocol to share grouped
updates
• Overlay network between hosts
Service Discovery and Configuration
Management with Consul
ECSCluster
consul-server
ECS Instance
consul-agent
registrator
ECS Instance
Back end 1
Back end 2
consul-agent
registrator
ECS Instance
Front end
ECSCluster
Security
IAM Roles for ECS Tasks
{
"family": “signup-app",
"taskRoleArn":
"arn:aws:iam::123456789012:role/DynamoDB
RoleForTask",
"volumes": [],
"containerDefinitions": [{
"environment": [ ... ],
"name": “signup-web",
"mountPoints": [],
"image": “amazon/signup-web",
"cpu": 25,
"portMappings": [ ... ],
"entryPoint": [ ... ],
"memory": 100,
"essential": true,
"volumesFrom": []
}
]}
Logging Amazon ECS API with AWS CloudTrail
{
"eventVersion": "1.03",
"userIdentity": {…},
"eventTime": "2015-10-12T13:57:33Z",
"eventSource": "ecs.amazonaws.com",
"eventName": "CreateCluster",
"awsRegion": "eu-west-1",
"sourceIPAddress": "54.240.197.227",
"userAgent": "console.amazonaws.com",
"requestParameters": {
"clusterName": "ecs-cli"
},
Create Cluster
event
Logging Amazon ECS API with AWS CloudTrail
"responseElements": {
"cluster": {
"clusterArn": "arn:aws:ecs:eu-west-
1:560846014933:cluster/ecs-cli",
"pendingTasksCount": 0,
"registeredContainerInstancesCount": 0,
"status": "ACTIVE",
"runningTasksCount": 0,
"clusterName": "ecs-cli",
"activeServicesCount": 0
}
},
[…]
Create Cluster
event
Image Vulnerability Scanning with Twistlock
Secrets Management
• Option 1: Task Definition Environment Variables
• Easy to get Started
• Configuration stored Directly into Task Definition
• Version in Immutable Definition; Easy Rollback
• Not Great for Secrets
• Option 2: Encrypted DynamoDB or S3
• Use Environment Variables to Provide Pointer
• Use AWS Encryption Clients to Securely Store
• Use VPC-Endpoints, IAM Policies, and IAM Roles to Restrict
Access
Secrets Management
Task
ECS Cluster
Container instance
PaaS on ECS
AWS Elastic Beanstalk
• Elastic Beanstalk uses Amazon ECS to coordinate deployments to
multi-container Docker environments
• Dockerrun.aws.json file that describes how to deploy containers.
• Takes care of tasks including cluster creation, task definition and
execution
Convox
Convox
# Initialize your app and create default manifest
> convox init
# Locally build and run your app as declared in the manifest
> convox start
# Create app
> convox apps create my_app
# Deploy app, output ELB DNS name
> convox deploy
[...]
web: http://my_app-1234567890.us-east-1.elb.amazonaws.com
Remind Empire
• Offers a control layer on top of Amazon ECS that provides a Heroku
like workflow
• Any tagged Docker image can be deployed to Empire as an app
• When you deploy a Docker image to Empire, it will extract a Procfile
from the WORKDIR
• Each process type in the Procfile maps directly to an ECS Service
Remind Empire
• Get started by launching CloudFormation stack
• Use the emp client to start developing your app
# tell empire client where it can find the API
$ export EMPIRE_API_URL=http://empire-60-LoadBala-…elb.amazonaws.com/
# login to empire using your github credentials
$ emp login
# run your first app
$ emp deploy remind101/acme-inc:master
# check what’s running
$ emp apps
acme-inc Jun 15 20:42[...]
Additional Resources
• ECS CLI – http://bit.ly/2eKy3I6
• ECR Docker Credential Helper – http://bit.ly/2dD02xo
• AutoScaling – http://amzn.to/2eohA2a
• ECS integration with ALB to support Dynamic ports and
Path-based routing: http://amzn.to/2exhh07
• Service Discovery
• Service Discovery using ELB – http://bit.ly/2dAN6Dw
• Service Discovery using DNS – http://bit.ly/2eI831D
Thank you!
Peter Dalbhanjan
dalbhanj@amazon.com

Contenu connexe

Tendances

Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and SchedulingAmazon Web Services
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesAmazon Web Services
 
Advanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECSAdvanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECSJulien SIMON
 
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWSAWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWSAmazon 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
 
Running Docker clusters on AWS (November 2016)
Running Docker clusters on AWS (November 2016)Running Docker clusters on AWS (November 2016)
Running Docker clusters on AWS (November 2016)Julien SIMON
 
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
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSAmazon Web Services
 
An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
An introduction to AWS CloudFormation - Pop-up Loft Tel AvivAn introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
An introduction to AWS CloudFormation - Pop-up Loft Tel AvivAmazon Web Services
 
(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the HoodAmazon Web Services
 
AWS March 2016 Webinar Series - Amazon EC2 Masterclass
AWS March 2016 Webinar Series - Amazon EC2 MasterclassAWS March 2016 Webinar Series - Amazon EC2 Masterclass
AWS March 2016 Webinar Series - Amazon EC2 MasterclassAmazon Web Services
 
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...Amazon Web Services
 
Building Open Source Platforms on AWS (April 2017)
Building Open Source Platforms on AWS (April 2017)Building Open Source Platforms on AWS (April 2017)
Building Open Source Platforms on AWS (April 2017)Julien SIMON
 
AWS CloudFormation Best Practices
AWS CloudFormation Best PracticesAWS CloudFormation Best Practices
AWS CloudFormation Best PracticesAmazon Web Services
 
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel AvivEC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel AvivAmazon Web Services
 

Tendances (20)

Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and Scheduling
 
Amazon EC2:Masterclass
Amazon EC2:MasterclassAmazon EC2:Masterclass
Amazon EC2:Masterclass
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar Series
 
Development Workflows on AWS
Development Workflows on AWSDevelopment Workflows on AWS
Development Workflows on AWS
 
Advanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECSAdvanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECS
 
Intro to Amazon ECS
Intro to Amazon ECSIntro to Amazon ECS
Intro to Amazon ECS
 
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWSAWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
 
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
 
Running Docker clusters on AWS (November 2016)
Running Docker clusters on AWS (November 2016)Running Docker clusters on AWS (November 2016)
Running Docker clusters on AWS (November 2016)
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
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
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
An introduction to AWS CloudFormation - Pop-up Loft Tel AvivAn introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
An introduction to AWS CloudFormation - Pop-up Loft Tel Aviv
 
(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood
 
AWS March 2016 Webinar Series - Amazon EC2 Masterclass
AWS March 2016 Webinar Series - Amazon EC2 MasterclassAWS March 2016 Webinar Series - Amazon EC2 Masterclass
AWS March 2016 Webinar Series - Amazon EC2 Masterclass
 
AWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic ScaleAWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic Scale
 
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
Managing Your Infrastructure as Code by Travis Williams, Solutions Architect,...
 
Building Open Source Platforms on AWS (April 2017)
Building Open Source Platforms on AWS (April 2017)Building Open Source Platforms on AWS (April 2017)
Building Open Source Platforms on AWS (April 2017)
 
AWS CloudFormation Best Practices
AWS CloudFormation Best PracticesAWS CloudFormation Best Practices
AWS CloudFormation Best Practices
 
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel AvivEC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
EC2 Container Service - Distributed Applications at Scale - Pop-up Loft Tel Aviv
 

Similaire à Amazon ECS Deep Dive

AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNNguyen Anh Tu
 
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014Amazon Web Services
 
無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門 無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門 Amazon Web Services
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDanilo Poccia
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks
 
Deep Dive - Infrastructure as Code
Deep Dive - Infrastructure as CodeDeep Dive - Infrastructure as Code
Deep Dive - Infrastructure as CodeAmazon Web Services
 
Getting Started with Serverless and Container Architectures
Getting Started with Serverless and Container ArchitecturesGetting Started with Serverless and Container Architectures
Getting Started with Serverless and Container ArchitecturesAmazon Web Services
 
Scalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSScalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSFernando Rodriguez
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeAmazon Web Services
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursAmazon Web Services
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeAmazon Web Services
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivAmazon Web Services
 
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016Amazon Web Services Korea
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeAmazon Web Services
 
2013 05-fite-club-working-models-cloud-growing-up
2013 05-fite-club-working-models-cloud-growing-up2013 05-fite-club-working-models-cloud-growing-up
2013 05-fite-club-working-models-cloud-growing-upAlex Heneveld
 
2013 05-openstack-israel-heat
2013 05-openstack-israel-heat2013 05-openstack-israel-heat
2013 05-openstack-israel-heatAlex Heneveld
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsManish Pandit
 
Tech connect aws
Tech connect  awsTech connect  aws
Tech connect awsBlake Diers
 
Getting started with Amazon ECS
Getting started with Amazon ECSGetting started with Amazon ECS
Getting started with Amazon ECSIoannis Polyzos
 

Similaire à Amazon ECS Deep Dive (20)

AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHN
 
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
 
無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門 無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
 
Deep Dive - Infrastructure as Code
Deep Dive - Infrastructure as CodeDeep Dive - Infrastructure as Code
Deep Dive - Infrastructure as Code
 
Getting Started with Serverless and Container Architectures
Getting Started with Serverless and Container ArchitecturesGetting Started with Serverless and Container Architectures
Getting Started with Serverless and Container Architectures
 
Scalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSScalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWS
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
 
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
 
Deep Dive: Infrastructure as Code
Deep Dive: Infrastructure as CodeDeep Dive: Infrastructure as Code
Deep Dive: Infrastructure as Code
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
2013 05-fite-club-working-models-cloud-growing-up
2013 05-fite-club-working-models-cloud-growing-up2013 05-fite-club-working-models-cloud-growing-up
2013 05-fite-club-working-models-cloud-growing-up
 
2013 05-openstack-israel-heat
2013 05-openstack-israel-heat2013 05-openstack-israel-heat
2013 05-openstack-israel-heat
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and Jenkins
 
Tech connect aws
Tech connect  awsTech connect  aws
Tech connect aws
 
Getting started with Amazon ECS
Getting started with Amazon ECSGetting started with Amazon ECS
Getting started with Amazon ECS
 

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
 

Dernier

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Dernier (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Amazon ECS Deep Dive

  • 1. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. October 25th, 2016 Amazon EC2 Container Service Deep Dive Peter Dalbhanjan, Solutions Architect
  • 2. Agenda • ECS Infrastructure Setup • ECS Infrastructure Management • PaaS on ECS • Q & A
  • 3. Amazon ECS Benefits • Easily Manage Clusters for any scale • Flexible Container Placement • Designed for use with other AWS Services • Extensible
  • 5. Amazon ECS Infrastructure Setup • Amazon ECS Cluster • AWS CloudFormation • Amazon ECS CLI • AWS OpsWorks • Amazon ECR
  • 6. ECS Cluster Setup with AWS CloudFormation "Resources" : { "ECSCluster": { "Type": "AWS::ECS::Cluster" }, "ECSAutoScalingGroup" : { "Type" : "AWS::AutoScaling::AutoScalingGroup", "Properties" : { "VPCZoneIdentifier" : { "Ref" : "SubnetID" }, "LaunchConfigurationName" : { "Ref" : "ContainerInstances" }, "MinSize" : "1", "MaxSize" : { "Ref" : "MaxSize" }, "DesiredCapacity" : { "Ref" : "DesiredCapacity" } }, […] }, Autoscaling Group ECS Cluster
  • 7. "ContainerInstances": { "Type": "AWS::AutoScaling::LaunchConfiguration", "Metadata" : { "AWS::CloudFormation::Init" : { "config" : { "commands" : { "01_add_instance_to_cluster" : { "command" : { "Fn::Join": [ "", [ "#!/bin/bashn", "echo ECS_CLUSTER=", { "Ref": "ECSCluster" }, " >> /etc/ecs/ecs.config" ] ] } } }, […] } } } ECS Cluster Setup with AWS CloudFormation Launch Configuration
  • 8. "taskdefinition": { "Type": "AWS::ECS::TaskDefinition", "Properties" : { "ContainerDefinitions" : [ { "Name": "simple-app", "Cpu": "10", "Essential": "true", "Image":"httpd:2.4", "Memory":"300", "MountPoints": [{ "ContainerPath": "/usr/local/apache2/htdocs", "SourceVolume": "my-vol” }], "PortMappings": [ { "HostPort": 80, "ContainerPort": 80 } ] }, ECS Cluster Setup with AWS CloudFormation { "Name": "busybox", "Cpu": 10, "Command": [ "/bin/sh -c " while true; do echo '<html> <head> <title>Amazon ECS Sample App</title> <style>..... > /usr/local/apache2/htdocs/index.html ; sleep 1; done"” ], "EntryPoint": [ "sh", "-c"], "Essential": false, "Image": "busybox", "Memory": 200, "VolumesFrom": [ { "SourceContainer": "simple-app" } ] } ],
  • 9. ECS Cluster Setup with Amazon ECS CLI • Simplifies creating, updating, and monitoring clusters and tasks • Supports Docker Compose • Available on github https://github.com/aws/a mazon-ecs-cli
  • 10. ECS Cluster Setup with Amazon ECS CLI # Build cluster and container instances $ ecs-cli scale --size 2 --capability-iam --keypair demo-user # Create task definition and start tasks $ ecs-cli compose up # See running tasks $ ecs-cli compose ps # Start tasks as ECS service $ ecs-cli compose --project-name wordpress-test service start # See the progress of task state $ ecs-cli compose --project-name wordpress-test service ps
  • 11. ECS Cluster Setup with AWS OpsWorks • Update OpsWorks IAM role to allow ecs:* actions • Add instances to layer (24/7, time-based, load-based) • Manage security updates, user permission and access Note: • One ECS Cluster layer per stack • An ECS Cluster can only be associated with one stack
  • 13. Amazon ECR Setup • You have read and write access to the repositories you create in your default registry, i.e. <aws_account_id>.dkr.ecr.us-east-1.amazonaws.com • Repository names can support namespaces, e.g. team- a/web-app. • Repositories can be controlled with both IAM user access policies and repository policies.
  • 14. Amazon ECR Setup # Authenticate Docker to your Amazon ECR registry > aws ecr get-login > docker login -u AWS -p <password> -e none https://<aws_account_id>.dkr.ecr.us- east-1.amazonaws.com > docker login -u AWS -p <password> -e none https://<aws_account_id>.dkr.ecr.us- east-1.amazonaws.com # Create a repository called ecr-demo > aws ecr create-repository --repository-name ecr-demo # Push an image to your repository > docker push <aws_account_id>.dkr.ecr.us-east-1.amazonaws.com/ecr-demo:v1
  • 15. Amazon ECR Docker Credential Helper • Available today - https://github.com/awslabs/amazon- ecr-credential-helper • Place the docker-credential-ecr-login binary on your PATH • Set the contents of ~/.docker/config.json file to be: { "credsStore": "ecr-login" } • Push and pull images from ECR without docker login
  • 17. Amazon ECS Infrastructure Management • Monitoring and Logging • Automatic Scaling • Service Discovery • Security
  • 19. Monitoring with Amazon CloudWatch • Metric data sent to CloudWatch in 1-minute periods and recorded for a period of two weeks • Available metrics: CPUReservation, MemoryReservation, CPUUtilization, MemoryUtilization • Available dimensions: ClusterName, ServiceName
  • 22. Monitoring with Amazon CloudWatch Use the Amazon CloudWatch Monitoring Scripts to monitor additional metrics, e.g. disk space: # Edit crontab > crontab -e # Add command to report disk space utilization to CloudWatch every five minutes */5 * * * * <path_to>/mon-put-instance-data.pl --disk-space-util --disk-space-used -- disk-space-avail --disk-path=/ --from-cron
  • 23. CloudWatch Logs with awslogs driver Amazon CloudWatch Logs Amazon CloudWatch Logs Amazon CloudWatch Logs Amazon CloudWatch Logs Amazon S3 Amazon Kinesis AWS Lambda Amazon Elasticsearch Service Amazon ECS Store Stream Process Search
  • 25. Configuring Logging in Task Definition "containerDefinitions": [ { "memory": 300, "portMappings": [ { "hostPort": 80, "containerPort": 80 } ], "entryPoint": [ "sh", "-c" ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "awslogs-test", "awslogs-region": "us-west-2", "awslogs-stream-prefix": "nginx" } }, "name": "simple-app", "image": "httpd:2.4", "command": [ "/bin/sh -c "echo 'Congratulations! Your application is now running on a container in Amazon ECS.' > /usr/local/apache2/htdocs/index.html && httpd-foreground"" ], "cpu": 10 } ], "family": "cw-logs-example" }
  • 26. Monitoring Amazon ECS with Datadog
  • 27. Monitoring Amazon ECS with Sysdig Cloud
  • 29. Setup ECS Cluster with AutoScaling Create LaunchConfiguration • Pick instance type depending on resource requirements, e.g. memory or CPU • Use latest Amazon Linux ECS- optimized AMI, other distros available Create AutoScaling group and set to cluster initial size
  • 30. AutoScaling your Amazon ECS Cluster • Create CloudWatch alarm on a metric, e.g. MemoryReservation • Configure scaling policies to increase and decrease the size of your cluster
  • 31. AutoScaling your Amazon ECS services
  • 32. AutoScaling your Amazon ECS services
  • 34. Service Discovery using ELB • Automation built using CloudWatch Events, Lambda and Route53 private hosted zones • Route53 is used as service registry • Lambda is used to add/remove records based on Service API’s from ECS • Available on github https://github.com/awslabs /ecs-refarch-service- discovery
  • 36. Service Discovery using DNS • Install an agent (ecssd_agent.go) on container instances • The agent registers service name, IP and port into Route53 private hosted zone • lambda_health_check.py used for cleanup • Available on github https://github.com/awslabs/ service-discovery-ecs-dns
  • 38. Service Discovery with Weaveworks • DNS interface for cross-host container communication • Gossip protocol to share grouped updates • Overlay network between hosts
  • 39. Service Discovery and Configuration Management with Consul ECSCluster consul-server ECS Instance consul-agent registrator ECS Instance Back end 1 Back end 2 consul-agent registrator ECS Instance Front end ECSCluster
  • 41. IAM Roles for ECS Tasks { "family": “signup-app", "taskRoleArn": "arn:aws:iam::123456789012:role/DynamoDB RoleForTask", "volumes": [], "containerDefinitions": [{ "environment": [ ... ], "name": “signup-web", "mountPoints": [], "image": “amazon/signup-web", "cpu": 25, "portMappings": [ ... ], "entryPoint": [ ... ], "memory": 100, "essential": true, "volumesFrom": [] } ]}
  • 42. Logging Amazon ECS API with AWS CloudTrail { "eventVersion": "1.03", "userIdentity": {…}, "eventTime": "2015-10-12T13:57:33Z", "eventSource": "ecs.amazonaws.com", "eventName": "CreateCluster", "awsRegion": "eu-west-1", "sourceIPAddress": "54.240.197.227", "userAgent": "console.amazonaws.com", "requestParameters": { "clusterName": "ecs-cli" }, Create Cluster event
  • 43. Logging Amazon ECS API with AWS CloudTrail "responseElements": { "cluster": { "clusterArn": "arn:aws:ecs:eu-west- 1:560846014933:cluster/ecs-cli", "pendingTasksCount": 0, "registeredContainerInstancesCount": 0, "status": "ACTIVE", "runningTasksCount": 0, "clusterName": "ecs-cli", "activeServicesCount": 0 } }, […] Create Cluster event
  • 45. Secrets Management • Option 1: Task Definition Environment Variables • Easy to get Started • Configuration stored Directly into Task Definition • Version in Immutable Definition; Easy Rollback • Not Great for Secrets • Option 2: Encrypted DynamoDB or S3 • Use Environment Variables to Provide Pointer • Use AWS Encryption Clients to Securely Store • Use VPC-Endpoints, IAM Policies, and IAM Roles to Restrict Access
  • 48. AWS Elastic Beanstalk • Elastic Beanstalk uses Amazon ECS to coordinate deployments to multi-container Docker environments • Dockerrun.aws.json file that describes how to deploy containers. • Takes care of tasks including cluster creation, task definition and execution
  • 50. Convox # Initialize your app and create default manifest > convox init # Locally build and run your app as declared in the manifest > convox start # Create app > convox apps create my_app # Deploy app, output ELB DNS name > convox deploy [...] web: http://my_app-1234567890.us-east-1.elb.amazonaws.com
  • 51. Remind Empire • Offers a control layer on top of Amazon ECS that provides a Heroku like workflow • Any tagged Docker image can be deployed to Empire as an app • When you deploy a Docker image to Empire, it will extract a Procfile from the WORKDIR • Each process type in the Procfile maps directly to an ECS Service
  • 52. Remind Empire • Get started by launching CloudFormation stack • Use the emp client to start developing your app # tell empire client where it can find the API $ export EMPIRE_API_URL=http://empire-60-LoadBala-…elb.amazonaws.com/ # login to empire using your github credentials $ emp login # run your first app $ emp deploy remind101/acme-inc:master # check what’s running $ emp apps acme-inc Jun 15 20:42[...]
  • 53. Additional Resources • ECS CLI – http://bit.ly/2eKy3I6 • ECR Docker Credential Helper – http://bit.ly/2dD02xo • AutoScaling – http://amzn.to/2eohA2a • ECS integration with ALB to support Dynamic ports and Path-based routing: http://amzn.to/2exhh07 • Service Discovery • Service Discovery using ELB – http://bit.ly/2dAN6Dw • Service Discovery using DNS – http://bit.ly/2eI831D