SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
© 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

Más contenido relacionado

La actualidad más candente

CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
Amazon Web Services
 

La actualidad más candente (20)

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
 
Deep Dive - CI/CD on AWS
Deep Dive - CI/CD on AWSDeep Dive - CI/CD on AWS
Deep Dive - CI/CD on AWS
 
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
 
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
 
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,...
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
 
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
 
(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 ...
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
Getting Started on Amazon EKS
Getting Started on Amazon EKSGetting Started on Amazon EKS
Getting Started on Amazon EKS
 
고객 경험을 통한 AWS 클라우드 이전을 위한 지름길 - 김효정 (AWS 솔루션즈 아키텍트)
고객 경험을 통한 AWS 클라우드 이전을 위한 지름길 - 김효정 (AWS 솔루션즈 아키텍트)고객 경험을 통한 AWS 클라우드 이전을 위한 지름길 - 김효정 (AWS 솔루션즈 아키텍트)
고객 경험을 통한 AWS 클라우드 이전을 위한 지름길 - 김효정 (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
 
Automation CICD
Automation CICDAutomation CICD
Automation CICD
 
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
 
(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
 
Amazon ECS
Amazon ECSAmazon ECS
Amazon ECS
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 

Destacado

(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
 

Destacado (14)

(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
 
(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
 
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
 
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
 

Similar a (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
 

Similar a (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
 

Más 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
 

Más 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
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

(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