Files
homelab-infrastructure-as-code/docs/runbooks/ci-runner-vm.md
T
kasun 6108d6dbf5
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
docs: add decision record and runbook for the CI runner VM
2026-12-04 18:45:11 +01:00

1.3 KiB

CI runner VM: first-time setup

The runner VM is defined in 01-proxmox-infra. For the design, see decision 0002. 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:

    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:

    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.