SlideShare uma empresa Scribd logo
1 de 38
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Jeremy Cowan, Solutions Architect
August 30th, 2016
Continuous Delivery to
Amazon EC2 Container
Service
What is continuous delivery?
• Software development practice where code changes are
automatically built, tested, and prepared for a release to production.
• Extends continuous integration by deploying all code changes to a
testing environment and/or a production environment after the build
stage.
• Developers approve the update to production when they are ready.
• Different from continuous deployment, where the push to production
happens automatically without explicit approval.
• Continuous delivery lets developers automate testing beyond just
unit tests to verify application updates across multiple dimensions
before deploying.
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
Development and deployment workflow
Code
repository
Build
environment
Test
environment
Deployment
environment
Source
Stage 1 - Source
Development environment
Code
repository
Source
Docker and Docker Toolbox
• Docker (Linux > 3.10)
• Docker Toolbox or Docker Beta (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"
Stage 2 - Build
Build environment
Build
environment
Build environment
Containers can be used in two ways:
• Execution environment for the build jobs
• Output of the build process itself
Containers as build execution environment
Containers as build artifacts
Amazon EC2 Container Registry
• Security
• IAM Resource-based Policies
• CloudTrail Audit Logs
• Images encrypted at transit and at rest
• Easily Manage & Deploy Images
• Tight Integration with ECS
• Integration with Docker Toolset
• Management Console & AWS CLI
• Reliability & Performance
• S3 Backed
Stage 3 - Test
Test environment
Test
environment
Running test inside a container
Usual Docker commands available within your test
environment
Run the container with the commands necessary to
execute your tests, e.g.:
docker run web bundle exec rake test
Running test against a container
Start a container running in detached mode with an
exposed port serving your app
Run browser tests or other black box tests against the
container, e.g. headless browser tests
Stage 4 - Deploy
Deployment environment
Deployment
environment
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
Recent Enhancements to ECS
• Task Roles
• Dynamic Port Mapping and path based routing
• Auto-scaling policies for services
• Network modes for Docker
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)
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
Configuring the ECS CLI
# Configure the CLI using environment variables
> export AWS_ACCESS_KEY_ID=<my_access_key>
> export AWS_SECRET_ACCESS_KEY=<my_secret_key>
> ecs-cli configure --region us-east-1 --access-key
$AWS_ACCESS_KEY_ID --secret-key $AWS_SECRET_ACCESS_KEY --cluster
ecs-cli-demo
# Configure the CLI using an existing AWS CLI profile
> ecs-cli configure --region us-west-2 --profile ecs-profile --
cluster ecs-cli-demo
Deploy and scale Compose app with ECS CLI
# Deploy a Compose app as a Task or as a Service
> ecs-cli compose up
> ecs-cli compose ps
> ecs-cli compose service create
> ecs-cli compose service start
# Scale a Compose app deployed as a Task or as a Service
> ecs-cli compose scale n
> ecs-cli compose service scale n
Continuous Delivery
Workflows
Continuous delivery to ECS with Jenkins
4. Push image to
Docker registry
2. Build image from
sources 3. Run test on image
1. Code push
triggers build
5. Update Service
6. Pull image
Continuous delivery to ECS with Jenkins
Easy Deployment
Developers – Merge into master, done!
Jenkins Build Steps
Trigger via Webhooks, Monitoring, Lambda
Build Docker image via Build and Publish plugin
Push Docker image into Registry
Register Updated Job with ECS API
Continuous delivery to ECS with CodePipeline
1. Code push
triggers pipeline
2. Lambda function
creates EC2 instance
3. Image is built and
pushed to ECR
4. Lambda function
terminates EC2 instance
5. Lambda function
deploy new task
revision to ECS
Continuous delivery to ECS with CodePipeline
• Lambda custom actions
• Create and terminate EC2 instance
• Update ECS service
• EC2 instance uses user data to build an image and push
it to Amazon ECR
Amazon ECS continuous delivery partners
Continuous delivery to ECS with Shippable
Demo
Thank you!

Mais conteúdo relacionado

Mais procurados

Master Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins PlatformMaster Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins Platform
dcjuengst
 

Mais procurados (20)

Arquitectura de microservicios
Arquitectura de microserviciosArquitectura de microservicios
Arquitectura de microservicios
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
 
Intro - Cloud Native
Intro - Cloud NativeIntro - Cloud Native
Intro - Cloud Native
 
Introduction to Dev Ops and Containerisation with Docker
Introduction to Dev Ops and Containerisation with DockerIntroduction to Dev Ops and Containerisation with Docker
Introduction to Dev Ops and Containerisation with Docker
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps Journey
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
 
CI/CD 101
CI/CD 101CI/CD 101
CI/CD 101
 
Multimedia Translation & Localization Services
Multimedia Translation & Localization ServicesMultimedia Translation & Localization Services
Multimedia Translation & Localization Services
 
DevOps and Splunk
DevOps and SplunkDevOps and Splunk
DevOps and Splunk
 
DevOps and Tools
DevOps and ToolsDevOps and Tools
DevOps and Tools
 
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
實現 Angular, Docker 與 Kubernetes 持續部署 (NG+2020)
 
Transforming Organizations with CI/CD
Transforming Organizations with CI/CDTransforming Organizations with CI/CD
Transforming Organizations with CI/CD
 
Master Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins PlatformMaster Continuous Delivery with CloudBees Jenkins Platform
Master Continuous Delivery with CloudBees Jenkins Platform
 
[AWS Community Day 2021] AWS와 함께하는 무중단 배포 파이프라인 개선기
[AWS Community Day 2021] AWS와 함께하는 무중단 배포 파이프라인 개선기[AWS Community Day 2021] AWS와 함께하는 무중단 배포 파이프라인 개선기
[AWS Community Day 2021] AWS와 함께하는 무중단 배포 파이프라인 개선기
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang Nguyen
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Welcome to Azure Devops
Welcome to Azure DevopsWelcome to Azure Devops
Welcome to Azure Devops
 
CI / CD ( 지속적인 통합 / 지속적인 전달 ) 발표 자료 다운로드
CI / CD ( 지속적인 통합 / 지속적인 전달 ) 발표 자료 다운로드CI / CD ( 지속적인 통합 / 지속적인 전달 ) 발표 자료 다운로드
CI / CD ( 지속적인 통합 / 지속적인 전달 ) 발표 자료 다운로드
 
Audiovisual translation (avt)
Audiovisual translation (avt)Audiovisual translation (avt)
Audiovisual translation (avt)
 
Using WordPress as a Headless CMS
Using WordPress as a Headless CMSUsing WordPress as a Headless CMS
Using WordPress as a Headless CMS
 

Destaque

Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...
Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...
Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...
Oscar Romano
 

Destaque (20)

Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Containers - Transforming the data centre as we know it 2016
Containers - Transforming the data centre as we know it 2016Containers - Transforming the data centre as we know it 2016
Containers - Transforming the data centre as we know it 2016
 
Continuous Integration with Amazon ECS and Docker
Continuous Integration with Amazon ECS and DockerContinuous Integration with Amazon ECS and Docker
Continuous Integration with Amazon ECS and Docker
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
 
Marseille 2017 FTTH Conference Main Programm "Service Delivery in a 3-Layer-O...
Marseille 2017 FTTH Conference Main Programm "Service Delivery in a 3-Layer-O...Marseille 2017 FTTH Conference Main Programm "Service Delivery in a 3-Layer-O...
Marseille 2017 FTTH Conference Main Programm "Service Delivery in a 3-Layer-O...
 
Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...
Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...
Cisco Visual Networking Index (VNI) Global Mobile Data Traffic Forecast for 2...
 
Containers 101 - CloudCamp London
Containers 101 - CloudCamp LondonContainers 101 - CloudCamp London
Containers 101 - CloudCamp London
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECSContinuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS
 
Marseille 2017 FTTH Conference Workshop "Revenues from Passive Network and fr...
Marseille 2017 FTTH Conference Workshop "Revenues from Passive Network and fr...Marseille 2017 FTTH Conference Workshop "Revenues from Passive Network and fr...
Marseille 2017 FTTH Conference Workshop "Revenues from Passive Network and fr...
 
Cisco Visual Networking Index and VNI Service Adoption 2014–2019 - Argentina
Cisco Visual Networking Index and VNI Service Adoption 2014–2019 - ArgentinaCisco Visual Networking Index and VNI Service Adoption 2014–2019 - Argentina
Cisco Visual Networking Index and VNI Service Adoption 2014–2019 - Argentina
 
Rev motors brochure_oct. 2012
Rev motors brochure_oct. 2012Rev motors brochure_oct. 2012
Rev motors brochure_oct. 2012
 
VMworld 2014: Extreme Performance Series
VMworld 2014: Extreme Performance Series VMworld 2014: Extreme Performance Series
VMworld 2014: Extreme Performance Series
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Hackproof Your Cloud: Responding to 2016 Threats
Hackproof Your Cloud: Responding to 2016 ThreatsHackproof Your Cloud: Responding to 2016 Threats
Hackproof Your Cloud: Responding to 2016 Threats
 
Customer Sharing: Trend Micro - Trend Micro's DevOps Practices
Customer Sharing: Trend Micro - Trend Micro's DevOps Practices Customer Sharing: Trend Micro - Trend Micro's DevOps Practices
Customer Sharing: Trend Micro - Trend Micro's DevOps Practices
 
AWS Partner ConneXions Taiwan - Q3 2016 Technology Update
AWS Partner ConneXions Taiwan - Q3 2016 Technology UpdateAWS Partner ConneXions Taiwan - Q3 2016 Technology Update
AWS Partner ConneXions Taiwan - Q3 2016 Technology Update
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Digital Workloads on Amazon Web Services
Digital Workloads on Amazon Web ServicesDigital Workloads on Amazon Web Services
Digital Workloads on Amazon Web Services
 
Stackops - Openstack Nova sizing & service definition
Stackops - Openstack Nova sizing & service definitionStackops - Openstack Nova sizing & service definition
Stackops - Openstack Nova sizing & service definition
 
Big Data Solutions Day - Calgary
Big Data Solutions Day - CalgaryBig Data Solutions Day - Calgary
Big Data Solutions Day - Calgary
 

Semelhante a Continuous Delivery to Amazon ECS - AWS August Webinar Series

基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻
Mason Mei
 
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
 

Semelhante a Continuous Delivery to Amazon ECS - AWS August Webinar Series (20)

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 EC2 Container Service
Continuous Delivery to Amazon EC2 Container ServiceContinuous Delivery to Amazon EC2 Container Service
Continuous Delivery to Amazon EC2 Container Service
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
 
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)
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
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
 
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWSAWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
 
Aws User Group Singapore Presentation Oct-21-2020
Aws User Group Singapore Presentation Oct-21-2020Aws User Group Singapore Presentation Oct-21-2020
Aws User Group Singapore Presentation Oct-21-2020
 
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
 
AWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps PresentationAWS ECS Copilot DevOps Presentation
AWS ECS Copilot DevOps Presentation
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
 
Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017
Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017
Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017
 
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
 
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
Managing Your Application Lifecycle on AWS: Continuous Integration and Deploy...
 
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
 
基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻基于Aws的持续集成、交付和部署 代闻
基于Aws的持续集成、交付和部署 代闻
 
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 ...
 
ACDKOCHI19 - CI / CD using AWS Developer Tools
ACDKOCHI19 - CI / CD using AWS Developer ToolsACDKOCHI19 - CI / CD using AWS Developer Tools
ACDKOCHI19 - CI / CD using AWS Developer Tools
 
A Pathway to Continuous Integration/Continuous Delivery on AWS
A Pathway to Continuous Integration/Continuous Delivery on AWSA Pathway to Continuous Integration/Continuous Delivery on AWS
A Pathway to Continuous Integration/Continuous Delivery on AWS
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
 

Mais 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
 

Mais 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

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 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 ..
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"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 ...
 

Continuous Delivery to Amazon ECS - AWS August Webinar Series

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Jeremy Cowan, Solutions Architect August 30th, 2016 Continuous Delivery to Amazon EC2 Container Service
  • 2. What is continuous delivery? • Software development practice where code changes are automatically built, tested, and prepared for a release to production. • Extends continuous integration by deploying all code changes to a testing environment and/or a production environment after the build stage. • Developers approve the update to production when they are ready. • Different from continuous deployment, where the push to production happens automatically without explicit approval. • Continuous delivery lets developers automate testing beyond just unit tests to verify application updates across multiple dimensions before deploying.
  • 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. Development and deployment workflow Code repository Build environment Test environment Deployment environment Source
  • 6. Stage 1 - Source
  • 8. Docker and Docker Toolbox • Docker (Linux > 3.10) • Docker Toolbox or Docker Beta (OS X, Windows) • Define app environment with Dockerfile
  • 9. 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
  • 10. 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
  • 11. 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"
  • 12. Stage 2 - Build
  • 14. Build environment Containers can be used in two ways: • Execution environment for the build jobs • Output of the build process itself
  • 15. Containers as build execution environment
  • 16. Containers as build artifacts
  • 17. Amazon EC2 Container Registry • Security • IAM Resource-based Policies • CloudTrail Audit Logs • Images encrypted at transit and at rest • Easily Manage & Deploy Images • Tight Integration with ECS • Integration with Docker Toolset • Management Console & AWS CLI • Reliability & Performance • S3 Backed
  • 18. Stage 3 - Test
  • 20. Running test inside a container Usual Docker commands available within your test environment Run the container with the commands necessary to execute your tests, e.g.: docker run web bundle exec rake test
  • 21. Running test against a container Start a container running in detached mode with an exposed port serving your app Run browser tests or other black box tests against the container, e.g. headless browser tests
  • 22. Stage 4 - Deploy
  • 24. 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
  • 25. Recent Enhancements to ECS • Task Roles • Dynamic Port Mapping and path based routing • Auto-scaling policies for services • Network modes for Docker
  • 26. 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)
  • 27. 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
  • 28. Configuring the ECS CLI # Configure the CLI using environment variables > export AWS_ACCESS_KEY_ID=<my_access_key> > export AWS_SECRET_ACCESS_KEY=<my_secret_key> > ecs-cli configure --region us-east-1 --access-key $AWS_ACCESS_KEY_ID --secret-key $AWS_SECRET_ACCESS_KEY --cluster ecs-cli-demo # Configure the CLI using an existing AWS CLI profile > ecs-cli configure --region us-west-2 --profile ecs-profile -- cluster ecs-cli-demo
  • 29. Deploy and scale Compose app with ECS CLI # Deploy a Compose app as a Task or as a Service > ecs-cli compose up > ecs-cli compose ps > ecs-cli compose service create > ecs-cli compose service start # Scale a Compose app deployed as a Task or as a Service > ecs-cli compose scale n > ecs-cli compose service scale n
  • 31. Continuous delivery to ECS with Jenkins 4. Push image to Docker registry 2. Build image from sources 3. Run test on image 1. Code push triggers build 5. Update Service 6. Pull image
  • 32. Continuous delivery to ECS with Jenkins Easy Deployment Developers – Merge into master, done! Jenkins Build Steps Trigger via Webhooks, Monitoring, Lambda Build Docker image via Build and Publish plugin Push Docker image into Registry Register Updated Job with ECS API
  • 33. Continuous delivery to ECS with CodePipeline 1. Code push triggers pipeline 2. Lambda function creates EC2 instance 3. Image is built and pushed to ECR 4. Lambda function terminates EC2 instance 5. Lambda function deploy new task revision to ECS
  • 34. Continuous delivery to ECS with CodePipeline • Lambda custom actions • Create and terminate EC2 instance • Update ECS service • EC2 instance uses user data to build an image and push it to Amazon ECR
  • 35. Amazon ECS continuous delivery partners
  • 36. Continuous delivery to ECS with Shippable
  • 37. Demo