The goal of this document is to give you enough technical specifics to configure and run the autoscaler. When properly configured, it will automatically provision and terminate Hetzner Cloud instances based on your Drone server’s build volume.
Create a Drone Token
You need to create a Drone user token with administrative privilege that you can provide to the autoscaler. The autoscaler will use this token to remotely access the Drone build queue. If you do not know how to create a token please see our tutorial.
Create a Hetzner Token
You need to create a Hetzner token that you can provide to the autoscaler. The autoscaler will use the token to authorize API requests.
Create an SSH Keypair
You need to create an SSH keypair and register with Hetzner. The autoscaler will use the SSH private key for remote login and access to your droplets.
The autoscaler is distributed as a lightweight Docker image. The image is self-contained and does not have any external requirements.
docker pull drone/autoscaler
Start the Server
The autoscaler container can be started with the below command. The container is configured through environment variables. For a full list of configuration parameters, please see the configuration reference.
Configuration parameters are set using environment variables. This section defines a subset of recommended configuration parameters. For a full list, please see our configuration reference.
An integer defining the minimum number of instances the autoscaler should keep alive. The default value is two instances.
An integer defining the maximum number of instances the autoscaler can provision. The default value is four instances.
A string containing your Drone server protocol scheme. This value should be set to http or https.
A string containing your Drone server hostname or IP address.
A string containing your Drone user token. This token must grant administrative access to your Drone server.
An integer defining the maximum number of concurrent builds an agent can execute. This value is used to configure new agents.
A string containing the shared secret (DRONE_RPC_SECRET) that authorizes agent to server communication. This value is used to configure new agents.
The autoscaler exposes REST endpoints so that you can extract runtime information from the system. The autoscaler listens on port 8080 inside the container, and should be published on the host machine:
The autoscaler creates a sqlite database and persists to a container volume at
/data. To prevent dataloss, we recommend mounting the data volume to the host machine.