- connects to a WIS2 Global Broker, subscribed to the following:
origin/a/wis2/#
cache/a/wis2/#
- connects to a WIS2 Global Cache, subscribed to the following:
cache/a/wis2/#
- connects to one or more WIS2 Nodes, subscribing to the following:
origin/a/wis2/{centre_id}/#
- on all notifications:
- verfies message is WIS2 compliant
- ensures the message is unique, not previously recieved from any other subscription
- publishes the message to the Global Broker
- performs metric accounting
Docker
Docker Compose
- python 3.10
- python requests==2.26.0
- python urllib3==1.26.0
- cmake
- docker plugin grafana/loki-docker-driver:2.9.2
Dependencies are listed in requirements.txt. Dependencies are automatically installed during pywis-pubsub installation.
git clone https://github.com/wmo-im/wis2-gb.git
cd wis2-gb ./platform-setup.sh
Several setups are pre-configured for usage:
default
: TODO describe (default if not specified)brief
: Small test configuration with global service participantsfull
: Full compliment of WIS2 participantsfunc
: Functional test configuration compatible withWis2-Global-Services-Testing
make ENV=brief build
make ENV=brief up
The Docker setup uses Docker and Docker Compose to manage the following services:
- redis:
Redis
Data cache for de-duplication - global-broker:
Eclipse Misquitto
MQTT broker - wis2-relay: MQTT subscription relay. One container for each subscription to WIS2 participants, performs message verification and de-duplication and then publishes the message to the Global Broker
- grafana:
Grafana
provides administrator dashboards, log monitoring and browsing prometheus metrics - loki:
Grafana Loki
provides administrator dashboards, log monitoring and browsing prometheus metrics - prometheus:
Prometheus
provides time-series metrics collections - metrics-collector: Subscribes to message telemetry, complies metrics from Prometheus and exposes HTTP metric status endpoint
See wis2-gb-default.env
for default environment variable settings.
Environment variables for WIS2 Notification Message handling are as follows:
- VERIFY_MESSAGE: whether to perform JSON Schema validation according to WNM
- VERIFY_DATA: whether to truncate notification mmessages with inline data exceeding 4096 bytes
- VERIFY_TOPIC: whether to perform WIS2 topic validation according to WTH (must be
False
for GTS-to-WIS2 nodes) - VERIFY_METADATA: whether to discard notification messages with missing metadata
- VERIFY_CENTRE_ID: whether to verify messages where the container assigned centre identifier does not match the centre identifier in the subscription topic
The Makefile
provides options to easily manage the Docker Compose setup.
make build
make force-build
make up
make dev
make logs
make login
make restart
make down
make rm
All bugs, enhancements and issues are managed on GitHub.