infrastructure/control
2026-11-09 19:06:00 +03:00
..
app.js Add private build control portal and durable full pipeline logs 2026-11-09 19:06:00 +03:00
index.html Add private build control portal and durable full pipeline logs 2026-11-09 19:06:00 +03:00
README.md Add private build control portal and durable full pipeline logs 2026-11-09 19:06:00 +03:00
server.py Add private build control portal and durable full pipeline logs 2026-11-09 19:06:00 +03:00
style.css Add private build control portal and durable full pipeline logs 2026-11-09 19:06:00 +03:00

Private build control portal

Standalone Python stdlib service. No ingress, reverse proxy, Docker socket or public-site route. The service binds only configured LAN/Tailscale/loopback addresses, checks the peer subnet and Host header, and requires same-origin JSON POSTs for the fixed systemd start/stop/schedule actions. It trusts users on those private networks; it is a personal control surface, not an Internet-facing app.

Terra deployment: 192.168.88.104:8099, 100.64.0.11:8099, 127.0.0.1:8099. Allowed peers: 192.168.88.0/24, 100.64.0.0/10, 127.0.0.0/8. Config /etc/archipelago/control.json includes listen, hosts (with port), allowed_networks, port, coordinator_root, worker_root, worker_source_root. Unit: deploy/archipelago-control.service. Source: /opt/archipelago/control-source. LAN address changes require updating bind/Host config and restarting this service.

Monitoring contract

  • /api/status: actual systemd service/timer state, next trigger, history, source SHAs.
  • /api/run?run=ID: ordered phase events, all invoked actions, complete argv, start/end times, elapsed time, exit code/error, and inventory of nested logs.
  • /api/log?run=ID&id=LOG&offset=BYTE: 256-KiB pages from any byte offset; offset -1 tails. Every byte is reachable; the UI does not equate a tail to a full log.
  • download=1: stream the complete file, without a size cap. No arbitrary path API.
  • All output is rendered as text; log content never becomes HTML or executable code.
  • Old runs expose all surviving logs but explicitly lack the new action timeline.
  • Progress is measured phases/status/duration, not an invented overall percentage.

New runs retain action-NNNN.log (stdout + stderr, no line limit), command metadata, phase events and nested CLI/build/acceptance/serial/Flatpak logs on ZFS under /opt/archipelago/data/private/pipeline-monitor/ID. Coordinator journald output is also available by invocation ID. The worker's live files are available before archive. Log history is separate from artifact-retention cleanup and is not auto-deleted. Source revisions are frozen into each run's source archive; the overview shows the next run's configured source revisions. Native executable logs retain their existing format; monitoring does not substitute human CLI output for private detailed logs.

Stopping the driver stops owned worker units and VM units, retains logs, and leaves unfinished build artifacts for diagnosis rather than starting a lengthy archive. No command shell or arbitrary service name is accepted over HTTP. Schedule buttons control the existing 15th/30th 00:00 UTC timer and do not change its dates.

Runtime API tests: python3 tests/control_portal.py on terra. They use a temporary fixture and fake systemd responses; they never start or stop a real build.