![Page 1: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/1.jpg)
©2014
Elisabeth HendricksonUsing PaaS for Continuous Delivery
![Page 2: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/2.jpg)
Spoiler
Cloud Foundry is perfect for Continuous Delivery.
The hard part about Continuous Delivery probably isn’t your deployment
infrastructure.
![Page 3: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/3.jpg)
What is CI?
Hint: it’s not a server
![Page 4: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/4.jpg)
Culture Change: Stop the Line
If just one single test out of thousands fails, the whole build failed. We stop the line and fix the issue.
![Page 5: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/5.jpg)
What is CD?Hint: it’s not just a lot of CI
![Page 6: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/6.jpg)
Continuous Delivery Defined
Continuous delivery means that your software is production-ready from day one of your project (even when it's not "feature complete") and that you can release to users on demand at the push of a button. – Jez Humble
“
![Page 7: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/7.jpg)
Preconditions
• Fully automated tests at unit / integration / system levels
• Continuous integration infrastructure• Scripted, automated deployment to each
needed environment
![Page 8: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/8.jpg)
From Build to Pipeline
Deploy Config A to Test Env A
Deploy Config B to Test Env B
Unit Tests
System Tests
System Tests
Promotecheckin
![Page 9: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/9.jpg)
Culture Changes: Overcoming Resistance
What do you mean
there’s no manual QA
phase?
Deliver half-done
features? Can’t
possibly work.
What’s the point?
Customers don’t want stuff that
fast anyway.
Automation is expensive.
![Page 10: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/10.jpg)
(Yes, change is hard.)
All checking is
automated.
Develop in slices. Aim for
MVP. Try feature flags.
There is a strategic
advantage in being
continuously deliverable even if you don’t ship.
Error-prone manual processes
are more expensive. (Try TDD.)
![Page 11: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/11.jpg)
CD with Cloud Foundry
![Page 12: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/12.jpg)
Cloud Foundry Supports CD
• Promotion path: environment variables support running identical code in test and prod environments
• Automated deploys: cf v6 is scriptable• Zero-downtime deploys: the blue/green
deploy pattern
![Page 13: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/13.jpg)
Promotion: Same Code, Different Space
Testing Space
Your AppPromote*
“Automated Promotion” isn’t a feature yet. You can automate promotion in your build pipeline with the cf cli.
*
Production Space
Your App
Test DB Production DB
Connect to the DB with VCAP_SERVICES
![Page 14: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/14.jpg)
Zero Downtime: Blue/Green Deploys
http://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html
app-greenstopped
app-bluestarted
app-greenstarted
app-bluestopped
v2
v3
push new code to app-green
stop blue, start green
app-greenstopped
app-bluestarted
v2
v1
v3
v2
![Page 15: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/15.jpg)
Example: Cloud Foundry Docs
![Page 16: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/16.jpg)
What About the Automated Tests?
Sorry, Cloud Foundry can’t help you there.
But it can get deployment and configuration yaks out of your way so your team can focus on the hard things that only they can solve.
Hint: there are still no magic bullets.
![Page 17: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)](https://reader034.vdocument.in/reader034/viewer/2022042714/54c6dfa54a7959f23e8b456b/html5/thumbnails/17.jpg)
©2014
Elisabeth Hendrickson, @testobsessedThank You!