Installation

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

System Requirements

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

Java Runtime Environment

The Transport Proxy software 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 Proxy software 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-proxy 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-proxy 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-proxy-1.5.0-bin.zip
or
% tar -xzvf transport-proxy-1.5.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 result in the creation of the transport-proxy-1.5.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.

  • prod.war

    This is the Web ARchive (WAR) file containing the Transport Proxy software including all dependent JAR files.

  • doc/

    This directory contains a local web site with the Transport Proxy documentation and other configuration management related information. Just point the desired web browser to the index.html file in this directory.

Deploying the Application

The Transport Proxy 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 $TOMCAT_HOME/webapps directory within the Tomcat installation or installed via the Manager interface. Once this step is complete, the application is ready for operation.

Configuring the Application

The Transport Proxy web application can be configured via a set of servlet parameters as well as specifying the list of aliases for supported Transport Services.

Servlet Parameters

The application provides the following parameters for configuration:

ParameterDescription
aliasFileSpecThe file specification for the aliases.properties file. This file maps the URNs of the Product Servers to their associated URLs. The default value specifies the version of this file that is included in the WAR.
chunkSizeThe buffer size to be used when transferring product files from the Product Server. The value is represented in bytes and defaults to "8192".
preferredNamespaceThe URN prefix that is added to Product Server identifiers in the case where it is not already present. The value defaults to "urn:eda:rmi:".

To modify the configuration, edit the web.xml file located in the $TOMCAT_HOME/webapps/prod/WEB-INF directory. The following block contains the parameters:

<servlet>
  <servlet-name>product</servlet-name>
  <servlet-class>gov.nasa.pds.portal.product.ProductServlet</servlet-class>
  <!-- All parameters are optional and default to the values below.
  <init-param>
    <param-name>aliasFileSpec</param-name>
    <param-value>/aliases.properties</param-value>
  </init-param>
  <init-param>
    <param-name>chunkSize</param-name>
    <param-value>8192</param-value>
  </init-param>
  <init-param>
    <param-name>preferredNamespace</param-name>
    <param-value>urn:eda:rmi:</param-value>
  </init-param>
  -->
</servlet>
        

Aliases

The file containing the list of Transport Service aliases (specified by the aliasFileSpec parameter above) can be modified. To modify the list, edit the aliases.properties file located in the $TOMCAT_HOME/webapps/prod/WEB-INF/classes directory. Entries in the file follow this format:

urn\:eda\:rmi\:PDS.ASU.Product=http\://bastion.mars.asu.edu\:7576/pds/prod
urn\:eda\:rmi\:PDS.Atmos.Product=http\://atmos.nmsu.edu\:7576/pds/prod
urn\:eda\:rmi\:PDS.CN.Product=http\://starbrite.jpl.nasa.gov/pdsd/prod
...
        

Once a modification has been made, the Transport Proxy application must be stopped and started for these changes to take effect. This can be accomplished by restarting the Tomcat Server. Alternatively, if the Tomcat Manager interface was utilized for the deployment, find the Transport Proxy entry in the Manager interface, select the associated Stop button followed by a selection of the associated Start button to stop and then start the applications, respectively.

Deploying the DTD Files

The Transport Proxy web application includes a set of Document Type Definition (DTD) files that are utilized by the applications that the proxy interfaces with (e.g., Transport Service (OFSN), Product Server, Profile Server, etc.). These files can be deployed with a Subversion "external" directory configuration within the PDS Home site directory structure. The desired end point is /dtd within the site. The files will be accessed at http://starbrite.jpl.nasa.gov/dtd. From within the top directory of the PDS site deployment (e.g., /data/www/pds/htdocs), perform the following commands to configure and retrieve the "external" directory:

% svn propset svn:externals \
'dtd https://starcell.jpl.nasa.gov/repo/2010/trunk/transport/transport-proxy/src/main/resources/dtd' .
% svn update