The Why and How of Continuous Delivery
-
Upload
nigel-mcnie -
Category
Technology
-
view
2.410 -
download
2
description
Transcript of The Why and How of Continuous Delivery
![Page 1: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/1.jpg)
The Why and How of Continuous Delivery
Nigel McNiegetyourgameon.co.nz
![Page 2: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/2.jpg)
Continuous Delivery is a strategy for releasing software
![Page 3: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/3.jpg)
The Development Landscape
• Business Demands• Team instability• Near-realtime dev requirements• Technical Debt
![Page 4: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/4.jpg)
The Deployment Landscape
• Waterfall• Agile• Business As Usual (BAU)• Hotfixing/Firefighting• Marketing Release• 5am Release• Friday Afternoon Release• Scheduled Downtime• Unexpected Downtime• Merge Hell• String Freeze• QA Approval• Management signoff
![Page 5: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/5.jpg)
What's wrong with them?
• Even nightly releases are not fast enougho Vulnso Urgent/Important fixes
• The less you deploy, the worse you get at ito Process subverted for quick fixeso Process rot
• Delays cause inefficiencyo Merge hello Wasted code & time
![Page 6: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/6.jpg)
What's wrong with them?
Releases are a source of friction.The larger the friction, the more a project struggles.
![Page 7: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/7.jpg)
What's wrong with them?
Releases are feared.The less you confront your fear, the more a project struggles.
![Page 8: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/8.jpg)
The Development Landscape (again)• Business Demands• Team instability• Near-realtime dev requirements• Technical Debt
![Page 9: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/9.jpg)
Continuous Delivery
• The ability to deploy at any time• Two requirements:
o Deployment process should be automatedo Mainline branch should always be deployable
• Mechanics: Commit, Test, Deploy
![Page 10: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/10.jpg)
Commit
• Small commits• If possible, all commits!• Need a tactic to hide feature development
![Page 11: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/11.jpg)
Feature Branches
• Well understood and easy to use• Be careful - Merge Hell needs to be managed• GitHub uses this model
![Page 12: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/12.jpg)
Feature Flags (Flippers/Toggles)
• "Feature branching in code"• Can be as complex as you want
o "Dark launch"o Enable for admins only, (random?) list of users, user
cohort, QA team...o Enable after a certain date
• Built-in kill switches
![Page 13: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/13.jpg)
Test
• Continuous Integration (poorman: manual)• Should complete quickly• When they fail, the impending deployment is abandoned
![Page 14: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/14.jpg)
Deploy
• Triggered by a successful run of the tests (poorman: manual)
• As few commands as possible! Should be frictionless• Should be no cause for fear
![Page 15: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/15.jpg)
What happens if things break?
• Should always be possible to roll back to the previous commito The smaller the changes are, the easier this is
• Write a test to cover the break• Strategy assumption: "Every Defect Once"
![Page 16: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/16.jpg)
"It sounds too risky!"
• CD is actually a risk reduction strategy• Presupposes what you're doing now is working ;)• Going slower decreases frequency of risk, but massively
increases magnitude
![Page 17: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/17.jpg)
Benefits
• More responsive• Solid incentive to develop good testing habits• Less pressure• Less waste• Improved developer attitude
![Page 18: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/18.jpg)
Core Benefit
CD lets you go fast with confidence
![Page 19: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/19.jpg)
"But what about... ?"
• "I work for a financial institution"o Your problem is the test suite, not CD
• "You're outsourcing QA to your customers!"o You can still involve QA - deploy to a staging environment
simultaneously, or use feature flagso You already outsource QA to your customers to some
extent anyway ;)• "Batching up changes is safer"
o Waiting longer does not correlate with higher qualityo Other eyes checking does - which you can do without
batching
![Page 20: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/20.jpg)
But what about... ?
• "We'd never get signoff for this"o "We're losing millions" never goes through signoff either
• "Legislation forbids us from..."o Devs change stuff all the time, in violation of legislation!
See previous pointo Some dev always has root access
• "GST goes up to 15% on XXX..."o Manage dependency issues with feature flags
• "Our tests now take hours to run!"o Test cluster
• "That's all good for you SaaS guys, but..." o Google Chrome, Moodle, IOS
![Page 21: The Why and How of Continuous Delivery](https://reader035.fdocuments.us/reader035/viewer/2022070302/548176055806b5ce108b4671/html5/thumbnails/21.jpg)
Final Thoughts
• CD has significant mindshare in the tech startup community• Major players are already adopting it• You will be left behind - nobody who switches to CD
switches back• Try it on a small/new project to test the concept if you need