This article explains how to install the VM runner on Linux. The VM runner is packaged as a minimal Docker image distributed on DockerHub.
Drivers
This runner provides support for multiple drivers, please see the links at the bottom of the page or the section drivers for their specific setup information.
By default we use the Amazon ec2 driver.
Download
Install Docker and pull the public image:
|
|
Configuration
The VM runner can be configured using environment variables. This article references the below configuration options. See Reference for a complete list of configuration options.
-
- DRONE_RPC_HOST
- provides the hostname (and optional port) of your Drone server. The runner connects to the server at the host address to receive pipelines for execution.
-
- DRONE_RPC_PROTO
- provides the protocol used to connect to your Drone server. The value must be either http or https.
-
- DRONE_RPC_SECRET
- provides the shared secret used to authenticate with your Drone server. This must match the secret defined in your Drone server configuration.
-
- DRONE_MIN_POOL_SIZE (optional)
- provides the minimum size of the pool. The pool will not shrink below this size. The default is 1.
-
- DRONE_MAX_POOL_SIZE (optional)
- provides the maximum size of the pool. The pool will not grow above this size. The default is 2.
-
- DRONE_ENABLE_AUTO_POOL (optional)
- runner will attempt to match your pipeline to a pool based on its OS information. pool name does not need to be set in pipeline. The default is false.
Amazon EC2 prerequisites
By default the runner requires two additional Amazon specific environment variables. For more information look at the amazon specific configuration options for Amazon
-
- AWS_ACCESS_KEY_ID
- provides the access key id for your AWS account. This must have permissions to create and run EC2 instances.
-
- AWS_SECRET_ACCESS_KEY
- provides the secret access key for your AWS account. aws secret.
-
- AWS_DEFAULT_REGION (optional)
- provides the default region for your AWS account. Defaults to us-east-2.
Installation
|
|
This will start 2 Ubuntu instances in the us-east-2 region in a pool called “testpool”.
Verification
Use the docker logs command to view the logs and verify the runner successfully established a connection with the Drone server.
|
|
If the runner is unable to create an instance in Amazon, we have a setup command to help check the AWS configuration, see Amazon Setup.
Advanced Configuration
For more information on advanced runner configuration options, see Reference.
For more information on advanced pool configuration options, see Pool.
More information on using the Amazon driver.
More information on using the Anka driver.
More information on using the Azure driver.
More information on using the Digital Ocean driver.
More information on using the Google driver.