feat(host): rename the service user to bitborg #753

Sammanfogat
supernaut sammanfogade 15 incheckningar från feat/legacy-rename-role in i main 2026-10-15 10:00:00 +00:00
Ägare

Renames the legacy service user and its paths, volumes and secrets to bitborg, and adds the legacy-rename role that moves an existing host over.

Prod and monitoring already run this branch: both rename windows ran on 2026-10-15 (runbook "Legacy rename"). Staging has run it since the rehearsal. main still expects the old user, so merge this before any other apply.

  • legacy-rename role: preflight with counts and a space check, save and reload the podman store, rename the user, mounts and labels, copy the volumes, soft rollback. A no-op on a host without the legacy user.
  • Roles, paths, volume and secret names use bitborg.
  • The monitoring role starts its Caddy socket after the Quadlet flush. Window A failed on that order.
  • The preflight counts repositories in the prod layout too.
  • Runbook: windows, rehearsal and prod record, rollback, purge. Forgejo v17 is no longer a prerequisite.

Verified on prod after window B: --check returns changed=0, no gitborg user, mount, volume, secret, image or unit is left, the counts diff holds only expired sessions, restic snapshots carry the new host tag. Backup, verify of a pre-window archive, a new backup and verify, the restore drill and the sign-up drill all passed.

Follow-ups: #582 (runbook commands), #585 (purge after 7 days and one weekly drill), #716 (Forgejo v17).

Refs #584

Renames the legacy service user and its paths, volumes and secrets to `bitborg`, and adds the `legacy-rename` role that moves an existing host over. Prod and monitoring already run this branch: both rename windows ran on 2026-10-15 (runbook "Legacy rename"). Staging has run it since the rehearsal. `main` still expects the old user, so merge this before any other apply. - `legacy-rename` role: preflight with counts and a space check, save and reload the podman store, rename the user, mounts and labels, copy the volumes, soft rollback. A no-op on a host without the legacy user. - Roles, paths, volume and secret names use `bitborg`. - The monitoring role starts its Caddy socket after the Quadlet flush. Window A failed on that order. - The preflight counts repositories in the prod layout too. - Runbook: windows, rehearsal and prod record, rollback, purge. Forgejo v17 is no longer a prerequisite. Verified on prod after window B: `--check` returns `changed=0`, no `gitborg` user, mount, volume, secret, image or unit is left, the counts diff holds only expired sessions, restic snapshots carry the new host tag. Backup, verify of a pre-window archive, a new backup and verify, the restore drill and the sign-up drill all passed. Follow-ups: #582 (runbook commands), #585 (purge after 7 days and one weekly drill), #716 (Forgejo v17). Refs #584
supernaut lade till 14 incheckningar 2026-10-15 09:33:14 +00:00
bitborg_user is bitborg and its home, config dir and the three mount
points are derived in group_vars. Podman volumes, ext4 labels and the
restic storage tag follow. The old names live only in the legacy_* block,
which the rename role and the restic readers use.

Refs #584
First in both plays. It does nothing on a host without the old user and
fails the run on one that still has it, unless
-e legacy_rename_confirm=<host> names that host. The script renames the
user, moves the mounts, builds a fresh podman store, loads the saved
images and copies the volume data. The old store stays aside for the
soft rollback until the purge.

Refs #584
Refs #584
Refs #584
# Conflicts:
#	ansible/group_vars/all/vars.yml
#	docs/runbook.md
The forgejo webhook GET goes through Caddy, which converges later in the same play on a fresh store,
so it refused and stopped the run. It is documented as warn-only, so it no longer fails. The relabel
also refreshes udev, so the old by-label device unit does not linger until reboot. Refs #584.
Refs #584.
fix(legacy-rename): count repositories in the prod layout too
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m20s
b8b172f32a
supernaut lade till 1 incheckning 2026-10-15 09:56:12 +00:00
docs(runbook): record the prod rename windows
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m13s
3d8363584e
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-15 09:56:17 +00:00
supernaut sammanfogade incheckning 7365827933 till main 2026-10-15 10:00:00 +00:00
supernaut tog bort grenen feat/legacy-rename-role 2026-10-15 10:00:00 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-15 10:00:00 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!753
Ingen beskrivning angiven.