Configure drone runner to use instance store volumes on AWS

Hi.

If we’re using drone-autoscaler on aws, and our instances have local instance store volumes, is there any way to configure drone to use that as a workspace for the build?

EBS volumes run out of burst performance credits for us.

The volume itself is present, but not formatted or mounted, so we can’t just update our pipelines to use it.

root@ip-10-110-10-252:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:1 0 55G 0 disk
└─nvme0n1p1 259:2 0 55G 0 part /
nvme1n1 259:0 0 139.7G 0 disk

nvme0n1 in this output is the EBS root volume, and nvme1n1 is the instance store volume we would like to use

The drone workspace is a temporary docker volume, and docker stores temporary volumes in /var/lib/docker/volumes. I believe you can configure the docker daemon to change its storage location using the data-root parameter, but that is something you will need to research and test, since this is not something I’ve personally done before.

In order to change the docker daemon configuration for instances created by the autoscaler, you would need to provide a custom cloud-init file that creates a custom /etc/docker/daemon.json file, similar to what is shown here.

1 Like