A simple project to deploy a War file to Tomcat

Project overview.

Here is a summary of what this project wil achieve.

This project will deploy a War file to a previously installed Tomcat installation on a target server.

Please note that in addition to the Tomcat 7 plugins, there are also plugins for Tomcat versions 8 and 9.

This project is configured for use on Linux/Mac only.

What is preconfigured and demonstrated.

The project demonstrates the following configurations:
  • Target servers for Linux/Mac using localhost
  • Use of the Remote agent plugin
  • Use of external resources to download War file from the internet
  • Use of a (shared) product environment. The environment is shared for both the binary install and War deployment projects.
  • StartTomcatTask
  • TomcatDeploymentTask

 

How to use this project.

  1. Download the project to your desktop by clicking on one of the links. The file will be saved as Tomcat-7-examplesWebApp-Deployment-41.zip
  2. Log into your RapidDeploy instance as mvadmin.
  3. Navigate to Resources-> Projects.
  4. In the top right hand corner click on the Upload Project button.
  5. Select the zip file you downloaded in step 1.
  6. You are guided through a project import wizard. The important thing to check and change (if necessary) here is the path to the project storage directory. Ideally this should be under the projects directory in your RapidDeploy installation. E.g.
    1. /usr/midvision/projects/Tomcat-7-examplesWebApp-Deployment-41.zip
  7. Once the project is imported, you’ll need to create a package to deploy.
    • Firstly, navigate to Resources-> Projects and edit the project (pencil icon on the tool menu).
    • Navigate to the Packages tab and click the Create Package  button. A new package is created with a version number. This is the package you’ll deploy later, containing all the environment definitions, actions and paylod (scripts) to allow the jobs to be run on all defined servers.
    • Over time, as you update the configuration or payload (war file), you’ll create more packages, which are a versioned snapshot of the configuration and payload at the time they are created.
  8. Now you can run a new job to the target of your choice.
    • Navigate to Jobs-> New Job.
    • Double click on the ‘Empty’ project job box, and select the project you created earlier from the droplist.
    • Select the Target  you want to deploy from the droplist.
    • Select the  Version  (package version) you want to deploy from the droplist.
    • Since there is only one package, it is preselected. The latest package will always be preselected by default.
    • Click on the  Run  button in the bottom right corner, enter a comment for this run and click and click Yes .
    • The deployment is started. Click on the Running Jobs icon in the top right corner and you see the tasks executed and job log in real time.
  9. Once the job completes, you can check the installation by accessing the Tomcat management app at http://localhost:8080/manager/html
  10. You should see the ‘Hello’ page here: http://localhost:8080/examplesWebApp/

Further Reading

The following links will help you gain a deeper understanding of the tasks used in this project:

Reviews

There are no reviews yet.

Be the first to review “Apache Tomcat Deploy Blueprint”