Pivotal/Cloud Foundry/Tasks
From r00tedvw.com wiki
Cloud Foundry | Cloud Foundry CLI | Apps | Tasks
Contents |
Blue/Green App Deployment
Push an app
start by pushing the app and defining the subdomain (hostname) and domain.
~$ cf push web-app -n daring-wildebeest -d cfapps.io
Update the app and push a new version
This will be done along side the old version and given a new subdomain. The old version will retain its existing route and traffic to it will still go to the old app version.
~$ cf push web-app-2 -n responsive-aligator -d cfapps.io
Map original route to new app
Now that we have (2) separate instances of the web-app running, one of the old version and one of the new version, we can map the old route to the new app. This will not replace the old app, instead both the old and new apps will be accessible from the old route (quasi load balanced).
~$ cf map-route web-app-2 cfapps.io --hostname web-app-daring-wildebeest
Remove old app from old route
Next we can remote the old app from the old route, leaving only the new app accessible from the old route.