Central Configurations #53

Merged
mahmoud merged 6 commits from development_central_config into development 2026-04-02 09:32:41 +00:00
Member

Issue: #40

Description:

### Issue: https://forge.ourworld.tf/lhumina_code/hero_compute/issues/40 ### Description: - added remote_config.rs to handle both image registry and central config - used central config from repo: https://forge.ourworld.tf/lhumina_code/hero_compute_config
fix: removed unused MY_HYPERVISOR_MYCELIUM_PEERS
Some checks failed
Test / test (push) Failing after 2m3s
Test / test (pull_request) Failing after 1m38s
ade5cb3f46
fix: cargo fmt
Some checks failed
Test / test (push) Failing after 1m43s
Test / test (pull_request) Failing after 1m44s
74230aa006
fix: removed closure wrapping
All checks were successful
Test / test (pull_request) Successful in 1m33s
Test / test (push) Successful in 1m51s
8ee81a0cea
docs: updated docs and .env.example
All checks were successful
Test / test (push) Successful in 1m25s
Test / test (pull_request) Successful in 1m27s
c7aa4ae1ea
fatmaebrahim changed title from Central Configurations to WIP: Central Configurations 2026-04-01 14:05:03 +00:00
fatmaebrahim changed title from WIP: Central Configurations to Central Configurations 2026-04-02 08:24:43 +00:00
mahmoud requested changes 2026-04-02 08:58:18 +00:00
Dismissed
.env.example Outdated
@ -44,2 +45,4 @@
# MYCELIUM_IP=
# Environment name — determines which config to fetch from the central config repo.
# Options: development, qa, testing, production
Owner

I would say that we should follow the same env-related names in the config etc, so we have central env also

I would say that we should follow the same env-related names in the config etc, so we have central env also
Author
Member

will remove qa (not in central config) and add canary

will remove qa (not in central config) and add canary
mahmoud marked this conversation as resolved
@ -48,2 +52,2 @@
# Edit to add/remove peers as needed.
MY_HYPERVISOR_MYCELIUM_PEERS=tcp://188.40.132.242:9651,tcp://136.243.47.186:9651,tcp://185.69.166.7:9651,tcp://185.69.166.8:9651,tcp://65.21.231.58:9651,tcp://65.109.18.113:9651,tcp://209.159.146.190:9651,tcp://5.78.122.16:9651,tcp://5.223.43.251:9651,tcp://142.93.217.194:9651
# Sourced from central config. Uncomment to override locally.
# CHVM_MYCELIUM_PEERS=tcp://188.40.132.242:9651,tcp://136.243.47.186:9651
Owner

Same here no CHVM and please make sure it is all updated

Same here no CHVM and please make sure it is all updated
fatmaebrahim marked this conversation as resolved
@ -0,0 +7,4 @@
use std::time::Duration;
const CONFIG_BASE_URL: &str =
"https://git.ourworld.tf/lhumina_code/hero_compute_config/raw/branch/main";
Owner

This one should be auto-generated in the auto-generated env file, so we have to make changes in only one place in the future. also make sure it is documented

This one should be auto-generated in the auto-generated env file, so we have to make changes in only one place in the future. also make sure it is documented
mahmoud marked this conversation as resolved
@ -0,0 +9,4 @@
const CONFIG_BASE_URL: &str =
"https://git.ourworld.tf/lhumina_code/hero_compute_config/raw/branch/main";
const REGISTRY_URL_DEFAULT: &str =
Owner

Here also, and make sure this applied in all places and also documented as well

Here also, and make sure this applied in all places and also documented as well
mahmoud marked this conversation as resolved
@ -34,3 +41,2 @@
| `MYCELIUM_IP` | This node's Mycelium IP, sent in heartbeats (server only) | *(empty)* |
| `MY_HYPERVISOR_MYCELIUM_PEERS` | Comma-separated mycelium peer addresses for VM networking. If not set, uses 10 built-in public peers from [threefoldtech/mycelium](https://github.com/threefoldtech/mycelium) | *(built-in defaults)* |
| `HERO_COMPUTE_REGISTRY_URL` | URL to `images.toml` in the image registry repo. Images are loaded from this URL at deploy time | `https://forge.ourworld.tf/lhumina_code/hero_compute_registry/raw/branch/main/images.toml` |
| `CHVM_MYCELIUM_PEERS` | Comma-separated mycelium peer addresses for VM networking. Sourced from central config; override in `.env` if needed | *(from central config)* |
Owner

Here also

Here also
fatmaebrahim marked this conversation as resolved
@ -71,3 +79,3 @@
# Network
EXPLORER_ADDRESSES=unix:///root/hero/var/sockets/hero_compute_explorer.sock
MY_HYPERVISOR_MYCELIUM_PEERS=tcp://188.40.132.242:9651,tcp://136.243.47.186:9651
CHVM_MYCELIUM_PEERS=tcp://188.40.132.242:9651,tcp://136.243.47.186:9651
Owner

This should not be renamed, there is no thing called CHVM

This should not be renamed, there is no thing called CHVM
fatmaebrahim marked this conversation as resolved
docs/setup.md Outdated
@ -137,3 +137,3 @@
| `HERO_COMPUTE_ADVERTISE_ADDRESS` | Worker's TCP address for explorer proxy | `--mode worker` (auto-detected) |
| `HERO_PROC_SOCKET` | Override hero_proc socket path | Auto-detected |
| `MY_HYPERVISOR_MYCELIUM_PEERS` | Mycelium peer addresses for VM IPv6 networking | Built-in defaults (10 public peers) |
| `CHVM_MYCELIUM_PEERS` | Mycelium peer addresses for VM IPv6 networking | From central config |
Owner

No more CHVM please

No more CHVM please
fatmaebrahim marked this conversation as resolved
refactor: applied review comments
All checks were successful
Test / test (pull_request) Successful in 1m27s
Test / test (push) Successful in 1m45s
8b632a826f
mahmoud approved these changes 2026-04-02 09:32:30 +00:00
mahmoud left a comment
Owner

LGTM

LGTM
mahmoud merged commit 9b3e409709 into development 2026-04-02 09:32:41 +00:00
mahmoud deleted branch development_central_config 2026-04-02 09:32:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!53
No description provided.