full-setup and the host swarmctl reach the controller as a pod, not through a host socket
This commit is contained in:
parent
67bf51809a
commit
64d340e385
3 changed files with 222 additions and 157 deletions
|
|
@ -174,6 +174,9 @@ It prints a generated password once — record it. Keep both flags:
|
|||
it. Without it you log in fine and are then refused.
|
||||
- **`--email`** — the forge won't create an account without one.
|
||||
|
||||
This step writes authelia's users file and calls no controller, so it needs nothing from the controller. The first verb that calls the controller is
|
||||
`swarmctl forge make-admin` in step 3, after `swarmctl login`.
|
||||
|
||||
Fix either afterwards with `swarmctl user update mara --add-group admins
|
||||
--email …`. Details: [`2-handbook/swarm/sso.md`](../2-handbook/swarm/sso.md).
|
||||
|
||||
|
|
@ -186,7 +189,8 @@ needs a real DNS record. → [`2-handbook/swarm/ui.md`](../2-handbook/swarm/ui.m
|
|||
Signing in to the forge once through SSO creates your forge account under the
|
||||
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:
|
||||
verb that calls the controller (`forge make-admin`, `agent create`, `schedule`, the agent steps of
|
||||
`setup status`) needs this login, and the controller has no socket on the host to use instead:
|
||||
|
||||
```bash
|
||||
swarmctl login
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ swarm-level operator CLI
|
|||
* `--users-file <PATH>` — Host-side path of authelia's users database — that is, the path inside the container, prefixed with the container's root.
|
||||
|
||||
This is the only user store: it's read before every change and written in place, and `swarm-authelia-bridge` writes the same file.
|
||||
* `--swarm <URL>` — The swarm's domain, as `https://<domain>` or the bare domain. Given, the `agent`, `schedule` and `forge` verbs, and the agent checks and steps of `setup`, go through its gateway as the account `swarmctl login` logged in, instead of over the controller's socket. Falls back to `SWARMCTL_SWARM`; `login` then falls back to `SWARMCTL_LOGIN_DEFAULT_SWARM`. The swarm-controller nix module sets both to its host's own swarm, so there the verbs use the gateway and need `swarmctl login` once; an empty `SWARMCTL_SWARM` or `--swarm ""` puts them back on the controller's socket
|
||||
* `--swarm <URL>` — The swarm's domain, as `https://<domain>` or the bare domain. Given, the `agent`, `schedule` and `forge` verbs, and the agent checks and steps of `setup`, go through its gateway as the account `swarmctl login` logged in, instead of over the controller's socket. Falls back to `SWARMCTL_SWARM`; `login` then falls back to `SWARMCTL_LOGIN_DEFAULT_SWARM`. The swarm-controller nix module sets both to its host's own swarm, so there the verbs use the gateway and need `swarmctl login` once. With no swarm, they use the socket that `--controller-socket` or `SWARM_CONTROLLER_SOCKET` names; the module sets neither
|
||||
* `--ca-file <PATH>` — A PEM CA certificate to trust beside the system roots, for a swarm whose gateway serves a certificate from the swarm's own CA. Falls back to `SWARMCTL_CA_FILE`
|
||||
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ No approval gate guards this: the caller is root on the controller's host, or lo
|
|||
The agent writes it on its first start, and only when it has no `AGENTS.md` yet: re-creating an agent never replaces an existing file. The controller refuses a file over 64 KiB.
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ Queues and returns, the same way `agent create` does — watch the swarm UI's jo
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ No approval gate guards this: the caller is root on the controller's host, or lo
|
|||
* `--yes` — Confirm `destroyed`, which can't be undone
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ The swarm-level counterpart of `hivectl agent watch`, read from the swarm-contro
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ Show what the swarm sets for an agent, naming the fields it doesn't set, and the
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ Set fields for an agent. Only the flags given change; the others keep what's sto
|
|||
* `--subagent-models <MODELS>` — The models it may start subagents on, comma-separated. Stored and shown; the agent doesn't apply it yet
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@ Clear every field for an agent, so it goes back to its own values
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -298,7 +298,7 @@ Show the permissions the swarm grants an agent, or that it sets none
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -321,7 +321,7 @@ Replace the permissions the swarm grants an agent; the internet flag stays unles
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -339,7 +339,7 @@ Clear the agent's permissions, so the default applies again
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ Print an agent's AGENTS.md on stdout, and its revision on stderr
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ The diff names `a/AGENTS.md` and `b/AGENTS.md`, as `diff -u a/AGENTS.md b/AGENTS
|
|||
* `--base <REVISION>` — The revision you made the diff against, as `get` printed it. It's the git blob id of that text, so `git hash-object` of the unedited file prints it too
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ Without `--every` it fires once. Without `--at` its first fire is now.
|
|||
* `--paused` — Add it paused
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -450,7 +450,7 @@ List scheduled prompts, one row each, with their agents and next fire time
|
|||
* `--agent <AGENT>` — Show only the prompts that fire in this agent
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ Only the flags given change, and the id stays. `--at` and `--every` move the fir
|
|||
* `--remove-agent <AGENT>` — Agent to stop firing it in. Repeatable. Fails if the agent isn't a target, or if no agent would remain
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -495,7 +495,7 @@ Stop a scheduled prompt firing. Times that pass while it's paused aren't fired w
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -513,7 +513,7 @@ Let a paused scheduled prompt fire again, from its next time on
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -531,7 +531,7 @@ Remove a scheduled prompt from every agent it names
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -641,7 +641,7 @@ The forge creates a human's account on their first SSO login, and this fails unt
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -664,7 +664,7 @@ For scripts, use `setup status` and the individual verbs.
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
@ -682,7 +682,7 @@ Exits 0 when every step it can see has finished, and 1 otherwise, including when
|
|||
|
||||
* `--controller-socket <PATH>` — swarm-controller's unix socket.
|
||||
|
||||
Supplied by the nix module that installs this binary, from the same `socketPath` option the daemon binds; falls back to `SWARM_CONTROLLER_SOCKET`.
|
||||
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -171,8 +171,8 @@ of more than one node needs one before the controller may run there.
|
|||
and the script's tools.
|
||||
- **`swarmctl`.** The controller's socket lives inside the pod, so the host's
|
||||
`swarmctl` reaches the controller only through the gateway: run
|
||||
`swarmctl login` once, then use `--swarm <url>` or a wrapper that defaults
|
||||
to it. A socket path on the host serves nothing.
|
||||
`swarmctl login` once. The host's wrapper defaults `--swarm` to the host's own
|
||||
swarm and sets no socket path, since a socket path on the host serves nothing.
|
||||
- **Probes.** The pod binds `SWARM_CONTROLLER_HEALTH_ADDR`, with liveness on
|
||||
`/healthz` and readiness on `/readyz`. Readiness needs the queue connection
|
||||
and a fresh store login, so a store role that refuses the pod's token leaves
|
||||
|
|
|
|||
Loading…
Reference in a new issue