SlideShare a Scribd company logo
Introduction	
  to	
  Amazon	
  EC2	
  Container	
  
Service and	
  setting	
  up	
  build	
  pipeline	
  with	
  
ECS	
  and	
  Jenkins
Swapnil Dahiphale
DevOps	
  Engineer,	
  WhiteHedge	
  Technologies
Agenda
• Containers
• Orchestration	
  
• Why	
  ECS?
• What	
  is	
  ECS?
• Key	
  Components
• Typical	
  user	
  workflow
• Build	
  pipeline	
  with	
  Jenkins	
  and	
  ECS
Containers
“automates	
  the	
  deployment	
  of	
  any	
  	
  
application	
  as	
  a	
  lightweight,	
  
portable,	
  	
  self-­‐sufficient container
that	
  will	
  run	
  virtuallyanywhere”
What	
  are containers?
OS	
  virtualization	
  	
  
Process isolation	
  	
  
Automation	
  	
  
Images
Server
Guest OS
Bins/Libs Bins/Libs
App2App1
Why	
  use Docker?
With Docker we can solve many problems
• “it works on my machine”
• reducing build & deploy time
• Infrastructure	
   configuration –automation!
• Libs	
  dependency hell
• Cost	
  control	
  and granularity
A	
  container pipeline
A	
  container pipeline
IT Operations
Base
Image
PatchesUtilities
A	
  container pipeline
IT Operations
Base
Image
PatchesUtilities
Ruby
Redis
Logger
A	
  container pipeline
IT Operations Developer
Base
Image
PatchesUtilities
Ruby
Redis
Logger
App
A	
  container pipeline
Base
Image
PatchesUtilities
IT Operations Developer
Ruby
Redis
Logger
App
Orchestration!
Orchestration	
  is	
  a	
  mean	
  to	
  Automate	
  Manual	
  Process	
  
Orchestration
Why	
  Orchestration?
• Microservice	
  Architectures
• Fault	
  tolerance	
  /	
  High	
  Availability
• Scalability
• Resource	
  Utilization
Orchestration	
  Tools
• Kubernetes
• Docker	
  Swarm
• Amazon  EC2  Container  Service
Why	
  EC2	
  Container	
  Service ?
EC2 Container Service
EC2 Container Service
What	
  is	
  ECS?
Building  Block  Service
What	
  is	
  ECS?
Easily	
  Manage	
  Clusters	
  for	
  Any Scale
• Nothing	
  to run
• Complete state
• Control	
  and monitoring
• Scale
ECS	
  List*	
  and	
  Describe*	
  APIactions
What	
  is	
  ECS?
Flexible	
  Container Placement
• Applications
• Batch jobs
• Multiple schedulers
What	
  is	
  ECS?
Designed	
  for	
  use	
  with	
  other	
  AWS services
• Virtual	
  Private Cloud
• Elastic	
  Load Balancing
• Elastic	
  Block Store
• IAM
• CloudTrail
What	
  is	
  ECS?
Performance  at  scale
What	
  is	
  ECS?
Secure
Your  containers,
Your  instances
What	
  is	
  ECS?
Extensible
• ComprehensiveAPIs
• Open	
  sourceagent
• Customschedulers
Key	
  Components
Tasks
Containers
Clusters
Container	
  Instances
Key	
  Components:	
  Container	
  Instances
Amazon	
  EC2	
  instances
Docker	
  daemon
Amazon	
  ECS	
  agent
Key	
  Components:	
  Clusters
Regional
Resource	
  pool
Grouping	
  of	
  Container	
  Instances
Start	
  empty,	
  dynamically	
  scalable
Key	
  Components:	
  Tasks
Unit	
  of	
  work
Grouping	
  of	
  related	
  containers
Run	
  on	
  Container	
  Instances
Key	
  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
}
{
"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
{
Key	
  components:	
  task definitions
"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
}
[
{
"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
Typical	
  user workflow
I  want  to  run  aservice
Typical	
  user workflow
Run Instances Amazon
EC2
Use  custom  AMI  with    
Docker  support  and    
ECS  Agent. Instances    
will  register  with    
default cluster.
Typical	
  user workflow
Create  Task Definition
Declare resource
requirements for
containers
Shared  Data Volume
Node.jsApp
Time  of day    
App
Typical	
  user workflow
Create Service
Declare resource
requirements for
service
Shared  Data Volume
Node.jsApp
Time  of day    
App
Elastic    
Load    
Balancing
X 5
Typical	
  user workflow
Describe Service
Demo
Build	
  Pipeline	
  with	
  ECS	
  and	
  Jenkins
Continuous	
  delivery	
  with Jenkins
Build image
Push image
Update service
Q&A
Thank  You

More Related Content

PPTX
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
PDF
Making Sense Out of Amazon EC2 Container Service
PPTX
Tech connect aws
PDF
AWS Elastic Container Service - DockerHN
PDF
Docker 1.12 (dockercon recap)
PPTX
Automation with Packer and TerraForm
PDF
Amazon EC2 Container Service Live Demo - Microservices Web Day
PDF
Mitchell Hashimoto, HashiCorp
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
Making Sense Out of Amazon EC2 Container Service
Tech connect aws
AWS Elastic Container Service - DockerHN
Docker 1.12 (dockercon recap)
Automation with Packer and TerraForm
Amazon EC2 Container Service Live Demo - Microservices Web Day
Mitchell Hashimoto, HashiCorp

What's hot (15)

PPTX
Automating aws infrastructure and code deployments using Ansible @WebEngage
PPTX
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
PDF
(2016-06-11) Packer: Make Multi-Platform Images
PPTX
Packer, where DevOps begins
PDF
Docker on AWS OpsWorks
PDF
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
PPTX
Packer
PDF
A Introduction of Packer
PPTX
Baking in the cloud with packer and puppet
PDF
London Hug 19/5 - Terraform in Production
PDF
Spinnaker 파트 1
PDF
TIAD - DYI: A simple orchestrator built step by step
PPTX
Ansible presentation
PDF
Ansible Introduction
PPTX
Learn you some Ansible for great good!
Automating aws infrastructure and code deployments using Ansible @WebEngage
Introduction to Packer and Suitcase: A Packer-based OS Image Build System
(2016-06-11) Packer: Make Multi-Platform Images
Packer, where DevOps begins
Docker on AWS OpsWorks
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Packer
A Introduction of Packer
Baking in the cloud with packer and puppet
London Hug 19/5 - Terraform in Production
Spinnaker 파트 1
TIAD - DYI: A simple orchestrator built step by step
Ansible presentation
Ansible Introduction
Learn you some Ansible for great good!
Ad

Viewers also liked (19)

PPTX
Trabajo de tecnologia slidshare
PPTX
Original forgiveness
PDF
08021105.PDF
DOCX
CVofNawshad.docx
DOC
Btktxd2 ngah xd
PDF
08021104.PDF
PPTX
Merry Christmas 2015
PDF
CVwithSelectedPublications-AmnonShaboShvo
PPT
Medanets
DOC
Safety guide
PDF
Nghị định số 102/2016/NĐ-CP của Chính phủ
PPTX
Creating Dynamic Sprint Reviews - cPrime Presentation
PPTX
Performance Demystified for SQL Server on Azure Virtual Machines
PDF
DevOps : Consulting with Foresight
PDF
2016 12-14 colloque ssi-etat des lieux de la ssi dans le programme hôpital nu...
PDF
2016 12-14-colloque ssi retour d'expérience-centre hospitalier du mans _ atta...
PDF
Guerrilla Marketing: 17 Scrappy Tactics to Grow Your Business
PDF
2016 12-14 - Colloque SSI - L'analyse des risques intégrés aux projets si
Trabajo de tecnologia slidshare
Original forgiveness
08021105.PDF
CVofNawshad.docx
Btktxd2 ngah xd
08021104.PDF
Merry Christmas 2015
CVwithSelectedPublications-AmnonShaboShvo
Medanets
Safety guide
Nghị định số 102/2016/NĐ-CP của Chính phủ
Creating Dynamic Sprint Reviews - cPrime Presentation
Performance Demystified for SQL Server on Azure Virtual Machines
DevOps : Consulting with Foresight
2016 12-14 colloque ssi-etat des lieux de la ssi dans le programme hôpital nu...
2016 12-14-colloque ssi retour d'expérience-centre hospitalier du mans _ atta...
Guerrilla Marketing: 17 Scrappy Tactics to Grow Your Business
2016 12-14 - Colloque SSI - L'analyse des risques intégrés aux projets si
Ad

Similar to EC2 Container Service (20)

PDF
Making Sense out of Amazon ECS
PDF
Getting started with Amazon ECS
PDF
Getting Started with Docker on AWS
PPTX
AWS ECS Meetup Talentica
PDF
Running Docker Containers on AWS
PDF
Amazon EC2 container service
PDF
Amazon ECS (March 2016)
ODP
Walk-through: Amazon ECS
PPTX
Amazon Container Services
PDF
Running your dockerized application(s) on AWS Elastic Container Service
PPTX
AWS SSA Webinar 12 - Getting started on AWS with Containers
PPTX
Leveraging Amzon EC2 Container Services for Container Orchestration
PDF
Running Docker clusters on AWS (November 2016)
PDF
Running Docker clusters on AWS (June 2016)
PDF
Amazon Web Services EC2 Container Service (ECS)
PPTX
Getting Started With Docker on AWS
PDF
Amazon Container Services - Let me count the ways
PPTX
AWS Elastic Container Service (ECS) with a CI Pipeline Overview
PPTX
ECS and Docker at Okta
PPTX
ECS - from 0 to 100
Making Sense out of Amazon ECS
Getting started with Amazon ECS
Getting Started with Docker on AWS
AWS ECS Meetup Talentica
Running Docker Containers on AWS
Amazon EC2 container service
Amazon ECS (March 2016)
Walk-through: Amazon ECS
Amazon Container Services
Running your dockerized application(s) on AWS Elastic Container Service
AWS SSA Webinar 12 - Getting started on AWS with Containers
Leveraging Amzon EC2 Container Services for Container Orchestration
Running Docker clusters on AWS (November 2016)
Running Docker clusters on AWS (June 2016)
Amazon Web Services EC2 Container Service (ECS)
Getting Started With Docker on AWS
Amazon Container Services - Let me count the ways
AWS Elastic Container Service (ECS) with a CI Pipeline Overview
ECS and Docker at Okta
ECS - from 0 to 100

More from WhiteHedge Technologies Inc. (10)

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

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Electronic commerce courselecture one. Pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation theory and applications.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
“AI and Expert System Decision Support & Business Intelligence Systems”
Electronic commerce courselecture one. Pdf
Review of recent advances in non-invasive hemoglobin estimation
Understanding_Digital_Forensics_Presentation.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

EC2 Container Service