Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/host-modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas e2da5509ae swarm-ci-runner: run the forge CI runner as a swarm service
The CI runner was a hive deploy module: hive-ci.nix ran it beside the
forge, and hive-c0re registered it through the forge's admin API with
the `core` token, writing the registration token through hive-priv. It
could only run on the forge's host, and it kept an admin-scoped forge
token on a hive.

Now the runner is a swarm service:

- swarm-ci-runner.nix runs it in a `swarm-ci-runner` container on the
  host that sets deploy.ci-runner.enable, reaching the forge by name.
  It needs neither the forge nor a hive there.
- swarm-controller reads the forge's runner registration token with its
  own admin token and writes it to swarm/services/ci-runner/
  registration-token whenever it differs from what it last wrote. Its
  grant on that path is create/update only.
- The runner's own leaf (CN swarm-ci-runner, role and policy of the same
  name) reads that one path. swarm-bao-ci-runner.service fetches it into
  the runner's EnvironmentFile and restarts the runner on a change.
- A pre-start step removes .runner when the daemon's journal since its
  last start holds Forgejo's "unregistered runner" refusal (the daemon
  exits 1 when its startup Declare gets it), or when .runner names
  another forge address; upstream's pre-start step then registers again.

Removed from the hive side: hive-ci.nix and deploy.forgejo.ci.*,
forge/ci_runner.rs, PrivRequest::RegisterCiRunner and its handler and
ReadWritePaths entry, InfraContainer::Ci with hivectl's --ci and the
dashboard's hive-ci journal entry, HYPERHIVE_FORGE_CI_ENABLED, and
read:admin,write:admin from CORE_TOKEN_SCOPES: nothing else in hive-c0re
calls /api/v1/admin/*. The old ci options, under both swarm.forge.ci and
deploy.forgejo.ci, now fail evaluation naming deploy.ci-runner.

The forge's half of the old ci.enable, the actions/checkout mirror and
DEFAULT_ACTIONS_URL = self, is deploy.forgejo.actionsFromSelf.

Closes #4954
2026-10-05 13:55:37 +02:00
..
hive-c0re swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
hive-forge swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
hive-gateway swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
lib swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
swarm-grafana/dashboards hive-agent: export ACP-reported cost and context fill over OTLP 2026-09-30 22:24:06 +02:00
bao-bootstrap-policy.hcl bao: disable the unused approle auth method, declaratively 2026-09-28 22:58:36 +02:00
default.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
deploy.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
glue-bao-readers-policy-order.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
glue-bao-tls.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
glue-bao-ui-oidc-client.nix bao: OIDC login to the browser UI via authelia, as a metadata-only viewer 2026-09-28 19:56:38 +02:00
glue-controller-bao-identity.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-controller-oidc-client.nix swarm: OIDC clients registered wherever authelia runs; nats + matrix secrets from bao 2026-10-05 09:58:02 +02:00
glue-forge-oidc-client.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-grafana-oidc-client.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-hive-tls-bao-identity.nix hive-tls: a store-only host without a hive starts its gateway with the store sealed 2026-10-04 19:45:14 +02:00
glue-matrix-ctl-bao-identity.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-matrix-oidc-client.nix swarm: OIDC clients registered wherever authelia runs; nats + matrix secrets from bao 2026-10-05 09:58:02 +02:00
glue-nats-auth-bao-identity.nix module-eval: set the hive-controller option only in tests that need a hive 2026-10-05 09:58:13 +02:00
glue-nats-bao-identity.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-nats-oidc-client.nix swarm: OIDC clients registered wherever authelia runs; nats + matrix secrets from bao 2026-10-05 09:58:02 +02:00
glue-queue-agent-credential.nix nix: comments state current behaviour, not history 2026-10-05 09:58:50 +02:00
glue-secret-publisher-bao-identity.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-services-issuer-bao-identity.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-swarm-bao-otel-oidc-client.nix ops: update option pointers after grafana/bao split 2026-10-01 09:53:04 +02:00
glue-swarm-otel-oidc-client.nix ops: update option pointers after otel split 2026-10-01 13:00:40 +02:00
hive-matrix-service.nix swarm-controller: revoke matrix admin from former operators 2026-10-05 12:39:02 +02:00
hive-matrix.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
hive-network.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
hive-priv.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
hive-tls.nix nix: leave unit-script comments untouched outside swarm-bao-pki 2026-10-05 09:59:05 +02:00
hyperhive.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
local-defaults.nix swarm-controller: read the queue client secret from the store, drop the file 2026-09-28 19:01:05 +02:00
otel.nix nix: comments state current behaviour, not history 2026-10-05 09:58:50 +02:00
stylix-theme.nix swarm-ui: apply the operator's stylix theme, same as the dashboard already does 2026-08-24 14:28:25 +02:00
swarm-authelia-service.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
swarm-authelia.nix nix: comments state current behaviour, not history 2026-10-05 09:58:50 +02:00
swarm-bao-service.nix nix: split swarm-bao into service and deploy-mode files 2026-10-01 09:37:36 +02:00
swarm-bao.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
swarm-ca.nix nix: comments state current behaviour, not history 2026-10-05 09:58:50 +02:00
swarm-ci-runner.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
swarm-controller.nix swarm-controller: revoke matrix admin from former operators 2026-10-05 12:39:02 +02:00
swarm-grafana-service.nix nix: finish the "moved to" comment sweep 2026-10-05 09:59:02 +02:00
swarm-grafana.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
swarm-nats-service.nix nix: finish the "moved to" comment sweep 2026-10-05 09:59:02 +02:00
swarm-nats.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
swarm-otel-service.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
swarm-otel.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
swarm-peers-removed.nix nix: comments state current behaviour, not history 2026-10-05 09:58:50 +02:00
swarm-required-services.nix nix: run the forge on one host per swarm (deploy.forgejo.enable) 2026-09-24 23:56:07 +02:00
swarm-secret-publisher.nix swarm: OIDC clients registered wherever authelia runs; nats + matrix secrets from bao 2026-10-05 09:58:02 +02:00
swarm-snapshot-store.nix deploy: move the wireguard mesh out of the namespace hives read 2026-09-07 14:24:52 +02:00
swarm-ui.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
swarm-victorialogs-service.nix nix: split swarm-victorialogs into service and deploy-mode files 2026-10-01 10:03:55 +02:00
swarm-victorialogs.nix nix: comments state current behaviour, not history 2026-10-05 09:58:50 +02:00
swarm-victoriametrics-service.nix nix: split swarm-victoriametrics into service and deploy-mode files 2026-10-01 10:03:55 +02:00
swarm-victoriametrics.nix swarm-ui: build the forge link from swarm.forge.domain 2026-10-02 20:02:02 +02:00
swarm-wireguard.nix swarm options: no swarm.* value depends on a deploy option or this host's hive 2026-10-04 18:13:47 +02:00
swarm.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00