Documentation menu

Routine operations

Use Octopus docs with AI

Restarting a Tomcat Web application

With Octopus Deploy you can restart a Tomcat web application as part of a routine operations task.

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:
ParameterDescriptionExample
Tomcat Manage URLURL of the Tomcat Managerhttp://localhost:8080/manager
Management userName of the management accounttomcat
Management passwordPassword for the management accountMySecretPassword!!!
Context pathThe relative URL to your application/my-app
Deployment versionVersion number of your application1.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