[Phase 2] Codify demo-VM hotfixes into upstream code — clean runbook, no manual steps #185
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?
Phase 2 — codify demo-VM hotfixes into upstream code (clean runbook, no manual steps)
Goal
Get the Hero OS nu-shell deploy to a state where a fresh VM redeploys via the runbook in ~1.5 hours with no manual hotfix steps — just terraform, bootstrap, install, optional auth, optional snapshot.
Phase 1 (merge code-bearing PRs) is complete:
2dbc543) — OnlyOffice integration5bea19b) — MCP tool name sanitizer000922b)Runbook captured at
hero_demo/docs/ops/DEPLOYMENT_NU_HERO_OS.md. Method captured athero_demo/docs/ops/FIX_TRIAGE.md.This issue tracks Phase 2 — converting the runbook's manual fixup sections (§4.5, §10, §11, §12) into upstream code in
hero_skills,hero_proxy, andhero_demo.Tier 1 — small, mechanical (
hero_skillsbootstrap; ~1 day total, all parallel)Single-file changes to
hero_skills/install/bootstrap or apt config. Each is independently mergeable.hero_skills/development_mik_apt_deps— addlibclang-dev cmake python3 python3-openpyxl jq sqlite3to bootstrap apt list. Closes home#170, home#172hero_skills/development_mik_uv_install— addcurl -LsSf https://astral.sh/uv/install.sh \| shforuv(used byhero_code'spython_exec). Closes home#170hero_skills/development_mik_chrome_install— Google Chrome.debapt source (Ubuntu'schromium-browseris a snap wrapper that fails on TF Grid flists). Closes home#177hero_skills/development_mik_onnxruntime— wget+tar both ONNX runtimes: 1.23.2 →/usr/local/onnxruntime/, 1.24.x →/usr/local/onnxruntime-1.24/. Closes home#162, partially home#173hero_skills/development_mik_libreoffice—apt install libreoffice-core libreoffice-impress libreoffice-writer libreoffice-calc(used for at-click PDF preview generation). Closes home#178 prerequisitehero_skills/development_mik_init_sh_env—install.shreadsHERO_ROOTDIRenv var and skips the interactive prompt when set. Closes home#164After Tier 1: runbook §2 (Bootstrap the VM) collapses from 6 manual steps to one
bash bootstrap.shinvocation.Tier 2 — medium, requires nu-shell module understanding (
hero_skillsservices +hero_proxy; ~1.5 days, ordered)Touches the actual nu-shell service modules. Each has internal ordering dependencies (Docker before OnlyOffice; ONNX install before embedder/voice env).
hero_skills/development_mik_service_set_after_install—service_install_all.nucallsservice.setfor every action it registers, eliminating theherodemo_set_services.pyworkaround. Closes home#167hero_skills/development_mik_embedder_env—service_embedder.nusetsORT_LIB_LOCATION=/usr/local/onnxruntime/lib,LD_LIBRARY_PATH=/usr/local/onnxruntime/lib,EMBEDDER_MODELS=/data/home/driver/hero/var/embedder/models. Closes home#166hero_skills/development_mik_voice_env—service_voice.nusetsORT_LIB_LOCATION=/usr/local/onnxruntime-1.24/lib,LD_LIBRARY_PATH=/usr/local/onnxruntime-1.24/lib,ORT_PREFER_DYNAMIC_LINK=1. Closes home#173 (deploy-side)hero_skills/development_mik_office_env—service_office.nusetsONLYOFFICE_JWT_SECRET(from generated secret or env),OO_SERVER_URL(templated from public hostname),OO_UPSTREAM_BASE=http://10.1.2.2:8088,CONNECTOR_EXTERNAL_URL=http://10.1.2.2:9990. Closes home#174 (deploy-side)hero_skills/development_mik_docker_btrfs— bootstrap installs Docker, sets/etc/docker/daemon.jsonwithdata-root: /data/docker+storage-driver: btrfs, starts vianohup dockerd(no systemd on TF Grid). Closes home#181hero_skills/development_mik_onlyoffice_install— newservice_onlyoffice.numodule:docker pull onlyoffice/documentserver:latest,docker run -dwith JWT secret, registers a hero_proc supervisor entry. Depends ondevelopment_mik_docker_btrfs. Closes home#174 end-to-endhero_skills/development_mik_basic_auth— optional nginx + htpasswd setup driven byHERO_AUTH_MODE=basicenv var (and credentials viaHERO_AUTH_BASIC_USER/HERO_AUTH_BASIC_PASS). Closes home#182 (basic mode)hero_proxy/development_mik_runbook_setup— installer-side helper that runsproxy domain add ... --auth-mode <mode>based onHERO_AUTH_MODEenv (oauth/optional/bearer). Closes home#182 (canonical mode)After Tier 2: runbook §4.5 (action env patches), §10 (Docker), §11 (OnlyOffice), §12 (auth) all become flags on the install pipeline.
Tier 3 — content seeding (
hero_demo; ~0.5 days)hero_demo/development_mik_seed_data— commit sample files tohero_demo/data/seed/{office,diagrams,books}/:.vsdxfrom Apache POI (already on VM, ready to extract).pptx(Geomind-themed, pandoc-generated).xlsx(openpyxl-generated).pdffor each (libreoffice-generated)libraries.txtfor hero_booksservice_office.nu/service_books.nutocpintowebdav/<context>/Closes home#183
After Tier 3: runbook §7 (Seed content) becomes "automatic at install time."
After Tier 1 + 2 + 3 — the simplified runbook
Wall-clock target: 1.5 hours (apt + cargo build dominate).
Deferred — NOT Phase 2 (open issues, separate engineering)
These are real upstream code work, NOT codify-the-runbook tasks:
hero_biz_uiHero0Configrefactor for OSIS per-domain split. Multi-day. Native Business island works as alternative.ortcrate version acrosshero_voice+hero_embedderso a single ONNX install suffices. Cross-repo, multi-day./api/servicesdiscovery). Design discussion needed.island-books-nativefeature in the WASM build, not a code change to hero_books_ui).These can be picked up by devops independently.
Process / quality gate
Per FIX_TRIAGE:
cargo fmt --check && cargo clippy --workspace --all-targets -- -D warnings && cargo build --workspace --release(or the nu-shell equivalent verification forhero_skillsmodules)Tracking
This issue is the master tracker. Sub-tasks above will be checked off as branches merge. Linked PRs will appear here automatically.
Once all three tiers ship, the runbook's §13 Category C goes empty and §14 Phase 2 gets a ✅ COMPLETE marker. Phase 3 (release artifacts so we don't
cargo buildper-deploy) becomes a separate conversation.Signed-off-by: mik-tf
hero_proc service startreturns 'service not found' #167Phase 2 progress — most of Tier 1 + Tier 2 landed in one PR
Strategy adjustment: rather than 13 separate
development_mik_*branches on hero_skills, the work was bundled into one squash-merged commit onhero_skills/development.Landed: hero_skills/PR #126 → squash commit
7c823d1Tier 1 — done (collapsed into 7c823d1)
1379cc0; libreoffice in7c823d1uvinstall — already covered by existinginstall_py(usesastral.sh/uv/install.sh).deb—install_chrome(closes #177)install_onnxruntime(closes #162; partial #173)install_base(closes #178)HERO_ROOTDIRenv override —find_rootdirininstall.sh(closes #164)Tier 2 — done (collapsed into 7c823d1)
service_completeaggregator (install + register + start in dependency order) —packages.nu(closes #167)ORT_LIB_LOCATION,LD_LIBRARY_PATH,EMBEDDER_MODELS) —service_embedder.nu(closes #166 for embedder)ORT_LIB_LOCATION,LD_LIBRARY_PATH,ORT_PREFER_DYNAMIC_LINK=1) —service_voice.nu(closes #166 for voice; #170 deploy-side; #173 deploy-side)OO_UPSTREAM_BASEforwarding —service_office.nuinstall_docker_btrfs(closes #181)service_onlyoffice.nu(closes #174)Tier 2 — still TODO (separate branches)
hero_skills/development_mik_basic_auth— optional nginx + htpasswd setup (#182 basic mode)hero_proxy/development_mik_runbook_setup—proxy domain add ... --auth-mode <mode>driven by env (#182 canonical mode)Tier 3 — still TODO
hero_demo/development_mik_seed_data— sample .vsdx/.pptx/.xlsx + libraries.txt (#183)Issues closed today
#162, #164, #166, #167, #174, #177, #178, #181 — all resolved by
7c823d1.#170 (voice ORT_PREFER_DYNAMIC_LINK) and #173 (full ort unification) left open — deploy-side is fixed but upstream
ortcrate work remains.Validation
All changed nu modules load cleanly under
nu -c "use ..."(parser-only — runtime validation needs a TF Grid VM).Next sessions: basic-auth helper, hero_proxy runbook setup, seed data.
Signed-off-by: mik-tf
Phase 2 'what's left' — all 5 PRs opened
Five PRs ready for review covering the remaining
what's leftitems from the boss-message snapshot. Each is independent — they can be reviewed and merged in any order.action.setinvocations)service_agentmodule (was missing entirely from hero_skills);service_bizHERO0_BASE_URLenv override;service_routerenv-driven--address+--ui-portservice_os wasm_buildexport +service_complete --wasmflag — runsmake build-wasm+install-assets-releaseand restarts hero_osbasic_auth_setuphelper (nginx + htpasswd) for the demo pathproxy_auth_setuphelper — wrapshero_proxy domain add --auth-mode oauth/bearer/optionaldriven by env varsdata/seed/with pandoc/openpyxl source inputs +seed_install.shorchestrator that generates.docx/.xlsx/.pdfon the VM and copies into hero_foundry webdavAfter all five land, the §0.1 Quick path becomes truly hot-fix-free for the happy path (basic-auth or hero_proxy auth picked per deploy). Validation on each PR is parser-only (
nu -c "use ..."+ bash/python AST) — runtime needs a TF Grid VM. Awaiting verification + green-light before squash-merging.Signed-off-by: mik-tf
Phase 2 'what's left' — all 5 PRs merged ✅
All five squash-merged to
development:60375f4service_agent+ service_biz/service_router env wiring6d1f725service_os wasm_build+service_complete --wasm011dd83basic_auth_setup(demo nginx gate)f17e99cproxy_auth_setup(canonical hero_proxy auth)9318fd0data/seed/+seed_install.shPre-merge audit caught 3 real bugs (AIBROKER URL scheme, stale
:6666port,cdcwd leak) — all fixed before merge.Issues closed
#182 (auth — both deploy modes shipped), #183 (seed data).
New tracker filed
home#186 — finalize prod auth on
hero_proxyand remove demo nginx helper. Operators currently choose between two auth paths; long-term we want exactly one.What's left in Phase 2
ortcrate version unification (multi-day cross-repo refactor; deploy-side workaround in place)hero_bizHero0Config→ OSIS per-domain refactor (multi-day; native Business island works as alternative)The Quick path in DEPLOYMENT_NU_HERO_OS.md is now end-to-end nu commands (modulo §5 backup restore which only matters when migrating data). Runbook updated at
f2444adonhero_demo/development.This issue stays open until the four remaining items resolve — keeps it as the umbrella tracker.
Signed-off-by: mik-tf
Moved to hero_demo#36 — see lhumina_code/hero_demo#36