Step 11: Auto-update the running application

Process Supervisor Demo

Updating an application can be an arduous task. With the Habitat Supervisor, we simply promote a new build artifact and it automatically handles the update for us.

In the previous step, we used the Supervisor to start the application which, by default, watches for new stable versions of a package in the public depot. As we did earlier, click the Build latest version button in the Builder web UI to start a new build (see image below).

screenshot of requesting a new build in the Builder web UI

Before promoting this new build artifact to stable, make sure you have the Supervisor log visible in your terminal session from the previous step.

Once the build has finished, go to the Versions tab and click the Promote to stable button for this build. Within a minute, you will see the log update and the new version will be noted in the output (see image below). With a simple click of a button, you're now running the latest version of your application code!

screenshot of supervisor log updating to latest stable version

As you would expect, if there were more than one instance running, they would all update according to the declared update strategy.

That's a wrap!

By running your application with the Habitat, you are now able to take advantage of all that the Habitat Supervisor has to offer.

Return to the Learn Habitat page for additional demos and tutorials.