Installing LAS using a remote Tomcat for F-TDS
For the example used in this tutorial, the LAS is installed on node Eclipse using the Tomcat server at /home/eclipse/tmap/armstrong/apache-tomcat-5.5.20 ($LAS_TOMCAT_HOME) and the Tomcat server for F-TDS is /usr/local/src/tomcat ($TDS_TOMCAT_HOME) on node Pale.
Steps
1. Run configure and prepare to install LAS as normal.
2. In the $LAS_HOME directory run the "ant iosp" target to create the dist/lib/ferret_iosp.jar file.
3. Find "data" and "temp" directory that was selected during the config process. The "data" contains the *.jnl files and a "dynamic" directory.
E.g.
The directory /home/eclipse/tmap/NVODS/baker/conf/server/data contains the *.jnl files and an empty “dynamic” directory.
4. Copy those files to a directory where the F-TDS will actually run.
E.g.
(1) Make a new directory called 'las' under /usr/local/src/tomcat
(2) Copy directory /home/eclipse/tmap/NVODS/baker/conf/server/data to /usr/local/src/tomcat/las
(3) Copy directory /home/eclipse/tmap/NVODS/baker/conf/server/temp to /usr/local/src/tomcat/las
5. Copy the ferret_iosp.jar file (created in Step 2) to and unjar it in the $TDS_TOMCAT_HOME/webapps/thredds/WEB-INF/classes directory of the machine where F-TDS is going to run.
E.g.
(1). Copy file /home/eclipse/tmap/NVODS/baker/dist/lib/ferret_iosp.jar to and unjar it at /usr/local/src/tomcat/webapps/thredds/WEB-INF/classes
(2). In the “classes” directory, run “jar -xvf ferret_iosp.jar”
6. Copy FerretBackendConfig.xml to $TDS_TOMCAT_HOME/webapps/thredds/WEB-INF/classes/resources/iosp/ and rename it as FerretConfig.xml file. Then, fix the directory names for the iosp directories and Ferret environment variables. You have to install Ferret on the remote machine if necessary.
E.g.
Ferret was installed at /usr/local/src/ferret/bin/ferret on node Pale. Make the following changes in FerretConfig.xml.
(1). ferret_bin
ferret_bin="/usr/local/src/ferret/bin/ferret"
(2). iosp directories
iosp_script_dir="resources/iosp/scripts"
iosp_temp_dir="/usr/local/src/tomcat/las/temp"
iosp_data_dir="/usr/local/src/tomcat/las/data/dynamic"
las_tfds_data_dir="/usr/local/src/tomcat/las/data"
iosp_base_dir="resources/iosp"
opendap_base_url = "http://ferret.pmel.noaa.gov/thredds/dodsC/output"
(3) Ferret environment variables
<variable>
<name>FER_DIR</name>
<value>.</value>
<value>/usr/local/src/ferret</value>
</variable>
<variable>
<name>FER_DESCR</name>
<value>.</value>
<value>/usr/local/src/fer_dsets/descr</value>
<value>des</value>
<value>/usr/local/src/tomcat/las/custom/des</value>
</variable>
<variable>
<name>FER_DATA</name>
<value>.</value>
<value>/usr/local/src/fer_dsets/data</value>
<value>/usr/local/src/ferret/contrib</value>
<value>/usr/local/src/ferret/examples</value>
<value>/usr/local/src/ferret/go</value>
<value>/usr/local/src/tomcat/las/custom/des</value>
</variable>
<variable>
<name>FER_GRIDS</name>
<value>.</value>
<value>/usr/local/src/fer_dsets/grids</value>
</variable>
<variable>
<name>FER_PALETTE</name>
<value>.</value>
<value>/usr/local/src/ferret/ppl</value>
<value>jnls</value>
<value>jnls/insitu</value>
<value>jnls/section</value>
<value>scripts</value>
</variable>
<variable>
<name>FER_GO</name>
<value>.</value>
<value>/usr/local/src/ferret/contrib</value>
<value>/usr/local/src/ferret/examples</value>
<value>/usr/local/src/ferret/go</value>
<value>jnls</value>
<value>jnls/insitu</value>
<value>jnls/section</value>
<value>scripts</value>
<value>/usr/local/src/tomcat/las/custom/scripts</value>
</variable>
<variable>
<name>PLOTFONTS</name>
<value>/usr/local/src/ferret/ppl/fonts</value>
</variable>
<variable>
<name>FER_EXTERNAL_FUNCTIONS</name>
<value>.</value>
<value>/usr/local/src/ferret/ext_func/libs</value>
</variable>
7. Change base_url for <ftds> in $LAS_HOME/conf/server/productserver.xml
E.g.
<ftds base_url="http://ferret.pmel.noaa.gov/thredds/dodsC/las" data_dir="/home/eclipse/tmap/NVODS/baker/conf/server/data"/>
8. Configure the TDS at the remote location to see that directory as a datascan location just as you would for a normal LAS/F-TDS install.
E.g.
(1). Add the following to /usr/local/src/tomcat/content/thredds/catalog.xml:
<service name="gridded" serviceType="Compound" base="" >
<service name="opendap" serviceType="OpenDAP" base="/thredds/dodsC/"/>
<service name="wcs" serviceType="WCS" base="/thredds/wcs/"/>
</service>
<datasetScan name="Data From LAS" path="las" location="/usr/local/src/tomcat/las/data" serviceName="gridded">
<filter><include wildcard="*.nc"/>
<include wildcard="*.fds"/>
<include wildcard="*.jnl"/>
</filter>
</datasetScan>
The URL for this datasetscan would be http://ferret.pmel.noaa.gov/thredds/dodsC/las/catalog.html.
(2). Add following to /usr/local/src/tomcat/content/thredds/threddsConfig.xml:
<datasetSource>
gov.noaa.pmel.tmap.iosp.FerretDataSource
</datasetSource>
<nj22Config>
<ioServiceProvider class="gov.noaa.pmel.tmap.iosp.FerretIOServiceProvider"/>
</nj22Config>
<WCS>
<allow>true</allow>
<dir>/usr/local/src/tomcat/las/temp/wcs</dir>
<scour>15 min</scour>
<maxAge>30 min</maxAge>
</WCS>
9. Fix F-TDS link in $LAS_HOME/WebContent/luis/velocity/VM_global_library.vm
E.g.
<a href="http://ferret.pmel.noaa.gov/thredds/dodsC/las/catalog.html" target="_blank">OPeNDAP (F-TDS)</a>
10. Restart both Tomcats.
11. Test the installation by checking F-TDS link on the main LAS UI page and the products that use F-TDS, i.e., define variable, and comparison.