Restarting a Tomcat app requires the user to have the correct permissions. It is not always feasible to grant access to Tomcat, however, using an Octopus runbook, you don't have to. Octopus Deploy comes with a built-in step with the capability to restart a Tomcat App. This allows you to provide a self-service method of starting or stopping a Tomcat app without granting any permissions.
Create the runbook
To create a runbook to restart Tomcat:
- From your project's overview page, navigate to Operations ➜ Runbooks, and click ADD RUNBOOK.
- Give the runbook a Name and click SAVE.
- Click DEFINE YOUR RUNBOOK PROCESS, and then click ADD STEP.
- Click Built-in steps, and then select the Start/Stop App in Tomcat step.
- Give the step a name.
- Fill in the parameters of the step:
|Tomcat Manage URL||URL of the Tomcat Manager||http://localhost:8080/manager|
|Management user||Name of the management account||tomcat|
|Management password||Password for the management account||MySecretPassword!!!|
|Context path||The relative URL to your application||/myapp|
|Deployment version||Version number of your application||188.8.131.52|
The last option under
Advanced Options is a radio button with two options:
- Leave the application running (default). Note, This option will start the app if in a stopped state.
- Stop the application
Need support? We're here to help.