D4 — post-deploy flow (template manifest + scp + setup-binaries dispatch + verify) #6
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?
D4 — post-deploy flow (template manifest + scp + setup-binaries dispatch + verify)
Sub-issue of
#?(v0.1 scope). The bridge between "VM exists" and "user has a working Hero OS environment".What this does
After D3's
VmBackend::deploy_vmreturns a reachable VM, the deployer:Templates the per-user component manifest at
~driver/hero/cfg/cockpit/services.tomlon the VM, format defined inhero_cockpit#1§6. Profile selected by admin from the form (default =demo).scp's setup-binaries.sh from the deployer's local checkout of
hero_demo/deploy/single-vm/scripts/setup-binaries.sh+ the manifest + the d07_set.txt to/root/on the VM.Runs the bootstrap via SSH:
Streams stdout back to deployer; admin UI shows progress as it runs (~5-30 min depending on per-user profile + cache state).
Verifies by curl'ing
https://<user>.<node>.grid.tf/health(via the deployed gateway) — expects HTTP 200 once hero_proxy + hero_router + cockpit_web are up.Updates sqlite — vm.state = 'ready', stores gateway_fqdn, provisioned_at; logs event 'bootstrap_run'.
SSH vs vm_exec
Initial implementation uses SSH (proven). Once Mahmoud confirms
ComputeService.vm_execstreams stdout cleanly for long-running scripts (G2 inhero_compute#? (deployer integration)), we add an alternate path. The trait surface is the same — only the transport differs.Per-user component manifest templating
The deployer holds default profiles (per cockpit spec §6):
demo— proxy + router + proc + cockpit + embedder-small + db + bookslightweight— proxy + router + proc + cockpit + booksbooks-only— proxy + router + proc + cockpit + books (same as lightweight; alias for now)custom— proxy + router + proc + cockpit (always-on only; user adds via cockpit later)Templates live at
crates/hero_os_tfgrid_deployer_server/templates/profiles/<name>.toml. At deploy time:The cockpit on the VM reads + edits this file from there on.
Setup-binaries.sh dependency
This work needs
hero_demo/setup-binaries.shto be manifest-aware — currently (s132) it loops over a fixed d07_set.txt. A sibling issue / hero_demo PR refactors setup-binaries.sh to read the per-user manifest's[enabled]table andlab build $name --download --installonly for entries whereenabled = true. Tracked separately (see references).Acceptance criteria
https://<user>.<node>.grid.tf/healthand get HTTP 200References
hero_cockpit#1§6hero_demo/deploy/single-vm/scripts/setup-binaries.shhero_demofollow-up issue/PR (to file when D4 lands)#?(v0.1 scope)/forge_api