Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mishaschwartz committed Oct 11, 2024
1 parent 5d4387c commit 23d58ac
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
18 changes: 9 additions & 9 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@

## Changes

- THREDDS: add more options to configure catalog.xml
- Currently the default THREDDS configuration creates two default datasets, the Service Data dataset and the
Main dataset. The Service Data dataset is used internally and hosts WPS outputs. The Main dataset is the
- THREDDS: add more options to configure `catalog.xml`
- The default THREDDS configuration creates two default datasets, the *Service Data* dataset and the
*Main* dataset. The *Service Data* dataset is used internally and hosts WPS outputs. The *Main* dataset is the
place where users can access data served by THREDDS. Both of these are configured to serve files with the following
extensions: .nc .ncml .txt .md .rst .csv

- In order to allow the THREDDS server to serve files with additional extensions, this introduces two new
variables:
variables:
- `THREDDS_SERVICE_DATA_EXTRA_FILE_FILTERS`: this allows users to specify additional [filter
elements](https://docs.unidata.ucar.edu/tds/current/userguide/tds_dataset_scan_ref.html#including-only-desired-files) to the Service Data dataset. This is especially useful if a WPS
elements](https://docs.unidata.ucar.edu/tds/current/userguide/tds_dataset_scan_ref.html#including-only-desired-files) to the *Service Data* dataset. This is especially useful if a WPS
outputs files with an extension other than the default (eg: .h5) to the `wps_outputs/` directory.
- `THREDDS_DATASET_DATASETSCAN_BODY`: this allows users to specify the whole body of the main dataset's
- `THREDDS_DATASET_DATASETSCAN_BODY`: this allows users to specify the whole body of the *Main* dataset's
[`<datasetScan>`](https://docs.unidata.ucar.edu/tds/current/userguide/tds_dataset_scan_ref.html) element.
This allows users to fully customize how this dataset serves files.

- We limit the configuration options for the Service Data dataset more than the main dataset because the Service
Data dataset requires a basic configuration in order to properly serve WPS outputs. Making significant changes
- We limit the configuration options for the *Service Data* dataset more than the *Main* dataset because the *Service
Data* dataset requires a basic configuration in order to properly serve WPS outputs. Making significant changes
to this configuration could have unexpected negative impacts on WPS usage.

- The defaults for these new variables are fully backwards compatible. Without changing these variables, the THREDDS
server should behave exactly the same as before.
server should behave exactly the same as before.

[2.5.3](https://github.com/bird-house/birdhouse-deploy/tree/2.5.3) (2024-09-11)
------------------------------------------------------------------------------------------------------------------
Expand Down
23 changes: 9 additions & 14 deletions birdhouse/components/thredds/catalog.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
xmlns:xlink="http://www.w3.org/1999/xlink" >

<service name="all" serviceType="Compound" base="" >
<service name="http" serviceType="HTTPServer" base="/twitcher/ows/proxy/thredds/fileServer/" />
<service name="odap" serviceType="OpenDAP" base="/twitcher/ows/proxy/thredds/dodsC/" />
<service name="ncml" serviceType="NCML" base="/twitcher/ows/proxy/thredds/ncml/"/>
<service name="uddc" serviceType="UDDC" base="/twitcher/ows/proxy/thredds/uddc/"/>
<service name="iso" serviceType="ISO" base="/twitcher/ows/proxy/thredds/iso/"/>
<service name="wcs" serviceType="WCS" base="/twitcher/ows/proxy/thredds/wcs/" />
<service name="wms" serviceType="WMS" base="/twitcher/ows/proxy/thredds/wms/" />
<service name="subsetServer" serviceType="NetcdfSubset" base="/twitcher/ows/proxy/thredds/ncss/" />
<service name="http" serviceType="HTTPServer" base="${TWITCHER_PROTECTED_PATH}/thredds/fileServer/" />
<service name="odap" serviceType="OpenDAP" base="${TWITCHER_PROTECTED_PATH}/thredds/dodsC/" />
<service name="ncml" serviceType="NCML" base="${TWITCHER_PROTECTED_PATH}/thredds/ncml/"/>
<service name="uddc" serviceType="UDDC" base="${TWITCHER_PROTECTED_PATH}/thredds/uddc/"/>
<service name="iso" serviceType="ISO" base="${TWITCHER_PROTECTED_PATH}/thredds/iso/"/>
<service name="wcs" serviceType="WCS" base="${TWITCHER_PROTECTED_PATH}/thredds/wcs/" />
<service name="wms" serviceType="WMS" base="${TWITCHER_PROTECTED_PATH}/thredds/wms/" />
<service name="subsetServer" serviceType="NetcdfSubset" base="${TWITCHER_PROTECTED_PATH}/thredds/ncss/" />
</service>

<datasetScan name="${THREDDS_SERVICE_DATA_LOCATION_NAME}" ID="${THREDDS_SERVICE_DATA_URL_PATH}" path="${THREDDS_SERVICE_DATA_URL_PATH}" location="${THREDDS_SERVICE_DATA_LOCATION_ON_CONTAINER}">
Expand All @@ -21,12 +21,7 @@
</metadata>

<filter>
<include wildcard="*.nc" />
<include wildcard="*.ncml" />
<include wildcard="*.txt" />
<include wildcard="*.md" />
<include wildcard="*.rst" />
<include wildcard="*.csv" />
${THREDDS_DEFAULT_FILE_FILTERS}
${THREDDS_SERVICE_DATA_EXTRA_FILE_FILTERS}
</filter>

Expand Down
18 changes: 12 additions & 6 deletions birdhouse/components/thredds/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ export THREDDS_SERVICE_DATA_LOCATION_NAME='Birdhouse'
export THREDDS_DATASET_URL_PATH='datasets'
export THREDDS_SERVICE_DATA_URL_PATH='birdhouse'

export THREDDS_DEFAULT_FILE_FILTERS='
<include wildcard="*.nc" />
<include wildcard="*.ncml" />
<include wildcard="*.txt" />
<include wildcard="*.md" />
<include wildcard="*.rst" />
<include wildcard="*.csv" />
'

export THREDDS_SERVICE_DATA_EXTRA_FILE_FILTERS=''

export THREDDS_DATASET_DATASETSCAN_BODY='
Expand All @@ -25,12 +34,7 @@ export THREDDS_DATASET_DATASETSCAN_BODY='
</metadata>

<filter>
<include wildcard="*.nc" />
<include wildcard="*.ncml" />
<include wildcard="*.txt" />
<include wildcard="*.md" />
<include wildcard="*.rst" />
<include wildcard="*.csv" />
${THREDDS_DEFAULT_FILE_FILTERS}
</filter>
'

Expand All @@ -44,6 +48,7 @@ VARS="
\$THREDDS_DATASET_URL_PATH
\$THREDDS_DATASET_LOCATION_ON_CONTAINER
\$THREDDS_DATASET_DATASETSCAN_BODY
\$THREDDS_DEFAULT_FILE_FILTERS
"

OPTIONAL_VARS="
Expand All @@ -64,4 +69,5 @@ export DELAYED_EVAL="
THREDDS_SERVICE_DATA_LOCATION_ON_HOST
THREDDS_IMAGE
THREDDS_IMAGE_URI
THREDDS_DATASET_DATASETSCAN_BODY
"

0 comments on commit 23d58ac

Please sign in to comment.