Add a node with one command: llmgw node add, with a terminal screen

Adding a node was deploy/bootstrap/onboard-node.sh, which is not installed
anywhere and wanted the node's name, the control plane's address and a
dozen flags. It is now in the binary, run on the control plane:

    sudo llmgw node add ubuntu@10.0.0.21

The node id is the machine's hostname, and the address its agent dials is
this machine's on the route to it, checked against the server certificate.
It installs llmgw there (the release for its architecture, fetched and
checked by the node; uname rather than dpkg, so RHEL works), runs doctor
there and stops on a problem before changing anything, issues and installs
the certificate, writes agent.yaml and the unit, starts the agent, and waits
for it to join and install llama.cpp. The authority is read first, so a
missing one is said before the node is touched.

The steps are events. In a terminal they draw a checklist (bubbletea) that
asks what a script cannot: which fabric each group of active adapters is on,
grouped by the subnet manager or RoCE network they report, and whether to go
on past a problem. Elsewhere, one line per step.

Found by running it on an empty VM: ssh's "Permanently added" warning on
stderr was read as the machine's hostname, so standard error is now kept
apart; and a node added again while cordoned never counted as joined, so
joining now means a heartbeat since the restart.

llmgw node remove forgets a lost node, which otherwise stays listed until
the control plane restarts. ctl nodes no longer lists vLLM as skipped on
every CPU node. The quick install, install and onboarding docs use it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-09-29 19:33:47 +02:00
1 parent c8da06988f
commit 2a16c26575
17 files changed
+2056 -120

No files matched your search

+21
View File
@@ -667,3 +667,24 @@ func TestAProfileThatIsGoneIsNotReportedAsStale(t *testing.T) {
t.Error("a missing model is not a changed profile")
}
}
func TestOnlyANodeThatIsGoneCanBeRemoved(t *testing.T) {
a, ctl := setup(t, testModels(), gpuNode("n1", 8))
// Connected, even cordoned: it would register again on its next
// heartbeat, so removing it would do nothing but confuse.
ctl.Inventory().SetState("n1", inventory.Cordoned)
if code := call(t, a, "DELETE", "/api/v1/nodes/n1", "", nil); code != 409 {
t.Errorf("a connected node gave %d, expected 409", code)
}
ctl.Inventory().SetState("n1", inventory.Lost)
if code := call(t, a, "DELETE", "/api/v1/nodes/n1", "", nil); code != 200 {
t.Fatalf("a lost node gave %d, expected 200", code)
}
if _, ok := ctl.Inventory().Get("n1"); ok {
t.Error("the node is still listed")
}
if code := call(t, a, "DELETE", "/api/v1/nodes/n1", "", nil); code != 404 {
t.Errorf("removing it again gave %d, expected 404", code)
}
}