Skip to content

Add local libvirt based provider #522

@Cyberbeni

Description

@Cyberbeni

I am currently manually launching the CI runner VM on my developer machine when I want CI pipelines to run. I will eventually want to move the VM to my low power home server and then having the option to automatically turn on and shut down the VM via this autoscaler would be nice.

The appropriate socket would be mounted to the docker container: https://libvirt.org/daemons.html#monolithic-sockets
The agent names would probably be provided through prefixed environment variables that pair them up with the registered agents:

WOODPECKER_LIBVIRT_VM_woocpecker-clang="Clang agent"
WOODPECKER_LIBVIRT_VM_woodpecker-gcc="Gcc agent"

This way we can (force) shutdown and boot up again the ones that are stuck.
It would also allow us to know which one to boot up based on the label filters in the workflow that is requesting a runner.
Some existing inputs would be unused. (like WOODPECKER_WORKFLOWS_PER_AGENT as these would be already registered agents with known capacity)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhance existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions