Integrate hero_compute for real VM deployment on slice rental #51
Labels
No labels
meeting-notes
meeting-sensitive
meeting-transcript
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/home#51
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?
Goal
When a user rents a compute slice on the marketplace, actually deploy a VM on real hardware via hero_compute. Turn the marketplace from a catalog into a real provisioning system.
Architecture
The explorer acts as a multi-node registry and RPC proxy. The marketplace talks to the explorer, which routes to the right node.
Reference
crates/hero_compute_sdk/— auto-generated typed client from OpenRPC speccrates/hero_compute_explorer/— multi-node registry, proxies RPC callstcp://ip:port(remote via explorer proxy)hero_compute RPC methods we need
ComputeService.list_slicesComputeService.deploy_vmComputeService.start_vmComputeService.stop_vmComputeService.delete_vmComputeService.list_vmsComputeService.get_vmComputeService.node_statusComputeService.vm_execTasks
Backend
hero_compute_sdkdependency (or build a lightweight HTTP client for the explorer)src/services/impl_compute/moduleSliceRentalManagertrait:rent_slice()→deploy_vm()on the target node via explorercancel_slice_rental()→delete_vm()manage_slice_rental()→start_vm()/stop_vm()/restart_vm()get_user_slice_rentals()→list_vms()filtered by user secretNodeRentalManagertrait:rent_node()→ deploy VMs filling all slices on a nodecancel_node_rental()→ delete all VMs on nodeResourceProviderManagerenhancements:add_farm_node()→node_register()on hero_computeget_node_details()→node_status()for real resource usagesync_with_grid()→ query explorer for all registered nodesHERO_COMPUTE_EXPLORER_URL=tcp://explorer:9003env varAPP_COMPUTE_BACKEND=compute(default stayslocalfor dev)SPA Frontend
Testing
Key decisions
APP_COMPUTE_BACKEND=local(OSIS mock, dev) vscompute(real VMs, prod)Flow: User rents a slice
— mik-tf
Core integration complete
Done (C1-C9)
Compute client methods (20 typed methods)
node_list, node_get, node_stats, node_search, list_slices, list_images,
deploy_vm, start_vm, stop_vm, restart_vm, delete_vm, list_vms, get_vm, inject_ssh_keys
Combinable with hero_ledger
Verified: all 272 tests pass (zero regression)
Remaining
— mik-tf
Status: blocked on explorer
hero_compute_server and hero_compute_ui are running locally (root PIDs 3338046, 3338065) but:
Need someone to start the explorer:
hero_compute_explorer --tcp_port 9003or run in master mode.Code is ready — just needs a reachable explorer endpoint to test against.
— mik-tf
mik-tf referenced this issue2026-04-01 17:28:03 +00:00
Code complete — impl_compute/slice_rental_manager.rs and impl_compute/compute_client.rs merged.
Blocked on hero_compute_explorer running on real hardware. Consolidated into mycelium_code/home#55
— mik-tf