mirror of
https://github.com/zvx-echo6/central.git
synced 2026-08-26 17:31:39 +00:00
Compare commits
1 commit
main
...
stabilize/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb0b8c5e02 |
3 changed files with 37 additions and 4 deletions
|
|
@ -4,11 +4,11 @@ Central is the data hub spine for the Echo6 infrastructure. Adapters normalize u
|
||||||
|
|
||||||
## Status
|
## 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-supervisor` — adapter lifecycle manager
|
||||||
- `central-archive` — NATS consumer persisting events to TimescaleDB
|
- `central-archive` — NATS consumer persisting events to TimescaleDB
|
||||||
- `central-gui` — FastAPI + HTMX web interface / API (:8000)
|
- `central-gui` — FastAPI + HTMX web interface / API (:8000)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "central"
|
name = "central"
|
||||||
version = "0.3.0"
|
version = "0.14.6"
|
||||||
requires-python = ">=3.12,<3.13"
|
requires-python = ">=3.12,<3.13"
|
||||||
description = "Data hub spine — adapters, bus, archive."
|
description = "Data hub spine — adapters, bus, archive."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
33
sql/migrations/036_add_avalanche_org_adapter.sql
Normal file
33
sql/migrations/036_add_avalanche_org_adapter.sql
Normal file
|
|
@ -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;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue