Server and Applications
While all our Tomcat servers are created and configured centrally, they run separately. This document explains our Tomcat installation from the individual server and application level.
The files for your server (not counting the administrative scripts mentioned below) are located in:
nerdc/servlets/osgjas/<server>/
Under this directory, you will see the following subdirectories:
-
conf/ - The server configuration files are in here. DO NOT edit any of these files, as they are generated automatically by the central administrative scripts.
-
logs/ - You'll find the Tomcat logs here (obviously). The catalina.out file contains server messages as well as any STDOUT output from your applications. The logs should be rotated and archived daily by the operating system.
-
webapps/ - Under here is where your WAR archive is kept (i.e. webapps/<virtualhost>/appname.war). After installation, Tomcat will expand the contents of the WAR file in the same directory.
There are also temp/ and work/ directories which Tomcat uses. You shouldn't have to touch them.
The scripts for controlling Tomcat instances are located at:
nerdc/servlets/osgjas/scripts/server/
To run these scripts, you must have owner or group permissions for the particular instance. Each server will have the following scripts:
<server>-list.sh
<server>-resources.sh
<server>-roles.sh
<server>-serverinfo.sh
<server>-shutdown.sh
<server>-startup.sh
The most important scripts are <server>-shutdown.sh and <server>-startup.sh, which must be run from the same node on which the instance is located. Run these scripts to restart the JVM and reload all applications running within the server.
The other scripts output various server information, and can be run from any Tomcat node. They basically run the server-related Tomcat manager commands, via ant over HTTP.
The scripts for controlling individual applications are located at:
nerdc/servlets/osgjas/scripts/app/
You must have owner or group permissions for the particular instance to run these scripts. Each application will have the following scripts:
<server>-<application>-deploy.sh
<server>-<application>-install.sh
<server>-<application>-reload.sh
<server>-<application>-sessions.sh
<server>-<application>-start.sh
<server>-<application>-stop.sh
<server>-<application>-undeploy.sh
The most important script is <server>-<application>-install.sh, which you will run whenever installing a new or updated WAR file.
The other scripts basically run the application-specific Tomcat manager commands, via ant over HTTP.
-
Make sure you have owner or group permissions for the particular server. Upload the application WAR to:
nerdc/servlets/osgjas/<server>/webapps/<virtualhost>/ -
Make sure you are on the same node where the server is installed. Check nerdc/servlets/osgjas/INFO.html to find out which node that is. Stop the server instance:
nerdc/servlets/osgjas/<scripts>/server/<server>-shutdown.shWait until the instance has really stopped before moving on. grep the process table to make sure it's not still running: ps -fade | grep <server>.
-
Run the install script:
nerdc/servlets/osgjas/scripts/app/<server>-<application>-install.sh -
Start the server instance:
nerdc/servlets/osgjas/<scripts>/server/<server>-startup.sh -
You can watch Tomcat's progress in the server log, located at:
nerdc/servlets/osgjas/<server>/logs/catalina.out

