Promote tester-VM install runner to a Rust crate (replace setup-binaries.sh in install path) #17
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?
The deployer's
install_hero_stackRPC currently drives tester-VM install by SCPingcockpit-services.toml+app.env, then SSHing in and pipingcurl <bootstrap_url> | bashagainsthero_demo/deploy/single-vm/scripts/setup-binaries.sh. This works but has structural problems that became visible across s172c live walks.What's wrong with the current shape
Wrong repo for install logic.
hero_demois for demo scripts and runbooks, not for code that the deployer depends on for every tester onboarding. The deployer is inhero_os_tfgrid_deployer; the install runner it depends on should also live inhero_os_tfgrid_deployer.Wrong language. Bash has no type system for the manifest.
cockpit-services.tomlandapp.envare projections of the deployer's typed Rust structs into untyped shell. Adding new install-time config means editing the Rust shape, the TOML rendering in the deployer, AND (potentially) the bash script that reads them. Easy to drift; impossible to unit-test.Wrong env model. Bash exports in
app.envdo not propagate tohero_proc-managed daemons (the canonical pattern). Every operator-owned runtime knob must be set separately viahero_proc secret setafter install, which today means appending shell snippets to the SSH payload string inweb.rs::handle_install_hero_stack. Each new secret = string-format edit. Not a structured surface.Proposed fix
A new crate
lhumina_code/hero_os_tfgrid_deployer/crates/hero_tester_install/providing:InstallManifeststruct (services list, secrets list as(context, key, value)triples, env list, install bootstrap URL, optional embedder model size). Serializes to TOML.hero_tester_installthat takes--manifest /path/to/install.toml, connects to (or starts)hero_proc, callshero_proc_sdk::secret_setfor every secret triple, registers each enabled service via thehero_procservice.addRPC, downloads binaries vialab build --download, starts services in dependency order, polls health, returns structured status.The deployer's
ssh.rsthen SCPs the binary + a generated manifest TOML, runsssh ... hero_tester_install --manifest /root/install.toml. The Rust manifest generation inweb.rs::handle_install_hero_stackreplaces the currentapp.env+cockpit-services.tomlstring renderers.hero_demo/deploy/single-vm/scripts/setup-binaries.shstays for hero_demo's own manual-install use cases but is no longer invoked by the deployer.Acceptance criteria
app.env-shaped artifact on disk.cargo test -p hero_tester_installpasses.Scope estimate
1-2 days of focused work. Independent of the home#238 arc closure but enables clean closure of any future install-related work.
Filed from the s172c session on
hero_os_tfgrid_deployer/development(commits ec27241..483c8b8). Refs home#238.