DevOps On AWS
DevOps On AWS
July 2016
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why are we
here today?
© Mike Gifford
https://secure.flickr.com/photos/mgifford/4525333972
https://creativecommons.org/licenses/by-nc-sa/2.0/legalcode
Software moves faster today
© Steve Jurvetson
https://www.flickr.com/photos/jurvetson/5201796697/
https://creativecommons.org/licenses/by-nc-sa/2.0/legalcode
Release processes have four major phases
Continuous integration
Continuous delivery
Continuous deployment
Release Processes levels
Continuous delivery
Continuous deployment
Continuous delivery benefits
Automate the software Improve developer Find and address Deliver updates faster
release process productivity bugs quickly
A look back at
development
at Amazon
© Craig Morey
https://secure.flickr.com/photos/pixelthing/15806918992/
https://creativecommons.org/licenses/by-nc-sa/2.0/legalcode
Development transformation at Amazon: 2001–2009
2001 2009
Development benefits
• Faster
• Safer
• Consistent and
standardized
• Visualization of the
process
This has continued to work out really well
In 2014
• Thousands of service teams across Amazon
• Building microservices
• Practicing continuous delivery
• Many environments (staging, beta, production)
50 million deployments
We continue to survey our
software developers every year
and in 2014 results found only
one development tool or service
could be correlated statistically
with happier developers:
Build
Stage
JenkinsOnEC2 Pipeline
Jenkins Action
Transition
Deploy
JavaApp
AWS Elastic Beanstalk
CodePipeline
MyApplication
Source
Source
GitHub
Build
JenkinsOnEC2 NotifyDevelopers
Jenkins AWS Lambda
Parallel actions
Deploy
JavaApp
AWS Elastic Beanstalk
CodePipeline
MyApplication
Source
Source
GitHub
Build
JenkinsOnEC2 NotifyDevelopers
Jenkins AWS Lambda
Sequential actions
TestAPI
Runscope
Deploy
JavaApp
AWS Elastic Beanstalk
CodePipeline
MyApplication
Source 1. Get changes
Source
GitHub
© Spencer Cooper
https://secure.flickr.com/photos/spenceyc/7481166880
https://creativecommons.org/licenses/by/2.0/legalcode
Building your code
“Building” code typically refers to languages that
require compiled binaries
• .NET languages: C#, F#, VB.net, etc
• Java and JVM languages: Java, Scala,
JRuby
• Go
• iOS languages: Swift, Objective-C
We also refer to the process of creating Docker
container images as “building” the image EC2
No building required!
one at a time
v2 v1 v1 v1 v1 v1 Agent Agent
OR
half at a time Prod Deployment group
v2 v2 v2 v1 v1 v1
Agent Agent Agent
all at once
v2 v2 v2 v2 v2 v2 Agent Agent Agent
Launching to
production
https://www.flickr.com/photos/spacex/16510243060/
Launching to production
After you’ve built and tested your code and
hopefully gone through a few preproduction
deploys, its time for the real thing!
You’ll want think about the following
• Impact to customers
• Impact to infrastructure
• Impact to business
Build
JenkinsOnEC2
Jenkins
Deploy
1. Poll for job Amazon
EC2
JavaApp
Action 2. Acknowledge job 3. Perform job
CustomBeanstalk
Elastic action
4. Put success
Job worker
JavaApp
Elastic Beanstalk
CodePipeline With AWS Lambda-based actions,
MyApplication AWS CodePipeline
Source
Source
drives the integration with Lambda,
GitHub which then connects with other
applications or services
Build
JenkinsOnEC2
Jenkins
Deploy
1. Invoke Lambda function
MyAction
2. Perform job
AWS Lambda 3. PutJobSuccessResult w/
continuation token
AWS
JavaApp 4. Invoke Lambda function w/ Lambda
Elastic Beanstalk continuation token
5. PutJobSuccessResult #3 and #4 repeat until no continuation
token is sent, signaling the action has
been completed (#5)
What extension method should I use?
Long-running tasks need more work Control over links displayed in console
• Pipeline stops executing when it has reached the point at which you
set the approval action
• Pipeline execution resumes only when the action has been approved
bit.ly/AWSCodeStarterKit
But wait, there’s more!
Resources to learn more
• Continuous integration: https://aws.amazon.com/devops/continuous-integration/
• Continuous delivery: https://aws.amazon.com/devops/continuous-delivery/
• CodePipeline
• https://aws.amazon.com/codepipeline/
• https://aws.amazon.com/documentation/codepipeline/
• CodeDeploy
• https://aws.amazon.com/codedeploy/
• https://aws.amazon.com/documentation/codedeploy/
• https://github.com/awslabs/aws-codedeploy-samples
• Code services starter kit: http://bit.ly/AWSCodeStarterKit
Thank You!