Octopus Deploy Documentation

Restarting a Tomcat Web application

Last updated

Restarting a Tomcat app web application 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:

  1. From your project's overview page, navigate to Operations ➜ Runbooks, and click ADD RUNBOOK.
  2. Give the runbook a Name and click SAVE.
  3. Click DEFINE YOUR RUNBOOK PROCESS, and then click ADD STEP.
  4. Click Built-in steps, and then select the Start/Stop App in Tomcat step.
  5. Give the step a name.
  6. Fill in the parameters of the step:
Parameter Description Example
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 1.0.0.1

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.