Migrating from the web GUI embedded in sensor-network-collector
Older versions of sensor-network-collector served this application themselves, either
from the collector process (httpEnabled: true) or from a Gunicorn service running
webapp_wsgi:app out of the collector image. This project replaces both. No data
conversion is needed.
What to reuse
- Configuration file: the collector's
config.jsonworks unchanged. Collector-only keys are ignored, andhttpEnabledis not required. - Data directory: mount or point
pathStorageat the directory the collector writes. - Database: keep
authDbPathas it is. When it is not set, the default is still<pathStorage>/collector_auth.sqlite, so accounts, permissions, API tokens, workflows, chart settings, logos, and the anomaly log are kept. webSessionSecret: keep the same value so users stay logged in.- Environment:
PWA_CONFIGnames the configuration file for Gunicorn;COLLECTOR_CONFIGis still accepted.
What changes
- The watchdog used to run inside the collector process. It is now a process of
this project:
python main.py --config <config> --watchdog-only, exactly one instance. Without it no anomaly notifications are sent and no workflows are evaluated. - The reverse proxy must forward to this project's
webservice.
Steps (Docker Compose)
- Update the collector first, following
docs/upgrading.mdinsensor-network-collector; its updater leaves the old web service running. - In this checkout, create
docker-compose.ymlandconfig.jsonas described in Docker deployment, using the collector's configuration file and the absolute path of its data directory. - Start
webandwatchdoghere. The old web service may keep running during the switch (on another host port): both use the same SQLite file safely. - Point the reverse proxy at the new
webservice and check login, a station page, independentCan APIandCan workflowspermission assignment,/api-tokens,/workflows, and the watchdog log lineWatchdog started. During the schema upgrade, existingCan APIgrants are copied toCan workflowsso previously authorized workflow users and running workflows keep working; review and separate those permissions after the first start where appropriate. - Remove the old web service from the collector's
docker-compose.yml.
This page is rendered directly from
docs/migration.md.