Configuration
Main configuration environment variables
wis2-gdc configuration is driven by the following environment variables, which are managed in wis2-gdc.env:
Name |
Description |
Default |
|---|---|---|
|
logging level as per the standard Python logging levels |
|
|
public URL of the GDC API |
|
|
internal Docker URL of the API |
|
|
API backend type |
|
|
API backend connection |
|
|
URL of the GDC broker |
|
|
centre identifier of the GDC |
|
|
URL of metrics collector |
|
|
WIS2 Global Broker that the GDC connects to |
|
|
WIS2 topic that the GDC subscribes to |
|
|
whether the GDC should publish ETS and KPI reports |
|
|
whether the GDC should stop ingest based on on failing record |
|
|
whether the GDC should run KPI as part of ingest |
|
|
whether the GDC should in experimental mode |
|
|
URL of the GDC cache |
|
|
cache retention policy for notification messages in seconds |
|
API configuration environment variables
If you wish to update the API configuration, you can set the below values accordingly (to override the pygeoapi defaults):
Name |
Description |
|---|---|
|
Icon for HTML templates |
|
Logo/banner for HTML templates |
|
Title |
|
Description |
|
Terms of service |
|
URL related to API |
|
License name |
|
License URL |
|
Provider name |
|
Provider URL |
|
Contact name |
|
Contact position |
|
Contact address |
|
Contact city |
|
Contact state or province |
|
Contact postal code |
|
Contact country |
|
Contact phone number (in format |
|
Contact fax number (in format |
|
Contact email |
|
Contact URL |
|
Contact hours of service |
|
Contact instructions |
|
Contact role |
Global Broker environment variables
WIS2 Global Broker environment variables are defined as comma-separated values (centre=id,url,centre-name). wis2-gdc allows for 1..n Global Broker environment variables as required.
Note
the naming convention is
WIS_GDC_GB_LINK_<LABEL>, where<LABEL>can be named as desired to identify the GBat least one Global Broker environment variable is required
the centre name may contain commas
An example can be found below:
WIS2_GDC_GB_LINK_METEOFRANCE,"fr-meteo-france-global-broker,mqtts://everyone:everyone@globalbroker.meteo.fr:8883,Météo-France, Global Broker Service"
Key settings
A default installation with minimal configuration changes per below satisfies most use casess:
WIS2_GDC_API_URLWIS2_GDC_CENTRE_IDWIS2_GDC_GBWIS2_GDC_GB_LINK...
Note
The wis2-gdc Docker Compose file also contains additional environment variables (see docker-compose.yml to adjust accordingly). In most cases, these values do not need adjustment.
Note
The WIS2_GDC_METADATA_ARCHIVE_ZIPFILE environment variable is always set by wis2-gdc to /data/wis2-discovery-metadata-archive.zip for the wis2-gdc-management and wis2-gdc-api containers.
Application specific configurations
Application specific configurations can be found in the following files (for direct editing if needed):
Filepath |
Description |
|---|---|
|
pygeoapi configuration (documentation) |
|
mosquitto main configuration |
|
mosquitto access control list |
|
pywis-pubsub configuration |
|
Grafana configuration |
|
Grafana configuration |
|
Prometheus configuration |
Note
Application specific configurations do not need adjustment in most cases.
Connections to additional Global Brokers
By default, wis2-gdc interacts with a single Global Broker via the wis2-gdc-management service.
To connect to additional Global Brokers, any number of additional wis2-gdc-management services may be added. For example, adding in docker-compose.yml:
wis2-gdc-management2: # update name accordingly
container_name: wis2-gdc-management2 # update name accordingly
build:
context: ./wis2-gdc-management/
env_file:
- wis2-gdc.env
environment:
- WIS2_GDC_API_URL_DOCKER=http://wis2-gdc-api:8080
- WIS2_GDC_GB=mqtts://everyone:everyone@globalbroker.inmet.br:8883 # override default WIS2_GDC_GB
depends_on:
wis2-gdc-backend:
condition: service_healthy
wis2-gdc-cache:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://wis2-gdc-backend:9200/wis2-discovery-metadata"]
interval: 1m
retries: 3
volumes:
- wis2-gdc-management-data2:/data # update volume accordingly
restart: always
command: ["/venv/bin/pywis-pubsub", "subscribe", "--config", "/app/docker/pywis-pubsub.yml", "--verbosity", "DEBUG"]
networks:
- wis2-gdc-net
<<: *logging
…then adding the associated volume:
volumes:
wis2-gdc-backend-data:
wis2-gdc-management-data:
wis2-gdc-management2-data: # added volume