add Hero Cloud Explorer service for multi-node orchestration #5

Merged
mahmoud merged 14 commits from development_explorer into development 2026-03-08 12:09:25 +00:00
Owner

Description

Introduces the hero_cloud_explorer crate. a new gateway service that aggregates multiple hero_cloud nodes into a single entry point. Nodes self-register via periodic heartbeats over Mycelium, and users can deploy VMs across any registered node without knowing backend addresses.

Changes

  • Add hero_cloud_explorer crate with explorer.oschema and OSIS-generated server, types, and RPC modules
  • Implement heartbeat system: nodes report specs, status, and Mycelium address every ~5 minutes
  • Add node monitoring with configurable online/offline threshold detection
  • Add explorer feature flag (default-on) for conditional compilation
  • Centralize module declarations, remove inline #[path] imports
  • Fix domain reference in hero_cloud_server/src/main.rs after domain extraction
### Description Introduces the `hero_cloud_explorer` crate. a new gateway service that aggregates multiple hero_cloud nodes into a single entry point. Nodes self-register via periodic heartbeats over Mycelium, and users can deploy VMs across any registered node without knowing backend addresses. ### Changes - Add `hero_cloud_explorer` crate with `explorer.oschema` and OSIS-generated server, types, and RPC modules - Implement heartbeat system: nodes report specs, status, and Mycelium address every ~5 minutes - Add node monitoring with configurable online/offline threshold detection - Add `explorer` feature flag (default-on) for conditional compilation - Centralize module declarations, remove inline `#[path]` imports - Fix domain reference in `hero_cloud_server/src/main.rs` after domain extraction ### Related Issues - https://forge.ourworld.tf/lhumina_code/hero_cloud/issues/3
feat: add hero_cloud_explorer crate and heartbeat system
Some checks failed
Test / test (push) Failing after 1m20s
b896bd8dd6
New crate: hero_cloud_explorer — multi-node VM orchestration gateway that
receives heartbeats from cloud nodes, stores their status, and proxies
VM operations to the correct backend.

Explorer components:
- OSchema: ExplorerNode type + ExplorerService with 12 RPC methods
- rpc.rs: node_heartbeat (upsert), node_list/get, proxied VM methods
- proxy.rs: Unix socket JSON-RPC client for backend forwarding
- heartbeat.rs: background monitor marks stale nodes offline

Server additions:
- heartbeat_sender.rs: periodic task pings explorers with node status
- EXPLORER_ADDRESSES env var: comma-separated explorer socket paths
- HEARTBEAT_INTERVAL_SECS constant (300s)

Makefile: run-explorer, logs-explorer, integrated into run/stop targets.
fix: add explorer feature gate and fix domain move in server main
Some checks failed
Test / test (push) Failing after 1m7s
38530a4aeb
style: fix formatting to pass cargo fmt --check
Some checks failed
Test / test (push) Failing after 1m10s
3b9d8378ab
refactor: centralize module declarations
All checks were successful
Test / test (push) Successful in 1m11s
1ea67885d1
- Move `constants`, `heartbeat`, `proxy` module declarations
- Place declarations within `rpc` subdirectory using relative paths
- Update all affected module import paths
style: Improve code formatting and import ordering
All checks were successful
Test / test (push) Successful in 1m11s
7e5b639780
- Reorder `use` statements
- Collapse multi-line function parameters
- Reformat RPC method handlers for conciseness
- Adjust spacing around code blocks
feat: Add node socket path to heartbeat and object
All checks were successful
Test / test (push) Successful in 1m15s
Test / test (pull_request) Successful in 1m42s
091552c5c3
- Add `socket_path` parameter to `node_heartbeat` RPC
- Store `socket_path` in `ExplorerNode` OSchema
- Update `node_heartbeat` lookup to use hostname
- Send node's socket path and mycelium IP in heartbeats
- Improve error logging and apply minor code formatting
mahmoud force-pushed development_explorer from b0aac1b60d
Some checks failed
Test / test (push) Failing after 20s
Test / test (pull_request) Failing after 23s
to 8a756551de
Some checks failed
Test / test (push) Failing after 0s
Test / test (pull_request) Failing after 0s
2026-03-08 08:59:58 +00:00
Compare
feat: enforce secret validation via CRUD hooks, update docs with secret auth examples
Some checks failed
Test / test (pull_request) Failing after 0s
Test / test (push) Failing after 13s
181a71f0e6
- Add trigger_get_pre and trigger_list_pre hooks (from hero_rpc update)
- Add thread-local secret context for passing secrets to CRUD hooks
- Scrub secret field from CRUD responses via vm_trigger_get_post
- Update docs/testing.md with secret params in all VM examples
- Add Security model section to docs/api.md
feat: enhance dev workflow and platform hypervisor
Some checks failed
Test / test (push) Failing after 0s
Test / test (pull_request) Failing after 1s
91668f6018
- Implement conditional hypervisor driver selection.
- Introduce `StubDriver` for non-Linux environments.
- Migrate local development from `zinit` to foreground scripts.
- Add `socat`-based `make proxy-*` targets for local access.
- Update `Cargo.lock` for various crate dependencies.
build: specify chvm-lib dependency directly
Some checks failed
Test / test (pull_request) Failing after 2s
Test / test (push) Failing after 2s
15dc293f28
- Use git URL instead of workspace inheritance
refactor: Migrate chvm-lib to target_os cfg
Some checks failed
Test / test (pull_request) Failing after 2m4s
Test / test (push) Failing after 2m11s
a025d0e463
- Update chvm-lib dependency source to HTTPS
- Downgrade getrandom and windows-sys versions
- Remove chvm Cargo feature
- Make chvm-lib dependency Linux-specific
- Replace `cfg(feature = "chvm")` with `cfg(target_os = "linux")`
refactor: remove unnecessary mutability from manager lock
Some checks failed
Test / test (push) Failing after 0s
Test / test (pull_request) Has been cancelled
a7c26e0a73
refactor: use const for RefCell static initialization
All checks were successful
Test / test (push) Successful in 1m19s
Test / test (pull_request) Successful in 1m37s
191d50325a
mahmoud changed title from WIP: add Hero Cloud Explorer service for multi-node orchestration to add Hero Cloud Explorer service for multi-node orchestration 2026-03-08 12:09:15 +00:00
mahmoud merged commit feae626a39 into development 2026-03-08 12:09:25 +00:00
mahmoud deleted branch development_explorer 2026-03-08 12:09:25 +00:00
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_compute!5
No description provided.