SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Dan Sommerfield, Sr. Manager
Daniele Stroppa, Solutions Architect
October 2015
DVO305
Turbo Charge Your Continuous
Deployment Pipeline with Containers
What to expect from the session
• Best practices for containers in continuous delivery
solutions
• Toolset to implement such solutions
• Demos
Why use containers?
• Process isolation
• Portable
• Fast
• Efficient
Why use containers for continuous delivery?
• Roll out features as quickly as possible
• Predictable and reproducible environment
• Fast feedback
Demo application architecture
Nginx Proxy
Ruby on Rails
web app
PostgreSQL
on RDS
Amazon EC2 Container Service
• Highly scalable container management service
• Easily manage clusters for any scale
• Flexible container placement
• Integrated with other AWS services
• Extensible
• Amazon ECS concepts
• Cluster and container instances
• Task definition and task
Development and deployment workflow
Orchestration
layer
Code
repository
Build
environment
Test
environment
Deployment
environment
Source
Stage 1 - Source
Development environment
Code
repository
Source
AWS CodeCommit
• Private Git repository
• Fully managed
• Secure
• Highly available and scalable
• Alternatives
• GitHub
• Bitbucket
Docker and Docker Toolbox
• Docker (Linux > 3.10) or Docker Toolbox (OS X,
Windows)
• Define app environment with Dockerfile
Dockerfile
FROM ruby:2.2.2
RUN apt-get update -qq && apt-get install -y build-
essential libpq-dev
RUN mkdir -p /opt/web
WORKDIR /tmp
ADD Gemfile /tmp/
ADD Gemfile.lock /tmp/
RUN bundle install
ADD . /opt/web
WORKDIR /opt/web
Docker Compose
Define and run multi-container applications:
1. Define app environment with Dockerfile
2. Define services that make up your app in docker-
compose.yml
3. Run docker-compose up to start and run entire app
docker-compose.yml
proxy:
build: ./proxy
ports:
- "80:80"
links:
- web
web:
build: ./web
command: bundle exec rails server -b 0.0.0.0
environment:
- SECRET_KEY_BASE=secretkey
expose:
- "3000"
Amazon ECS CLI
• Easily create Amazon ECS clusters & supporting
resources such as EC2 instances
• Run Docker Compose configuration files on Amazon
ECS
• Available today – http://amzn.to/1jBf45a
Amazon ECS CLI
> ecs-cli configure
> ecs-cli compose build
> ecs-cli compose up --local
It’s Dem-o-clock!
Stage 2 - Build
Build environment
Build
environment
Partners
Jenkins
• Extensible
• Flexible builds
• Ant or Maven based projects
• Docker images
• Optionally runs in Docker container
CloudBees Docker Build and Publish plugin
Amazon EC2 Container Registry
• Private Docker Repository
• v2 Docker Registry
• AWS Identity and Access Management (IAM) and AWS Auth
integration
• Low latency push, pulls, and inspection
• Alternatives:
• DockerHub
• Docker Trusted Registry
Stage 3 - Test
Test environment
Test
environment
rspec and capybara-webkit
require 'rails_helper.rb'
feature 'Signing in' do
scenario 'can sign in' do
visit '/users/sign_in'
within("#new_user") do
fill_in 'Email', :with => 'test@test.com'
fill_in 'Password', :with => 'password'
end
click_button 'Log in'
expect(page).to have_content('Signed in successfully.')
end
end
Jenkins
• Run tests directly via Docker run
• Run tests in a Docker slave on Amazon ECS
CloudBees Jenkins ECS plugin
Jenkins slave Dockerfile
FROM jenkinsci/jnlp-slave
USER root
RUN apt-get update -qq && 
apt-get install -y -qq git curl wget build-essential […]
RUN apt-get install -y qt5-default libqt5webkit5-dev
RUN apt-get install -y xvfb x11-xkb-utils xfonts-100dpi xfonts-
75dpi xfonts-scalable xfonts-cyrillic x11-apps
ENV RUBY_VERSION 2.2.2
RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&
mkdir /src && cd /src && git clone
https://github.com/sstephenson/ruby-build.git &&
cd /src/ruby-build && ./install.sh &&
cd / && rm -rf /src/ruby-build && ruby-build $RUBY_VERSION
/usr/local
Jenkins slave Dockerfile
RUN gem update --system && gem install bundler
# Install Gems
WORKDIR /tmp
ADD Gemfile /tmp/
ADD Gemfile.lock /tmp/
RUN bundle install
USER jenkins
It’s Dem-o-clock!
Stage 4 - Deploy
Deployment environment
Deployment
environment
Amazon ECS CLI
> ecs-cli up
> ecs-cli compose up
> ecs-cli ps
AWS Elastic Beanstalk
• Deploy and manage applications without worrying about
the infrastructure
• AWS Elastic Beanstalk manages your database, Elastic
Load Balancing (ELB), Amazon ECS cluster, monitoring,
and logging
• Docker support
• Single container (on Amazon EC2)
• Multi container (on Amazon ECS)
Putting it all together
Putting it all together
Orchestration
layer
AWS CodePipeline
Model and automate your software release processes
• Rapid delivery
• Configurable workflow
• Customizable
• Highly integrated
It’s Dem-o-clock!
Takeaways
• Use Amazon ECS CLI to run application
• Run Jenkins jobs in containers
• Let AWS CodePipeline orchestrate your pipeline
Thank you!
Related Sessions
• CMP302 - Amazon EC2 Container Service: Distributed
Applications at Scale - Thursday, Oct 8, 2:45 PM
• DVO202 - DevOps at Amazon: A Look at Our Tools and
Processes - Wednesday, Oct 7, 12:15 PM
• DVO317 - From Local Docker Development to
Production Deployments - Wednesday, Oct 7, 4:15 PM
Remember to complete
your evaluations!
Additional resources
• Amazon ECS CLI GitHub - http://bit.ly/1FJfWyQ
• CloudBees Docker Build and Publish plugin -
http://bit.ly/1LUryzZ
• CloudBees Jenkins ECS plugin - http://bit.ly/1RiMpNK

Contenu connexe

Tendances

AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
Amazon Web Services
 
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
Amazon Web Services Korea
 

Tendances (20)

Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practices
 
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software D...
 
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
(DVO201) Scaling Your Web Applications with AWS Elastic Beanstalk
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
AWS Containers Day.pdf
AWS Containers Day.pdfAWS Containers Day.pdf
AWS Containers Day.pdf
 
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
(DVO315) Log, Monitor and Analyze your IT with Amazon CloudWatch
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
AWS January 2016 Webinar Series - Introduction to Docker on AWS
AWS January 2016 Webinar Series - Introduction to Docker on AWSAWS January 2016 Webinar Series - Introduction to Docker on AWS
AWS January 2016 Webinar Series - Introduction to Docker on AWS
 
Introduction to DevOps on AWS
Introduction to DevOps on AWSIntroduction to DevOps on AWS
Introduction to DevOps on AWS
 
Intro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStarIntro to AWS Developer Tools, featuring AWS CodeStar
Intro to AWS Developer Tools, featuring AWS CodeStar
 
Amazon ECS
Amazon ECSAmazon ECS
Amazon ECS
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
AWS Account Best Practices
AWS Account Best PracticesAWS Account Best Practices
AWS Account Best Practices
 
Azure DevOps
Azure DevOpsAzure DevOps
Azure DevOps
 
AWS
AWSAWS
AWS
 
CI/CD pipelines on AWS - Builders Day Israel
CI/CD pipelines on AWS - Builders Day IsraelCI/CD pipelines on AWS - Builders Day Israel
CI/CD pipelines on AWS - Builders Day Israel
 
Serverless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about serversServerless Computing: build and run applications without thinking about servers
Serverless Computing: build and run applications without thinking about servers
 
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
 

En vedette

(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microservice(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microservice
Amazon Web Services
 
07 ZamyšLení Co MáMe Za PeníZe
07  ZamyšLení  Co MáMe Za PeníZe07  ZamyšLení  Co MáMe Za PeníZe
07 ZamyšLení Co MáMe Za PeníZe
jedlickak07
 
07 ZamyšLení StvořEní žEny
07  ZamyšLení  StvořEní žEny07  ZamyšLení  StvořEní žEny
07 ZamyšLení StvořEní žEny
jedlickak07
 

En vedette (19)

(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
(DVO313) Building Next-Generation Applications with Amazon ECS
(DVO313) Building Next-Generation Applications with Amazon ECS(DVO313) Building Next-Generation Applications with Amazon ECS
(DVO313) Building Next-Generation Applications with Amazon ECS
 
AWS Code{Commit,Deploy,Pipeline} (June 2016)
 AWS Code{Commit,Deploy,Pipeline} (June 2016) AWS Code{Commit,Deploy,Pipeline} (June 2016)
AWS Code{Commit,Deploy,Pipeline} (June 2016)
 
(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microservice(CMP406) Amazon ECS at Coursera: A general-purpose microservice
(CMP406) Amazon ECS at Coursera: A general-purpose microservice
 
(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns
 
(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
 
AWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar SeriesAWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar Series
 
Improving Infrastructure Governance on AWS - AWS June 2016 Webinar Series
Improving Infrastructure Governance on AWS - AWS June 2016 Webinar SeriesImproving Infrastructure Governance on AWS - AWS June 2016 Webinar Series
Improving Infrastructure Governance on AWS - AWS June 2016 Webinar Series
 
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
 
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as CodeAWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
 
Haishuo Lee on Speech
Haishuo Lee on SpeechHaishuo Lee on Speech
Haishuo Lee on Speech
 
07 ZamyšLení Co MáMe Za PeníZe
07  ZamyšLení  Co MáMe Za PeníZe07  ZamyšLení  Co MáMe Za PeníZe
07 ZamyšLení Co MáMe Za PeníZe
 
The Responsive Grid & You: Extending Your WordPress Site Across Multiple Dev...
The Responsive Grid & You:  Extending Your WordPress Site Across Multiple Dev...The Responsive Grid & You:  Extending Your WordPress Site Across Multiple Dev...
The Responsive Grid & You: Extending Your WordPress Site Across Multiple Dev...
 
07 ZamyšLení StvořEní žEny
07  ZamyšLení  StvořEní žEny07  ZamyšLení  StvořEní žEny
07 ZamyšLení StvořEní žEny
 
Tecnologie dell'Informazione e della Comunicazione per le Smart Cities
Tecnologie dell'Informazione e della Comunicazione per le Smart CitiesTecnologie dell'Informazione e della Comunicazione per le Smart Cities
Tecnologie dell'Informazione e della Comunicazione per le Smart Cities
 
Inleiding Sociale Media voor Musea
Inleiding Sociale Media voor MuseaInleiding Sociale Media voor Musea
Inleiding Sociale Media voor Musea
 
Social Media Strategy
Social Media StrategySocial Media Strategy
Social Media Strategy
 

Similaire à (DVO305) Turbocharge YContinuous Deployment Pipeline with Containers

Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Amazon Web Services
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 

Similaire à (DVO305) Turbocharge YContinuous Deployment Pipeline with Containers (20)

TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up LoftTurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
 
Continuous Delivery to Amazon EC2 Container Service
Continuous Delivery to Amazon EC2 Container ServiceContinuous Delivery to Amazon EC2 Container Service
Continuous Delivery to Amazon EC2 Container Service
 
Continuous Delivery to Amazon ECS - AWS August Webinar Series
Continuous Delivery to Amazon ECS - AWS August Webinar SeriesContinuous Delivery to Amazon ECS - AWS August Webinar Series
Continuous Delivery to Amazon ECS - AWS August Webinar Series
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECSContinuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS
 
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
 
Continuous Delivery to Amazon EC2 Container Service
Continuous Delivery to Amazon EC2 Container ServiceContinuous Delivery to Amazon EC2 Container Service
Continuous Delivery to Amazon EC2 Container Service
 
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
 
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
 
AWS Elastic Beanstalk: Running Multi-Container Docker Applications - DevDay L...
AWS Elastic Beanstalk: Running Multi-Container Docker Applications - DevDay L...AWS Elastic Beanstalk: Running Multi-Container Docker Applications - DevDay L...
AWS Elastic Beanstalk: Running Multi-Container Docker Applications - DevDay L...
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
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...
 
Building Open Source Platforms on AWS (April 2017)
Building Open Source Platforms on AWS (April 2017)Building Open Source Platforms on AWS (April 2017)
Building Open Source Platforms on AWS (April 2017)
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
vu2urc
 

Dernier (20)

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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Dan Sommerfield, Sr. Manager Daniele Stroppa, Solutions Architect October 2015 DVO305 Turbo Charge Your Continuous Deployment Pipeline with Containers
  • 2. What to expect from the session • Best practices for containers in continuous delivery solutions • Toolset to implement such solutions • Demos
  • 3. Why use containers? • Process isolation • Portable • Fast • Efficient
  • 4. Why use containers for continuous delivery? • Roll out features as quickly as possible • Predictable and reproducible environment • Fast feedback
  • 5. Demo application architecture Nginx Proxy Ruby on Rails web app PostgreSQL on RDS
  • 6. Amazon EC2 Container Service • Highly scalable container management service • Easily manage clusters for any scale • Flexible container placement • Integrated with other AWS services • Extensible • Amazon ECS concepts • Cluster and container instances • Task definition and task
  • 7. Development and deployment workflow Orchestration layer Code repository Build environment Test environment Deployment environment Source
  • 8. Stage 1 - Source
  • 10. AWS CodeCommit • Private Git repository • Fully managed • Secure • Highly available and scalable • Alternatives • GitHub • Bitbucket
  • 11. Docker and Docker Toolbox • Docker (Linux > 3.10) or Docker Toolbox (OS X, Windows) • Define app environment with Dockerfile
  • 12. Dockerfile FROM ruby:2.2.2 RUN apt-get update -qq && apt-get install -y build- essential libpq-dev RUN mkdir -p /opt/web WORKDIR /tmp ADD Gemfile /tmp/ ADD Gemfile.lock /tmp/ RUN bundle install ADD . /opt/web WORKDIR /opt/web
  • 13. Docker Compose Define and run multi-container applications: 1. Define app environment with Dockerfile 2. Define services that make up your app in docker- compose.yml 3. Run docker-compose up to start and run entire app
  • 14. docker-compose.yml proxy: build: ./proxy ports: - "80:80" links: - web web: build: ./web command: bundle exec rails server -b 0.0.0.0 environment: - SECRET_KEY_BASE=secretkey expose: - "3000"
  • 15. Amazon ECS CLI • Easily create Amazon ECS clusters & supporting resources such as EC2 instances • Run Docker Compose configuration files on Amazon ECS • Available today – http://amzn.to/1jBf45a
  • 16. Amazon ECS CLI > ecs-cli configure > ecs-cli compose build > ecs-cli compose up --local
  • 18. Stage 2 - Build
  • 21. Jenkins • Extensible • Flexible builds • Ant or Maven based projects • Docker images • Optionally runs in Docker container
  • 22. CloudBees Docker Build and Publish plugin
  • 23. Amazon EC2 Container Registry • Private Docker Repository • v2 Docker Registry • AWS Identity and Access Management (IAM) and AWS Auth integration • Low latency push, pulls, and inspection • Alternatives: • DockerHub • Docker Trusted Registry
  • 24. Stage 3 - Test
  • 26. rspec and capybara-webkit require 'rails_helper.rb' feature 'Signing in' do scenario 'can sign in' do visit '/users/sign_in' within("#new_user") do fill_in 'Email', :with => 'test@test.com' fill_in 'Password', :with => 'password' end click_button 'Log in' expect(page).to have_content('Signed in successfully.') end end
  • 27. Jenkins • Run tests directly via Docker run • Run tests in a Docker slave on Amazon ECS
  • 29. Jenkins slave Dockerfile FROM jenkinsci/jnlp-slave USER root RUN apt-get update -qq && apt-get install -y -qq git curl wget build-essential […] RUN apt-get install -y qt5-default libqt5webkit5-dev RUN apt-get install -y xvfb x11-xkb-utils xfonts-100dpi xfonts- 75dpi xfonts-scalable xfonts-cyrillic x11-apps ENV RUBY_VERSION 2.2.2 RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc && mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git && cd /src/ruby-build && ./install.sh && cd / && rm -rf /src/ruby-build && ruby-build $RUBY_VERSION /usr/local
  • 30. Jenkins slave Dockerfile RUN gem update --system && gem install bundler # Install Gems WORKDIR /tmp ADD Gemfile /tmp/ ADD Gemfile.lock /tmp/ RUN bundle install USER jenkins
  • 32. Stage 4 - Deploy
  • 34. Amazon ECS CLI > ecs-cli up > ecs-cli compose up > ecs-cli ps
  • 35. AWS Elastic Beanstalk • Deploy and manage applications without worrying about the infrastructure • AWS Elastic Beanstalk manages your database, Elastic Load Balancing (ELB), Amazon ECS cluster, monitoring, and logging • Docker support • Single container (on Amazon EC2) • Multi container (on Amazon ECS)
  • 36. Putting it all together
  • 37. Putting it all together Orchestration layer
  • 38. AWS CodePipeline Model and automate your software release processes • Rapid delivery • Configurable workflow • Customizable • Highly integrated
  • 40. Takeaways • Use Amazon ECS CLI to run application • Run Jenkins jobs in containers • Let AWS CodePipeline orchestrate your pipeline
  • 42. Related Sessions • CMP302 - Amazon EC2 Container Service: Distributed Applications at Scale - Thursday, Oct 8, 2:45 PM • DVO202 - DevOps at Amazon: A Look at Our Tools and Processes - Wednesday, Oct 7, 12:15 PM • DVO317 - From Local Docker Development to Production Deployments - Wednesday, Oct 7, 4:15 PM
  • 44. Additional resources • Amazon ECS CLI GitHub - http://bit.ly/1FJfWyQ • CloudBees Docker Build and Publish plugin - http://bit.ly/1LUryzZ • CloudBees Jenkins ECS plugin - http://bit.ly/1RiMpNK