Watch
0
0
Fork
You've already forked hyperhive
0

default the host's swarmctl to the gateway; login takes a callback port

This commit is contained in:
atlas 2026-11-22 15:00:54 +01:00
commit 58236e1b7f

View file

@ -53,7 +53,8 @@ the `shamir` seal, the restart after the granter, and the browser login.
Run `swarmctl setup status` at any point to see how far you have got. It
changes nothing, and it works from a script: it exits 0 when every step it can
see has finished.
see has finished. The agent steps (9 and 10) read the controller, so they show `unknown` until
`swarmctl login` has run.
```console
# swarmctl setup status
@ -172,12 +173,27 @@ name resolves on the box itself through `/etc/hosts`; from anywhere else it
needs a real DNS record. → [`2-handbook/swarm/ui.md`](../2-handbook/swarm/ui.md)
Signing in to the forge once through SSO creates your forge account under the
same username. Then, _on the swarm-controller's host_:
same username. Then, _on the swarm-controller's host_, log `swarmctl` in once. The host's
`swarmctl` reaches the controller through the swarm's gateway as your own SSO account, so every
verb that calls the controller needs this login:
```bash
swarmctl login
swarmctl forge make-admin mara
```
`login` prints a URL and waits for the browser's answer on a loopback port of the machine it runs
on. On a host with no browser, forward a port from the machine that has one, then run the login
with that port:
```bash
ssh -L 8765:127.0.0.1:8765 <host> # on your workstation
swarmctl login --callback-port 8765 # in that ssh session, on the host
```
Open the printed URL in the workstation's browser. The login lasts until the refresh token
expires; `swarmctl` then says to run `login` again.
If the forge already has a local account with your username, the first
SSO login asks for its forge password once, to link the two.