docs: document operations/+web/ layers and live ci-web.service deployment

CLAUDE.md and docs/ARCHITECTURE.md were still missing the operations/ and web/ packages added by the web-UI plan (W0-W7). Also records that ci-web.service is now live on this host (LAN + Gitea OIDC) in docs/WEB-UI.md and closes plans/web-ui-management-plan.md with a status header.
This commit is contained in:
2026-07-23 22:52:32 +02:00
parent 1a96330de2
commit 907e79818e
4 changed files with 49 additions and 0 deletions
+13
View File
@@ -92,9 +92,22 @@ The host **never executes build tools directly** — it only orchestrates VM lif
| `commands/wait.py` | `wait-ready` |
| `commands/monitor.py` | `monitor disk / runner` |
| `commands/report.py` | `report job` |
| `operations/vms.py`, `cache.py`, `host.py`, `audit.py` | Pure logic layer shared by the CLI and the web UI — dataclasses only, zero `click`/`print`. `commands/*` and `web/routes.py` both call these; never duplicate logic in either caller. |
| `commands/web.py` | `web serve` — `ci web serve --host --port` launches the dashboard (`uvicorn`/`fastapi` imported lazily so the core CLI stays dep-light without the `[web]` extra) |
| `web/app.py`, `auth.py`, `routes.py`, `security.py` | FastAPI dashboard: read-only VM/cache/disk/runner view, Gitea OIDC login (Authlib, fail-closed allowlist), CSRF-protected confirm-gated mutating actions (VM remove/cleanup, cache purge, template backup), JSONL audit trail. In-process only — imports `operations/` + `backends.load_backend` directly, never shells the CLI. See `docs/WEB-UI.md`. |
**Key design rule**: Application code (especially `commands/job.py`) must import `backends.load_backend` only — never `WorkstationVmrunBackend` directly. This keeps the Phase D ESXi extension path open.
### Web management dashboard
`ci web serve` (package `web/`, optional `[web]` extra) is a server-rendered
FastAPI dashboard for VM/host management — see `docs/WEB-UI.md` for install,
Gitea OIDC setup, and operations, and `plans/web-ui-management-plan.md` for
the design history (steps W0–W7, all closed). Deployed live on this host as
`ci-web.service` (systemd, `ci-runner` user), bound to the LAN with Gitea
OIDC auth active — never bind `0.0.0.0`, and never bind non-loopback without
`[web.oidc]` configured (enforced at startup by `commands/web.py`).
### Transport selection
`commands/job.py` reads `guestOS = "..."` from the cloned VMX. `ubuntu-*` → Linux/SSH (`transport/ssh.py`); anything else → Windows/WinRM (`transport/winrm.py`).