aws codedeploy, aws codepipeline, and aws codecommit: transforming software development

44
AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015 AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015 AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development Andy Troutman Manager, AWS Deployment Services ©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Upload: amazon-web-services

Post on 13-Aug-2015

1.037 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

Andy Troutman

Manager, AWS Deployment Services

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 2: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Prelude

Page 3: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Agenda• The Amazon DevOps story

• New developer tools– AWS CodeDeploy– AWS CodePipeline– AWS CodeCommit

• Summary/Q&A

Page 4: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

The Amazon DevOps story

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 5: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Page 6: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

• Service-Oriented Architecture (SOA)

• Everything gets a service interface

• Primitives

• “Microservices”

Page 7: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

• Decentralized

• Two-pizza teams

• Agility, autonomy, accountability, and ownership

• “DevOps”

Page 8: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Page 9: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

• Deployment service

• Zero downtime

• Health checking

• Versioned artifacts & rollbacks

Page 10: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

• Continuous delivery

• From check-in to production

• CI/CD + release automation

• >90% of teams

Pipelines

Page 11: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

= 50 million deployments a year

Thousands of teams +Microservices architecture +Multiple environments +Continuous delivery

Page 12: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Page 13: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

DevOpsPipeline

SourceDevelopers

commitchanges

BuildChanges

are built and unit tested

StagingCode deployed to

staging and load/UI tested

ProductionCode is deployed

to production

Changes, updates, and

fixes

Ideas, requests, and bugs

Developers Customers

Page 14: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS CodeDeploy

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 15: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Why use a deployment service?

Automatedeployments

Managecomplexity

Avoiddowntime

Page 16: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

CodeDeploy

• Scale from 1 instance to thousands• Deploy without downtime• Centralize deployment control and monitoring

Staging

CodeDeployv1, v2, v3

Production

Dev

Coordinate automated deployments, just like AmazonApplication

revisionsDeployment groups

Page 17: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Step 1: Package your application (with an AppSpec file)

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/librarian-install.sh ApplicationStart: - location: deploy_hooks/chef-solo.sh ValidateService: - location: deploy_hooks/verify_service.sh

Page 18: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Step 1: Package your application (with an AppSpec file)

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/librarian-install.sh ApplicationStart: - location: deploy_hooks/chef-solo.sh ValidateService: - location: deploy_hooks/verify_service.sh

Page 19: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Step 1: Package your application (with an AppSpec file)

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/librarian-install.sh ApplicationStart: - location: deploy_hooks/chef-solo.sh ValidateService: - location: deploy_hooks/verify_service.sh

Page 20: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Step 2: Set up your target environments

Agent Agent Agent

Staging

Agent Agent

Agent Agent

Agent

Agent

Production

Deployment groupDeployment group

Group instances by:• Auto Scaling group• Amazon EC2 tag• On-premises tag

Page 21: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Step 3: Deploy!aws deploy create-deployment \--application-name MyApp \--deployment-group-name TargetGroup \--s3-location bucket=MyBucket,key=MyApp.zip

AWS CLI & SDKsAWS ConsoleCI / CD PartnersGitHub

Page 22: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Deployment config – Choose speedv2 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 23: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Rolling update – Deploy without downtime

v1v1 v1

Load Balancer

Page 24: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Rolling update – Deploy without downtime

v1v2 v1

Load Balancer

Page 25: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Rolling update – Deploy without downtime

v2v2 v1

Load Balancer

Page 26: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Rolling update – Deploy without downtime

v2v2v2

Load Balancer

Page 27: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Rolling update – Deploy without downtime

v2v2 v2

Load Balancer

Page 28: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Health Tracking – Catch deployment problems

v2v2 v2

Load Balancer

Page 29: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Health tracking – Catch deployment problems

v3 v2 v2Stop

Load Balancer

Page 30: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Health tracking – Catch deployment problems

v2v2 v2

Load Balancer

Rollback

Page 31: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Health tracking – Catch deployment problems

v2v2 v2

Load Balancer

Page 32: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Demo

Page 33: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Product integrations

Page 34: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS CodePipeline

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 35: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Why use a release automation service?

Automateworkflow

Releasequickly

Ensurequality

Page 36: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

CodePipeline

• Customizable workflow engine• Integrate with partner and custom systems• Visual editor and status

Continuous delivery and release automation, just like Amazon

Build1) Build2) Unit test

1) Deploy2) UI test

Source Beta Production1) Deploy2) Load test

Gamma1) Deploy region12) Deploy region23) Deploy region3

Page 37: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Demo

Page 38: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS CodeCommit

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 39: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

What's required for source control in the cloud?

Fullymanaged

High availability

Security Storeanything

Page 40: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

CodeCommit

• Data redundancy across Availability Zones • Data-at-rest encryption• Integrated with AWS Identity and Access Management• No repo size limit

git push CodeCommit

Git objectsin Amazon S3

Git indexin Amazon DynamoDB

Encryption keyin AWS KMS

SSH or HTTPS

Secure, scalable, and managed Git source control

Page 41: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Same Git experience$ git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/aws-cliCloning into 'aws-cli'...Receiving objects: 100% (16032/16032), 5.55 MiB | 1.25 MiB/s, done.Resolving deltas: 100% (9900/9900), done.Checking connectivity... done.$ nano README.rst $ git commit -am 'updated README'[master 4fa0318] updated README 1 file changed, 1 insertion(+)$ git pushCounting objects: 3, done.Delta compression using up to 4 threads.Compressing objects: 100% (3/3), done.Writing objects: 100% (3/3), 297 bytes | 0 bytes/s, done.Total 3 (delta 2), reused 0 (delta 0)remote: To https://git-codecommit.us-east-1.amazonaws.com/v1/repos/aws-cli 4dacd6d..4fa0318 master -> master

Page 42: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

Summary

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 43: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

AWS code services

CodeCommitcoming soon

CodePipelinecoming soon

CodeDeploylaunched Nov 2014

Page 44: AWS CodeDeploy, AWS CodePipeline, and AWS CodeCommit: Transforming Software Development

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015

Thank You.This presentation will be loaded to SlideShare the week following the Symposium.

http://www.slideshare.net/AmazonWebServices

AWS Government, Education, and Nonprofit Symposium Washington, DC I June 25-26, 2015