Drone

Autoprovision a disposable VM

Hi
I want to be able to run integration tests against an active docker-compose stack in drone.
I want these tests to get their own VM so that the teardown is simple and the environment completely isolated.
I want drone to automatically provision a VM or atleast get a disposable VM to start a docker-compose stack in.

Any ideas on making this work? Is it doable given existing features?

I’ve tried “build” and “up” my docker-compose stack. It works.
But it needs the docker socket from the host and that means I need to manually cleanup the environment. This is not a safe way to things.

  image: docker/compose:debian-1.25.4

I’ve seen this but it’s empty.

You can use the Digital Ocean runner for this [1]

The Digital Ocean runner executes a build pipeline on a dedicated virtual machine using the SSH protocol. The virtual machine is created for each pipeline execution and terminated upon completion.

There are plans to create an AWS runner and a Virtual Box runner but those projects will not be started until the second half of the year at the earliest, due to lack of time and priority.

[1] https://docs.drone.io/runner/digitalocean/overview/

Okey. Interesting. Does this rely on anything specific to Digital Ocean? Can this runner be used on any good ol’ linux machine? Does it use a specific VM technology?