keycloak: first stand-up on a fresh host must not need its own registry #613
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#613
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What
keycloak_imageis{{ bitborg_registry_host }}/bitborg/bitborg-keycloak, the host's own Forgejo registry (group_vars/all/vars.yml:326). The Keycloak role pulls it withpull: trueand no failure tolerance (roles/keycloak/tasks/main.yml:122-130). Insite.ymlthe role runs beforeforgejo,billing,webandcaddy(:66-72). Web and billing tolerate a missing image (soft pull, presence check, stage the unit).Related to #575 (cutover) and #161 (full stand-up).
Why
A rebuild from backup must complete with one
site.ymlrun.Failing case
A full stand-up on a fresh prod host with
keycloak_enabled: true. The Keycloak pull aborts the play, because the registry that serves the image is Forgejo, which has not been deployed yet.Fix
Use the billing pattern: soft pull,
podman image exists, stage the unit and skip the start when the image is absent. Alternatively move the Keycloak role aftercaddy. The first option keeps the role order the cutover plan assumes.Done when
site.ymlon a fresh staging host withkeycloak_enabled: truefinishes.Plan outline
Triage, 2026-10-11.
The Keycloak pull is fixed by #641 and #643. The role soft-pulls, stages the unit and skips the start, and the health gate drops Keycloak until the image is there. Web, billing, the reconciler and reconcile-trigger already soft-pull. No other image needs this host's registry at first boot.
A second first-pass blocker was fixed in #656. The forgejo role runs before caddy, so
forgejo admin auth add-oauthcould not fetch the discovery document and aborted the play. The add now tolerates only that error, and the second pass adds the source.Rebuild order: pass 1 (clean stack), restore the databases and the storage tier (registry packages included), pass 2 (Keycloak starts, OIDC source added).
Still open:
opentofu/keycloakrealm apply between the passes, or the checks gated on the realm existing.Status 2026-10-11: the first pass on a fresh host no longer aborts on the OIDC source (#656), and the runbook names the realm apply between the passes (#657). Open: a real fresh-host run, which is the done-when.