Date post: | 27-Jan-2015 |
Category: |
Technology |
Upload: | pivotal |
View: | 106 times |
Download: | 0 times |
©2014
Elisabeth HendricksonUsing PaaS for Continuous Delivery
Spoiler
Cloud Foundry is perfect for Continuous Delivery.
The hard part about Continuous Delivery probably isn’t your deployment
infrastructure.
What is CI?
Hint: it’s not a server
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.
What is CD?Hint: it’s not just a lot of CI
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
“
Preconditions
• Fully automated tests at unit / integration / system levels
• Continuous integration infrastructure• Scripted, automated deployment to each
needed environment
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
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.
(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.)
CD with Cloud Foundry
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
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
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
Example: Cloud Foundry Docs
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.
©2014
Elisabeth Hendrickson, @testobsessedThank You!