harness: OpenBao on test-01..03 like c1; harness OpenBao configured from vault/sim #34

Merged
ginjiruu merged 6 commits from harness-openbao into main 2026-11-16 01:39:56 +00:00
Owner

The lab now runs OpenBao the way c1 does, and configures every OpenBao it uses from the same Terraform module as production.

OpenBao on test-01..03

  • modules/openbao-think.nix gains options for the lab:

    • sealToken: yubikey (the default) or softhsm
    • rootCaFile
    • apiCertFile

    The defaults are the thinks' values. think-01 and think-02 build byte-identical before and after this change.

  • modules/profiles/harness.nix imports the module with SoftHSM. The unit stays off until the node has been provisioned.

  • scripts/harness-openbao-cluster.sh:

    • creates a SoftHSM token and PIN on each node, with one seal key on all three
    • makes the API key on each host and has the throwaway pki-infra sign it (harness-ceremony.sh server)
    • initialises on test-01, then waits for three unsealed Raft voters
    • configure applies lab/iac vault/sim through a tunnel.
  • task vm:openbao-cluster-check runs in vm:e2e after the cluster check. It restarts one node, which must unseal itself, and stops another, so the remaining two must keep serving.

Harness OpenBao configured from code

harness-bao.sh applies lab/iac vault/sim instead of running hand-written bao commands. That root uses the production contract module (vault/modules/openbao-platform) with lab values. Running up a second time applies no changes.

Fixes

  • k3s-reset.sh checked each node's OpenBao from the operator's machine, which may not be able to reach the node's address. It now asks each node over SSH.
  • New k3s-rejoin-dropin-check: a timer, an hour after boot and hourly after that, that fails visibly if a k3s-reset --node rejoin drop-in was left behind. It isn't part of node-health, so it never rolls a generation back. vm:reset-check covers both outcomes.
  • lab:destroy now removes .vm/bedrock.

Tested

The full vm:e2e passes on c6a23f5. vm:watchdog-check failed once: the VM reset without the soft-lockup panic, and the same boot logged clocksource: Watchdog remote CPU 1 read timed out. That looks like the host starving the VM, not this change. The stage passed on rerun, along with vm:reboot-check and vm:reset-check, and it passed in three earlier full runs.

The lab now runs OpenBao the way c1 does, and configures every OpenBao it uses from the same Terraform module as production. ## OpenBao on test-01..03 - `modules/openbao-think.nix` gains options for the lab: - `sealToken`: `yubikey` (the default) or `softhsm` - `rootCaFile` - `apiCertFile` The defaults are the thinks' values. think-01 and think-02 build byte-identical before and after this change. - `modules/profiles/harness.nix` imports the module with SoftHSM. The unit stays off until the node has been provisioned. - `scripts/harness-openbao-cluster.sh`: - creates a SoftHSM token and PIN on each node, with one seal key on all three - makes the API key on each host and has the throwaway pki-infra sign it (`harness-ceremony.sh server`) - initialises on test-01, then waits for three unsealed Raft voters - `configure` applies lab/iac `vault/sim` through a tunnel. - `task vm:openbao-cluster-check` runs in `vm:e2e` after the cluster check. It restarts one node, which must unseal itself, and stops another, so the remaining two must keep serving. ## Harness OpenBao configured from code `harness-bao.sh` applies lab/iac `vault/sim` instead of running hand-written `bao` commands. That root uses the production contract module (`vault/modules/openbao-platform`) with lab values. Running `up` a second time applies no changes. ## Fixes - `k3s-reset.sh` checked each node's OpenBao from the operator's machine, which may not be able to reach the node's address. It now asks each node over SSH. - New `k3s-rejoin-dropin-check`: a timer, an hour after boot and hourly after that, that fails visibly if a `k3s-reset --node` rejoin drop-in was left behind. It isn't part of node-health, so it never rolls a generation back. `vm:reset-check` covers both outcomes. - `lab:destroy` now removes `.vm/bedrock`. ## Tested The full `vm:e2e` passes on c6a23f5. `vm:watchdog-check` failed once: the VM reset without the soft-lockup panic, and the same boot logged `clocksource: Watchdog remote CPU 1 read timed out`. That looks like the host starving the VM, not this change. The stage passed on rerun, along with `vm:reboot-check` and `vm:reset-check`, and it passed in three earlier full runs.
ginjiruu deleted branch harness-openbao 2026-11-16 01:39:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/machine-configs!34
No description provided.