feat(web): rename the portal database and role to bitborg_web #748

Sammanfogat
supernaut sammanfogade 8 incheckningar från feat/portal-db-rename in i main 2026-10-14 15:26:24 +00:00
Ägare

Rename the portal database and role gitborg_web to bitborg_web.

  • web_db_name and web_db_user become bitborg_web. web_db_legacy_name keeps the old name for the readers and the one-shot migration.
  • roles/web/tasks/rename-db.yml probes which names exist, refuses mixed states, and on prod refuses a run that does not include backup and backup-drill. It then stops the portal and, in one transaction, terminates sessions, renames the database and role, and resets the password. The new DATABASE_URL secret restarts the portal. A failed rename changes nothing.
  • The nightly writer dumps ${WEB_DB}.dump. Verify and the drill read both names, so older archives stay restorable.
  • Runbook: "Portal database rename (#736)" with timing, checks and rollback.

Apply between :25 and :55 (clear of the :17 hot backup): staging --tags web, then prod --tags web,backup,backup-drill. About 1 minute of portal downtime; Forgejo stays up.

Closes #736

Rename the portal database and role `gitborg_web` to `bitborg_web`. - `web_db_name` and `web_db_user` become `bitborg_web`. `web_db_legacy_name` keeps the old name for the readers and the one-shot migration. - `roles/web/tasks/rename-db.yml` probes which names exist, refuses mixed states, and on prod refuses a run that does not include `backup` and `backup-drill`. It then stops the portal and, in one transaction, terminates sessions, renames the database and role, and resets the password. The new `DATABASE_URL` secret restarts the portal. A failed rename changes nothing. - The nightly writer dumps `${WEB_DB}.dump`. Verify and the drill read both names, so older archives stay restorable. - Runbook: "Portal database rename (#736)" with timing, checks and rollback. Apply between :25 and :55 (clear of the :17 hot backup): staging `--tags web`, then prod `--tags web,backup,backup-drill`. About 1 minute of portal downtime; Forgejo stays up. Closes #736
supernaut lade till 7 incheckningar 2026-10-14 14:27:06 +00:00
Rename the podman secrets for postgres, forgejo, web and grafana to
bitborg-*. Each role creates the new secret, restarts its unit on it,
then removes the old one. The kanidm provision token stays until kanidm
is removed.

Forgejo reads app.ini from /etc/bitborg and /run/bitborg in the
container. The drill's scratch forgejo is bitborg-restore-drill.

Backup verify and the drill accept both portal dump names and both
restic host tags, so archives from before and after the rename stay
restorable. The writers are unchanged.

Closes #735
fix(forgejo): keep the old postgres secret until its unit uses the new one
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m11s
8be330f012
Merge remote-tracking branch 'origin/main' into feat/pre-rename-names
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m12s
5b3b2f4c0c
The web role renames gitborg_web once, before its create task. It
stops the portal, ends open sessions, renames the database and the
role and resets the password from vault. Mixed states fail. A prod run
that renames refuses without the backup and backup-drill roles.

The nightly writer now names the dump after web_db_name. Verify and
the drill still accept gitborg_web.dump from older archives.

Closes #736
# Conflicts:
#	ansible/group_vars/all/vars.yml
#	docs/runbook.md
#	scripts/test_backup_guards.py
fix(web): rename the portal database and role in one transaction
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m52s
1c33b891f8
A failed role rename left the database renamed and the role not.
The runbook rollback now also ends sessions and runs in one
transaction. It also names the hot backup slot to avoid.
supernaut lade till 1 incheckning 2026-10-14 15:23:00 +00:00
Merge branch 'main' into feat/portal-db-rename
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m47s
d0749419bc
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-14 15:23:17 +00:00
supernaut sammanfogade incheckning 07e992baff till main 2026-10-14 15:26:24 +00:00
supernaut tog bort grenen feat/portal-db-rename 2026-10-14 15:26:25 +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!748
Ingen beskrivning angiven.