![]() |
NetCDF 4.8.0
|
The test suite for the DAP2 and DAP4 (aka DAP) protocols optionally uses a continuously running test server to verify that the DAP protocols can successfully be used against a remote server such as a Unidata THREDDS Data Server or a OPeNDAP Hyrax server.
The way that this is tests is to establish two servlets running under a Tomcat server on some machine with a known IP address or DNS name. For example, accessing this URL.
will bring up a page with a variety of DAP2 accessible files. These files are accessed by the netcdf-c test case netcdf-c/ncdap_test/tst_remote3.sh to verify that the whole transmission and conversions process worked correctly. Similarly, the DAP4 test case is netcdf-c/ncdap_test/test_remote.sh and it accesses the test server web page with this URL.
Setting up and Maintaining the test server involves a somewhat complex set of tasks. This document shows how to do those tasks.
The initial task is to setup a Tomcat server on some machine. Currently the remote server is operating on Jetstream on an Ubuntu Linux environment.
Assuming you do not already have Tomcat setup, the necessary steps are as follows.
In the primary Tomcat directory – probably /usr/share/tomcat7 – there should be a ''conf'' directory, and in that directory, you will need to edit the file ''tomcat-users.xml''.
The goal here is primarily to setup a user that can login to the Tomcat admin page to upload the dts and d4ts servlets. Let us assume that the username we want to use is ''dapadmin'' with password ''dap''.
Edit the ''tomcat-users.xml'' file. You will probably have to use ''sudo'' to access the file. Insert the following near the end of the file.
As a rule, the default settings in ''server.xml'' will work and provide insecure access to the Tomcat server via port 8080. This is ok if the test server is running nothing but the d4ts and dts test servlets. Otherwise, you should investigate how to get the Tomcat server to use https:
The next step is to actually upload the servlet files for the DAP test servlets. We assume that you have on your local disk two files: ''dts.war'' and ''d4ts.war''. Building those servlet war files is described in a separate section.
The specific tasks are as follows:
You can now test the test server by configuring and building the netcdf-c library. In order to force the use of the newly started test server you can either:
After building the library, go into the directory ''ncdap_test'' and do a ''make check'' command. This should succeed. Similarly enter the directory ''dap4_test'' and do a make check to verify that the d4ts test server is working.
In order to build the servlet (.war) files, you will need to clone the Thredds directory on github: https://github.com/Unidata/tds.
Once you have a clone, you will need to enter the tds directory and build by invoking gradle using this command.
If successful, the following two files should exist (the names may vary slightly).
Copy the two files to some more accessible place and rename them to ''d4ts.war'' and ''dts.war'' respectively.
Use those files to upload the servlets to your Tomcat server as described above.
Author: Dennis Heimbigner
Email: dmh at ucar dot edu
Initial Version: 6/26/2018
Last Revised: 6/28/2018