Deploying

Because WebMDS is implemented as a servlet, it must be deployed into a servlet container, such as Tomcat. The following instructions assume that you've installed Tomcat version 5.0.28. and set the $CATALINA_HOME environment variable to the directory into which you've installed Tomcat.

1. Standard deployment into Tomcat 5.0.28

The standard deployment consists of two steps: creating a configuration file that tells Tomcat where to find the WebMDS servlet and related files, and restarting Tomcat so that it will read this new configuration file. These steps require write permission on files and directories in $CATALINA_HOME; they do not require write permission on anything in $GLOBUS_LOCATION.

To create the configuration file, run this command:

    $GLOBUS_LOCATION/lib/webmds/bin/webmds-create-context-file \
         $CATALINA_HOME/conf/Catalina/localhost

This will create $CATALINA_HOME/conf/Catalina/localhost/webmds.xml. Note: if this file already exists (e.g., if you've previously installed another version of WebMDS), you'll need to use the -f option to webmds-create-context-file.

Next, make sure that Tomcat has a version of the Xalan library (used by WebMDS to do XSL transforms) that is compatible with the one used by Globus:

    cp $GLOBUS_LOCATION/endorsed/xalan-2.6.jar $CATALINA_HOME/common/endorsed/.

Next, restart Tomcat. If Tomcat is already running, stop it:

    $CATALINA_HOME/bin/shutdown.sh

Then, start Tomcat:

    $CATALINA_HOME/bin/startup.sh

2. Deploying WebMDS and Globus in the same Tomcat Server

If you wish to run Globus and WebMDS in the same Tomcat instance (instead of, for example, running Globus in the Globus standalone container and WebMDS in Tomcat), then do the following:

  1. Install Globus and deploy it into Tomcat, as described in Installing GT 4.1.3.
  2. Run webmds-create-context-file:

        $GLOBUS_LOCATION/lib/webmds/bin/webmds-create-context-file \
             $CATALINA_HOME/conf/Catalina/localhost
    

    (see the previous section for more details about webmds-create-context-file).

  3. The Globus and WebMDS deployments install identical copies of certain files in different places. The presence of these duplicates causes WebMDS to fail when sending requests to secure servers. To prevent this problem, remove the duplicates:

    rm $GLOBUS_LOCATION/lib/webmds/WEB-INF/lib/puretls.jar
    rm $GLOBUS_LOCATION/lib/webmds/WEB-INF/lib/cryptix*.jar
    rm $GLOBUS_LOCATION/lib/webmds/WEB-INF/lib/jce-jdk*.jar
    

  4. Finally, restart Tomcat. If Tomcat is already running, stop it:

        $CATALINA_HOME/bin/shutdown.sh
    

    Then, start Tomcat:

        $CATALINA_HOME/bin/startup.sh
    

3. Custom deployment

If you are already running a Tomcat server (or other server that supports servlets) and your preferred mechanism for installing servlets is something other than creating a configuration file and restarting your web server, feel free to use that mechanism. The servlet root for WebMDS is $GLOBUS_LOCATION/lib/webmds.

For the rest of these instructions, the term Globus user will be used to refer to the owner of the $GLOBUS_LOCATION directory, and Tomcat user will be used to refer to the owner of the $CATALINA_HOME directory. If the Globus and Tomcat installations were performed from the same user account, the Globus user and Tomcat user will be the same.

Any time you change the servlet configuration (or any jar files used by the servlet), you'll need to let tomcat know there was a change. If you have a preferred way of configuring tomcat, feel free to use it, with $GLOBUS_LOCATION/lib/webmds as the servlet directory. These steps need to be performed by the Tomcat user.

If you're using tomcat 5.0.28 and haven't done any custom configuration (such as defining additional hosts) other than changing the tomcat port, you can configure tomcat by doing the following:

  1. Create a context descriptor file called webmds.xml in the location where tomcat will look for it:

        $GLOBUS_LOCATION/lib/webmds/bin/webmds-create-context-file \
             $CATALINA_HOME/conf/Catalina/localhost
    

    Note: if the file $CATALINA_HOME/conf/Catalina/localhost/webmds.xml already exists, you can use the -f flag to create-context-file to overwrite it. to the tomcat configuration directory.

  2. If tomcat is running, shut it down.

        $CATALINA_HOME/bin/shutdown.sh
    
  3. Start tomcat up.

        $CATALINA_HOME/bin/startup.sh