provisioning: provision-deploy-vm-mode — deploy services to a VM-mode device over the connection #61

Closed
opened 2026-07-25 04:57:02 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #17 (provisioning).

What to build

The deploy step of the P4 journey for a VM-mode device, driven by the provision
orchestrator seam. When the operator confirms a deploy, the community's own config
repo drives it over the connection already established at device-add — no
enrollment step is repeated — and progress streams to the dashboard as a checklist
on P4-S4, with every step logged and offering Open/Download. For a VM-mode device
(its NixOS VM already created at device-add), deploy attaches the chosen services
to the VM via clan.Deploy with no install or takeover phase, so a machine
already running the right OS is not needlessly rebuilt.

This slice builds the plain-deploy path and its log-streaming surface that the
full-install takeover (next slice) then extends. Supply.Seed is a hard
precondition of every deploy — a drifted, unfed node cannot deploy offline.

Notes: the failure classification and per-service health outcomes live in
neighbouring slices; this slice owns the VM-mode clan.Deploy path and the
streamed, logged deploy checklist. Flow:
docs/ux/flows/p4-provisioning.mermaid.

Acceptance criteria

  • (story 10) Given a confirmed deploy, when it runs, then the community's own config repo drives it, progress streams to the dashboard as a checklist, and every step is logged with Open/Download.
  • (story 12) Given a VM-mode device (its NixOS VM already created at device-add), when deploy runs, then services are deployed to the VM with no install/takeover phase.

Blocked by

  • #51 — deploy runs after review

Task manifest

task: provisioning:provision-deploy-vm-mode
implements_flow: p4-provisioning
implements_edge: S3→S4
wireframe: docs/ux/wireframes/p4-provisioning/p4-s4-deploy-and-health-checks.html
interface: "`provision` orchestrator seam — deploy(node) for a VM-mode device drives `clan.Deploy` (services only, no install/takeover phase) over the established connection after `Supply.Seed`; streams the config-repo-driven checklist with per-step logs (Open/Download)"
seam: "`provision` orchestrator seam tests (control plane, Go) — fake `clan.Clan` (`Deploy` hot path), fake `Supply` (seed precondition), real brandkit; asserts services-only deploy, streamed checklist, and logged steps"
acceptance:
  - given: a confirmed deploy
    when: it runs
    then: the community's own config repo drives it, progress streams as a checklist, and every step is logged with Open/Download
  - given: a VM-mode device whose NixOS VM already exists from device-add
    when: deploy runs
    then: services are deployed to the VM via `clan.Deploy` with no install or takeover phase
depends_on: [provision-review-impact]
out_of_scope:
  - "story 11, 13 full-install takeover and deploy-failure recovery — provision-deploy-full-install's"
  - "story 14–17 active / partial-success health gating — provision-active-and-partial's"
  - "Supply.Seed's supply-chain internals — settled in ADR 0017, consumed here"
needs_human_decision: []
## Parent Feature spec: #17 (provisioning). ## What to build The deploy step of the P4 journey for a VM-mode device, driven by the `provision` orchestrator seam. When the operator confirms a deploy, the community's own config repo drives it over the connection already established at device-add — no enrollment step is repeated — and progress streams to the dashboard as a checklist on P4-S4, with every step logged and offering Open/Download. For a VM-mode device (its NixOS VM already created at device-add), deploy attaches the chosen services to the VM via `clan.Deploy` with no install or takeover phase, so a machine already running the right OS is not needlessly rebuilt. This slice builds the plain-deploy path and its log-streaming surface that the full-install takeover (next slice) then extends. `Supply.Seed` is a hard precondition of every deploy — a drifted, unfed node cannot deploy offline. Notes: the failure classification and per-service health outcomes live in neighbouring slices; this slice owns the VM-mode `clan.Deploy` path and the streamed, logged deploy checklist. Flow: `docs/ux/flows/p4-provisioning.mermaid`. ## Acceptance criteria - [ ] (story 10) Given a confirmed deploy, when it runs, then the community's own config repo drives it, progress streams to the dashboard as a checklist, and every step is logged with Open/Download. - [ ] (story 12) Given a VM-mode device (its NixOS VM already created at device-add), when deploy runs, then services are deployed to the VM with no install/takeover phase. ## Blocked by - #51 — deploy runs after review ## Task manifest ```yaml task: provisioning:provision-deploy-vm-mode implements_flow: p4-provisioning implements_edge: S3→S4 wireframe: docs/ux/wireframes/p4-provisioning/p4-s4-deploy-and-health-checks.html interface: "`provision` orchestrator seam — deploy(node) for a VM-mode device drives `clan.Deploy` (services only, no install/takeover phase) over the established connection after `Supply.Seed`; streams the config-repo-driven checklist with per-step logs (Open/Download)" seam: "`provision` orchestrator seam tests (control plane, Go) — fake `clan.Clan` (`Deploy` hot path), fake `Supply` (seed precondition), real brandkit; asserts services-only deploy, streamed checklist, and logged steps" acceptance: - given: a confirmed deploy when: it runs then: the community's own config repo drives it, progress streams as a checklist, and every step is logged with Open/Download - given: a VM-mode device whose NixOS VM already exists from device-add when: deploy runs then: services are deployed to the VM via `clan.Deploy` with no install or takeover phase depends_on: [provision-review-impact] out_of_scope: - "story 11, 13 full-install takeover and deploy-failure recovery — provision-deploy-full-install's" - "story 14–17 active / partial-success health gating — provision-active-and-partial's" - "Supply.Seed's supply-chain internals — settled in ADR 0017, consumed here" needs_human_decision: [] ```
Author
Owner

Done in e6db7e6 (on main).

What was built — the S3/S3x → S4 edge at the ADR 0058 seam:

  • provision.Deploy (internal/provision/deploy.go) runs the confirmed selection for a VM-mode device over the connection already established at device-add — no enrollment step repeated. Which clan hot path runs is read from the install facts (ADR 0059): a VM-mode device gets clan.Deploy, services only — the seam test proves clan.Enroll is never touched, so a machine already running the right OS is never rebuilt. A full-install device still takeover-ready is refused typed (ErrTakeoverPath, nothing run) — provision-deploy-full-install extends from here.
  • The community's own config repo drives it (story 10): the selection's diff is committed (role assigned, added services attached, removals detached) and clan.Deploy applies that exact revision to the one node.
  • Supply.Seed is a hard precondition: after the commit, strictly before clan.Deploy; a failed seed stops the run before any deploy, with the checklist saying so honestly.
  • Progress streams as a checklist (commit-config / seed-closures / deploy-services, worded per the P4-S4 wireframe) and every step + the run carry a log with Open/Download (ADR 0027).
  • Dashboard ships DeployScreen (P4-S4, wireframe element contract: data-field per step, data-status streaming, per-step + run-level open-log/download-log) composed by SetupSurface — confirming on review is what starts the deploy through the seam's new deploy() face.

Evidence: internal/provision/deploy_test.go (5 seam tests over a recording clan wrapper — hot-path order seed→deploy, services-only/never-Enroll, streamed frames, per-step logs, seed-failure stop, takeover refusal); dashboard/tests/unit/provisionDeploy.test.ts (4 tests pinning the P4-S4 element contract). Full Go suite + vet, 260 dashboard tests, vue-tsc, eslint all green. STATUS.md updated in the same commit.

Health-check gating (stories 14–17) and full-install takeover / deploy-failure recovery (stories 11, 13) are the neighbouring slices', per the manifest's out_of_scope.

Done in e6db7e6 (on main). **What was built** — the S3/S3x → S4 edge at the ADR 0058 seam: - `provision.Deploy` (`internal/provision/deploy.go`) runs the confirmed selection for a VM-mode device over the connection already established at device-add — no enrollment step repeated. Which clan hot path runs is read from the install facts (ADR 0059): a VM-mode device gets `clan.Deploy`, **services only** — the seam test proves `clan.Enroll` is never touched, so a machine already running the right OS is never rebuilt. A full-install device still takeover-ready is refused typed (`ErrTakeoverPath`, nothing run) — provision-deploy-full-install extends from here. - **The community's own config repo drives it** (story 10): the selection's diff is committed (role assigned, added services attached, removals detached) and `clan.Deploy` applies that exact revision to the one node. - **`Supply.Seed` is a hard precondition**: after the commit, strictly before `clan.Deploy`; a failed seed stops the run before any deploy, with the checklist saying so honestly. - **Progress streams as a checklist** (commit-config / seed-closures / deploy-services, worded per the P4-S4 wireframe) and **every step + the run carry a log with Open/Download** (ADR 0027). - Dashboard ships `DeployScreen` (P4-S4, wireframe element contract: `data-field` per step, `data-status` streaming, per-step + run-level `open-log`/`download-log`) composed by `SetupSurface` — confirming on review is what starts the deploy through the seam's new `deploy()` face. **Evidence**: `internal/provision/deploy_test.go` (5 seam tests over a recording clan wrapper — hot-path order seed→deploy, services-only/never-Enroll, streamed frames, per-step logs, seed-failure stop, takeover refusal); `dashboard/tests/unit/provisionDeploy.test.ts` (4 tests pinning the P4-S4 element contract). Full Go suite + vet, 260 dashboard tests, vue-tsc, eslint all green. STATUS.md updated in the same commit. Health-check gating (stories 14–17) and full-install takeover / deploy-failure recovery (stories 11, 13) are the neighbouring slices', per the manifest's out_of_scope.
ben closed this issue 2026-07-25 17:37:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#61
No description provided.