LXDRunner: Emphemeral self-hosted runners for GitHub Actions and LXD

Announcing this here as it may be of interest to GitHub/LXD users.

LXDRunner is an experimental server to automatically dispatch self-hosted runners for Github Actions using LXD.

For those not familiar Github Actions is their own CI/CD service which is either hosted by Github or self-hosted using their runner client. This hooks LXD into that, providing pristine ephemeral workers for every job without intervention.

Its a bit rough but already usable and making good use of it running matrix builds in containers and VMs. There are various issues to resolve, check the TODO list if interested.

1 Like


I’ve been looking into this a bit in the past and considered any real work on this to be effectively blocked by https://github.com/actions/runner/issues/510 as without a reliable way to have the runner consume only a single job, we’d run the risk of a second job being partly consumed by the runner causing random failures.

Isn’t that also a problem with your approach?

Probably as Im also using the --once flag and came across that ticket. But I have yet to confirm it as the majority of my failures have been due provisioning (shell setup script, error handling etc). According to issue they are working on it so I am hopeful it will be fixed at some point.

Guess I should come up a with a test case to reproduce it, see how it works and see if it can be worked around. A large queue of jobs with max_workers=1 should do it.

There are some k8s, and docker projects also using the --once flag so need to investigate.

The runner client is also open so might be worth poking around to see if anything could be done from that end: