Slice-based VM compute manager for the Hero Ecosystem, built on hero_rpc OSIS framework
- Rust 59.1%
- Shell 24.7%
- JavaScript 8.5%
- HTML 4.4%
- Makefile 3.2%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| crates | ||
| docs | ||
| schemas/cloud | ||
| scripts | ||
| sdk/js | ||
| .gitignore | ||
| buildenv.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Makefile | ||
| README.md | ||
Hero Cloud
Slice-based virtual machine manager for the Hero Ecosystem. Divides a physical host into 4 GB RAM slices, each backing exactly one VM. Built on the hero_rpc OSIS framework with JSON-RPC 2.0 over Unix sockets.
How It Works
On bootstrap the server reads /proc/meminfo and df, reserves 1 GB for the OS, and carves the rest into slices:
Example: 64 GB RAM, 2 TB SSD
usable = 64 - 1 = 63 GB
slices = floor(63 / 4) = 15
disk/slice = floor(2000 / 15) = 133 GB
Deploy a VM into any free slice; start/stop/restart return immediately while the hypervisor works in the background.
Requirements
Quick Start
make build # compile workspace
make run # start server + UI via zinit
make logs # view server logs
make stop # stop all services
Test with socat:
echo '{"jsonrpc":"2.0","method":"cloud.ComputeService.node_register","params":{},"id":1}' \
| socat - UNIX-CONNECT:$HOME/hero/var/sockets/hero_cloud_server.sock
Documentation
- Setup Guide — installation, chvm, environment variables
- API Reference — all RPC methods, VM states, data types
- Testing Guide — full VM lifecycle walkthrough with socat
Related Projects
| Crate | Description |
|---|---|
hero_cloud_server |
JSON-RPC daemon (Unix socket) |
hero_cloud_sdk |
Generated OpenRPC client library |
hero_cloud_ui |
Admin dashboard (Axum + Askama) |
hero_cloud_examples |
SDK usage examples |
License
Apache-2.0