Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between Restage and Restart in PCF

What is difference between Restage and Restart your application in Pivotal Cloud Foundary and when to pick one among this?

like image 312
Vijai Avatar asked May 22 '18 20:05

Vijai


People also ask

What is meant by restage in PCF?

NAME. restage - Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.). This action will cause app downtime.

What is a droplet in PCF?

A droplet is the result of the application staging process. Managed Services. Services provided by third parties that are integrated into Cloud Foundry through APIs so that Cloud Foundry users can provision reserved resources and credentials on demand.

What is CF start?

cf start - starts a stopped application.


2 Answers

The quotes below are from the 2.0 documentation.

Restart

Restarting your application stops your application and restarts it with the already compiled droplet.

So if you haven't made any changes and don't need to re-compile the project, a Restart should be done.

Restage

Restaging your application stops your application and restages it, by compiling a new droplet and starting it.

Restaging your app compiles a new droplet from your app without updating your app source. If you must update your app source, re-push your app.

Differences

The difference between the two is that Restart won't re-compile the project while Restage does.

like image 200
Thomas Avatar answered Oct 07 '22 14:10

Thomas


In addition to the above answer, to know when to restart and restage please find below the explanation from the Docs.

When to Restart:

Restart your app to refresh the app’s environment after actions such as binding a new service to the app or setting an environment variable that only the app consumes.

When to Restage:

Restage your app if you have changed the environment in a way that affects your staging process, such as setting an environment variable that the buildpack consumes. The staging process has access to environment variables, so the environment can affect the contents of the droplet.

like image 30
Andy Avatar answered Oct 07 '22 13:10

Andy