TechTalk: Reduce Risk with Canary Deployments
-
Upload
ca-technologies -
Category
Technology
-
view
644 -
download
2
Transcript of TechTalk: Reduce Risk with Canary Deployments
TechTalk: Reducing Risk with Canary Deployments
Marta Benach
DevOps: Continuous Delivery
CA Technologies
Sr. Engineering Services Architect
DO4T32T
@TwitterHandle
#CAWorld
2 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
© 2015 CA. All rights reserved. All trademarks referenced herein belong to their respective companies.
The content provided in this CA World 2015 presentation is intended for informational purposes only and does not form any type of
warranty. The information provided by a CA partner and/or CA customer has not been reviewed for accuracy by CA.
For Informational Purposes Only
Terms of this Presentation
3 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Abstract
During this session, we’ll discuss concepts like Canary, Blue/Green and A/B deployments. We will show you just how easy it is to use CA Release Automation to automate these advanced techniques to reduce your overall risk and ensure that the applications you are deploying will perform as expected.
Marta
Benach
CA Technologies
Principal Engineering Services Architect
4 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Agenda
WHAT IS A CANARY DEPLOYMENT
DEPLOYMENT TYPES
NETFLIX/ETSY CANARY DEPLOYMENT
HOW RELEASE AUTOMATION SUPPORTS CANARY DEPLOYMENTS
QUESTIONS
1
2
3
4
5
5 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Every company is becoming a technology company,every business a digital business.
Re-think how the business operates to find
new ways to create and deliver customer value. DIGITAL
TRANSFORMATIONDIGITAL
TRANSFORMATION
Increase agility Increase qualityIncrease release velocity and cadence
CONTINUOUS DELIVERY
The Ability to Reliably Release High-Quality Applications at Any Time
6 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
What is a canary deployment?
The basic idea of a canary deployment is to deploy new code to a small subset of your production infrastructure to see how the new code (the canary) compares to the old code (the baseline).
7 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
How do canary deployments help us?
Reducing risk/increases confidence in the release
Contain failure/faster recovery due to failure
Faster time to end user
Key technique of Continuous Delivery
8 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Deployment and Testing Techniques
A/B
Testing performance and usability,generally front-end testing
Blue/Green
Two identical product systems in which one is live and the other is standby
Canary
Rolling out code to a small subset of servers/users at a time, sometimes referred to as a phased or incremental rollout
9 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
A/B Testing
A randomized experiment with variations in the application.
A subset of users is exposed to each version.
Metrics are collected and used to determine effectiveness (performance, usability). Christian Posta, “Dzone, Blue-green Deployments, A/B Testing and Canary Releases,”
https://dzone.com/articles/blue-green-deployments-ab-testing-and-canary-relea-2
50% visitors see variation A
50% visitors see variation B
variation A
variation B
23%conversion
11%conversion
10 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Blue Green DeploymentsReleasing Applications in a consistent manner with limited down time
Two identical production systems, Blue and Green
Either Blue or Green is live at any given time
New code is pushed to the standby system(Green) and tested
New users are directed to Green, active Blue users are gradually directed to Green when active sessions timeout
Blue then becomes standby system
Reverse proxy
App1 App3
DB
App2
App1 App3
DB
App2
Reverse proxy
App1 App3
DB
App2
App1 App3
DB
App2
Christian Posta —Dzone —Blue-green Deployments, A/B Testing and Canary Releases
https://dzone.com/articles/blue-green-deployments-ab-testing-and-canary-relea-2
11 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Canary Deployments
Christian Posta —Dzone —Blue-green Deployments, A/B Testing and Canary Releases
https://dzone.com/articles/blue-green-deployments-ab-testing-and-canary-relea-2
Canary in the coalmine—warns of danger.
A small subset of servers are taken off the load balancer.
The latest build is deployed to the subset and tested.
After successful testing, code is fully deployed.
LOADBALANCER
v1 v1 v1
v1 v1
12 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
A Few Examples
Online video streaming service
Continuous delivery model
Deploy after every commit
Canary deployments
– Test.
– Gather metrics.
– Analyze.
– Release to full production.
A premier destination for handmade goods, vintage items and craft supplies.
Continuous delivery model
Configuration as code/database schema changes
Canary Deployments
– Test.
– Gather Metrics.
– Analyze.
– Release.
ETSYNETFLIX
13 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Canary Deployments with Release Automation
Ability to deploy code to limited number of servers during deployment
Dynamically add/remove servers to canary group
Ability to execute canary deployments in all environments not just prod
Rollback for failures
Run staggered and scheduled deployments
Clear visualization of the deployment status
Consistent delivery of the artifacts
14 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
A Typical Canary Deployment Scenario with CA Release Automation
Stage artifacts for deployments, including: build artifacts, test scripts,
config files and deployment manifests.
Remove canary servers from load balancing.
Upgrade canary application.
Proceed with automated testing
of application
Restore Canary servers to load balancing (connectivity and
sanity checks).
Upgrade the rest of the servers if the Canary
testing with live usage is successful (otherwise
rollback).
15 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Pipeline ReportCanary Environment
16 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Pre-Deployment
17 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Deployment
18 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Post Deployment
19 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Canary Deployments with CA Release Automation
• A deployment technique helps to reduce risk while introducing new content to production.
• Easily define and execute canary deployments with CA Release Automation.
• Consistently and reliably deploy new functionality to production environments.
• Fail faster and mitigate risk.
Notice: No canaries were harmed during the creation of this presentation.
Summary
20 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Recommended Sessions
SESSION # TITLE DATE/TIME
DO4T06SVision and Roadmap: Learn How Application Release
Solutions Help You Lead the Way11/18/2015 at 2:00 pm
DO4X213L
Hands-On Lab: Complement CA Release Automation with
a New Continuous Delivery Solution Offering A Visual
Approach for Complex Application Releases
11/18/2015 at 4:30 pm
DO4X210L
Hands-On Lab: Build Integrations You Need with CA
Release Automation Rapid Development Kit (RDK) and
Software Development Kit (SDK)
11/19/2015 at 3:00 pm
21 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Must See Demos
CA Release Automation
CA Release Automation
Theater 4
CA Continuous Delivery DirectorTheater 4
CA RA Rapid Dev. Kit, SDKCA Release Automation
Theater 4
Integrations
CA Release Automation
Theater 4
22 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Follow On Conversations At…
Smart Bar
CA Release Automation
Theater 4
Tech Talks
CA Release Automation
Theater 4
23 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Q & A
24 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
For More Information
To learn more, please visit:
http://cainc.to/Nv2VOe
CA World ’15