How to add a Linux runner¶
This turns a Debian 13 host into a runner in your hoard. install.sh is the
only step that runs as root. You need a set-up laptop
and sudo on the host. Linux runner lists
everything the script installs. If the host ran the spike, start with
If the host ran the spike.
Steps¶
-
On the laptop, build the binaries and fetch gVisor:
-
Copy them and
deploy/linux/to the host: -
On the laptop, start the invite:
It prints the tailnet IP the runner's egress self-check will prove a job can't reach, and an invite that is good for 15 minutes and one connection. Leave it waiting.
-
On the host, run the script and paste the invite when it asks:
It reads the invite from the terminal, never from an argument, so
psand shell history never hold it. A bad paste fails before anything is installed. -
The host prints a fingerprint. If the laptop shows the same fingerprint and the right name, approve on the laptop. Touch ID asks only when the day key needs renewing.
-
Wait for the script to finish. It prints the units' state, the allmyram processes and their users (none may be root), and the egress self-check:
egress self-check passed=trueand oneok=trueline per check. It exits 0 only when the self-check passed.
The runner is now in client.json under its name. When the laptop has a
sink, the invite then waits up to 2 minutes for the runner to answer and
hands it the sink record, so the sink starts collecting from it. A runner
that doesn't answer in time gets the record the next time the laptop
connects to it.
Options¶
- If you want the egress self-check to prove jobs can't reach a different
tailnet machine, add
--tailnet-peer ADDR; pick one that is up. On a runner that has already joined it works without--join, changing the existing trust settings. - If you want to limit which registries jobs pull from, add
--registries FILE, onehost[:port]per line. To return to the defaults,sudo rm /etc/allmyram/registriesand reruninstall.sh. -
If you want scratch pads cloned rather than copied and the host has ZFS, move the data onto its own dataset, naming the units to stop and restart:
Running jobs end as RunnerRestarted. The script's header has the undo.
Upgrade a runner¶
Copy the new binaries to the host and rerun sudo bash install.sh without
flags. It keeps the runner's identity, trust settings and configuration.
Upgrade runners before clients: a runner refuses request fields it doesn't
know, so a newer client's runs fail against an older runner.
A host installed when the warden was called the helper is renamed in place:
install.sh stops the runner and its jobs, renames the allmyram-helper
user, group, unit, binary and /var/lib/allmyram/helper, and carries on.
Logs of runs that ended before the rename can no longer be read.
A host installed before joins existed has no trust.json, and the runner
refuses its old runner.json, so it stays stopped until it joins with
--join. install.sh no longer takes --ca-pub, --host-cert or
--allowed.
Rejoin a runner¶
Pass --join again, with a fresh allmyram invite. --join is never
remembered. Rejoin after allmyram init --new-owner, or to move a runner to
a new owner key. A rejoin replaces trust.json, so add --tailnet-peer
again if you used it.
Remove a runner¶
- On the laptop:
allmyram remove smaug. The runner keeps admitting the laptop's key until you uninstall it. - On the host, follow the header of
install.sh, which lists every command. In short: disable and remove the four units, delete the nft tables and the bridge, remove the CNI config, restore/etc/containerd/config.toml.before-allmyram-install, remove/etc/containerd/allmyram-runsc.toml,/etc/allmyram,/var/lib/allmyramand the binaries, and delete the two users.
If the host ran the spike¶
Before the first install.sh, clear what the spike's scripts left:
It removes the spike's sudo rule, bridges, CNI configs, cgroup, debug
wrapper and nerdctl. crictl stays, and egress.nft replaces the spike's nft
tables. It refuses to run once allmyram is installed.