To jump into the meat of the plugin, once it is configured cleanly all you have to do is the following:
For an autopilot style
and for a Blue-Green deployment:
and the plugin tasks would take care of the rest.
What is being solved
If you use Cloud Foundry CLI to push an application to Cloud Foundry, then existing instances of the application is stopped, replaced and started up. This introduces a downtime for the application until the new instance of the application is up. Just to demonstrate this behavior, the following graph represents a steady traffic to a website while an application is pushed to Cloud Foundry - the 30 second blip is when the new app is being started up.
Autopilot and Blue-Green style deployments
Autopilot and Blue-Green styles of deployment fix the issue by carefully orchestrating the deployment of an application such that the external facing route always points to a working version of the application.
The plugin now natively performs all the steps needed for these two styles of no-downtime deployments.
Here is how the same graph looks with an Autopilot style type deployment using the plugin, note that there is a slightly higher response time around the time the new application switches in. Once primed though the response times smooth out:
and with a Blue-Green style deployment using this plugin
1. The details about how to install and configure the plugin is available here - https://github.com/pivotalservices/ya-cf-app-gradle-plugin
2. A sample application configured with the plugin is here - https://github.com/bijukunjummen/cf-show-env
3. The load test using gatling is available here