docs: add decision record and runbook for the CI runner VM
Secret Scan / Betterleaks (pull_request) Successful in 6s
Deploy Proxmox Infra / Pulumi Deploy (pull_request) Skipped
Deploy Proxmox Infra / Pulumi Preview (pull_request) Successful in 46s

This commit is contained in:
kasun committed 2026-12-04 18:45:11 +01:00
1 parent 7586d8af31
commit 6108d6dbf5
3 files changed
+56 -1

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
# CI runner VM: first-time setup
The `runner` VM is defined in `01-proxmox-infra`. For the design, see [decision 0002](../decisions/0002-ci-runner-on-a-vm.md). Do this once, before the first deploy that creates the VM.
1. On the Ansible node, create a key that is used only for the runner VM:
```bash
ssh-keygen -t ed25519 -f ~/.ssh/runner_vm -C ansible-runner-vm
```
2. Set the config from the repo root, then commit and push it in the private config repo:
```bash
cd 01-proxmox-infra
pulumi config set --secret runnerIp <free IP outside the DHCP pool>
pulumi config set --secret runnerAnsibleSshPublicKey "$(cat runner_vm.pub)" # copy of ~/.ssh/runner_vm.pub from the Ansible node
```
3. Deploy `01-proxmox-infra`. Pulumi creates the pfSense DHCP reservation and the VM.
4. Check that the Ansible node can log in: `ssh -i ~/.ssh/runner_vm ubuntu@<runnerIp>`.
5. Install and register act_runner with the runner playbook in the Ansible repo. The playbook asks for a registration token: create one in Gitea, then reset it right after registering.
## Revoke access
To lock the Ansible node out of the runner VM, remove its key from `~ubuntu/.ssh/authorized_keys` on the VM. Changing the config alone isn't enough, because cloud-init only applies keys on the first boot.