deploying github self-hosted runner?

wez

New Member
Apr 2, 2024
2
0
1
I'd like to use proxmox to deploy the github self-hosted runner application in ephemeral mode.

The idea is that there is a VM that boots up, registers as an ephemeral single-use runner (https://docs.github.com/en/actions/...nners#using-ephemeral-runners-for-autoscaling), then terminate and the VM is then either reset to a snapshot, or completely destroyed and re-built.

Has anyone already done something like this and are they willing to share how they've set it up? It seems to me as though I'd need to run something outside of proxmox to automate this.

I'm am completely new to proxmox, but I am willing to read docs; I would appreciate being pointed to the right docs to read!

Thanks!
 
but I am willing to read docs; I would appreciate being pointed to the right docs to read!
You can setup a VM with common Cloud-Init: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_cloud_init
You can manage VMs from the command line or API: https://pve.proxmox.com/pve-docs/pv...l_machines_with_span_class_monospaced_qm_span or https://pve.proxmox.com/pve-docs/pv...strong_shell_interface_for_the_proxmox_ve_api
You can trigger actions on VM start and stop with hookscripts: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_hookscripts
I hope this can get you started.
 
  • Like
Reactions: wez
@wez Did you ever solve this issue? We are looking to do the same thing.

I have not had good luck on PVE 8 with the hookscripts. There are a few ways that I am thinking that this could be done. You could run something on the ProxMox server itself that checks Github for Queued actions and then starts up VMs on your cluster that have the GitHub runner installed and will start in ephemeral mode. I feel like this could scale well. Just keep firing up VMs as they are needed (to a max value for your CI cluster).

Does anyone else have any thoughts or better yet, example codes or instructions?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!