feat(skills): codify Phase 2 deploy-time hotfixes into installer + service modules #126

Closed
mik-tf wants to merge 1 commit from development_mik_phase2_install into development
Owner

Bundles the manual fixups previously documented in §4.5 / §10 / §11 of docs/ops/DEPLOYMENT_NU_HERO_OS.md (tracker home#185) so a fresh herodemo-style deploy reaches working state without manual hero_proc action.set or docker run invocations.

Changes

Installers (tools/modules/installers/installers.nu)

  • install_base now also installs libreoffice-{core,impress,writer,calc} for at-click PDF preview — closes home#178
  • install_chrome — Google's apt repo + google-chrome-stable; the snap chromium fails on TF Grid flists — closes home#177
  • install_onnxruntime — installs ONNX Runtime 1.23.2 → /usr/local/onnxruntime AND 1.24.4 → /usr/local/onnxruntime-1.24 side-by-side, so hero_embedder (rc.11 → 1.23.2) and hero_voice (rc.12 → 1.24.x) can each link the version their ort-sys wants — closes home#162; partial home#173
  • install_docker_btrfs — apt-installs docker.io, configures /etc/docker/daemon.json with data-root=/data/docker + storage-driver=btrfs, starts dockerd via systemctl OR nohup fallback for TF Grid VMs — closes home#181
  • install_core invokes all three after install_base

Bootstrap (tools/install.sh)

  • HERO_ROOTDIR env override on find_rootdir(), so non-interactive deploys (TF Grid provisioning, CI) can skip the macOS external-disk prompt and the default $HOME/hero pick — closes home#164

Service env wiring

  • service_embedder.nu — adds ORT_LIB_LOCATION=/usr/local/onnxruntime/lib + LD_LIBRARY_PATH + EMBEDDER_MODELS=$HOME/hero/var/embedder/models to the hero_embedderd action — closes home#166 for embedder
  • service_voice.nu — adds ORT_LIB_LOCATION=/usr/local/onnxruntime-1.24/lib + LD_LIBRARY_PATH + ORT_PREFER_DYNAMIC_LINK=1 to both hero_voice_server and hero_voice_ui actions; without ORT_PREFER_DYNAMIC_LINK the static-link fallback fails at runtime — closes home#166 for voice; deploy-side home#170
  • service_office.nu — forwards OO_UPSTREAM_BASE env to the hero_office_ui action (browser-side OO_SERVER_URL is HTTPS-public, but the reverse proxy needs the internal HTTP target; the split is essential — see PR #3 on hero_office)
  • packages.nu — uncomments service_voice in services_extra (was disabled before ONNX 1.24 was sorted out)

New module: tools/modules/services/service_onlyoffice.nu

Manages the OnlyOffice Document Server Docker container that hero_office depends on. Standalone (not hero_proc-supervised — OO ships as a Docker image, restart-policy=unless-stopped keeps it alive).

  • installdocker pull onlyoffice/documentserver
  • startdocker run with JWT_ENABLED + JWT_SECRET + waits for /healthchecktrue (~5 min timeout)
  • stop / status / restart
  • Env-overridable: ONLYOFFICE_BIND_ADDR (default 10.1.2.2:8088), ONLYOFFICE_JWT_SECRET, ONLYOFFICE_IMAGE

Closes home#174 deploy-side.

New service_complete aggregator (tools/modules/services/packages.nu)

service_install_all only builds binaries; per-service start does the hero_proc action.set / service.set / service.start dance. service_complete glues them together:

  • Phase 1 = service_install_all
  • Phase 2 = start on every runtime service in dependency order

Skips service_lib_rhai (library, no runtime). Re-exported from services/mod.nu.

Closes home#167.

Validation

Every changed module loads cleanly under nu -c "use ..." (parser-only — runtime validation needs a TF Grid VM).

Tracker

home#185

Signed-off-by: mik-tf

Bundles the manual fixups previously documented in §4.5 / §10 / §11 of `docs/ops/DEPLOYMENT_NU_HERO_OS.md` (tracker [home#185](https://forge.ourworld.tf/lhumina_code/home/issues/185)) so a fresh herodemo-style deploy reaches working state without manual `hero_proc action.set` or `docker run` invocations. ## Changes ### Installers (`tools/modules/installers/installers.nu`) - `install_base` now also installs `libreoffice-{core,impress,writer,calc}` for at-click PDF preview — closes [home#178](https://forge.ourworld.tf/lhumina_code/home/issues/178) - `install_chrome` — Google's apt repo + `google-chrome-stable`; the snap chromium fails on TF Grid flists — closes [home#177](https://forge.ourworld.tf/lhumina_code/home/issues/177) - `install_onnxruntime` — installs ONNX Runtime 1.23.2 → `/usr/local/onnxruntime` AND 1.24.4 → `/usr/local/onnxruntime-1.24` side-by-side, so hero_embedder (rc.11 → 1.23.2) and hero_voice (rc.12 → 1.24.x) can each link the version their `ort-sys` wants — closes [home#162](https://forge.ourworld.tf/lhumina_code/home/issues/162); partial [home#173](https://forge.ourworld.tf/lhumina_code/home/issues/173) - `install_docker_btrfs` — apt-installs `docker.io`, configures `/etc/docker/daemon.json` with `data-root=/data/docker` + `storage-driver=btrfs`, starts dockerd via `systemctl` OR `nohup` fallback for TF Grid VMs — closes [home#181](https://forge.ourworld.tf/lhumina_code/home/issues/181) - `install_core` invokes all three after `install_base` ### Bootstrap (`tools/install.sh`) - `HERO_ROOTDIR` env override on `find_rootdir()`, so non-interactive deploys (TF Grid provisioning, CI) can skip the macOS external-disk prompt and the default `$HOME/hero` pick — closes [home#164](https://forge.ourworld.tf/lhumina_code/home/issues/164) ### Service env wiring - `service_embedder.nu` — adds `ORT_LIB_LOCATION=/usr/local/onnxruntime/lib` + `LD_LIBRARY_PATH` + `EMBEDDER_MODELS=$HOME/hero/var/embedder/models` to the `hero_embedderd` action — closes [home#166](https://forge.ourworld.tf/lhumina_code/home/issues/166) for embedder - `service_voice.nu` — adds `ORT_LIB_LOCATION=/usr/local/onnxruntime-1.24/lib` + `LD_LIBRARY_PATH` + `ORT_PREFER_DYNAMIC_LINK=1` to both `hero_voice_server` and `hero_voice_ui` actions; without `ORT_PREFER_DYNAMIC_LINK` the static-link fallback fails at runtime — closes [home#166](https://forge.ourworld.tf/lhumina_code/home/issues/166) for voice; deploy-side [home#170](https://forge.ourworld.tf/lhumina_code/home/issues/170) - `service_office.nu` — forwards `OO_UPSTREAM_BASE` env to the `hero_office_ui` action (browser-side `OO_SERVER_URL` is HTTPS-public, but the reverse proxy needs the internal HTTP target; the split is essential — see PR [#3](https://forge.ourworld.tf/lhumina_code/hero_office/pulls/3) on hero_office) - `packages.nu` — uncomments `service_voice` in `services_extra` (was disabled before ONNX 1.24 was sorted out) ### New module: `tools/modules/services/service_onlyoffice.nu` Manages the OnlyOffice Document Server Docker container that hero_office depends on. Standalone (not hero_proc-supervised — OO ships as a Docker image, `restart-policy=unless-stopped` keeps it alive). - `install` — `docker pull onlyoffice/documentserver` - `start` — `docker run` with `JWT_ENABLED` + `JWT_SECRET` + waits for `/healthcheck` → `true` (~5 min timeout) - `stop` / `status` / `restart` - Env-overridable: `ONLYOFFICE_BIND_ADDR` (default `10.1.2.2:8088`), `ONLYOFFICE_JWT_SECRET`, `ONLYOFFICE_IMAGE` Closes [home#174](https://forge.ourworld.tf/lhumina_code/home/issues/174) deploy-side. ### New `service_complete` aggregator (`tools/modules/services/packages.nu`) `service_install_all` only builds binaries; per-service `start` does the `hero_proc action.set` / `service.set` / `service.start` dance. `service_complete` glues them together: - Phase 1 = `service_install_all` - Phase 2 = `start` on every runtime service in dependency order Skips `service_lib_rhai` (library, no runtime). Re-exported from `services/mod.nu`. Closes [home#167](https://forge.ourworld.tf/lhumina_code/home/issues/167). ## Validation Every changed module loads cleanly under `nu -c "use ..."` (parser-only — runtime validation needs a TF Grid VM). ## Tracker [home#185](https://forge.ourworld.tf/lhumina_code/home/issues/185) Signed-off-by: mik-tf
Bundles the manual fixups previously documented in §4.5 / §10 / §11 of
DEPLOYMENT_NU_HERO_OS.md (lhumina_code/home#185)
so a fresh herodemo-style deploy reaches working state without manual
hero_proc action.set or docker run invocations.

Installers (tools/modules/installers/installers.nu):
- install_base now also installs libreoffice-{core,impress,writer,calc}
  for at-click PDF preview (closes
  lhumina_code/home#178)
- install_chrome — adds Google's apt repo + installs google-chrome-stable;
  the snap chromium fails on TF Grid flists (closes
  lhumina_code/home#177)
- install_onnxruntime — installs ONNX Runtime 1.23.2 → /usr/local/onnxruntime
  AND 1.24.4 → /usr/local/onnxruntime-1.24 side-by-side, so hero_embedder
  (rc.11 → 1.23.2) and hero_voice (rc.12 → 1.24.x) can each link the
  version their ort-sys wants (closes
  lhumina_code/home#162; partial
  lhumina_code/home#173)
- install_docker_btrfs — apt-installs docker.io, configures
  /etc/docker/daemon.json with data-root=/data/docker + storage-driver=btrfs,
  starts dockerd via systemctl OR nohup fallback for TF Grid VMs (closes
  lhumina_code/home#181)
- install_core invokes all three after install_base

Bootstrap (tools/install.sh):
- HERO_ROOTDIR env override on find_rootdir(), so non-interactive deploys
  (TF Grid provisioning, CI) can skip the macOS external-disk prompt and
  the default $HOME/hero pick (closes
  lhumina_code/home#164)

Service env wiring:
- service_embedder.nu — adds ORT_LIB_LOCATION=/usr/local/onnxruntime/lib +
  LD_LIBRARY_PATH + EMBEDDER_MODELS=$HOME/hero/var/embedder/models to the
  hero_embedderd action (closes
  lhumina_code/home#166 for embedder)
- service_voice.nu — adds ORT_LIB_LOCATION=/usr/local/onnxruntime-1.24/lib +
  LD_LIBRARY_PATH + ORT_PREFER_DYNAMIC_LINK=1 to both hero_voice_server and
  hero_voice_ui actions; without ORT_PREFER_DYNAMIC_LINK the static-link
  fallback fails at runtime (closes
  lhumina_code/home#166 for voice;
  lhumina_code/home#170 deploy-side)
- service_office.nu — forwards OO_UPSTREAM_BASE env to the hero_office_ui
  action (browser-side OO_SERVER_URL is HTTPS-public, but the reverse
  proxy needs the internal HTTP target; the split is essential — see
  PR #3 on hero_office)
- packages.nu — uncomments service_voice in services_extra (was disabled
  before ONNX 1.24 was sorted out)

New module (tools/modules/services/service_onlyoffice.nu):
- Manages the OnlyOffice Document Server Docker container that
  hero_office depends on. Standalone (not hero_proc-supervised — OO
  ships as a Docker image, restart-policy=unless-stopped keeps it alive).
- install — docker pull onlyoffice/documentserver
- start  — docker run with JWT_ENABLED + JWT_SECRET + waits for
           /healthcheck → "true" (~5 min timeout)
- stop / status / restart
- Env-overridable: ONLYOFFICE_BIND_ADDR (default 10.1.2.2:8088),
  ONLYOFFICE_JWT_SECRET, ONLYOFFICE_IMAGE
- Closes lhumina_code/home#174 deploy-side

New service_complete aggregator (tools/modules/services/packages.nu):
- service_install_all only builds binaries; per-service `start` does the
  hero_proc action.set / service.set / service.start dance.  service_complete
  glues them together: phase 1 = service_install_all, phase 2 = `start`
  on every runtime service in dependency order.  Skips service_lib_rhai
  (library, no runtime).  Re-exported from services/mod.nu.
- Closes lhumina_code/home#167

Validation: every changed module loads cleanly under `nu -c "use ..."`
(parser-only — runtime needs a TF Grid VM).

Tracker: lhumina_code/home#185

Signed-off-by: mik-tf
mik-tf closed this pull request 2026-04-25 16:21:38 +00:00
Author
Owner

Squash-merged to development as 7c823d1. 7c823d1

Feature branch development_mik_phase2_install deleted.

Closed home issues: #162, #164, #166, #167, #177, #178, #181. Partials (deploy-side): #170, #173, #174.

Squash-merged to `development` as `7c823d1`. https://forge.ourworld.tf/lhumina_code/hero_skills/commit/7c823d1 Feature branch `development_mik_phase2_install` deleted. Closed home issues: #162, #164, #166, #167, #177, #178, #181. Partials (deploy-side): #170, #173, #174.

Pull request closed

Sign in to join this conversation.
No reviewers
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.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_skills!126
No description provided.