Central - data hub spine. Adapters -> NATS/JetStream -> archive.
  • Python 88.6%
  • HTML 9.4%
  • CSS 1.2%
  • Shell 0.6%
  • PLpgSQL 0.2%
Find a file
Ubuntu 05bb293f17 deploy.sh: fix central-migrate env (cd + EnvironmentFile) so pre-flight check works
central-migrate invocations were run via bare `cen "$VENV/bin/central-migrate"`,
which does not set the working directory or source the EnvironmentFile that the
systemd unit provides.  This caused the pre-flight --check to fail during the
v0.14.6 deploy with `PermissionError: [Errno 13] Permission error: '.env'`
because central-migrate tried to read .env from the caller's cwd instead of
/opt/central, and the DB DSN was missing.

The daemons themselves are unaffected — they always get WorkingDirectory=
/opt/central and EnvironmentFile=/etc/central/central.env from systemd.  The
deploy script is the only place that invoked central-migrate outside that context.

Fix: add ENV_FILE=/etc/central/central.env to the config block and a
cen_migrate() helper that wraps every central-migrate call with:
  sudo -u central bash -c "cd /opt/central && set -a && . /etc/central/central.env && set +a && /opt/central/.venv/bin/central-migrate <args>"
Replace all four bare invocations (--check preflight, --dry-run, apply,
--check post-deploy) with cen_migrate.  Exit-code propagation is unchanged —
bash -c forwards the inner exit status, so set -e / the ERR trap still fires
on non-zero exits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:30:50 +00:00
docs v0.13.0: sat_orbits adapter (forward-orbit-track per satellite) + antimeridian splitter 2026-06-09 18:50:47 -06:00
etc-templates scaffold: initial repository structure 2026-05-15 19:16:24 +00:00
scripts deploy.sh: fix central-migrate env (cd + EnvironmentFile) so pre-flight check works 2026-06-28 20:30:50 +00:00
sql v0.14.6: commit orphaned migration 036 + fix stale README/version metadata (#112) 2026-06-28 14:13:40 -06:00
src/central supervisor: shrink sat dedup window + WAL cursors.db to cut CPU/IO (#114) 2026-06-28 14:13:50 -06:00
systemd feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
tests v0.14.5: migration 042 re-asserts central ownership of config.monitoring_areas (#111) 2026-06-15 22:02:02 -06:00
.gitattributes chore: normalize line endings to LF 2026-05-16 22:26:12 +00:00
.gitignore feat(gui): add auth core, setup gate, and first-run operator creation 2026-05-17 05:30:49 +00:00
.python-version foundation: models, adapter ABC, config, CE wire, schema 2026-05-15 21:08:56 +00:00
CHANGELOG.md docs: add v0.3.0 changelog entry and network bindings reference (#29) 2026-05-18 14:26:09 -06:00
LICENSE scaffold: initial repository structure 2026-05-15 19:16:24 +00:00
pyproject.toml v0.14.6: commit orphaned migration 036 + fix stale README/version metadata (#112) 2026-06-28 14:13:40 -06:00
README.md v0.14.6: commit orphaned migration 036 + fix stale README/version metadata (#112) 2026-06-28 14:13:40 -06:00
uv.lock v0.11.1: satpass_predict adapter (server-side pass alerts for fixed observers) (#101) 2026-06-09 01:16:43 -06:00

Central

Central is the data hub spine for the Echo6 infrastructure. Adapters normalize upstream sources into a canonical event shape, publish CloudEvents to NATS/JetStream, and archive to TimescaleDB for historical query. Single-LXC deployment.

Status

Operational (v0.14.6) — deployed on utility CT 104 (central.echo6.mesh).

~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 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)

Architecture

  • Python 3.12 (uv-managed)
  • NATS + JetStream for live event bus
  • TimescaleDB + PostGIS for archive and geospatial query
  • One supervisor process managing adapter lifecycle
  • One archive consumer process persisting events to TimescaleDB
  • Both processes systemd-managed

Testing

See docs/test-database.md for test database setup.

License

MIT. See LICENSE.