Installation

This document describes how to install the Transport Service software contained in the transport-ofsn package. The following topics can be found in this section:

System Requirements

This section details the system requirements for installing and operating the Transport Service.

Java Runtime Environment

The Transport Service was developed using Java and will run on any platform with a supported Java Runtime Environment (JRE). The software was specifically compiled for Java version 1.7 and has been tested with this version and version 1.8. The following commands test the local Java installation in a UNIX-based environment:

% which java
/usr/bin/java

% java -version
java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)
        

The first command above checks whether the java executable is in the environment's path and the second command reports the version. If Java is not installed or the version is not at least 1.7, Java will need to be downloaded and installed in the current environment. Consult the local system administrator for installation of this software. For the do-it-yourself crowd, the Java software can be downloaded from the Oracle Java Download page. The suggested software package is the Java Standard Edition (SE) 7, either the JDK or the JRE package. The JDK package is not necessary to run the software but could be useful if development and compilation of Java software will also occur in the current environment.

Java Application Server

The Transport Service requires a Java application server for hosting the web application. The suggested application server for this release is Apache Tomcat with a minimal version of 7.0.X. Consult the local system administrator for installation of this software. For the do-it-yourself crowd, see the Tomcat Deployment document for installation and configuration details. If viewing this document from the transport-ofsn package, view the Tomcat Deployment document from the Engineering Node site.

The top-level directory where Apache Tomcat is installed (i.e. the directory containing the webapps and conf sub-directories) will be referenced in these instructions as $TOMCAT_HOME.

Unpacking the Package

Download the transport-ofsn package from the PDS FTP site. The binary distribution is available in identical zip or tar/gzip packages. The installation directory may vary from environment to environment but in UNIX-based environments it is typical to install software packages in the /usr/local directory and in Windows-based environments it is typical to install software packages in the C:\Program Files directory. Unpack the selected binary distribution file with one of the following commands:

% unzip transport-ofsn-1.6.0-bin.zip
or
% tar -xzvf transport-ofsn-1.6.0-bin.tar.gz
      

Note: Depending on the platform, the native version of tar may produce an error when attempting to unpack the distribution file because many of the file paths are greater than 100 characters. If available, the GNU version of tar will resolve this problem. If that is not available or cannot be installed, the zipped package will work just fine in a UNIX environment.

The commands above will result in the creation of the transport-ofsn-1.6.0 directory with the following directory structure:

  • README.txt

    A README file directing the user to the available documentation for the project.

  • LICENSE.txt

    The copyright notice from the California Institute of Technology detailing the restrictions regarding the use and distribution of this software. Although the license is strictly worded, the software has been classified as Technology and Software Publicly Available (TSPA) and is available for anyone to download and use.

  • transport-ofsn.war

    The Web ARchive file (WAR) containing the OFSN Transport Service application, which will need to be deployed to Apache Tomcat.

  • testdata/

    Directory containing some test files.

Deploying the Application

The Transport Service web application is packaged as a WAR file and is intended for installation under a standard Java Application Server. For a Tomcat server deployment, the WAR file is normally copied directly to the webapps directory within the Tomcat installation or installed via the Manager interface. Once this step is complete, the application is ready for configuration.

Configuring the Application

The preferred method to configure the transport service is to manually edit the application configuration files.

First, edit the file $TOMCAT_HOME/webapps/transport-ofsn/WEB-INF/config.xml and change the path of the Tomcat installation directory to properly reference the Transport Service configuration file ofsn-ps.xml which was included in the war distribution:

<property key="org.apache.oodt.product.handlers.ofsn.xmlConfigFilePath"> 
/usr/local/tomcat/webapps/transport-ofsn/WEB-INF/ofsn-ps.xml</property>
(enter the above instruction all in one line of the file). If you have installed Tomcat under $TOMCAT_HOME=/usr/local/tomcat, you may leave the config.xml file unchanged.

Note that the step above can also be accomplished by using the web application user interface, available at: http://localhost:8080/transport-ofsn/ (use the initial password hanalei to log in). See the documentation of the Registry Transport Service for additional information on using the web interface.

Second, edit the file $TOMCAT_HOME/webapps/transport-ofsn/WEB-INF/ofsn-ps.xml and insert the proper path of the root directory containing the products to be served. For testing purposes, you may want to use the testdata directory that is included in the Transport Service distribution, in the location where the application package was iniially unpacked:

<oodt:ofsn xmlns:oodt="http://osr.jpl.nasa.gov/xml/namespaces/oodt/1.0"
      id="urn:oodt:prod:ofsn"
      name="OODT OFSN Style Product Handler"
      productRoot="/usr/local/transport-ofsn/testdata">
When the transport service is used in production, the productRoot directory will have to be changed to reflect the location of the real products.

Restart Tomcat to load the configuration changes.

Testing

  1. First of all, you should test that the Transport Service web application is up and running. To do so, type the following URL in your browser:
    http://localhost:8080/transport-ofsn/
              
    The above URL assumes that your Tomcat is running on the default port 8080 on localhost - if not, please adjust the URL accordingly. You should see a simple introductory page with a few links.
     
  2. Out of the box, the PDS Transport Service is configured to serve products in the directory $PDS_HOME/transport-ofsn/testdata (referenced as "productRoot" in the file ofsn-ps.xml). You can test your installation by accessing the following URL:
    http://localhost:8080/transport-ofsn/prod?q=OFSN+EQ+/i943630r.xml+AND+RT+EQ+PDS_TO_JPG
    
    or equivalently, using the new product request syntax:
    http://localhost:8080/transport-ofsn/prod?OFSN=/i943630r.xml&RT=PDS_TO_JPG
    
    If you see a JPG image, your installation was successful! If not, please look into the Tomcat logs for any error messages.