Blue-Green Deployment with CloudFoundry
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.