dev-new/fw: cut lab over to the central OneCLI on web-arm and retire the sidecar #338
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#338
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR 2 of 2 — depends on #337 being merged, deployed, and manually provisioned. Do not start until the operator confirms: central OneCLI reachable at https://onecli.cloonar.com, account created (login mode), lab API key minted in the dashboard and added to dev-new sops, and the new gateway interception CA extracted. Design settled in the 2026-08-14 grill session.
Keep as needs-triage until those prerequisites are done, then relabel ready-for-agent.
Repoint lab (hosts/dev-new/modules/coding-lab/)
In one atomic change on dev-new:
services.lab.onecli.url = "https://onecli.cloonar.com"(REST rides TLS through web-arm's nginx vhost).services.lab.onecli.gatewayUrl = "http://10.42.98.10:10255"(direct CONNECT proxy over wg_cloonar; nginx cannot front it).services.lab.onecli.apiKeyFile→ new sops secret on dev-new (see below); delete the local-mode auto-key-fetch oneshot (coding-lab-onecli-key) — it only worked because local mode minted keys unauthenticated.services.lab.onecli.caFile→ the central gateway's interception CA, committed to the repo as a plain PEM file (public trust material, 0644 by design; deterministic, no boot-time fetch). Fetch once fromhttps://onecli.cloonar.com/v1/gateway/ca. If OneCLI is ever reinstalled this file must be refreshed — note that beside the file.services.lab.onecli.dashboard = "off", dropdashboardAddr— the central dashboard has its own vhost; lab's port-mode proxy is obsolete.Demolish the sidecar and its plumbing
hosts/dev-new/modules/coding-lab/onecli.nix(both containers, the onecli podman network unit) and dev-new'snetworking.firewall.allowedTCPPorts = [ 8081 ].onecli-dashboard(:8081) vhost fromhosts/fw/vms/web/lab.nix.hosts/fw/modules/firewall.nix(added for the old dashboard path).Secrets for the operator to add (agent must NOT edit sops files)
In
hosts/dev-new/secrets.sops.yaml:coding-lab-onecli-api-key— the key minted in the central dashboard (oc_proj_*). Module wires it with owner = lab service user, mode 0400 (apiKeyFile carries the masterKeyFile 0600-or-stricter contract).Manual re-entry (operator, dashboard)
Accepted consequences (state in the PR description)
Verification
GET /api/v1/onecli/healthon lab reports ok.Agent Brief
Category: enhancement
Summary: Repoint lab on dev-new at the central OneCLI on web-arm and delete the local sidecar and all its dashboard plumbing.
Prerequisites — verified done (2026-08-14):
https://onecli.cloonar.com(#337 merged and deployed, ADR-0026). Login ended up as OIDC via Keycloak rather than the plain login mode this issue's body assumed — no effect on the lab side.coding-lab-onecli-api-keyis present in dev-new's sops file (commitfc57bd7).https://onecli.cloonar.com/v1/gateway/ca— verified fetchable from inside an agent sandbox today, so the implementing agent can fetch it once and commit the PEM itself.Current behavior:
lab on dev-new talks to a local OneCLI sidecar (two podman containers in local mode, loopback-only), auto-fetches its API key and CA from that sidecar at boot via a oneshot, and exposes the sidecar dashboard through lab's port-mode proxy on :8081, fronted by an
onecli-dashboardvhost on the web VM plus an 8081 hairpin DNAT on fw.Desired behavior:
As specified in the issue body, in one PR:
services.lab.oneclion dev-new points at the central instance:url = "https://onecli.cloonar.com",gatewayUrl = "http://10.42.98.10:10255",apiKeyFilefrom thecoding-lab-onecli-api-keysops secret (owner = lab service user, mode 0400),caFile= the CA PEM committed to the repo as plain 0644 trust material (with a note beside it that a OneCLI reinstall requires refreshing it).dashboard = "off",dashboardAddrdropped — the central dashboard has its own vhost.onecli-dashboardvhost, and fw's 8081 hairpin DNAT.As-built notes beyond the issue body:
coding-lab-onecli-api-keyalso sits in web-arm's sops file. Operator cleanup — the agent must NOT edit any*.sops.yaml; just mention it in the PR description.Acceptance criteria:
HTTPS_PROXYpointing at10.42.98.10:10255and a granted service call succeeds through the central gateway.GET /api/v1/onecli/healthon lab reports ok.https://onecli.cloonar.com; port 8081 answers nowhere anymore (dev-new listener, web VM vhost, fw DNAT all gone).onecli-pgdata,onecli-appdata) that the operator can prune.Out of scope: