Platinum Partner
architects,cloud,tips and tricks,cloudfoundry,blue-green

Blue-Green Deployment with CloudFoundry

Martin Fowler Describes Blue-Green Deployment

Pivotal CF Blue-Green Deployment Documentation

Matt Stine’s NFJS Article on B-G

A simple example:

cf push Blue-tspann -n demo-time-tspann -i 1
cf push Green-tspann -n demo-time-temp-tspann -i 1
cf map-route Green-tspann cfapps.io -n demo-time-tspann
cf unmap-route Blue-tspann cfapps.io -n demo-time-tspann
cf delete-route cfapps.io -n demo-time-temp-tspann
cf routes
cf delete Blue-tspann

First we push our original version of the application, then a second version of the application.   You are either releasing a new version or doing an A/B version.   Jenkins can automate this deploy.

Now we have two versions of the application running in two identical environments.

We map the Green application to the original route (demo-time-tspann).   Now all requests are load balanced between the Blue and Green applications.

Now unmap the Blue application so no traffic will be routed there.   Now all traffic goes to the new Green version.  You can keep the Blue version deployed as a fail safe or delete it.


{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}