Upload
amazon-web-services
View
484
Download
0
Embed Size (px)
Citation preview
©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
• Service-Oriented Architecture (SOA)
• Everything gets a service interface
• Primitives
• “Microservices”
• Decentralized ownership (self service)
• Promote best practices without being restrictive
• Technology agnostic
• Support agile practices
• Continuous Delivery
• From check-in to production
• CI/CD + Release Automation
• >90% of teams
Pipelines
= 50 million deployments a year
Thousands of teams + Microservices architectures +
Multiple environments + Continuous delivery?
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
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
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
1) Package your application (with an AppSpec)
Start
BeforeInstall
ApplicationStart
ApplicationStop
Install
ValidateService
DownloadBundle
AfterInstall
End
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
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
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
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
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
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