This document describes how to install the Storage Service contained in the storage-service package. The following topics can be found in this document:
The Storage Service was developed using Java and will run on any platform with a supported Java Runtime Environment (JRE). The software was specifically developed under Java version 1.6 and has only been tested with this version. The following commands test the local Java installation in a UNIX-based environment:
% which java /usr/bin/java % java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, 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.6, 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 software package of choice is the Java Standard Edition (SE) 6, 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.
Download the storage-service 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 in the installation directory for the local environment with one of the following commands:
% unzip storage-service-1.0.0-bin.zip or % tar -xzvf storage-service-1.0.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 storage-service-1.0.0 directory with the following directory structure:
A README file directing the user to the available documentation for the project.
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.
This directory contains shell and batch scripts for launching and interacting with the service for UNIX-based and Windows environments.
This directory contains a local web site with the Storage Service documentation and other configuration management related information. Just point the desired web browser to the index.html file in this directory.
This directory contains configuration files for specifying the functionality of the service.
This directory contains the dependent jar files for the service.
This directory contains policy files for specifying the content supported by the service.
This directory contains a test product.
This section details the configuration of the service port, product policy, log file location and installation location.
By default, the Storage Service comes configured to run on port 9000 on the local machine. In order to change the port number, each of the scripts in the bin directory must be modified. In the storage-service script, modify the following line (replacing 9000) to specify the desired port:
SERVER_PORT=9000
In the storage-client, storage-delete and storage-query scripts, modify the following line (replacing 9000) to specify the desired port:
FILEMGR_URL=http://localhost:9000
If the client and query scripts will be executed from a machine other than the machine where the service is running, the localhost portion of the line above should be replaced with the actual machine name (i.e., host.jpl.nasa.gov). The examples above detail lines from the UNIX-based shell scripts. The lines in the Windows-based batch scripts are identical except that they are prefixed with "set ".
By default, the service comes configured to use the example product policy. Other sets of product policy may be defined in the future, but as of this release the only other product policy set is the pds policy that supports the Harvest Tool and Catalog Tool. If this installation is intended to support the Harvest Tool and Catalog Tool, modify the filemgr.properties file in the etc directory as follows:
# XML repository manager configuration org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:///[FILEMGR_HOME]/policy/example # XML validation layer configuration org.apache.oodt.cas.filemgr.validation.dirs=file:///[FILEMGR_HOME]/policy/example should be changed to: # XML repository manager configuration org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:///[FILEMGR_HOME]/policy/pds # XML validation layer configuration org.apache.oodt.cas.filemgr.validation.dirs=file:///[FILEMGR_HOME]/policy/pds
Information regarding how to modify or add product types to the product policy can be found on the Apache OODT Wiki.
By default, the location of the log file is defined as a relative reference to the logs directory in the distribution package. This will work just fine as long as the storage-service script is executed directly from the bin directory. If this will not be the case (meaning the script location is set in the user's path and the script is executed from another directory), then the location of the log file must be defined as an absolute reference. In order to change the log file location, modify the logging.properties file in the etc directory as follows:
java.util.logging.FileHandler.pattern = ../logs/filemgr%g.log should be changed to: java.util.logging.FileHandler.pattern = /<absolute-path>/logs/filemgr%g.log
Replace the <absolute-path> place holder above with the full path to the log file location.
In order to manage and interact with the Storage Service, the local environment must first be configured appropriately. This section describes how to setup the user environment on UNIX-based and Windows machines.
This section details the environment setup for UNIX-based machines. The binary distribution includes a few shell scripts that must be executed from the command-line. Setting the PATH environment variable to the location of the scripts, enables the shell scripts to be executed from any location on the local machine.
The following command demonstrates how to set the PATH environment variable (in Bourne shell), by appending to its current setting:
% export PATH=${PATH}:/usr/local/storage-service-1.0.0/bin
In addition, the shell scripts require that the JAVA_HOME environment variable be set to the appropriate location of the Java installation on the local machine. The following command demonstrates how to set the JAVA_HOME environment variable:
% export JAVA_HOME=/path/to/java/home
The system administrator for the local machine may need to be consulted for this location. The path specified should have a bin sub-directory that contains the java executable. This variable may also be defined within the scripts. Edit the scripts (files without the .bat extension) and change the line in the example above to represent the local Java installation.
This section details the environment setup for Windows machines. The binary distribution includes a few batch scripts that must be executed from the command-line. Setting the PATH environment variable to the location of the files, enables the batch scripts to be executed from any location on the local machine.
The following command demonstrates how to set the PATH environment variable, by appending to its current setting:
C:\> set PATH = %PATH%;C:\Program Files\storage-service-1.0.0\bin
In addition, the batch scripts require that the JAVA_HOME environment variable be set to the appropriate location of the Java installation on the local machine. The following command demonstrates how to set the JAVA_HOME environment variable:
C:\> set JAVA_HOME = C:\path\to\java\home
The system administrator for the local machine may need to be consulted for this location. The path specified should have a bin sub-directory that contains the java executable. This variable may also be defined within the scripts. Edit the scripts (files with the .bat extension) and change the line in the example above to represent the local Java installation. Additional methods for setting Windows environment variables can be found in the Windows System Properties document.
Both the shell and batch scripts for this service utilize system commands for determining the installation home directory that may or may not be available on all platforms. If these commands are not available in the current environment, their use can be replaced in the scripts by setting the FILEMGR_HOME variable with the actual installation path. Modify the UNIX-based shell scripts as follows (the actual installation path may be different in the current environment):
SCRIPT_DIR=`dirname $0` FILEMGR_HOME=`cd ${SCRIPT_DIR}/.. && pwd` should be replaced with: FILEMGR_HOME=/usr/local/storage-service-1.0.0
Modify the Windows-based batch scripts as follows (the actual installation path may be different in the current environment):
set SCRIPT_DIR=%~dps0 set FILEMGR_HOME=%SCRIPT_DIR%.. should be replaced with: set FILEMGR_HOME=C:\Program Files\storage-service-1.0.0