aws codedeploy: manage deployment complexitycodedeploy.pdfaws codedeploy • scale from 1 instance...
TRANSCRIPT
![Page 1: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/1.jpg)
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved ©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
AWS CodeDeploy: Manage Deployment Complexity
Shaun Pearce AWS Solutions Architect
![Page 2: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/2.jpg)
Prelude
![Page 3: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/3.jpg)
The Amazon DevOps Story
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
![Page 4: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/4.jpg)
![Page 5: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/5.jpg)
• Service-Oriented Architecture (SOA)
• Everything gets a service interface
• Primitives
• “Microservices”
![Page 6: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/6.jpg)
• Decentralized
• Two-Pizza Teams
• Agility, Autonomy, Accountability, and Ownership
• “DevOps”
![Page 7: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/7.jpg)
• Decentralized ownership (self service)
• Promote best practices without being restrictive
• Technology agnostic
• Support agile practices
![Page 8: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/8.jpg)
• Deployment Service
• Rolling Deployments
• Health Checking
• Versioned Artifacts & Rollbacks
![Page 9: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/9.jpg)
• Continuous Delivery
• From check-in to production
• CI/CD + Release Automation
• >90% of teams
Pipelines
![Page 10: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/10.jpg)
= 50 million deployments a year
Thousands of teams + Microservices architectures +
Multiple environments + Continuous delivery?
![Page 11: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/11.jpg)
![Page 12: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/12.jpg)
AWS CodeDeploy
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
![Page 13: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/13.jpg)
Why use a deployment service?
Automate deployments
Manage complexity
Avoid downtime
![Page 14: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/14.jpg)
AWS CodeDeploy
• Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring • On-Premises support
Staging
CodeDeploy v1, v2, v3
Production
Dev
Coordinate automated deployments, just like Amazon
Application Revisions
Deployment Groups
![Page 15: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/15.jpg)
1) Package your application (with an AppSpec)
version: 0.0os: linuxfiles: - source: chef/ destination: /etc/chef/codedeploy - source: target/hello.war destination: /var/lib/tomcat6/webappshooks: ApplicationStop: - location: deploy_hooks/stop-tomcat.sh BeforeInstall: - location: deploy_hooks/install-chef.sh AfterInstall: - location: deploy_hooks/knife-install.sh ApplicationStart: - location: deploy_hooks/chef-solo.sh ValidateService: - location: deploy_hooks/verify_service.sh
![Page 16: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/16.jpg)
1) Package your application (with an AppSpec)
version: 0.0os: linuxfiles: - source: chef/ destination: /etc/chef/codedeploy - source: target/hello.war destination: /var/lib/tomcat6/webappshooks: ApplicationStop: - location: deploy_hooks/stop-tomcat.sh BeforeInstall: - location: deploy_hooks/install-chef.sh AfterInstall: - location: deploy_hooks/knife-install.sh ApplicationStart: - location: deploy_hooks/chef-solo.sh ValidateService: - location: deploy_hooks/verify_service.sh
![Page 17: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/17.jpg)
1) Package your application (with an AppSpec)
Start
BeforeInstall
ApplicationStart
ApplicationStop
Install
ValidateService
DownloadBundle
AfterInstall
End
![Page 18: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/18.jpg)
1) Package your application (with an AppSpec)
version: 0.0os: linuxfiles: - source: chef/ destination: /etc/chef/codedeploy - source: target/hello.war destination: /var/lib/tomcat6/webappshooks: ApplicationStop: - location: deploy_hooks/stop-tomcat.sh BeforeInstall: - location: deploy_hooks/install-chef.sh AfterInstall: - location: deploy_hooks/knife-install.sh ApplicationStart: - location: deploy_hooks/chef-solo.sh ValidateService: - location: deploy_hooks/verify_service.sh
![Page 19: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/19.jpg)
2) Set up your target environments
Agent Agent Agent
Staging
Agent Agent
Agent Agent
Agent
Agent
Production
Deployment Group Deployment Group
Group instances by: • Auto Scaling group • EC2 tag • On-premises tag
![Page 20: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/20.jpg)
3) Deploy! aws deploy create-deployment \
--application-name MyApp \
--deployment-group-name TargetGroup \
--s3-location bucket=MyBucket,key=MyApp.zip
AWS CLI & SDKs AWS Console CI / CD Partners GitHub
![Page 21: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/21.jpg)
Deployment Config – Choose speed
v2 v1 v1 v1 v1 v1 v1 v1
v2 v2 v2 v2 v1 v1 v1 v1
v2 v2 v2 v2 v2 v2 v2 v2
One-at-a-Time
Half-at-a-Time
All-at-Once
![Page 22: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/22.jpg)
Rolling Update – Deploy without downtime
v1 v1 v1
Load Balancer
![Page 23: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/23.jpg)
Rolling Update – Deploy without downtime
v1 v2 v1
Load Balancer
![Page 24: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/24.jpg)
Rolling Update – Deploy without downtime
v2 v2 v1
Load Balancer
![Page 25: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/25.jpg)
Rolling Update – Deploy without downtime
v2 v2 v2
Load Balancer
![Page 26: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/26.jpg)
Rolling Update – Deploy without downtime
v2 v2 v2
Load Balancer
![Page 27: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/27.jpg)
Health Tracking – Catch deployment problems
v3 v2 v2 Stop
Load Balancer
![Page 28: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/28.jpg)
Health Tracking – Catch deployment problems
v2 v2 v2
Load Balancer
Rollback
![Page 29: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/29.jpg)
Health Tracking – Catch deployment problems
v2 v2 v2
Load Balancer
![Page 30: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/30.jpg)
Demo
![Page 31: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/31.jpg)
Product Integrations
![Page 32: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/32.jpg)
AWS CodePipeline
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
![Page 33: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/33.jpg)
Why use a release automation service?
Automate workflow
Release quickly
Ensure quality
![Page 34: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/34.jpg)
From this… …to this
![Page 35: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/35.jpg)
AWS CodePipeline
• Inspired by Pipelines • Flexible workflow engine • Extensible, plugin based architecture
Continuous delivery and release automation, just like Amazon
Build 1) Build 2) Unit test
1) Deploy 2) UI test
Source Beta Production 1) Deploy 2) Load test
Gamma 1) Deploy region1 2) Deploy region2 3) Deploy region3
![Page 36: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/36.jpg)
AWS CodeCommit
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
![Page 37: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/37.jpg)
What's required for source control in the cloud?
Fully Managed
High Availability
Security
![Page 38: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/38.jpg)
AWS CodeCommit
• Data redundancy across AZs • Data at rest encryption • Integrated with AWS Identity and Access Management • No repo size limit
git push CodeCommit
Git objects in S3
Git index in DynamoDB
Encryption key in KMS
SSH or HTTPS
Secure, scalable, and managed Git source control
![Page 39: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/39.jpg)
Summary
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
![Page 40: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/40.jpg)
AWS Code services
CodeCommit coming soon
CodePipeline coming soon
CodeDeploy launched Nov 2014
![Page 41: AWS CodeDeploy: Manage Deployment ComplexityCodeDeploy.pdfAWS CodeDeploy • Scale from 1 instance to thousands • Deploy without downtime • Centralize deployment control and monitoring](https://reader030.vdocuments.us/reader030/viewer/2022041016/5ec7ec31b0586619b6106ce2/html5/thumbnails/41.jpg)
Thank You