using paas for continuous delivery (cloud foundry summit 2014)

17
©2014 Elisabeth Hendrickson ing PaaS for Continuous Deliver

Upload: pivotal

Post on 27-Jan-2015

107 views

Category:

Technology


0 download

DESCRIPTION

Technical Track presented by Elisabeth Hendrickson at Pivotal. With continuous delivery, you release frequently and with very little, or no, manual intervention. That requires three things: fully automated tests; a continuous integration server that executes those tests and can promote successful deployments; and an automated deployment mechanism with zero downtime. PaaS's are a perfect fit for this. Cloud Foundry makes zero-downtime automated deployments straightforward. Further, cloud-based CI services such as Cloudbees work well with Cloud Foundry. In this talk, Elisabeth explains how to achieve continuous delivery with Cloud Foundry using one of our own applications (docs.cloudfoundry.org) as an example.

TRANSCRIPT

Page 1: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)

©2014

Elisabeth HendricksonUsing PaaS for Continuous Delivery

Page 2: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)

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)

What is CI?

Hint: it’s not a server

Page 4: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)

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)

What is CD?Hint: it’s not just a lot of CI

Page 6: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)

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)

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)

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)

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)

(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)

CD with Cloud Foundry

Page 12: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)

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)

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)

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)

Example: Cloud Foundry Docs

Page 16: Using PaaS for Continuous Delivery (Cloud Foundry Summit 2014)

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)

©2014

Elisabeth Hendrickson, @testobsessedThank You!