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
Hello! Welcome to WhiteHedge
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
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
Host OS
Server
DockerEngine
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
SharedDataVolume
Node.jsApp
Time of day
App
WhiteHedgeTYPICAL USER WORKFLOW
Create Service
Declare resource
requirements for
service
SharedDataVolume
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 (17)

PDF
TIAD - DYI: A simple orchestrator built step by step
The Incredible Automation Day
 
PPTX
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
HubSpot Product Team
 
PPTX
Packer, where DevOps begins
Jeff Hung
 
PDF
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Isaac Christoffersen
 
PDF
TIAD : Automating the modern datacenter
The Incredible Automation Day
 
PDF
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Josh Padnick
 
PDF
Kubernetes Boston — Custom High Availability of Kubernetes
Mike Splain
 
PDF
(2016-06-11) Packer: Make Multi-Platform Images
garrett honeycutt
 
PDF
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
PDF
Amazon EC2 Container Service in Action
Remotty
 
PPTX
Learn you some Ansible for great good!
David Lapsley
 
PPTX
Baking in the cloud with packer and puppet
Alan Parkinson
 
PDF
OpenSource ToolChain for the Hybrid Cloud
Isaac Christoffersen
 
PDF
SUPER-scaling E-Commerce with Magento
AOE
 
PDF
Fargate 를 이용한 ECS with VPC 1부
Hyun-Mook Choi
 
PPTX
Go Faster with Ansible (PHP meetup)
Richard Donkin
 
PDF
Ansible Introduction
Robert Reiz
 
TIAD - DYI: A simple orchestrator built step by step
The Incredible Automation Day
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
HubSpot Product Team
 
Packer, where DevOps begins
Jeff Hung
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Isaac Christoffersen
 
TIAD : Automating the modern datacenter
The Incredible Automation Day
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Josh Padnick
 
Kubernetes Boston — Custom High Availability of Kubernetes
Mike Splain
 
(2016-06-11) Packer: Make Multi-Platform Images
garrett honeycutt
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
Amazon EC2 Container Service in Action
Remotty
 
Learn you some Ansible for great good!
David Lapsley
 
Baking in the cloud with packer and puppet
Alan Parkinson
 
OpenSource ToolChain for the Hybrid Cloud
Isaac Christoffersen
 
SUPER-scaling E-Commerce with Magento
AOE
 
Fargate 를 이용한 ECS with VPC 1부
Hyun-Mook Choi
 
Go Faster with Ansible (PHP meetup)
Richard Donkin
 
Ansible Introduction
Robert Reiz
 

Similar to Making Sense Out of Amazon EC2 Container Service (20)

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

Recently uploaded (20)

PPTX
Q2 Leading a Tableau User Group - Onboarding
lward7
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Q2 Leading a Tableau User Group - Onboarding
lward7
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Ad

Making Sense Out of Amazon EC2 Container Service

  • 1. MAKING SENSE OUT OF AMAZON ECS Swapnil Dahiphale DevOps Engineer 13 Feb 2016, DevOps Meetup Banglore
  • 2. WhiteHedge 2 INTRODUCTION - HELLO Hello! Welcome to WhiteHedge 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 DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine Host OS Server DockerEngine 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 SharedDataVolume Node.jsApp Time of day App
  • 36. WhiteHedgeTYPICAL USER WORKFLOW Create Service Declare resource requirements for service SharedDataVolume 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]

Editor's Notes

  • #3: Remove slide?
  • #7: Similar to hardware virtualization like ec2 however instead of partitioning machine, they isolate processes that are running on single OS. Useful when you want to use os kernel to create multiple isolated userspace processes that have constraints on them like CPU and memory. Docker enables easy use of it, you can create images of containers, that enables automation. So we are able to define our app, build, share and deploy the image
  • #11: Before using ECS
  • #20: Different tools available
  • #22: the same Docker containers that you currently use will run exactly same on ECS. eliminates the need to install operate and scale your own cluster management system infra handles the complexity of running multiple containers like where in the cluster to schedule the container, availability, scalability and monitoring. 
  • #23: Use api’s to run apps or build a platform to run our apps on it
  • #24: Terminologies: Task: Grouping of related containers
  • #25: Terminologies: Task: Grouping of related containers
  • #26: Terminologies: Task: Grouping of related containers
  • #27: Terminologies: Task: Grouping of related containers
  • #28: Defines task: Which containers to be run, how much resources it should have Port mapping links
  • #31: Terminologies: Task: Grouping of related containers
  • #34: I have a docker image with app contained, how do I run