Why does DevOps matter? How can you use continuous integration to build your product faster, make it more highly available, and be able to recover from bugs quickly? Let one of our solutions architects walk you through continuous integration and continuous delivery on AWS. This session includes live demos of our tools AWS CodeCommit, AWS CodePipeline, and AWS CodeDeploy.
Speaker: Leo Zhandovsky, Solutions Architect, Amazon Web services
recordings to the Canberra Summit can be found here
https://aws.amazon.com/events/anz/on-demand/canberra-summit/
2. Why does DevOps matter?
• High-performing IT organizations deploy 30x more
frequently with 200x shorter lead times; they have 60x
fewer failures and recover 168x faster.
• Lean management and continuous delivery practices
create the conditions for delivering value faster,
sustainably.
• High performance is achievable whether your apps are
greenfield, brownfield, or legacy.
(source: puppet labs 2015 State of Devops Report)
https://puppetlabs.com/sites/default/files/2015-state-of-devops-report.pdf
3. What are CI and CD?
• Continuous Delivery
• A software engineering approach in which teams keep
producing valuable software in short cycles and ensure that
the software can be reliably released at any time
• Continuous Integration
• The practice, in software engineering, of merging all
developer working copies to a shared mainline several times
a day
4. What are CI and CD?
• Changes to code automatically deployed to mainline
branch
• After passing unit and mock tests
• Makes changes to code and deployments iterative, not
monolithic
• Bugs are detected quickly
• Helps automate deployments
• Allows rapid development and deployment
9. CodeCommit: source control
Private Git repositories hosted on Amazon S3
Full Git compatibility (use with existing tools)
All the benefits of the cloud
(scalable, durable, reliable, low pay-as-you-go pricing)
No size limits on repositories (store binary files)
Online web console
11. CodePipeline: continuous delivery
Customizable release automation, with integrated build and test
Model and visualize custom release workflow
(source è build è beta è gamma è prod)
Automate builds, tests, and deployments
Integrate with third-party and custom tools
Manual approvals
12. Deployment
Coordinate software updates to fleets of EC2 instances
Rolling updates for no downtime
Deployment health checks and easy rollback
Auto Scaling integration
Works with any application
Reuse existing setup tools
(Bash, Powershell, Chef, Puppet…)
14. Components of CI/CD with AWS Code Services
CI Software*
EC2 Instance
Project Management
Software
EC2 Instance
Build
Artifacts
S3 Bucket
Git Repository
CodeCommit
AWS
CodePipeline
AWS
CodeDeploy
15. DevOps Partner Solutions
Solutions vetted by the AWS Partner Competency Program
Continuous
Integration &
Delivery
Rapidly and reliably build, test and release your applications,
while improving quality and reducing time to market
Configuration
Management
Treat your infrastructure as code, manage container,
operating system, and application configurations
https://aws.amazon.com/solutions/partners/dev-ops/
17. Application architecture
Jenkins
(on EC2 instance)
WordPress servers
Availability Zone A Availability Zone B
WordPress servers
Auto Scaling group
RDS MySQL primary RDS MySQL standby
ELB load balancer
18. Developer
S3 bucket
Jenkins
(on EC2 instance)
1. Push code to
remote repository
2. CodePipeline polls
GitHub for new
commits
3. CodePipeline
pulls new commits
into ZIP file in S3
5. Jenkins
runs tests on
code and
notifies
CodePipeline
of results
7. Servers
download
and install
AWS CodeDeploy
6. Servers are
notified of
deployment
4. Jenkins polls
CodePipeline for
new activity
WordPress servers
(Auto Scaled)
8. CodeDeploy is
notified of success
or failure
AWS CodePipeline
Deployment overview
9. Load test is run
on the staging
Auto Scaling
group, production
deploy is triggered
10. Deployment is
marked in
NewRelic
19. CodeDeploy lifecycle events
AWS CodeDeploy
Elastic Load
Balancer
Target Instance
S3 bucket
1. ApplicationStop
• Deregister from load
balancer
• Stop server
3. BeforeInstall
• Delete old version
• Install dependencies
• Install New Relic
agents
2. DownloadBundle
4. Install
5. AfterInstall
• Update permissions
• Download config/creds
• Mark deployment in New
Relic
6. ApplicationStart
• Start server
• Register with load
balancer
0. Instance is notified of new
deployment
7. ValidateService
CodeDeploy is notified of
successful deployment
21. CodeDeploy custom deployment configs
HOST_COUNT FLEET_PERCENT = 80
No less than 80% of hosts should
be healthy during deployment
No less than 10 hosts should be
healthy during deployment,
regardless of the number of
instances
= 10
22. Failed deployments in CodeDeploy
Deploy
version 1.5
Deploy
to
O
K
?
Yes
Deployment failed
Deploy
to
O
K
?
Yes
Deploy
to
O
K
?
Yes
No No No
Done
version 1.4
Recover from a failed or canceled
deployment by creating a new
deployment of the previous version
23. AWS Training & Certification
Intro Videos & Labs
Free videos and labs to
help you learn to work with
30+ AWS services –
in minutes!
Training Classes
In-person and online
courses to build
technical skills –
taught by accredited
AWS instructors
Online Labs
Practice working with
AWS services in live
environment –
Learn how related
services work together
AWS Certification
Validate technical skills
and expertise - identify
qualified IT talent or show
you are AWS cloud ready
Learn more: aws.amazon.com/training