SlideShare a Scribd company logo
1 of 43
Download to read offline
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

Docker 1.12 (dockercon recap)
Docker 1.12 (dockercon recap)Docker 1.12 (dockercon recap)
Docker 1.12 (dockercon recap)Nguyen Anh Tu
 
AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNNguyen Anh Tu
 
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Amazon Web Services
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSYevgeniy Brikman
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepThe Incredible Automation Day
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemHubSpot Product Team
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps beginsJeff Hung
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleIsaac Christoffersen
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServiceJosh Padnick
 
Kubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesKubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesMike Splain
 
(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Imagesgarrett honeycutt
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationErica Windisch
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionRemotty
 
Learn you some Ansible for great good!
Learn you some Ansible for great good!Learn you some Ansible for great good!
Learn you some Ansible for great good!David Lapsley
 
Baking in the cloud with packer and puppet
Baking in the cloud with packer and puppetBaking in the cloud with packer and puppet
Baking in the cloud with packer and puppetAlan Parkinson
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudIsaac Christoffersen
 
SUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with MagentoSUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with MagentoAOE
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Hyun-Mook Choi
 
Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Richard Donkin
 

What's hot (20)

Docker 1.12 (dockercon recap)
Docker 1.12 (dockercon recap)Docker 1.12 (dockercon recap)
Docker 1.12 (dockercon recap)
 
AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHN
 
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECS
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by step
 
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build SystemIntroduction to Packer and Suitcase: A Packer-based OS Image Build System
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
 
Packer, where DevOps begins
Packer, where DevOps beginsPacker, where DevOps begins
Packer, where DevOps begins
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
 
TIAD : Automating the modern datacenter
TIAD : Automating the modern datacenterTIAD : Automating the modern datacenter
TIAD : Automating the modern datacenter
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
 
Kubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesKubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of Kubernetes
 
(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images(2016-06-11) Packer: Make Multi-Platform Images
(2016-06-11) Packer: Make Multi-Platform Images
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in Action
 
Learn you some Ansible for great good!
Learn you some Ansible for great good!Learn you some Ansible for great good!
Learn you some Ansible for great good!
 
Baking in the cloud with packer and puppet
Baking in the cloud with packer and puppetBaking in the cloud with packer and puppet
Baking in the cloud with packer and puppet
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 
SUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with MagentoSUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with Magento
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부
 
Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)
 

Similar to Making Sense Out of Amazon EC2 Container Service

Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Amazon Web Services
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherKarim Vaes
 
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...eZ Systems
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsMichael Lange
 
Effective DevOps by using Docker and Chef together !
Effective DevOps by using Docker and Chef together !Effective DevOps by using Docker and Chef together !
Effective DevOps by using Docker and Chef together !WhiteHedge Technologies Inc.
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp BerlinTech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp BerlinLeanIX GmbH
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixIBM
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Arun prasath
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java binOlve Hansen
 
AWS September Webinar Series - Running Microservices with Amazon EC2 Contain...
AWS September Webinar Series -  Running Microservices with Amazon EC2 Contain...AWS September Webinar Series -  Running Microservices with Amazon EC2 Contain...
AWS September Webinar Series - Running Microservices with Amazon EC2 Contain...Amazon Web Services
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixIBM
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developersDaniel Krook
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamBrian Benz
 
Dockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx CasablancaDockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx CasablancaMichel Courtine
 

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

Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
 
Amazon EC2 Container Service
Amazon EC2 Container ServiceAmazon EC2 Container Service
Amazon EC2 Container Service
 
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 
Effective DevOps by using Docker and Chef together !
Effective DevOps by using Docker and Chef together !Effective DevOps by using Docker and Chef together !
Effective DevOps by using Docker and Chef together !
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp BerlinTech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & Bluemix
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 
Docker in Production at the Aurora Team
Docker in Production at the Aurora TeamDocker in Production at the Aurora Team
Docker in Production at the Aurora Team
 
AWS September Webinar Series - Running Microservices with Amazon EC2 Contain...
AWS September Webinar Series -  Running Microservices with Amazon EC2 Contain...AWS September Webinar Series -  Running Microservices with Amazon EC2 Contain...
AWS September Webinar Series - Running Microservices with Amazon EC2 Contain...
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on Bluemix
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Mini-Training: Docker
Mini-Training: DockerMini-Training: Docker
Mini-Training: Docker
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
Dockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx CasablancaDockercon eu tour 2015 - Devoxx Casablanca
Dockercon eu tour 2015 - Devoxx Casablanca
 

Recently uploaded

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

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 sdahiphale@whitehedge.com

Editor's Notes

  1. Remove slide?
  2. 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
  3. Before using ECS
  4. Different tools available
  5. 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. 
  6. Use api’s to run apps or build a platform to run our apps on it
  7. Terminologies: Task: Grouping of related containers
  8. Terminologies: Task: Grouping of related containers
  9. Terminologies: Task: Grouping of related containers
  10. Terminologies: Task: Grouping of related containers
  11. Defines task: Which containers to be run, how much resources it should have Port mapping links
  12. Terminologies: Task: Grouping of related containers
  13. I have a docker image with app contained, how do I run