Files
infra/stacks/frost/README.md
znetsixe f69453df99 refactor(dns): rename frost.wbd-rd.nl → sta.wbd-rd.nl; drop redundant portainer.wbd-rd.nl
Match the short-functional naming convention used by the other vhosts
(git, auth, dash, flow, ml, hub, ops, mq, ci, mqtt). FROST implements
OGC SensorThings API, so `sta` is the natural fit.

portainer.wbd-rd.nl is dropped from deploy.sh HOSTS — there is no
nginx vhost for it; portainer is already served via ops.wbd-rd.nl.

DNS prereq for first deploy is now: create one new A record for
sta.wbd-rd.nl → cloud public IP. All other short subdomains already
point correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 16:46:32 +02:00

43 lines
2.1 KiB
Markdown

# frost
[FROST-Server](https://github.com/FraunhoferIOSB/FROST-Server) — an OGC SensorThings API server. Stores sensors, observations, datastreams in postgis; exposes REST + MQTT.
- **Public hostname**: `sta.wbd-rd.nl`
- `/FROST-Server` → REST + admin UI (frost-http:8080)
- `/mqtt` → WebSocket MQTT for SensorThings clients (frost-mqtt:9876)
- **Networks**: `frost-internal` (private bus) + `app` (nginx ingress)
- **Backend**: dedicated `postgis/postgis:16-3.4-alpine` container — segregated from the shared `sql` stack
- **Internal bus**: dedicated `eclipse-mosquitto` for frost-http ↔ frost-mqtt sync (not reachable from outside the stack)
- **Public MQTT broker for SCADA/IoT clients**: that's `rabbitmq` (port 8883 TLS via nginx stream), NOT this stack
## Volumes (persistent)
- `frost-db-data` — postgis data dir
- `frost-mosquitto-data`, `frost-mosquitto-log` — internal bus state
Container can be recreated freely; no data loss as long as volumes are kept.
## First-run
1. `docker compose up -d frost-db frost-mosquitto` (or just `up -d` for the full stack — frost-http waits on the db healthcheck)
2. `frost-http` will auto-create the schema (`persistence_autoUpdateDatabase=true`) on first start
3. Create the admin user (one-time, post-deploy — the USERS table is created by FROST itself):
```bash
docker compose exec frost-db psql -U sensorthings -d sensorthings -c \
"INSERT INTO \"USERS\" (\"USER_NAME\", \"USER_PASS\") VALUES ('admin', crypt('CHANGE_ME', gen_salt('bf', 12)));"
```
Subsequent password rotations:
```bash
docker compose exec frost-db psql -U sensorthings -d sensorthings -c \
"UPDATE \"USERS\" SET \"USER_PASS\"=crypt('NEW_PW', gen_salt('bf', 12)) WHERE \"USER_NAME\"='admin';"
```
## TODO
- Switch from `BasicAuthProvider` to Keycloak OIDC (FROST has a plugin)
- Bootstrap admin user automatically (post-init container that waits for FROST schema, then runs the SQL above with `${FROST_ADMIN_PASSWORD}`)
- Document the SensorThings client examples (Things, Datastreams, Observations)
- pgadmin / db inspection: use shared portainer or a one-off `psql` exec