/
docker_configuration.py.template
293 lines (286 loc) · 13 KB
/
docker_configuration.py.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# coding: utf-8
import os
import logging
logger = logging.getLogger("canarie-api-config")
MY_SERVER_NAME = 'https://${PAVICS_FQDN_PUBLIC}/canarie'
DATABASE = {
'filename': '/opt/local/src/CanarieAPI/stats.db',
'access_log': '/var/log/nginx/access_file.log',
'log_pid': '/var/run/nginx.pid'
}
SERVICES = {
'node': {
'info': {
'name': 'Node',
'synopsis': 'Nodes are data, compute and index endpoints accessed through the PAVICS platform or external clients. The Node service is the backend that allows: data storage, harvesting, indexation and discovery of local and federated data; authentication and authorization; server registration and management. Node service is therefore composed of several other services.',
'version': '1.20.3',
'releaseTime': '2022-08-17T22:27:19Z',
'institution': 'Ouranos',
'researchSubject': 'Climatology',
'supportEmail': '${SUPPORT_EMAIL}',
'category': 'Resource/Cloud Management',
'tags': ['Climatology']
},
'stats': {
'method': '.*',
'route': '/(magpie|geoserver|thredds|wpsoutputs|jupyter)/.*'
},
'redirect': {
'doc': 'https://pavics-sdi.readthedocs.io/en/latest/arch/backend.html',
'releasenotes': 'https://github.com/bird-house/birdhouse-deploy/releases',
'support': 'https://github.com/bird-house/birdhouse-deploy/issues',
'source': 'https://github.com/bird-house/birdhouse-deploy',
'tryme': 'https://${PAVICS_FQDN_PUBLIC}',
'licence': 'https://pavics-sdi.readthedocs.io/en/latest/license.html',
'provenance': 'https://pavics-sdi.readthedocs.io/en/latest/provenance/index.html'
},
'monitoring': {
'Magpie': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}/magpie/version'
},
'response': {
'text': '\{.*"code": 200.*"type": "application/json".*\}'
}
},
'Twitcher': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/flyingpigeon?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
'Geoserver': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}/geoserver/web/'
}
},
'Phoenix': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}/geoserver/web/'
}
},
'Catalog': {
'request': {
'url': 'http://${PAVICS_FQDN}:8086/pywps?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
'Malleefowl': {
'request': {
'url': 'http://${PAVICS_FQDN}:8091/wps?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
'Finch': {
'request': {
'url': 'http://${PAVICS_FQDN}:8095/wps?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
'Raven': {
'request': {
'url': 'http://${PAVICS_FQDN}:8096/wps?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
'Solr': {
'request': {
'url': 'http://${PAVICS_FQDN}:8983/solr/birdhouse/select?q=CMIP5&fq=model:MPI-ESM-MR&fq=experiment:rcp45&fq=variable:tasmax&fq=institute:MPI-M&fq=frequency:mon&wt=json'
},
'response': {
'text': '.*catalog_url\":\".+/testdata/flyingpigeon/cmip5.*/catalog.xml.*'
}
},
'Thredds': {
'request': {
'url': 'http://${PAVICS_FQDN}:8083${TWITCHER_PROTECTED_PATH}/thredds/catalog.html'
}
},
'Jupyter': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}/jupyter/hub/login'
},
}
}
},
'indices': {
'info': {
'name': 'Climate indices',
'synopsis': 'Users of climate data are interested in specific indices such as the number of freeze-thaw cycles, the number of degree-days of cooling, the duration of heatwaves, etc. This returns annual values of the most popular climate indices.',
'version': '0.7.1',
'institution': 'Ouranos',
'releaseTime': '2021-03-25T00:00:00Z',
'researchSubject': 'Climatology',
'supportEmail': '${SUPPORT_EMAIL}',
'category': 'Data Manipulation',
'tags': ['Climatology', 'Cloud']
},
'stats': {
'method': '.*',
'route': '${TWITCHER_PROTECTED_PATH}/finch.*'
},
'redirect': {
'doc': 'https://finch.readthedocs.io/en/latest/index.html',
'releasenotes': 'https://github.com/bird-house/finch/releases',
'support': 'https://github.com/bird-house/finch/issues',
'source': 'https://github.com/bird-house/finch',
'tryme': 'https://ouranosinc.github.io/pavics-sdi/notebooks/climate_indices.html',
'licence': 'https://github.com/bird-house/finch/blob/master/LICENSE.txt',
'provenance': 'https://ouranosinc.github.io/pavics-sdi/provenance/index.html'
},
'monitoring': {
'Finch': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/finch?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
}
},
'raven': {
'info': {
'name': 'Hydrological modeling and analysis',
'synopsis': ('A suite of WPS processes to calibrate and run hydrological models, including geographical'
'information retrieval and processing as well as time series analysis.'),
'version': '0.11.1',
'institution': 'Ouranos',
'releaseTime': '2021-02-01T00:00:00Z',
'researchSubject': 'Hydrology',
'supportEmail': '${SUPPORT_EMAIL}',
'category': 'Data Manipulation',
'tags': ['Hydrology']
},
'stats': {
'method': '.*',
'route': '${TWITCHER_PROTECTED_PATH}/raven.*'
},
'redirect': {
'doc': 'https://pavics-raven.readthedocs.io/en/latest/',
'releasenotes': 'https://github.com/Ouranosinc/raven/releases',
'support': 'https://github.com/Ouranosinc/raven/issues',
'source': 'https://github.com/Ouranosinc/raven',
'tryme': 'https://pavics-raven.readthedocs.io/en/latest/notebooks/index.html',
'licence': 'https://github.com/Ouranosinc/raven/blob/master/LICENSE.txt',
'provenance': 'https://ouranosinc.github.io/pavics-sdi/provenance/index.html'
},
'monitoring': {
'Raven': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/raven?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
}
},
'renderer': {
'info': {
'name': 'High-resolution spatial gridded data renderer',
'synopsis': 'This service renders gridded data on the server and sends images to the client for display within mapping applications using Open Geospatial Consortium (OGC) Web Mappping Service (WMS) standard.',
'version': '4.6.15',
'institution': 'Unidata',
'releaseTime': '2020-06-16T00:00:00Z',
'researchSubject': 'Climatology',
'supportEmail': '${SUPPORT_EMAIL}',
'category': 'Data Manipulation',
'tags': ['Climatology']
},
'stats': {
'method': '.*',
'route': '/thredds/.*'
},
'redirect': {
'doc': 'https://ouranosinc.github.io/pavics-sdi/arch/frontend.html#gridded-data-rendering',
'releasenotes': 'https://github.com/Unidata/tds/releases',
'support': 'https://github.com/Ouranosinc/pavics-sdi/issues',
'source': 'https://github.com/Unidata/tds',
'tryme': 'https://ouranosinc.github.io/pavics-sdi/notebooks/rendering.html',
'licence': 'https://github.com/Unidata/tds/blob/master/LICENSE',
'provenance': 'https://ouranosinc.github.io/pavics-sdi/provenance/index.html'
},
'monitoring': {
'ncWMS': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/thredds/wms/birdhouse/testdata/ta_Amon_MRI-CGCM3_decadal1980_r1i1p1_199101-200012.nc?service=WMS&version=1.3.0&request=GetCapabilities'
}
},
}
},
'slicer': {
'info': {
'name': 'Spatial and temporal data slicer',
'synopsis': 'These services allows the subsetting and download of NetCDF over user-defined regions and periods.',
'version': '0.7.1',
'institution': 'Ouranos',
'releaseTime': '2021-03-25T00:00:00Z',
'researchSubject': 'Climatology',
'supportEmail': '${SUPPORT_EMAIL}',
'category': 'Data Manipulation',
'tags': ['Climatology', 'Cloud']
},
'stats': {
'method': '.*',
'route': '${TWITCHER_PROTECTED_PATH}/finch.*'
},
'redirect': {
'doc': 'https://finch.readthedocs.io/en/latest/index.html',
'releasenotes': 'https://github.com/bird-house/finch/releases',
'support': 'https://github.com/bird-house/finch/issues',
'source': 'https://github.com/bird-house/finch',
'tryme': 'https://pavics-sdi.readthedocs.io/en/latest/notebooks/regridding.html',
'licence': 'https://github.com/bird-house/finch/blob/master/LICENSE.txt',
'provenance': 'https://ouranosinc.github.io/pavics-sdi/provenance/index.html'
},
'monitoring': {
'Flyingpigeon': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/finch?service=WPS&version=1.0.0&request=GetCapabilities'
}
},
}
}
}
PLATFORMS = {
'pavics': {
'info': {
'name': 'PAVICS',
'synopsis': 'The PAVICS (Power Analytics for Visualization of Climate Science) platform is a collection of climate analysis services served through Open Geospatial Consortium (OGC) protocols. These services include data access, processing and visualization. Both data and algorithms can be accessed either programmatically, through OGC-compliant clients such as QGIS or ArcGIS, or a custom web interface.',
'version': '1.20.3',
'releaseTime': '2022-08-17T22:27:19Z',
'institution': 'Ouranos',
'researchSubject': 'Climatology',
'supportEmail': '${SUPPORT_EMAIL}',
'tags': ['Climatology', 'Cloud']
},
'stats': {
'method': '.*',
'route': '/project-api/.*'
},
'redirect': {
'doc': 'https://pavics-sdi.readthedocs.io/en/latest/arch/backend.html',
'releasenotes': 'https://github.com/bird-house/birdhouse-deploy/releases',
'support': 'https://github.com/Ouranosinc/pavics-sdi/issues',
'source': 'https://github.com/Ouranosinc/pavics-sdi',
'tryme': 'https://pavics.ouranos.ca',
'licence': 'https://pavics-sdi.readthedocs.io/en/latest/license.html',
'provenance': 'https://pavics-sdi.readthedocs.io/en/latest/provenance/index.html',
'factsheet': 'http://www.canarie.ca/software/pavics'
},
'monitoring': {
'Frontend': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}'
}
},
'Project': {
'request': {
'url': 'https://${PAVICS_FQDN_PUBLIC}/project-api/explorer/'
}
},
}
}
}
CANARIE_MONITORING_EXTRA_CONF_DIR = os.environ.get(
'CANARIE_MONITORING_EXTRA_CONF_DIR', '/bogus-notexist')
if os.path.exists(CANARIE_MONITORING_EXTRA_CONF_DIR):
# alphabetically sorted for reproducible override precedence
for extra_conf in sorted(os.listdir(CANARIE_MONITORING_EXTRA_CONF_DIR)):
extra_conf_full_path = "{CANARIE_MONITORING_EXTRA_CONF_DIR}/{extra_conf}".format(**locals())
# only handle files ending with .py
if os.path.isfile(extra_conf_full_path) and extra_conf_full_path.endswith(".py"):
logger.info("canarie-api: loading extra config '{extra_conf_full_path}'".format(**locals()))
execfile(extra_conf_full_path)
else:
logger.info("canarie-api: ignoring extra config '{extra_conf_full_path}'".format(**locals()))