Installation instructions for F-TDS
How to install F-TDS as part of LAS and as a stand-alone OPeNDAP server.
Installation as part of LAS
The installation as part of LAS is covered here.
Installation as a stand-alone OPeNDAP Server
F-TDS operates by running Ferret in the background to read data source and to perform calculations on the server side before returning the results to the OPeNDAP client via TDS. So in order to run F-TDS as a stand-alone server the first task is to install Ferret.
Obviously, F-TDS also depends on the THREDDS Data Server. Install TDS by following these instructions.
Download the F-TDS code
F-TDS is distributed bundled with LAS. However, there are provisions in the installation procedure for LAS that allow you to package and install F-TDS as a stand-alone OPeNDAP server.
Unpack the LAS tar bundle
A command like
tar --gunzip xvf las.x.x.tar.gz
should get the job done.
Run the ferret_env.pl code.
Make sure you have your ferret paths set (usually accomplished by the command source ferret_paths). The run the ferret_env.pl script (ferret_env.pl > env.xml) to build the XML stub the Java code needs to build the environment in which to run Ferret.
Combine the stub with the base file and edit the path names.
In the $LAS_HOME/JavaSource/resources/ferret directory there is a file called FerretBackendConfig.xml.base.in. Copy FerretBackendConfig.xml.base.in to FerretConfig.xml and edit the new file with a text editor. Append the file you build in the previous step to the bottom of the FerretConfig.xml below the </messages> closing element.
Edit in the correct directory and URLs in the <invoker> element.
http_base_url = "http://@SERVLET_ROOT_URL@/@APPNAME@/output"
opendap_base_url = "http://@SERVLET_ROOT_URL@/thredds/dodsC/output"/>
The @FERRET@ text should be replace by the fully qualified path to the Ferret executable. The @TDS_TEMP@ directory should be replaced with a fully qualified path to a directory that can be used by the IOSP for temporary storage. This directory can grow quite large and the tomcat process will need write permission on this directory. This directory also serves as the cache for F-TDS, but the files in that directory can be removed at any time. If a file required file is missing from the cache, F-TDS will simply recreate the file. @TDS_DYNADATA@ is another temporary storage area used by F-TDS. The files placed in that directory are the Ferret scripts that result from URL that contain analysis expressions. These files are not large. Finally, the @SERVER_ROOT_URL@ should be replace with the host (and port number if applicable) of the TDS server into which this IOSP and DataSource are being installed. Any other attributes (like output_dir, http_base_url, las_ftds_data_dir) can be removed.
Build the Ferret IOSP code.
To build the code you need to create an build.xml file. Just copy the $LAS_HOME/build.xml.in file to build.xml and edit the file to replace @TOMCAT_HOME@ with the fully qualified path name to where Tomcat is installed. Then build the code using the:
Install the IOSP code and register it with TDS.
The previous step builds the $LAS_HOME/dist/lib/ferret_iosp.jar file. To install this code in the TDS, go to $TOMCAT_HOME/webapps/thredds/WEB-INF/classes and expand the jar file.
jar xvf [path_to_LAS_HOME]/dist/lib/ferret_iosp.jar
Copy over the FerretConfig.xml file you created above.
cp FerretConfig.xml $TOMCAT_HOME/webapps/thredds/WEB-INF/classes/resources/iosp/.
Configure in the FerretDataSource and FerretIOServiceProvider.
You have configure a couple of "plug-ins" into your TDS. These plug-ins allow TDS to serve data opened in a Ferret journal file via OPeNDAP and allow new data variables to be defined by passing TDS special a special URL syntax. To add these capabilities to LAS you'll need to add the following to your $TOMCAT_HOME/content/thredds/threddsConfig.xml file.
Edit the catalog to include netCDF data and virtual data variables via F-TDS.
Find the THREDDS catalog that is being
used to configure your TDS. It's
$TOMCAT_HOME/content/thredds/catalog.xml. If you have created some virtual data sets an easy to way to serve them is to add datasetScan element to the catalog. However, once the two Ferret TDS plug-ins are installed and configured you can treat Ferret journal scripts that read netCDF data (and optionally create virtual variables) just like any other file to be added to the THREDDS catalog of the TDS.
<datasetScan name="Data From F-TDS" path="data" location="/home/roland/mydata" serviceName="gridded">
Restart the server.
Restart the tomcat server and check the THREDDS catalog to make sure your Ferret data are being served.