deploy: rename swarm.enableRequiredServices to deploy.allSwarmServices
Both halves of the old name were wrong about the subject. The services
are required of the SWARM, not of the host, and the option says whether
THIS host runs them — so it described the wrong thing and sat in the
namespace that has to be identical on every host. The new name is mara's
own phrasing of what it means: "deploy all swarm level services on this
host".
mkRenamedOptionModule carries existing configs, read-side references
included, so this warns rather than failing to evaluate.
Three sites were not just the identifier:
- local-defaults.nix set it inside `config.services.hyperhive.swarm =
{ … }`. It moves out as a path beside the other deploy.* setter rather
than into a second `deploy = { … }` attrset — the warning that file
already carries about `swarm` applies to any second definition of the
same parent.
- swarm-required-services.nix bound only `swarmCfg`, now unused; it binds
and reads `deployCfg`.
- Two comments in that file described a half-migrated state, where the
switch asserted some `swarm.*.enable` toggles and some `deploy.*` ones.
Every one of them has been `deploy.*` for several slices now.
This commit is contained in:
parent
b699ca8857
commit
585269b8a3
7 changed files with 58 additions and 47 deletions
|
|
@ -7,11 +7,11 @@ optional ones live, and everything else derives:
|
|||
```nix
|
||||
services.hyperhive.enableAllLocalDefaults = true; # everything on this box
|
||||
# or, for a dedicated services host with hives elsewhere:
|
||||
services.hyperhive.swarm.enableRequiredServices = true;
|
||||
services.hyperhive.deploy.allSwarmServices = true;
|
||||
```
|
||||
|
||||
`enableAllLocalDefaults` is the all-on-one-box switch: it defaults both
|
||||
`swarm.enableRequiredServices` (the shared services run here) and
|
||||
`deploy.allSwarmServices` (the shared services run here) and
|
||||
`swarm.ca.autoConfigure` (the swarm CA is generated here). Each derived
|
||||
toggle can still be set on its own, so "all local except X" needs no
|
||||
further option.
|
||||
|
|
@ -36,7 +36,7 @@ the shapes worth naming are the ones they produce:
|
|||
`enableAllLocalDefaults = true`. Setup is automatic apart from
|
||||
choosing a domain and creating the first user.
|
||||
- **Services on the swarm controller host.**
|
||||
`swarm.enableRequiredServices = true` there; the required services
|
||||
`deploy.allSwarmServices = true` there; the required services
|
||||
deploy together on that host, with hives elsewhere.
|
||||
- **Fully spread out.** One container / VM / machine per service,
|
||||
somewhere.
|
||||
|
|
@ -65,7 +65,7 @@ provider, differentiated by roles and claims rather than by mechanism —
|
|||
there is one IdP and one auth path.
|
||||
|
||||
- **`deploy.authelia`** — run the container here. Defaults from
|
||||
`swarm.enableRequiredServices`.
|
||||
`deploy.allSwarmServices`.
|
||||
- **`swarm.authelia.url`** — where clients are sent to authenticate.
|
||||
Present on **every** hive, defaulting to this host's own instance only
|
||||
when this module is the thing running it; otherwise `null`, and a hive
|
||||
|
|
@ -98,7 +98,7 @@ one Grafana, in two containers at `metrics.<swarm-domain>` and
|
|||
`grafana.<swarm-domain>`. Two containers rather than one so Grafana can
|
||||
be restarted or broken without taking the time-series database with it.
|
||||
|
||||
Both follow `swarm.enableRequiredServices` like authelia and matrix, so
|
||||
Both follow `deploy.allSwarmServices` like authelia and matrix, so
|
||||
the swarm's service host gets them with everything else. They derive
|
||||
together: a store with no UI is unreadable and a UI with no store is
|
||||
empty. To run one without the other, set it directly:
|
||||
|
|
@ -133,7 +133,7 @@ the collector is the only intended writer.
|
|||
|
||||
The swarm's service containers ship their journals to one VictoriaLogs at
|
||||
`logs.<swarm-domain>`, behind the same SSO as everything else. It follows
|
||||
`swarm.enableRequiredServices` too, and the collector below is what writes
|
||||
`deploy.allSwarmServices` too, and the collector below is what writes
|
||||
to it.
|
||||
|
||||
**Reading them.** Open Grafana, pick **Explore**, and choose the
|
||||
|
|
@ -160,7 +160,7 @@ and exports to `otel.endpoint`, doing both when both are configured. It
|
|||
also holds the upstream credential, which is why no hive and no agent
|
||||
needs one.
|
||||
|
||||
It follows `swarm.enableRequiredServices` like the services above, in a
|
||||
It follows `deploy.allSwarmServices` like the services above, in a
|
||||
`swarm-otel` container. Its `swarm.otel.port` defaults to `4319` rather
|
||||
than OTLP's usual `4318`, which the hive tier already uses — swarm
|
||||
containers share the host's network namespace, so two collectors on one
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ answers for one host. This one is the view *across* hives.
|
|||
services.hyperhive.deploy.swarm-ui.enable = true; # defaults to deploy.swarm-controller.enable
|
||||
```
|
||||
|
||||
Derived from the controller rather than from `enableRequiredServices`:
|
||||
Derived from the controller rather than from `allSwarmServices`:
|
||||
the UI is a view onto the controller's state and reaches it over that
|
||||
daemon's socket, so the host that runs the controller is the host that
|
||||
can serve the UI. A hive that merely *uses* a swarm has nothing to serve.
|
||||
|
|
|
|||
Loading…
Reference in a new issue