diff --git a/README.md b/README.md index c0e4bc8..dc88dca 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ Central is the data hub spine for the Echo6 infrastructure. Adapters normalize u ## Status -**Live in production** (v0.14.5) on utility CT 104 (`central.echo6.mesh`). +**Operational** (v0.14.6) — deployed on utility CT 104 (`central.echo6.mesh`). -~25 adapters across domains: traffic, wildfire, weather, space-weather, hydrology, earthquakes, avalanche, disasters, and satellite. Events flow CloudEvents -> NATS/JetStream -> TimescaleDB/PostGIS. FastAPI + HTMX GUI/API on :8000. +~22 adapters live across traffic, wildfire, weather, space-weather, hydrology, earthquakes, avalanche, disasters, and satellite. CloudEvents published to NATS/JetStream, archived to TimescaleDB/PostGIS. FastAPI + HTMX GUI/API on :8000. -Three systemd services manage the deployment: +Three systemd units on a single LXC: - `central-supervisor` — adapter lifecycle manager - `central-archive` — NATS consumer persisting events to TimescaleDB - `central-gui` — FastAPI + HTMX web interface / API (:8000) diff --git a/pyproject.toml b/pyproject.toml index a9d4cad..cbe0d0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "central" -version = "0.3.0" +version = "0.14.6" requires-python = ">=3.12,<3.13" description = "Data hub spine — adapters, bus, archive." readme = "README.md" diff --git a/sql/migrations/036_add_avalanche_org_adapter.sql b/sql/migrations/036_add_avalanche_org_adapter.sql new file mode 100644 index 0000000..3e8db54 --- /dev/null +++ b/sql/migrations/036_add_avalanche_org_adapter.sql @@ -0,0 +1,33 @@ +-- Migration 036: register avalanche_org adapter row in config.adapters (v0.10.10.1) +-- +-- v0.10.10 (PR #98) shipped the avalanche_org adapter code, GUI templates, +-- stream registry entry, and migration 035 (CENTRAL_AVY config.streams seed). +-- It also (incorrectly) assumed the supervisor would schedule a new adapter +-- the moment its code landed. It won't: supervisor.list_enabled_adapters() +-- reads from config.adapters and skips any adapter without a row, so the +-- v0.10.10 deploy left avalanche_org code-shipped-but-inactive. +-- +-- This migration closes that gap. Mirrors the pattern of migration 031 +-- (itd_511) -- INSERT a row with default settings, idempotent via +-- ON CONFLICT (name) DO NOTHING. +-- +-- Unlike itd_511 (which shipped disabled because it needed an API key +-- staged first), avalanche_org has no auth requirement and is enabled +-- immediately: the upstream API is public and the off-season severity +-- gate means the adapter yields zero events during summer regardless, +-- so 'enabled at install' is the right default. +-- +-- Settings JSON matches AvalancheOrgSettings: center_ids defaults to +-- SNFAC + PAC (Idaho-region coverage). Operator can extend via GUI to +-- any avalanche.org-recognised center (NWAC, CAIC, etc.). +-- +-- Idempotent: re-running is a no-op for existing rows. + +INSERT INTO config.adapters (name, enabled, cadence_s, settings) +VALUES ( + 'avalanche_org', + true, + 1800, + '{"center_ids": ["SNFAC", "PAC"]}'::jsonb +) +ON CONFLICT (name) DO NOTHING;