Personal tools

Deploying a Service

Note: Return to reference manual view.

This guide contains the core installation instructions that are common to all GRIA services. Topics covered include installing Java and Tomcat, war file deployment and firewall configuration.

1. Deploying in Tomcat

Deploying the war file containing the services into the Tomcat container.

Deployment of the war file is based on the standard procedure which should already be familiar to Tomcat users. If, however, this is not the case then this section can be used as a guide on how to deploy and invoke the the web application. The home directory of Tomcat is denoted by <TOMCAT_HOME>

The next steps require the use of a web browser to complete the war file deployment.

  1. Using a web browser, load the main Tomcat server page (e.g. http://<servername>:8080) and select the "Tomcat Manager" link.

    N.B. "<servername>" should be replaced with the IP address or fully qualified hostname of the computer running the Tomcat server.

    You will be prompted for a username and password to be entered before displaying the manager page. Use "admin" as the username and enter the password that was selected either by using the Tomcat installer (WinXP) or by editing the <TOMCAT_HOME>/conf/tomcat-users.xml (Linux) .

  2. The page which loads once login has been successful presents the following sections:
    • Manager - lists the command controls and help functions
    • Applications - lists the applications currently deployed within Tomcat
    • Deploy - options for deploying applications to Tomcat
    • Server Information - lists specific information on Tomcat and the base platform it was installed to

    Scroll down to the WAR file to deploy subsection, within the Deploy section. Beside the "Select WAR file to upload" box, click the browse icon and select the war file, before clicking the "Deploy" button:

  3. An "OK" message at the top of the page indicates that the war has been successfully deployed to Tomcat.

The new webapp should now also be listed within the Applications section. Note here in the last column is where individual applications may be started, stopped, reloaded or if desired undeployed completely from within Tomcat.

This completes the first part of the installation and deployment of the GRIA services.

Having successfully deployed the war file, you can invoke it by just clicking on the webapp's name in the Applications section.

If you get an error page with a message related to the JAVA_HOME environment variable, then this probably means that the Java compiler isn't working. The usual cause of this is trying to run tomcat immediately after installing Java. You must log out and log in again to ensure the JAVA_HOME environment variable is set to the correct location. If you click on the Admin link in the top menu when having this problem you will also get a 401 Not Authorized error without being prompted to log in (check for errors in the catalina.out log file).

2. Deploying in JBoss

How to deploy a GRIA service in the JBoss Application Server

Introduction

These instructions are applicable on both Linux and Windows and have been tested on JBoss Application Server 4.0.2 and later.

Procedure

There are two restrictions on deploying a GRIA service in JBoss:

  1. JBoss must be installed in a directory that has no spaces in its path (for instance, not in C:\Program Files).
  2. The GRIA war file must be deployed statically.

To describe how to deploy a GRIA service statically, we will take the example of the GRIA OGSA-DAI service being deployed in the default JBoss server.

GRIA services are supplied as war files. These are actually just zip archives. The service must be unzipped by hand but the directory that results must be renamed to end with the .war file extension:

  1. Stop JBoss
  2. Take the GRIA package, e.g. gria-ogsadai-service.war and place it in server/default/deploy.
  3. Change the file extension from "war" to "zip" and unzip the package.
  4. Rename the new directory from e.g. gria-ogsadai-service to gria-ogsadai-service.war.
  5. Remove the zip file.
  6. Start JBoss

Once the service has been deployed, navigate to the GRIA Service in your web browser (e.g. http://localhost:8080/gria-ogsadai-service). The GRIA installation wizard will then guide you through the rest of the configuration process.