O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting/stopping/restarting an application

The rhc command-line client provides commands to start, stop, and restart an application. In this recipe, you will learn how to perform these commands using rhc.

Getting ready

To step through this recipe, you will need rhc installed on your machine. Also, we will make use of the OpenShift application created in the Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

To start an application, run the following command:

rhc start-app --app myapp

To stop an application, run the following command:

rhc stop-app --app myapp

To restart an application, run the following command:

rhc restart-app –-app myapp

The --app option is not required if you are running the command from within ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required