rollout: apply the October monitoring, Keycloak and ops changes #834

Öppen
öppnade 2026-10-21 06:33:17 +00:00 av supernaut · 1 kommentar
Ägare

Roll out the infra changes merged in #826 to #832 and Keycloak 26.8.1 (bitborg-keycloak#17, image 26.8.1-1). Parked on 2026-10-21.

State

  • Image bitborg-keycloak:26.8.1-1 is released.
  • Vault entries are in place: vault_services_host_private_ip (prod), vault_postgres_monitor_password (prod and staging).
  • Staging runs Keycloak 26.8.1-1 through an extra-var only. keycloak_image_tag in group_vars/all/vars.yml is still 26.8.0-5, so any staging apply with --tags keycloak and no -e keycloak_image_tag=26.8.1-1 downgrades staging. Pin the tag (step 2) before the next staging apply.
  • Staging has the Postgres exporter (--tags postgres,monitoring-agent) and KC_HOSTNAME_ADMIN. The bitborg realm issuer is unchanged.
  • The admin console through the forward still fails on staging. See #644.
  • A temporary master admin may exist on staging from bootstrap-admin user. Delete it when the console work resumes.
  • Nothing is applied to prod.

Steps

  • Release v26.8.1-1.
  • Vault entries.
  • Staging: ansible-playbook -i inventory/staging.yml site.yml --tags postgres,monitoring-agent,keycloak -e keycloak_image_tag=26.8.1-1.
  • Staging: bitborg issuer unchanged, sign-in works.
  • Staging: admin console through the forward (#644).
  • Staging: #800 scope change. Runbook "The opentofu client scope": add the mapping over the API first, then plan and apply the realm (workspace select staging, env/staging.tfvars). A second plan -detailed-exitcode exits 0.
  • Pin keycloak_image_tag: "26.8.1-1" in group_vars/all/vars.yml (PR).
  • Prod, --check --diff first each time:
    • --tags postgres,monitoring-agent (#459, cgroup memory series for #569).
    • --limit monitoring --tags base,monitoring (#732 nftables, #589/#621/#459 rules, #301 dashboards). Check nft list table inet bitborg | grep 3100 shows only the services host, and logs still arrive.
    • --tags keycloak (26.8.1, KC_HOSTNAME_ADMIN). Issuer stays https://id.bitborg.se/realms/bitborg.
    • #800 realm change on prod, same order as staging.
    • #177/#178: --tags forgejo, add bitborg-ci-logs (read team) and bitborg-artifact-cleanup (write team, Actions unit) to the org, mint PATs (read:repository,read:organization and write:repository,read:organization), vault vault_forgejo_ci_log_export_token and vault_forgejo_artifact_cleanup_token, apply --tags ci-log-export,artifact-cleanup,monitoring. Enable artifact_cleanup_delete_enabled after one clean dry run.
  • pnpm tofu:plan: no instance change (#611).
  • Configure the rclone remote and TOFU_STATE_OFFSITE_REMOTE, then check the next pnpm tofu:apply copies the state (#470).
  • Around 2026-10-27: set Postgres and Forgejo caps from the new series (#569).

Do not run scripts/teardown.sh --yes.

Roll out the infra changes merged in #826 to #832 and Keycloak 26.8.1 (bitborg-keycloak#17, image `26.8.1-1`). Parked on 2026-10-21. ## State - Image `bitborg-keycloak:26.8.1-1` is released. - Vault entries are in place: `vault_services_host_private_ip` (prod), `vault_postgres_monitor_password` (prod and staging). - Staging runs Keycloak `26.8.1-1` through an extra-var only. `keycloak_image_tag` in `group_vars/all/vars.yml` is still `26.8.0-5`, so **any staging apply with `--tags keycloak` and no `-e keycloak_image_tag=26.8.1-1` downgrades staging**. Pin the tag (step 2) before the next staging apply. - Staging has the Postgres exporter (`--tags postgres,monitoring-agent`) and `KC_HOSTNAME_ADMIN`. The `bitborg` realm issuer is unchanged. - The admin console through the forward still fails on staging. See #644. - A temporary master admin may exist on staging from `bootstrap-admin user`. Delete it when the console work resumes. - Nothing is applied to prod. ## Steps - [x] Release `v26.8.1-1`. - [x] Vault entries. - [x] Staging: `ansible-playbook -i inventory/staging.yml site.yml --tags postgres,monitoring-agent,keycloak -e keycloak_image_tag=26.8.1-1`. - [x] Staging: `bitborg` issuer unchanged, sign-in works. - [ ] Staging: admin console through the forward (#644). - [ ] Staging: #800 scope change. Runbook "The `opentofu` client scope": add the mapping over the API first, then plan and apply the realm (`workspace select staging`, `env/staging.tfvars`). A second `plan -detailed-exitcode` exits 0. - [ ] Pin `keycloak_image_tag: "26.8.1-1"` in `group_vars/all/vars.yml` (PR). - [ ] Prod, `--check --diff` first each time: - [ ] `--tags postgres,monitoring-agent` (#459, cgroup memory series for #569). - [ ] `--limit monitoring --tags base,monitoring` (#732 nftables, #589/#621/#459 rules, #301 dashboards). Check `nft list table inet bitborg | grep 3100` shows only the services host, and logs still arrive. - [ ] `--tags keycloak` (26.8.1, `KC_HOSTNAME_ADMIN`). Issuer stays `https://id.bitborg.se/realms/bitborg`. - [ ] #800 realm change on prod, same order as staging. - [ ] #177/#178: `--tags forgejo`, add `bitborg-ci-logs` (read team) and `bitborg-artifact-cleanup` (write team, Actions unit) to the org, mint PATs (`read:repository,read:organization` and `write:repository,read:organization`), vault `vault_forgejo_ci_log_export_token` and `vault_forgejo_artifact_cleanup_token`, apply `--tags ci-log-export,artifact-cleanup,monitoring`. Enable `artifact_cleanup_delete_enabled` after one clean dry run. - [ ] `pnpm tofu:plan`: no instance change (#611). - [ ] Configure the rclone remote and `TOFU_STATE_OFFSITE_REMOTE`, then check the next `pnpm tofu:apply` copies the state (#470). - [ ] Around 2026-10-27: set Postgres and Forgejo caps from the new series (#569). Do not run `scripts/teardown.sh --yes`.
Upphovsperson
Ägare

State on 2026-11-29:

  • Keycloak: superseded. Prod and the pin are on 26.8.2-1 (#915, #917). The #800 scope change is on prod: a full realm plan as opentofu is empty.
  • Prod --tags postgres,monitoring-agent: done. pg_up and bitborg_unit_memory_current_bytes report from bitborg-prod.
  • Not done: #177/#178. No bitborg_ci_log_export_* or bitborg_artifact_cleanup_* series exist.
  • Not verified: the monitoring base,monitoring apply (#732 nftables), staging #800, pnpm tofu:plan (#611), the off-site state copy (#470), #644, and the #569 caps.

Remaining scope is the unchecked items above.

State on 2026-11-29: - Keycloak: superseded. Prod and the pin are on `26.8.2-1` (#915, #917). The #800 scope change is on prod: a full realm plan as `opentofu` is empty. - Prod `--tags postgres,monitoring-agent`: done. `pg_up` and `bitborg_unit_memory_current_bytes` report from bitborg-prod. - Not done: #177/#178. No `bitborg_ci_log_export_*` or `bitborg_artifact_cleanup_*` series exist. - Not verified: the monitoring `base,monitoring` apply (#732 nftables), staging #800, `pnpm tofu:plan` (#611), the off-site state copy (#470), #644, and the #569 caps. Remaining scope is the unchecked items above.
Logga in för att delta i denna konversation.
Ingen milstolpe
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#834
Ingen beskrivning angiven.