SlideShare a Scribd company logo
MAKING SENSE OUT OF AMAZON ECS
Swapnil Dahiphale
DevOps Engineer
13 Feb 2016, DevOps Meetup Banglore
WhiteHedge
2
INTRODUCTION - HELLO
WhiteHedgeHello! Welcome to WhiteHedge
Our Work , Our Clients
WhiteHedge is an Agile Software Product Development company. But what really
describes us is what we think about Our Work , Our Clients.
We have deep experience in some of the most sought-after technology domains in the
industry today: Mobile Development, Big Data Analytics, Cloud Computing, and
DevOps. Having deep knowledge in these domains make us stand out as the best and
the coolest provider of services. Our DevOps will bring you a single team that works
together with continuous development, continuous testing, continuous deployments,
logging, monitoring and security.
WhiteHedge
3
WHITEHEDGE - AN OVERVIEW
 Global Presence
+
+
+
+
+
+
Agile + Flexible
Thorough + Quick Learner
Competitive + Comprehensive
Honest + Transparent
Young + Mature
Innovative + Creative
 More about us …
What definesus?
California
New Jersey Rotterdam
Pune
EnvisionProducts|
Convertintobusinesses
100+employees|50+live
productsworld-wide
Thebest oftheTalentand
Infrastructure
Started2003| FocusedAgile
ProductDevelopment
Selffunded| Wellfunded|
Profitable
WhiteHedge
4
TABLE OF CONTENTS - OUR AGENDA
Containers
1
Use case
2
Orchestration
3
Introduction to
ECS
4
Key Components
6
Architecture
7
Overview of Build
Process
8
Why ECS?
5
CONTAINERS
WhiteHedgeWHAT ARE CONTAINERS?
OS virtualization
Process isolation
Images
Automation
Bins/Libs
Docker Engine
Bins/Libs
App2App1
Host OS
Server
Guest OS
Hypervisor
Guest OS
Bins/LibsBin/Libs
Host OS
Server
App1 App2 Container 1 Container 2
VM 1 VM 2
WhiteHedge
“automates the deployment of any
application as a lightweight,
portable, self-sufficient container
that will run virtually anywhere”
CONTAINERS
USE CASE
WhiteHedgeUSE CASE
A highly available RESTful API server which fetches
data from third-party services and serves its clients.
WhiteHedgeARCHITECTURE
WhiteHedgeCONTINUOUS DELIVERYWITH JENKINS
Build Image
Push Image
CodeDeploy
WhiteHedgeTHE PROBLEM
• A large monolithic application that was difficult to run, deploy, and
scale.
• We were deploying a single docker container to run multiple processes.
• Docker was monitored and we were redeploying docker instance if the
docker instance runs into problems.
• We used to evaluate capacity of EC2 instance manually and are running
one container per instance
WhiteHedgeTHE CHALLENGE
• Use microservices architecture using docker
• Orchestration of dockers
• Replicate infrastructure to many regions
ORCHESTRATION
WhiteHedgeORCHESTRATION
Bins/Libs
Docker Engine
App1
Host OS
Server
Bins/Libs
App2
WhiteHedgeORCHESTRATION
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Docker Engine
Host OS
Server
Why EC2 Container
Service?

WhiteHedgeWHY ECS?
• It is a managedservice!
• Easy to integrate with other AWS services
• It is great for storing and enforcing task state
• Designed with custom schedulers in mind
• The agent code is available on a public GitHub repo and … it is in GO!
WhiteHedgeWHAT ELSE DID WE LOOK AT?
Home-grown Tech
Tried, but proved to
be unreliable
Difficult to handle
coordination and
synchronization
Powerful but hard
to productionize
Needs developers
with Experience
Not a managed
service, higher Ops
load
“Amazon ECS enabled us to focus on releasing new software rather than
spending time managing clusters”
Introduction to ECS
WhiteHedge
“a highly scalable, high performance container
management service that supports docker
containers and allows you to easily run and manage
Docker-enabled applications across cluster of EC2
instances”
WHAT IS ECS?
WhiteHedgeWHAT IS ECS?
• Building Block Service
• Easily Manage Clusters for Any Scale
Nothing to run
Complete state
Control and monitoring
Scale
• Flexible Container Placement
• Designed for use with other AWS services
• Secure
• Extensible - ComprehensiveAPIs
WhiteHedgeKEY COMPONENTS
Container Instances
Clusters
Tasks
Run a task
Create a service
WhiteHedgeKEY COMPONENTS
• Amazon EC2 Instances
• Docker daemon
• Amazon ECS agent
Container Instances
Clusters
Tasks
Run a task
Create a service
WhiteHedgeKEY COMPONENTS
• Grouping of Container
Instances
• Resource pool
• Regional
• Start empty, dynamically
scalable
Container Instances
Clusters
Tasks
Run a task
Create a service
WhiteHedgeKEY COMPONENTS
• Unit of work
• Grouping of related
Containers
• Run on Container Instances
Container Instances
Clusters
Tasks
Run a task
Create a service
WhiteHedgeKEY COMPONENTS: TASK DEFINITIONS
{
"environment": [],
"name": "simple-demo",
"image": "my-
demo", "cpu": 10,
"memory": 500,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
],
"mountPoints": [
{
"sourceVolume": "my-vol",
"containerPath":
"/var/www/my-
vol"
}
],
"entryPoint": [
"/usr/sbin/apache2"
, "-D",
"FOREGROUND"
],
"essential": true
},
{
"name": "busybox",
"image":
"busybox",
"cpu": 10,
"memory":
500,
"volumesFrom"
: [
{
"sourceContainer": "simple-demo"
}
],
"entryPoint"
: [
"sh",
"-c"
],
"command": [
"/bin/sh -c "while true; do
/bin/date > /var/www/my-vol/date; sleep 1;
done""
],
"essential": false
}
WhiteHedge
{
"environment": [],
"name": "simple-demo",
"image": "amazon/amazon-ecs-
sample", "cpu": 10,
"memory": 500,
"portMappings":
[
{
"containerPort": 80,
"hostPort": 80
}
],
"mountPoints": [
{
"sourceVolume": "my-vol",
"containerPath":
"/var/www/my-
vol"
}
],
"entryPoint": [
"/usr/sbin/apache2
", "-D",
"FOREGROUND"
],
"essential": true
},
KEY COMPONENTS: TASK DEFINITIONS
Essential  to  our
task
10  CPU  units  (1024  is  full  
CPU),    500  megabytes  of
memory
Expose  port  80  in container
to  port  80  on host
Create  and  mount volumes
WhiteHedge
{
"name": "busybox",
"image":
"busybox",
"cpu": 10,
"memory":
500,
"volumesFrom"
: [
{
"sourceContainer": "simple-demo"
}
],
"entryPoint"
: [
"sh",
"-c"
],
"command": [
"/bin/sh -c "while true; do
/bin/date > /var/www/my-vol/date; sleep 1;
done""
],
"essential": false
}
KEY COMPONENTS: TASK DEFINITIONS
[
{
"image": "tutum/wordpress-stackable",
"name": "wordpress",
"cpu": 10,
"memory": 500,
"essential": true,
"links": [
"db"
],
"entryPoint": [
"/bin/sh",
"-c"
],
"environment": [
…
],
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
]
},
]
From  Docker Hub
Mount  volume  from  other
container
Command  to
exec
WhiteHedgeKEY COMPONENTS
Good for short-lived containers,
e.g. batch jobs
Container Instances
Clusters
Tasks
Run a task
Create a service
WhiteHedgeKEY COMPONENTS
Good for long-running
applications and services
Container Instances
Clusters
Tasks
Run a task
Create a service
Typical user workflow
WhiteHedgeTYPICAL USER WORKFLOW
I  want  to  run  aservice
WhiteHedgeTYPICAL USER WORKFLOW
Run Instances Amazon
EC2
Use  custom  AMI  with    
Docker  support  and    
ECS  Agent. Instances    
will  register  with    
defaultcluster.
WhiteHedgeTYPICAL USER WORKFLOW
Create  Task Definition
Declare resource
requirements for
containers
Shared  DataVolume
Node.jsApp
Time  of day    
App
WhiteHedgeTYPICAL USER WORKFLOW
Create Service
Declare resource
requirements for
service
Shared  DataVolume
Node.jsApp
Time  of day    
App
Elastic    
Load    
Balancin
g
X 3
WhiteHedgeTYPICAL USER WORKFLOW
Describe Service
Architecture with ECS
WhiteHedgeARCHITECTURE
WhiteHedgeCONTINUOUS DELIVERYWITH JENKINS
Build Image
Push Image
Update ECS service
WhiteHedge
Features Without ECS Using ECS
High availability If any of the container dies, we
have to redeploy on all servers.
Restarts that container itself.
(Its a cluster management
system so it will always be in
desired state)
Managing number of
containers on a given EC2
instance
It will be complicated to run
and manage multiple
containers effectively.
Can manage multiple
containers.
Deployment method Handle deployments using
various methods.
(CodeDeploy, chef etc.)
ECS manages deployment of
new revision.
COMPARISON OF ARCHITECTURES
WhiteHedge
42
FOLLOW US
Questions?
 
http://www.whitehedge.com/devops.html
Swapnil Dahiphale
devops@whitehedge.com
- SOCIAL NETWORKS / PHONE
THANK YOU!
Have a Nice Day!

Swapnil Dahiphale
@Swapnil2233
sdahiphale@whitehedge.com

More Related Content

What's hot (20)

PPTX
Reusable, composable, battle-tested Terraform modules
Yevgeniy Brikman
 
PDF
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Edureka!
 
PPTX
Opscode Webinar: Cooking with Chef on Microsoft Windows
Chef Software, Inc.
 
PDF
Ansible at work
Bas Meijer
 
PDF
Rapid Infrastructure Provisioning
Uchit Vyas ☁
 
PDF
Amazon EC2 Container Service in Action
Remotty
 
PPTX
Transforming Infrastructure into Code - Importing existing cloud resources u...
Shih Oon Liong
 
PDF
Building Real-Time Web Applications with Vortex-Web
Angelo Corsaro
 
PDF
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
NETWAYS
 
PDF
Continuous Integration: SaaS vs Jenkins in Cloud
Ideato
 
PPTX
Go Faster with Ansible (PHP meetup)
Richard Donkin
 
PDF
Docker module 1
Liang Bo
 
ODP
Introduction to Chef
Knoldus Inc.
 
PDF
Cloud Foundry 百日行 振り返り
nota-ja
 
PDF
Infrastructure as Code with Terraform
Tim Berry
 
PDF
Managing Your Cisco Datacenter Network with Ansible
fmaccioni
 
PPTX
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Julian Dunn
 
PPTX
Configuration Management in a Containerized World
Julian Dunn
 
ODP
Docker for PHP Developers - php[world] 2017
Chris Tankersley
 
PPTX
Tech connect aws
Blake Diers
 
Reusable, composable, battle-tested Terraform modules
Yevgeniy Brikman
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Edureka!
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Chef Software, Inc.
 
Ansible at work
Bas Meijer
 
Rapid Infrastructure Provisioning
Uchit Vyas ☁
 
Amazon EC2 Container Service in Action
Remotty
 
Transforming Infrastructure into Code - Importing existing cloud resources u...
Shih Oon Liong
 
Building Real-Time Web Applications with Vortex-Web
Angelo Corsaro
 
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
NETWAYS
 
Continuous Integration: SaaS vs Jenkins in Cloud
Ideato
 
Go Faster with Ansible (PHP meetup)
Richard Donkin
 
Docker module 1
Liang Bo
 
Introduction to Chef
Knoldus Inc.
 
Cloud Foundry 百日行 振り返り
nota-ja
 
Infrastructure as Code with Terraform
Tim Berry
 
Managing Your Cisco Datacenter Network with Ansible
fmaccioni
 
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Julian Dunn
 
Configuration Management in a Containerized World
Julian Dunn
 
Docker for PHP Developers - php[world] 2017
Chris Tankersley
 
Tech connect aws
Blake Diers
 

Similar to Making Sense out of Amazon ECS (20)

PDF
EC2 Container Service
WhiteHedge Technologies Inc.
 
PDF
A 60-minute tour of AWS Compute (November 2016)
Julien SIMON
 
PPTX
AWS SSA Webinar 12 - Getting started on AWS with Containers
Cobus Bernard
 
PDF
ecs-presentation
Marc Costello
 
PDF
Getting Started with Docker on AWS
Kristana Kane
 
PDF
Running Docker clusters on AWS (June 2016)
Julien SIMON
 
PDF
Getting started with Amazon ECS
Ioannis Polyzos
 
PDF
Running Docker clusters on AWS (November 2016)
Julien SIMON
 
PDF
Breaking the monolith (an example)
Massimo Ferre'
 
PPTX
ECS and Docker at Okta
Jon Todd
 
PPTX
AWS ECS Meetup Talentica
Anshul Patel
 
PPTX
Amazon Web Services and Docker: from developing to production
Paolo latella
 
PDF
Running your dockerized application(s) on AWS Elastic Container Service
Marco Pas
 
PDF
Amazon ECS (March 2016)
Julien SIMON
 
PPTX
AWS Elastic Container Service (ECS) with a CI Pipeline Overview
Wyn B. Van Devanter
 
PPTX
Introduction to AWS and Docker on ECS
CloudHesive
 
PPTX
Docker on Amazon ECS
Deepak Kumar
 
PDF
The AWS DevOps combo (January 2017)
Julien SIMON
 
PDF
AWS Workshop 102
lynn80827
 
PDF
Amazon ECS (December 2015)
Julien SIMON
 
EC2 Container Service
WhiteHedge Technologies Inc.
 
A 60-minute tour of AWS Compute (November 2016)
Julien SIMON
 
AWS SSA Webinar 12 - Getting started on AWS with Containers
Cobus Bernard
 
ecs-presentation
Marc Costello
 
Getting Started with Docker on AWS
Kristana Kane
 
Running Docker clusters on AWS (June 2016)
Julien SIMON
 
Getting started with Amazon ECS
Ioannis Polyzos
 
Running Docker clusters on AWS (November 2016)
Julien SIMON
 
Breaking the monolith (an example)
Massimo Ferre'
 
ECS and Docker at Okta
Jon Todd
 
AWS ECS Meetup Talentica
Anshul Patel
 
Amazon Web Services and Docker: from developing to production
Paolo latella
 
Running your dockerized application(s) on AWS Elastic Container Service
Marco Pas
 
Amazon ECS (March 2016)
Julien SIMON
 
AWS Elastic Container Service (ECS) with a CI Pipeline Overview
Wyn B. Van Devanter
 
Introduction to AWS and Docker on ECS
CloudHesive
 
Docker on Amazon ECS
Deepak Kumar
 
The AWS DevOps combo (January 2017)
Julien SIMON
 
AWS Workshop 102
lynn80827
 
Amazon ECS (December 2015)
Julien SIMON
 
Ad

More from WhiteHedge Technologies Inc. (10)

PDF
Effective DevOps by using Docker and Chef together !
WhiteHedge Technologies Inc.
 
PDF
Mobile Development: Case Studies @ WhiteHedge
WhiteHedge Technologies Inc.
 
PPTX
Online Advertising
WhiteHedge Technologies Inc.
 
PDF
Icebreaker with DevOps
WhiteHedge Technologies Inc.
 
PPTX
DevOps Offerings at WhiteHedge
WhiteHedge Technologies Inc.
 
PDF
DevOps Case Studies
WhiteHedge Technologies Inc.
 
PDF
Enabling Enterprises Adopt DevOps
WhiteHedge Technologies Inc.
 
PDF
What is DevOps?
WhiteHedge Technologies Inc.
 
PDF
WhiteHedge DevOps Offerings and Skillset :: Changing Chaos to Coherence
WhiteHedge Technologies Inc.
 
PDF
India’s Most Exciting Companies and the Key People who Steer Them to Excellence.
WhiteHedge Technologies Inc.
 
Effective DevOps by using Docker and Chef together !
WhiteHedge Technologies Inc.
 
Mobile Development: Case Studies @ WhiteHedge
WhiteHedge Technologies Inc.
 
Online Advertising
WhiteHedge Technologies Inc.
 
Icebreaker with DevOps
WhiteHedge Technologies Inc.
 
DevOps Offerings at WhiteHedge
WhiteHedge Technologies Inc.
 
DevOps Case Studies
WhiteHedge Technologies Inc.
 
Enabling Enterprises Adopt DevOps
WhiteHedge Technologies Inc.
 
WhiteHedge DevOps Offerings and Skillset :: Changing Chaos to Coherence
WhiteHedge Technologies Inc.
 
India’s Most Exciting Companies and the Key People who Steer Them to Excellence.
WhiteHedge Technologies Inc.
 
Ad

Recently uploaded (20)

PDF
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
PPTX
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
ThousandEyes
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PDF
Market Wrap for 18th July 2025 by CIFDAQ
CIFDAQ
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
PDF
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
PDF
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
PDF
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
ThousandEyes
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Machine Learning Benefits Across Industries
SynapseIndia
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
Market Wrap for 18th July 2025 by CIFDAQ
CIFDAQ
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 

Making Sense out of Amazon ECS

  • 1. MAKING SENSE OUT OF AMAZON ECS Swapnil Dahiphale DevOps Engineer 13 Feb 2016, DevOps Meetup Banglore
  • 2. WhiteHedge 2 INTRODUCTION - HELLO WhiteHedgeHello! Welcome to WhiteHedge Our Work , Our Clients WhiteHedge is an Agile Software Product Development company. But what really describes us is what we think about Our Work , Our Clients. We have deep experience in some of the most sought-after technology domains in the industry today: Mobile Development, Big Data Analytics, Cloud Computing, and DevOps. Having deep knowledge in these domains make us stand out as the best and the coolest provider of services. Our DevOps will bring you a single team that works together with continuous development, continuous testing, continuous deployments, logging, monitoring and security.
  • 3. WhiteHedge 3 WHITEHEDGE - AN OVERVIEW  Global Presence + + + + + + Agile + Flexible Thorough + Quick Learner Competitive + Comprehensive Honest + Transparent Young + Mature Innovative + Creative  More about us … What definesus? California New Jersey Rotterdam Pune EnvisionProducts| Convertintobusinesses 100+employees|50+live productsworld-wide Thebest oftheTalentand Infrastructure Started2003| FocusedAgile ProductDevelopment Selffunded| Wellfunded| Profitable
  • 4. WhiteHedge 4 TABLE OF CONTENTS - OUR AGENDA Containers 1 Use case 2 Orchestration 3 Introduction to ECS 4 Key Components 6 Architecture 7 Overview of Build Process 8 Why ECS? 5
  • 6. WhiteHedgeWHAT ARE CONTAINERS? OS virtualization Process isolation Images Automation Bins/Libs Docker Engine Bins/Libs App2App1 Host OS Server Guest OS Hypervisor Guest OS Bins/LibsBin/Libs Host OS Server App1 App2 Container 1 Container 2 VM 1 VM 2
  • 7. WhiteHedge “automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere” CONTAINERS
  • 9. WhiteHedgeUSE CASE A highly available RESTful API server which fetches data from third-party services and serves its clients.
  • 11. WhiteHedgeCONTINUOUS DELIVERYWITH JENKINS Build Image Push Image CodeDeploy
  • 12. WhiteHedgeTHE PROBLEM • A large monolithic application that was difficult to run, deploy, and scale. • We were deploying a single docker container to run multiple processes. • Docker was monitored and we were redeploying docker instance if the docker instance runs into problems. • We used to evaluate capacity of EC2 instance manually and are running one container per instance
  • 13. WhiteHedgeTHE CHALLENGE • Use microservices architecture using docker • Orchestration of dockers • Replicate infrastructure to many regions
  • 16. WhiteHedgeORCHESTRATION Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server Docker Engine Host OS Server
  • 18. WhiteHedgeWHY ECS? • It is a managedservice! • Easy to integrate with other AWS services • It is great for storing and enforcing task state • Designed with custom schedulers in mind • The agent code is available on a public GitHub repo and … it is in GO!
  • 19. WhiteHedgeWHAT ELSE DID WE LOOK AT? Home-grown Tech Tried, but proved to be unreliable Difficult to handle coordination and synchronization Powerful but hard to productionize Needs developers with Experience Not a managed service, higher Ops load “Amazon ECS enabled us to focus on releasing new software rather than spending time managing clusters”
  • 21. WhiteHedge “a highly scalable, high performance container management service that supports docker containers and allows you to easily run and manage Docker-enabled applications across cluster of EC2 instances” WHAT IS ECS?
  • 22. WhiteHedgeWHAT IS ECS? • Building Block Service • Easily Manage Clusters for Any Scale Nothing to run Complete state Control and monitoring Scale • Flexible Container Placement • Designed for use with other AWS services • Secure • Extensible - ComprehensiveAPIs
  • 24. WhiteHedgeKEY COMPONENTS • Amazon EC2 Instances • Docker daemon • Amazon ECS agent Container Instances Clusters Tasks Run a task Create a service
  • 25. WhiteHedgeKEY COMPONENTS • Grouping of Container Instances • Resource pool • Regional • Start empty, dynamically scalable Container Instances Clusters Tasks Run a task Create a service
  • 26. WhiteHedgeKEY COMPONENTS • Unit of work • Grouping of related Containers • Run on Container Instances Container Instances Clusters Tasks Run a task Create a service
  • 27. WhiteHedgeKEY COMPONENTS: TASK DEFINITIONS { "environment": [], "name": "simple-demo", "image": "my- demo", "cpu": 10, "memory": 500, "portMappings": [ { "containerPort": 80, "hostPort": 80 } ], "mountPoints": [ { "sourceVolume": "my-vol", "containerPath": "/var/www/my- vol" } ], "entryPoint": [ "/usr/sbin/apache2" , "-D", "FOREGROUND" ], "essential": true }, { "name": "busybox", "image": "busybox", "cpu": 10, "memory": 500, "volumesFrom" : [ { "sourceContainer": "simple-demo" } ], "entryPoint" : [ "sh", "-c" ], "command": [ "/bin/sh -c "while true; do /bin/date > /var/www/my-vol/date; sleep 1; done"" ], "essential": false }
  • 28. WhiteHedge { "environment": [], "name": "simple-demo", "image": "amazon/amazon-ecs- sample", "cpu": 10, "memory": 500, "portMappings": [ { "containerPort": 80, "hostPort": 80 } ], "mountPoints": [ { "sourceVolume": "my-vol", "containerPath": "/var/www/my- vol" } ], "entryPoint": [ "/usr/sbin/apache2 ", "-D", "FOREGROUND" ], "essential": true }, KEY COMPONENTS: TASK DEFINITIONS Essential  to  our task 10  CPU  units  (1024  is  full   CPU),    500  megabytes  of memory Expose  port  80  in container to  port  80  on host Create  and  mount volumes
  • 29. WhiteHedge { "name": "busybox", "image": "busybox", "cpu": 10, "memory": 500, "volumesFrom" : [ { "sourceContainer": "simple-demo" } ], "entryPoint" : [ "sh", "-c" ], "command": [ "/bin/sh -c "while true; do /bin/date > /var/www/my-vol/date; sleep 1; done"" ], "essential": false } KEY COMPONENTS: TASK DEFINITIONS [ { "image": "tutum/wordpress-stackable", "name": "wordpress", "cpu": 10, "memory": 500, "essential": true, "links": [ "db" ], "entryPoint": [ "/bin/sh", "-c" ], "environment": [ … ], "portMappings": [ { "containerPort": 80, "hostPort": 80 } ] }, ] From  Docker Hub Mount  volume  from  other container Command  to exec
  • 30. WhiteHedgeKEY COMPONENTS Good for short-lived containers, e.g. batch jobs Container Instances Clusters Tasks Run a task Create a service
  • 31. WhiteHedgeKEY COMPONENTS Good for long-running applications and services Container Instances Clusters Tasks Run a task Create a service
  • 33. WhiteHedgeTYPICAL USER WORKFLOW I  want  to  run  aservice
  • 34. WhiteHedgeTYPICAL USER WORKFLOW Run Instances Amazon EC2 Use  custom  AMI  with     Docker  support  and     ECS  Agent. Instances     will  register  with     defaultcluster.
  • 35. WhiteHedgeTYPICAL USER WORKFLOW Create  Task Definition Declare resource requirements for containers Shared  DataVolume Node.jsApp Time  of day     App
  • 36. WhiteHedgeTYPICAL USER WORKFLOW Create Service Declare resource requirements for service Shared  DataVolume Node.jsApp Time  of day     App Elastic     Load     Balancin g X 3
  • 40. WhiteHedgeCONTINUOUS DELIVERYWITH JENKINS Build Image Push Image Update ECS service
  • 41. WhiteHedge Features Without ECS Using ECS High availability If any of the container dies, we have to redeploy on all servers. Restarts that container itself. (Its a cluster management system so it will always be in desired state) Managing number of containers on a given EC2 instance It will be complicated to run and manage multiple containers effectively. Can manage multiple containers. Deployment method Handle deployments using various methods. (CodeDeploy, chef etc.) ECS manages deployment of new revision. COMPARISON OF ARCHITECTURES
  • 43. THANK YOU! Have a Nice Day!  Swapnil Dahiphale @Swapnil2233 [email protected]