HetznerWorkerHost
One Hetzner Cloud VM per worker, created through the Hetzner Cloud API (https://docs.hetzner.cloud).
Nebula.Hosting · Packages/com.1by3.nebula/Runtime/Orchestrator/Hosting/HetznerWorkerHost.cspublic sealed class HetznerWorkerHost : IWorkerHostOne Hetzner Cloud VM per worker, created through the Hetzner Cloud API (https://docs.hetzner.cloud). Each VM boots Ubuntu with a cloud-init script that downloads the Linux server build from the orchestrator over the private network, reads its own private IP from the Hetzner metadata service, and starts the worker role as a systemd unit advertising that private IP. Killing a worker deletes its VM. On Initialize every VM labelled with this mesh id is deleted, so a restarted orchestrator never inherits (and pays for) stale machines.
All HTTP work runs on the thread pool; results are queued and applied in Tick on the main thread, where the JSON is parsed with JsonUtility.
Constructors
HetznerWorkerHost
public HetznerWorkerHost(CloudHostSettings settings);Properties
Name
public string Name { get; }IsReady
public bool IsReady { get; }InitializationError
public string InitializationError { get; } = "";Methods
Initialize
public void Initialize(Action<string, string> log);Launch
public IWorkerHandle Launch(WorkerLaunchSpec spec);Kill
public void Kill(IWorkerHandle handle);Tick
public void Tick();WriteHandleJson
public void WriteHandleJson(IWorkerHandle handle, JsonWriter w);Dispose
public void Dispose();BuildCloudInit
public static string BuildCloudInit(string buildUrl, string workerArgs);Boot script for a worker VM. Waits for the private interface, fetches the build from the orchestrator, and runs the worker as a systemd unit. $PRIVATE_IP in workerArgs expands on the machine.