Loading
feat(scripts): generate the bench control inputs
The weekly bench runs without a person. On 2026-11-23 the rig made its control inputs by hand: the lab CA, the vault file and the local vars. This adds scripts/gen_bench_inputs.py, which makes them for one run. This is node N5 of the bench plan. No CI job calls it yet.
flowchart LR
A[inventory or --zone] --> S[gen_bench_inputs.py]
B[licence path: checked, never read] --> S
S --> C[CA and five leaves]
S --> V[vault.yml 0600]
S --> L[local.yml 0600]
C --> T[track2.yml]
V --> T
L --> T
C --> K[lab-sealed-check.yml]
V --> K
L --> KWhat it does:
- Writes to the git-ignored
.bench-inputs/, or to--out. It refuses a directory in the checkout that Git does not ignore. - Reuses
scripts/gen_lab_ca.sh(newCERTS_DIRandLAB_HOSTSvariables) for the CA and one leaf each forgitlab,openbao,clickhouse,aigwandorbit. - Gives every variable of
vault.yml.examplea random value. The vault stays plain YAML at mode 0600: no playbook needs it encrypted, and the values live for one run. Encrypting would need one more secret. - Writes
local.ymlwith the Track 2 switches,orbit_pg_client_cidr,addon_host_address, the certificate paths,lab_seal_dns_hostsand theoffline_checktrack. Pass both files with-e @, which beats thevars.ymldefaults. - Takes the licence path, checks that the file exists and never opens it. It prints file paths only.
addon_wiringgetsaddon_wiring_certs_dir(default unchanged), because the role read the CA and the OpenBao leaf from a fixedcerts/path.
offline_check_admin_token is not generated here. The GitLab host mints it.
Checklist
- Verified on a deployment, or the reason it was not: no deployment.
scripts/test_gen_bench_inputs.py(13 tests) runs the script, derives the required variables from the role vars and asserts, and runsansible-playbook --syntax-checkoftrack2.ymlandlab-sealed-check.ymlwith the generated vars. yamllint and ansible-lint pass on the touched role. - Runbook and README updated if a step, variable or default changed:
AGENTS.mdanddocs/runbook/tracks/quadlet.md. - No secrets, hostnames or account IDs committed; certs stay in the git-ignored
certs/. - Release and service image pins changed in
ansible/group_vars/all/versions.yml: none changed.