Fixes to the thredds role. Add two templates for the main configuration files.
This commit is contained in:
parent
9dd57eee3d
commit
822c7488af
|
@ -3,9 +3,18 @@ thredds_install: False
|
|||
thredds_upgrade: False
|
||||
thredds_version: 4.6.9
|
||||
thredds_name: tds
|
||||
thredds_app_name: thredds
|
||||
thredds_group_id: edu.ucar.tds
|
||||
thredds_app_name: Thredds
|
||||
thredds_group_id: edu.ucar
|
||||
thredds_extension: war
|
||||
thredds_file: '{{ thredds_name }}-{{ thredds_version }}.{{ thredds_extension }}'
|
||||
thredds_repository_url: 'https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases'
|
||||
thredds_download_directory: /srv
|
||||
thredds_data_content_dir: /data/thredds
|
||||
thredds_public_netcdf_dir: '{{ thredds_data_content_dir }}/public/netcdf/'
|
||||
thredds_server_name: 'Thredds instance'
|
||||
thredds_logo_url: '/thredds/threddsIcon.gif'
|
||||
thredds_logo_alt_text: '{{ thredds_server_name }}'
|
||||
thredds_organization: 'ORG'
|
||||
thredds_email: ''
|
||||
thredds_host_institution_name: 'ORG'
|
||||
thredds_host_institution_web: ''
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the Thredds webapp directory
|
||||
file: path={{ item.instance_path }}/webapps/{{ thredds_app_name }} state=absent
|
||||
file: path={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }} state=absent
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
|
||||
- name: Remove the Thredds download and data directories
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ thredds_download_directory }}'
|
||||
- '{{ thredds_data_directory }}'
|
||||
|
||||
when: not thredds_install or thredds_upgrade
|
||||
tags: [ 'thredds', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Create the Thredds webapp directory
|
||||
file: path={{ item.instance_path }}/webapps/{{ thredds_app_name }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
file: path={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
|
||||
- name: Create the Thredds data directory
|
||||
file: path={{ thredds_data_content_dir }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
|
||||
- name: Install the Thredds configuration files
|
||||
template: src={{ item }}.j2 dest={{ thredds_data_content_dir }}/thredds/{{ item }} mode=444
|
||||
with_items:
|
||||
- threddsConfig.xml
|
||||
- catalog.xml
|
||||
|
||||
- name: Get the thredds war file
|
||||
maven_artifact: artifact_id={{ thredds_name }} version={{ thredds_version | default(omit) }} group_id={{ thredds_group_id }} extension={{ thredds_extension | default('war') }} repository_url={{ thredds_repository_url }} dest={{ thredds_download_directory }}/{{ thredds_file }}
|
||||
|
||||
- name: Unarchive the thredds war
|
||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ thredds_file }} dest={{ item.instance_path }}/webapps/{{ thredds_app_name }} creates={{ item.instance_path }}/webapps/{{ thredds_app_name }}/WEB-INF/lib owner={{ item.user }} group={{ item.user }}
|
||||
unarchive: copy=no src={{ thredds_download_directory }}/{{ thredds_file }} dest={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }} creates={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }}/WEB-INF/lib owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: tomcat instances restart
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<catalog name="THREDDS Server -gCube Development Infrastructure"
|
||||
xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0
|
||||
http://www.unidata.ucar.edu/schemas/thredds/InvCatalog.1.0.6.xsd">
|
||||
|
||||
<service name="all" base="" serviceType="compound">
|
||||
<service name="odap" serviceType="OpenDAP" base="/thredds/dodsC/" />
|
||||
<service name="dap4" serviceType="DAP4" base="/thredds/dap4/" />
|
||||
<service name="http" serviceType="HTTPServer" base="/thredds/fileServer/" />
|
||||
<service name="wcs" serviceType="WCS" base="/thredds/wcs/" />
|
||||
<service name="wms" serviceType="WMS" base="/thredds/wms/" />
|
||||
<service name="ncss" serviceType="NetcdfSubset" base="/thredds/ncss/" />
|
||||
</service>
|
||||
|
||||
<service name="dap" base="" serviceType="compound">
|
||||
<service name="odap" serviceType="OpenDAP" base="/thredds/dodsC/" />
|
||||
<service name="dap4" serviceType="DAP4" base="/thredds/dap4/" />
|
||||
</service>
|
||||
|
||||
<datasetScan name="public files" ID="DatasetScan"
|
||||
path="public/netcdf" location="{{ thredds_public_netcdf_dir }}">
|
||||
<metadata inherited="true">
|
||||
<serviceName>all</serviceName>
|
||||
</metadata>
|
||||
|
||||
<filter>
|
||||
<include wildcard="*.nc" />
|
||||
<include wildcard="*.tiff" />
|
||||
<include wildcard="*.geotiff" />
|
||||
<include wildcard="*.asc" />
|
||||
<include wildcard="*.ncml" />
|
||||
</filter>
|
||||
<sort>
|
||||
<lexigraphicByName increasing="true" />
|
||||
</sort>
|
||||
</datasetScan>
|
||||
|
||||
|
||||
</catalog>
|
|
@ -0,0 +1,271 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<threddsConfig>
|
||||
|
||||
<!-- all options are commented out in standard install - meaning use default values -->
|
||||
<!-- see http://www.unidata.ucar.edu/software/thredds/current/tds/reference/ThreddsConfigXMLFile.html -->
|
||||
<serverInformation>
|
||||
<name>{{ thredds_server_name }}</name>
|
||||
<logoUrl>{{ thredds_logo_url }}</logoUrl>
|
||||
<logoAltText>{{ thredds_server_name }}</logoAltText>
|
||||
|
||||
<abstract>Scientific Data</abstract>
|
||||
<keywords>meteorology, atmosphere, climate, ocean, earth science</keywords>
|
||||
|
||||
<contact>
|
||||
<name>Support</name>
|
||||
<organization>{{ thredds_organization }}</organization>
|
||||
<email>{{ thredds_email }}</email>
|
||||
<!--phone></phone-->
|
||||
</contact>
|
||||
<hostInstitution>
|
||||
<name>{{ thredds_host_institution_name }}</name>
|
||||
<webSite>{{ thredds_host_institution_web }}</webSite>
|
||||
</hostInstitution>
|
||||
</serverInformation>
|
||||
|
||||
<!--
|
||||
The <catalogRoot> element:
|
||||
For catalogs you don't want visible from the /thredds/catalog.xml chain
|
||||
of catalogs, you can use catalogRoot elements. Each catalog root config
|
||||
catalog is crawled and used in configuring the TDS.
|
||||
|
||||
<catalogRoot>myExtraCatalog.xml</catalogRoot>
|
||||
<catalogRoot>myOtherExtraCatalog.xml</catalogRoot>
|
||||
-->
|
||||
|
||||
<!--
|
||||
* Setup for generated HTML pages.
|
||||
*
|
||||
* NOTE: URLs may be absolute or relative, relative URLs must be relative
|
||||
* to the webapp URL, i.e., http://server:port/thredds/.
|
||||
-->
|
||||
<htmlSetup>
|
||||
<!--
|
||||
* CSS documents used in generated HTML pages.
|
||||
* The CSS document given in the "catalogCssUrl" element is used for all pages
|
||||
* that are HTML catalog views. The CSS document given in the "standardCssUrl"
|
||||
* element is used in all other generated HTML pages.
|
||||
* -->
|
||||
<standardCssUrl>tds.css</standardCssUrl>
|
||||
<catalogCssUrl>tdsCat.css</catalogCssUrl>
|
||||
<openDapCssUrl>tdsDap.css</openDapCssUrl>
|
||||
|
||||
<!--
|
||||
* The Google Analytics Tracking code you would like to use for the
|
||||
* webpages associated with THREDDS. This will not track WMS or DAP
|
||||
* requests for data, only browsing the catalog.
|
||||
-->
|
||||
<googleTrackingCode></googleTrackingCode>
|
||||
|
||||
</htmlSetup>
|
||||
|
||||
<!--
|
||||
The <TdsUpdateConfig> element controls if and how the TDS checks
|
||||
for updates. The default is for the TDS to check for the current
|
||||
stable and development release versions, and to log that information
|
||||
in the TDS serverStartup.log file as INFO entries.
|
||||
|
||||
<TdsUpdateConfig>
|
||||
<logVersionInfo>true</logVersionInfo>
|
||||
</TdsUpdateConfig>
|
||||
-->
|
||||
|
||||
<!--
|
||||
The <CORS> element controls Cross-Origin Resource Sharing (CORS).
|
||||
CORS is a way to allow a website (such as THREDDS) to open up access
|
||||
to resources to web pages and applications running on a different domain.
|
||||
One example would be allowing a web-application to use fonts from
|
||||
a separate host. For TDS, this can allow a javascript app running on a
|
||||
different site to access data on a THREDDS server.
|
||||
For more information see: https://en.wikipedia.org/wiki/Cross-origin_resource_sharing
|
||||
The elements below represent defaults. Only the <enabled> tag is required
|
||||
to enable CORS. The default allowed origin is '*', which allows sharing
|
||||
to any domain.
|
||||
<CORS>
|
||||
<enabled>false</enabled>
|
||||
<maxAge>1728000</maxAge>
|
||||
<allowedMethods>GET</allowedMethods>
|
||||
<allowedHeaders>Authorization</allowedHeaders>
|
||||
<allowedOrigin>*</allowedOrigin>
|
||||
</CORS>
|
||||
-->
|
||||
|
||||
<!--
|
||||
The <CatalogServices> element:
|
||||
- Services on local TDS served catalogs are always on.
|
||||
- Services on remote catalogs are set with the allowRemote element
|
||||
below. They are off by default (recommended).
|
||||
-->
|
||||
<CatalogServices>
|
||||
<allowRemote>false</allowRemote>
|
||||
</CatalogServices>
|
||||
|
||||
<!--
|
||||
Configuring the CDM (netcdf-java library)
|
||||
see http://www.unidata.ucar.edu/software/netcdf-java/reference/RuntimeLoading.html
|
||||
|
||||
<nj22Config>
|
||||
<ioServiceProvider class="edu.univ.ny.stuff.FooFiles"/>
|
||||
<coordSysBuilder convention="foo" class="test.Foo"/>
|
||||
<coordTransBuilder name="atmos_ln_sigma_coordinates" type="vertical" class="my.stuff.atmosSigmaLog"/>
|
||||
<typedDatasetFactory datatype="Point" class="gov.noaa.obscure.file.Flabulate"/>
|
||||
</nj22Config>
|
||||
-->
|
||||
|
||||
<!--
|
||||
CDM uses the DiskCache directory to store temporary files, like uncompressed files.
|
||||
<DiskCache>
|
||||
<alwaysUse>false</alwaysUse>
|
||||
<scour>1 hour</scour>
|
||||
<maxSize>1 Gb</maxSize>
|
||||
</DiskCache>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Caching open NetcdfFile objects.
|
||||
default is to allow 50 - 100 open files, cleanup every 11 minutes
|
||||
<NetcdfFileCache>
|
||||
<minFiles>50</minFiles>
|
||||
<maxFiles>100</maxFiles>
|
||||
<scour>11 min</scour>
|
||||
</NetcdfFileCache>
|
||||
-->
|
||||
|
||||
<!--
|
||||
The <HTTPFileCache> element:
|
||||
allow 10 - 20 open datasets, cleanup every 17 minutes
|
||||
used by HTTP Range requests.
|
||||
<HTTPFileCache>
|
||||
<minFiles>10</minFiles>
|
||||
<maxFiles>20</maxFiles>
|
||||
<scour>17 min</scour>
|
||||
</HTTPFileCache>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Writing GRIB indexes.
|
||||
<GribIndexing>
|
||||
<setExtendIndex>false</setExtendIndex>
|
||||
<alwaysUseCache>false</alwaysUseCache>
|
||||
</GribIndexing>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Persist joinNew aggregations to named directory. scour every 24 hours, delete stuff older than 90 days
|
||||
<AggregationCache>
|
||||
<scour>24 hours</scour>
|
||||
<maxAge>90 days</maxAge>
|
||||
<cachePathPolicy>NestedDirectory</cachePathPolicy>
|
||||
</AggregationCache>
|
||||
-->
|
||||
|
||||
<!--
|
||||
How to choose the template dataset for an aggregation. latest, random, or penultimate
|
||||
<Aggregation>
|
||||
<typicalDataset>penultimate</typicalDataset>
|
||||
</Aggregation>
|
||||
-->
|
||||
|
||||
<!--
|
||||
The Netcdf Subset Service is off by default.
|
||||
<NetcdfSubsetService>
|
||||
<allow>false</allow>
|
||||
<scour>10 min</scour>
|
||||
<maxAge>-1 min</maxAge>
|
||||
</NetcdfSubsetService>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<Opendap>
|
||||
<ascLimit>50</ascLimit>
|
||||
<binLimit>500</binLimit>
|
||||
<serverVersion>opendap/3.7</serverVersion>
|
||||
</Opendap>
|
||||
-->
|
||||
|
||||
|
||||
<!--The WCS Service is off by default.
|
||||
Also, off by default (and encouraged) is operating on a remote dataset. -->
|
||||
<WCS>
|
||||
<allow>true</allow>
|
||||
<allowRemote>false</allowRemote>
|
||||
<scour>15 min</scour>
|
||||
<maxAge>30 min</maxAge>
|
||||
</WCS>
|
||||
|
||||
|
||||
|
||||
<WMS>
|
||||
<allow>true</allow>
|
||||
<allowRemote>false</allowRemote>
|
||||
<maxImageWidth>2048</maxImageWidth>
|
||||
<maxImageHeight>2048</maxImageHeight>
|
||||
</WMS>
|
||||
|
||||
|
||||
|
||||
<NCISO>
|
||||
<ncmlAllow>true</ncmlAllow>
|
||||
<uddcAllow>true</uddcAllow>
|
||||
<isoAllow>true</isoAllow>
|
||||
</NCISO>
|
||||
|
||||
|
||||
<!-- CatalogGen service is off by default.
|
||||
<CatalogGen>
|
||||
<allow>false</allow>
|
||||
</CatalogGen>
|
||||
-->
|
||||
|
||||
<!-- DLwriter service is off by default.
|
||||
As is support for operating on remote catalogs.
|
||||
<DLwriter>
|
||||
<allow>false</allow>
|
||||
<allowRemote>false</allowRemote>
|
||||
</DLwriter>
|
||||
-->
|
||||
|
||||
<!-- DqcService is off by default.
|
||||
<DqcService>
|
||||
<allow>false</allow>
|
||||
</DqcService>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Link to a Viewer application on the HTML page:
|
||||
<Viewer>my.package.MyViewer</Viewer>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Add a DataSource - essentially an IOSP with access to Servlet request parameters
|
||||
<datasetSource>my.package.DatsetSourceImpl</datasetSource>
|
||||
-->
|
||||
|
||||
<!--
|
||||
set FeatureCollection logging
|
||||
<FeatureCollection>
|
||||
<RollingFileAppender>
|
||||
<MaxFileSize>1 MB</MaxFileSize>
|
||||
<MaxBackups>5</MaxBackups>
|
||||
<Level>INFO</Level>
|
||||
</RollingFileAppender>
|
||||
</FeatureCollection>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Configure how the NetCDF-4 C library is discovered and used.
|
||||
libraryPath: The directory in which the native library is installed.
|
||||
libraryName: The name of the native library. This will be used to locate the proper .DLL, .SO, or .DYLIB file
|
||||
within the libraryPath directory.
|
||||
useForReading: By default, the native library is only used for writing NetCDF-4 files; a pure-Java layer is
|
||||
responsible for reading them. However, if this property is set to true, then it will be used for reading
|
||||
NetCDF-4 (and HDF5) files as well.
|
||||
-->
|
||||
<!--
|
||||
<Netcdf4Clibrary>
|
||||
<libraryPath>/usr/local/lib</libraryPath>
|
||||
<libraryName>netcdf</libraryName>
|
||||
<useForReading>false</useForReading>
|
||||
</Netcdf4Clibrary>
|
||||
-->
|
||||
</threddsConfig>
|
Loading…
Reference in New Issue