Internal admin tool for deploying Hero OS demos on the ThreeFold Grid.
  • Rust 47.4%
  • JavaScript 37.3%
  • HTML 8.8%
  • CSS 4.6%
  • Shell 1.9%
Find a file
mik-tf e6fd3ad7de
Some checks failed
lab publish / publish (push) Failing after 5m48s
deployer: derive the gateway fqdn when the daemon returns ready without one
deploy_webgateway can reach on-chain ready while the grid SDK read-back returns
an empty fqdn (an intermittent miss). The deployer treated that as a hard error,
which skipped the per-tester OAuth app and blocked install, stalling onboarding
for that tester until manual intervention.

A name gateway's fqdn is deterministic: <gateway_name>.<zone>, where the zone is
the gateway node's domain suffix shared by every tester. When the daemon returns
ready without an fqdn, derive it (zone from TFGRID_GATEWAY_ZONE or inferred from
an existing tester's fqdn), persist it, and continue, so install + the login gate
proceed normally. install_hero_stack's repair path reuses this, so a single
Install recovers a tester that came up without a Cockpit URL.

Signed-by: mik-tf <mik-tf@noreply.invalid>
2026-06-08 11:19:14 -04:00
.forgejo/workflows deploy: embed the tester install script, build the deployer from main 2026-06-03 13:03:15 -04:00
crates deployer: derive the gateway fqdn when the daemon returns ready without one 2026-06-08 11:19:14 -04:00
schema chore: auto-commit local changes before pull 2026-05-31 23:42:11 +02:00
.gitignore deployer_server: bump ureq to 3.x to fix CI build 2026-05-28 09:35:26 -04:00
Cargo.lock deploy: embed the tester install script, build the deployer from main 2026-06-03 13:03:15 -04:00
Cargo.toml deploy: embed the tester install script, build the deployer from main 2026-06-03 13:03:15 -04:00
Cargo.toml.hero_builder_backup refactor: migrate from hero_rpc/herolib_core service macros to hero_lifecycle 2026-06-01 09:32:40 +02:00
README.md deployer: rename HERO_SOCKET_DIR → PATH_SOCKET + drop RUST_LOG/HERO_COMPUTE_NODE_ADDR env entries 2026-05-26 12:49:55 +02:00
rust-toolchain.toml chore: set rust-version to 1.96 and add rust-toolchain.toml 2026-06-01 13:31:07 +02:00

hero_tfgrid_deployer

Internal admin deployment tool for Hero OS demo environments on the ThreeFold Grid.

Purpose

Administrators use this tool to:

  1. Deploy VMs on the ThreeFold Grid — create one VM per demo user or environment, select capacity/node/location as needed, and track VM status, IP, and access details.

  2. Install Forge Hero OS — run lab builder inside each VM after creation to deploy and configure Hero OS automatically, with status and logs visible in the admin interface.

  3. Manage Forge accounts — check whether a user account exists at forge.ourworld.tf, create it if it does not, and link it to the deployed VM/Hero OS instance.

  4. Admin view — see all demo users, their associated VMs, and deployment status. Admins can access user machines directly (this is an internal demo tool, not a privacy environment).

  5. User view — each demo user sees only their own Hero OS environment. Admin functionality is not visible in the user view.

Crate layout

Crate Role
hero_tfgrid_deployer CLI — registers server + admin with hero_proc (--start / --stop)
hero_tfgrid_deployer_server JSON-RPC 2.0 daemon over Unix socket (OpenRPC)
hero_tfgrid_deployer_admin Admin web dashboard (Axum + Askama + Bootstrap)
hero_tfgrid_deployer_sdk Typed OpenRPC client generated from openrpc.json

Development

# Build all crates
lab build

# Start the service
hero_tfgrid_deployer --start

# Stop the service
hero_tfgrid_deployer --stop

Architecture

  • Transport: Unix domain sockets under $PATH_SOCKET/hero_tfgrid_deployer/
  • RPC socket: rpc.sock — JSON-RPC 2.0 / OpenRPC
  • Admin socket: admin.sock — HTTP / Axum dashboard

The server exposes its spec at /openrpc.json and a health endpoint at /health.