SlideShare una empresa de Scribd logo
1 de 40
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
Continuous Integration and
Deployment Best Practices on AWS
Adrian White
Solutions Architect, Amazon Web Services
Innovation, Quality, Governance
Stacks /
Environment(s)
An example CI / CD workflow
CI/CD tool
Issue
Tracker
SCM
Infrastructure
automation /
deployment
Test tools /
harnesses
CloudFormation Stack(s)
An example CI / CD workflow
PHPUnit
jQuery
…
Tasks for AWS
A CI / CD pipeline
Teardown
Release
Deploy
Test
Code
Get your source under control
Prod Phoenix (feature)UAT
Code
Test
Deploy
Release
Teardown
Code
Test
Deploy
Release
Teardown
Code
Test
Deploy
Release
Teardown
Code
Test
Deploy
Release
Teardown
Automated Merging
UAT Feature 2Feature 1
What does CI give us?
•  Test driven promotion (of development change)
•  Increasing velocity of feedback cycle through
iterative change
•  Contain change to reduce risk
•  Bugs are detected quickly
•  Automated testing reduces size of testing effort
What does CD give us?
•  Changes are pushed quickly to production
•  Immediate feedback from users
•  Supports A/B testing or “We test customer
reactions to features in production”
•  Hardens, de-risks the deployment process
•  Gives us a breadth of data points across our
applications
Deployment approaches
•  Deploy in place
–  Manage interruption
•  Bake
–  Discrete environment
•  Multiple environments from branches
•  Support A/B testing
•  “Rolling DNS”
Deploy Deploy in-place
Bake
Deploy in-place
Un-baked
•  Common baseline AMI
•  Customise at instantiation
•  Change in-place
Your app
AMI
Deploy in-place
Un-baked
•  Common baseline AMI
•  Customise at instantiation
•  Change in-place
Your app
AMI
Deploy in-place
Un-baked
•  Common baseline AMI
•  Customise at instantiation
•  Change in-place
Your app
AMI
Deploy in-place
Un-baked
•  Common baseline AMI
•  Customise at instantiation
•  Change in-place
Your app
AMI
Deploy in-place
Un-baked
•  Common baseline AMI
•  Customise at instantiation
•  Change in-place
Your app
AMI
Deploy in-place
Un-baked
•  Common baseline AMI
•  Customise at instantiation
•  Change in-place
Your app
AMI
Bake process
1.  Start a builder instance
2.  Bootstrap / cfn-init, cfn-signal
3.  Bake your AMI
4.  Tag it
5.  Destroy/clean up the builder instance
cfn-init
"AWS::CloudFormation::Init" : {
“cfn” : {
"packages" :{
"yum" : { "httpd" : [] }
},
"files":{
“/home/ec2-user/myfile.html:{
"source" : { "Fn::Join" : [ "", ["https://s3-ap-
southeast-2.amazonaws.com/",{ "Ref" : "S3Bucket" },”/myfile.html”]] },
"mode":"000644",
"owner":"root",
"group":"root",
"authentication":"S3AccessCreds”
},
cfn-init
"services": {
"sysvinit" : {
"httpd" : {
"enabled" : "true",
"ensureRunning" : "true"
}
}
}
}
Release
awssummit-1.com awssummit-2.com
awssummit.com
Release
Release
Test the new stack
Match the traffic between the two stacks
Update the “floating” DNS record
Send Notification(s)
ROLLBACK
Blue green deployment
awssummit-1.com awssummit-2.com
awssummit.com
Blue green deployment
awssummit-1.com awssummit-2.com
awssummit.com
Blue green deployment
awssummit-1.com awssummit-2.com
awssummit.com
Blue green deployment
awssummit-1.com awssummit-2.com
awssummit.com
Teardown
Teardown
Ensure that no traffic is moving though ELB
Teardown the CloudFormation Stack
Deregister the AMI
Advanced Techniques
•  Managing CD sprawl / Segregation of duties
•  Extending CloudFormation with custom
resources
•  Extending your CD tools
Stack chaining
Stack chaining
Stack chaining
CloudFormation Merging
Git Git
CloudFormation
Operations Repo Application Repo
VPC
Subnets
Security Groups
CloudFormation Frameworks
Best Practice
Application Code
Application CloudFormation
Load Balancing Setup
CloudFormation Custom Resources
•  Change DB schema during deployment
•  Extend CloudFormation to support other
services - “So You Think You Are An
AWS Ninja” talk
https://github.com/aws/aws-cfn-resource-bridge
https://github.com/awslabs/aws-cfn-custom-resource-examples
Parameters
Custom resource
implementation
Git
Custom resources – DatabaseSchema
"MyDBSchema" : {
"Type" : "Custom::DatabaseSchema”, "Version" : "1.0",
"Properties" : {
"ServiceToken": "arn:aws:sns:us-east-1:12345EXAMPLE:DBSchema",
"databaseChangeLog" : [ {
"changeSet" : {
"id" : "1",
"author" : "adamthom",
"changes" : [ {
"createTable" : { … }
} ]
}
}
}
}
Custom resources – DatabaseSchema
"createTable" : {
"tableName" : "example",
"columns" : [ {
"column" : {
"name" : "id",
"type" : "int",
"autoIncrement" : true,
"constraints" : {
"primaryKey" : true,
"nullable" : false
}
}
} ]
}
Extending your CD tools
Tasks for AWS
DynamoDB
Situational Awareness
Burden of Responsibility
APIs
Tasks for AWS
Containerisation
•  Build environments for artifacts, don’t update
environments with artifacts
•  All environments are transient
•  Standardisation, abstraction and portability
Docker, Amazon Linux and Elastic
Beanstalk
•  A framework for managing containers
•  LXC containers are more lightweight than VMs
•  Amazon Linux (2014.03) bundles Docker 0.9
and LXC 0.9
•  Docker containers on Beanstalk are Go!
Innovation, Quality, Governance
Discrete environments for each branch
Automated testing on every commit on every branch
Leverage CD tools to provide separation of duties
Audit Logs
Git approvals process
Use custom resources to extend CloudFormation
Leverage DNS
Interface with the API
Environments for artifacts
Expand your skills with AWS
Certification
aws.amazon.com/certification
Exams
Validate your proven
technical expertise with
the AWS platform
On-Demand
Resources
aws.amazon.com/training/
self-paced-labs
Videos & Labs
Get hands-on practice
working with AWS
technologies in a live
environment
aws.amazon.com/training
Instructor-Led
Courses
Training Classes
Expand your technical
expertise to design, deploy,
and operate scalable,
efficient applications on AWS

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

CI/CD on AWS Deploy Everything All the Time
CI/CD on AWS Deploy Everything All the TimeCI/CD on AWS Deploy Everything All the Time
CI/CD on AWS Deploy Everything All the Time
 
Deploying systems using AWS DevOps tools
Deploying systems using AWS DevOps toolsDeploying systems using AWS DevOps tools
Deploying systems using AWS DevOps tools
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
Test-Driven Infrastructure with CloudFormation and Cucumber.
Test-Driven Infrastructure with CloudFormation and Cucumber. Test-Driven Infrastructure with CloudFormation and Cucumber.
Test-Driven Infrastructure with CloudFormation and Cucumber.
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
 
Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)
 
Continuous delivery and deployment on AWS
Continuous delivery and deployment on AWSContinuous delivery and deployment on AWS
Continuous delivery and deployment on AWS
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best Practices
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
 
DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous Delivery
 
Introduction to DevOps on AWS
Introduction to DevOps on AWSIntroduction to DevOps on AWS
Introduction to DevOps on AWS
 
Atlassian Connect on Serverless Platforms: Low Cost Add-Ons
Atlassian Connect on Serverless Platforms: Low Cost Add-OnsAtlassian Connect on Serverless Platforms: Low Cost Add-Ons
Atlassian Connect on Serverless Platforms: Low Cost Add-Ons
 
Continuous deployment-at-flipkart
Continuous deployment-at-flipkartContinuous deployment-at-flipkart
Continuous deployment-at-flipkart
 
Test & Dev on the AWS Cloud
Test & Dev on the AWS CloudTest & Dev on the AWS Cloud
Test & Dev on the AWS Cloud
 
Serverless Delivery
Serverless DeliveryServerless Delivery
Serverless Delivery
 
DevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and ProcessesDevOps at Amazon: A Look at Our Tools and Processes
DevOps at Amazon: A Look at Our Tools and Processes
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 

Similar a Continuous Integration and Deployment Best Practices on AWS

Similar a Continuous Integration and Deployment Best Practices on AWS (20)

AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...
AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...
AWS Summit Auckland 2014 | Continuous Integration and Deployment Best Practic...
 
Continuous Integration and Deployment Best Practices on AWS
 Continuous Integration and Deployment Best Practices on AWS  Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
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 CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Integrating-Cloud-Development-Security-And-Operations.pdf
Integrating-Cloud-Development-Security-And-Operations.pdfIntegrating-Cloud-Development-Security-And-Operations.pdf
Integrating-Cloud-Development-Security-And-Operations.pdf
 
Integrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdfIntegrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdf
 
AWS CodeDeploy: Manage Deployment Complexity
AWS CodeDeploy: Manage Deployment ComplexityAWS CodeDeploy: Manage Deployment Complexity
AWS CodeDeploy: Manage Deployment Complexity
 
Transforming Software Development
Transforming Software DevelopmentTransforming Software Development
Transforming Software Development
 
Automate your serverless stack
Automate your serverless stack Automate your serverless stack
Automate your serverless stack
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step Functions
 
Building CI-CD Pipelines for Serverless Applications
Building CI-CD Pipelines for Serverless ApplicationsBuilding CI-CD Pipelines for Serverless Applications
Building CI-CD Pipelines for Serverless Applications
 
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step Functions
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
 
Build AWS CloudFormation Custom Resources (DEV417-R2) - AWS re:Invent 2018
Build AWS CloudFormation Custom Resources (DEV417-R2) - AWS re:Invent 2018Build AWS CloudFormation Custom Resources (DEV417-R2) - AWS re:Invent 2018
Build AWS CloudFormation Custom Resources (DEV417-R2) - AWS re:Invent 2018
 

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
 
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
 
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
 
+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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
 

Último (20)

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
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
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
 
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 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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​
 
+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...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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 - 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...
 
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
 
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
 

Continuous Integration and Deployment Best Practices on AWS

  • 1. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. Continuous Integration and Deployment Best Practices on AWS Adrian White Solutions Architect, Amazon Web Services
  • 3. Stacks / Environment(s) An example CI / CD workflow CI/CD tool Issue Tracker SCM Infrastructure automation / deployment Test tools / harnesses
  • 4. CloudFormation Stack(s) An example CI / CD workflow PHPUnit jQuery … Tasks for AWS
  • 5. A CI / CD pipeline Teardown Release Deploy Test Code
  • 6. Get your source under control Prod Phoenix (feature)UAT Code Test Deploy Release Teardown Code Test Deploy Release Teardown Code Test Deploy Release Teardown Code Test Deploy Release Teardown
  • 8. What does CI give us? •  Test driven promotion (of development change) •  Increasing velocity of feedback cycle through iterative change •  Contain change to reduce risk •  Bugs are detected quickly •  Automated testing reduces size of testing effort
  • 9. What does CD give us? •  Changes are pushed quickly to production •  Immediate feedback from users •  Supports A/B testing or “We test customer reactions to features in production” •  Hardens, de-risks the deployment process •  Gives us a breadth of data points across our applications
  • 10. Deployment approaches •  Deploy in place –  Manage interruption •  Bake –  Discrete environment •  Multiple environments from branches •  Support A/B testing •  “Rolling DNS” Deploy Deploy in-place Bake
  • 11. Deploy in-place Un-baked •  Common baseline AMI •  Customise at instantiation •  Change in-place Your app AMI
  • 12. Deploy in-place Un-baked •  Common baseline AMI •  Customise at instantiation •  Change in-place Your app AMI
  • 13. Deploy in-place Un-baked •  Common baseline AMI •  Customise at instantiation •  Change in-place Your app AMI
  • 14. Deploy in-place Un-baked •  Common baseline AMI •  Customise at instantiation •  Change in-place Your app AMI
  • 15. Deploy in-place Un-baked •  Common baseline AMI •  Customise at instantiation •  Change in-place Your app AMI
  • 16. Deploy in-place Un-baked •  Common baseline AMI •  Customise at instantiation •  Change in-place Your app AMI
  • 17. Bake process 1.  Start a builder instance 2.  Bootstrap / cfn-init, cfn-signal 3.  Bake your AMI 4.  Tag it 5.  Destroy/clean up the builder instance
  • 18. cfn-init "AWS::CloudFormation::Init" : { “cfn” : { "packages" :{ "yum" : { "httpd" : [] } }, "files":{ “/home/ec2-user/myfile.html:{ "source" : { "Fn::Join" : [ "", ["https://s3-ap- southeast-2.amazonaws.com/",{ "Ref" : "S3Bucket" },”/myfile.html”]] }, "mode":"000644", "owner":"root", "group":"root", "authentication":"S3AccessCreds” },
  • 19. cfn-init "services": { "sysvinit" : { "httpd" : { "enabled" : "true", "ensureRunning" : "true" } } } }
  • 21. Release Release Test the new stack Match the traffic between the two stacks Update the “floating” DNS record Send Notification(s) ROLLBACK
  • 22. Blue green deployment awssummit-1.com awssummit-2.com awssummit.com
  • 23. Blue green deployment awssummit-1.com awssummit-2.com awssummit.com
  • 24. Blue green deployment awssummit-1.com awssummit-2.com awssummit.com
  • 25. Blue green deployment awssummit-1.com awssummit-2.com awssummit.com
  • 26. Teardown Teardown Ensure that no traffic is moving though ELB Teardown the CloudFormation Stack Deregister the AMI
  • 27. Advanced Techniques •  Managing CD sprawl / Segregation of duties •  Extending CloudFormation with custom resources •  Extending your CD tools
  • 31. CloudFormation Merging Git Git CloudFormation Operations Repo Application Repo VPC Subnets Security Groups CloudFormation Frameworks Best Practice Application Code Application CloudFormation Load Balancing Setup
  • 32. CloudFormation Custom Resources •  Change DB schema during deployment •  Extend CloudFormation to support other services - “So You Think You Are An AWS Ninja” talk https://github.com/aws/aws-cfn-resource-bridge https://github.com/awslabs/aws-cfn-custom-resource-examples Parameters Custom resource implementation Git
  • 33. Custom resources – DatabaseSchema "MyDBSchema" : { "Type" : "Custom::DatabaseSchema”, "Version" : "1.0", "Properties" : { "ServiceToken": "arn:aws:sns:us-east-1:12345EXAMPLE:DBSchema", "databaseChangeLog" : [ { "changeSet" : { "id" : "1", "author" : "adamthom", "changes" : [ { "createTable" : { … } } ] } } } }
  • 34. Custom resources – DatabaseSchema "createTable" : { "tableName" : "example", "columns" : [ { "column" : { "name" : "id", "type" : "int", "autoIncrement" : true, "constraints" : { "primaryKey" : true, "nullable" : false } } } ] }
  • 35. Extending your CD tools Tasks for AWS DynamoDB
  • 36. Situational Awareness Burden of Responsibility APIs Tasks for AWS
  • 37. Containerisation •  Build environments for artifacts, don’t update environments with artifacts •  All environments are transient •  Standardisation, abstraction and portability
  • 38. Docker, Amazon Linux and Elastic Beanstalk •  A framework for managing containers •  LXC containers are more lightweight than VMs •  Amazon Linux (2014.03) bundles Docker 0.9 and LXC 0.9 •  Docker containers on Beanstalk are Go!
  • 39. Innovation, Quality, Governance Discrete environments for each branch Automated testing on every commit on every branch Leverage CD tools to provide separation of duties Audit Logs Git approvals process Use custom resources to extend CloudFormation Leverage DNS Interface with the API Environments for artifacts
  • 40. Expand your skills with AWS Certification aws.amazon.com/certification Exams Validate your proven technical expertise with the AWS platform On-Demand Resources aws.amazon.com/training/ self-paced-labs Videos & Labs Get hands-on practice working with AWS technologies in a live environment aws.amazon.com/training Instructor-Led Courses Training Classes Expand your technical expertise to design, deploy, and operate scalable, efficient applications on AWS