Configuration Reference
- AWS_ACCESS_KEY_ID
- AWS_IAM
- AWS_SECRET_ACCESS_KEY
- DRONE_AGENT_CONCURRENCY
- DRONE_AGENT_ENVIRON
- DRONE_AGENT_ENV_FILE
- DRONE_AGENT_IMAGE
- DRONE_AGENT_LABELS
- DRONE_AGENT_TOKEN
- DRONE_AGENT_VOLUMES
- DRONE_AMAZON_DEVICE_NAME
- DRONE_AMAZON_IAM_PROFILE_ARN
- DRONE_AMAZON_IMAGE
- DRONE_AMAZON_INSTANCE
- DRONE_AMAZON_PRIVATE_IP
- DRONE_AMAZON_REGION
- DRONE_AMAZON_RETRIES
- DRONE_AMAZON_SECURITY_GROUP
- DRONE_AMAZON_SSHKEY
- DRONE_AMAZON_SUBNET_ID
- DRONE_AMAZON_TAGS
- DRONE_AMAZON_VOLUME_SIZE
- DRONE_AMAZON_VOLUME_TYPE
- DRONE_AMAZON_VOLUME_TYPE
- DRONE_CAPACITY_BUFFER
- DRONE_DATABASE_DATASOURCE
- DRONE_DATABASE_DRIVER
- DRONE_DIGITALOCEAN_REGION
- DRONE_DIGITALOCEAN_SIZE
- DRONE_DIGITALOCEAN_SSHKEY
- DRONE_DIGITALOCEAN_TAGS
- DRONE_DIGITALOCEAN_TOKEN
- DRONE_GOOGLE_DISK_SIZE
- DRONE_GOOGLE_DISK_TYPE
- DRONE_GOOGLE_LABELS
- DRONE_GOOGLE_MACHINE_IMAGE
- DRONE_GOOGLE_MACHINE_TYPE
- DRONE_GOOGLE_NETWORK
- DRONE_GOOGLE_PRIVATE_IP
- DRONE_GOOGLE_PROJECT
- DRONE_GOOGLE_SCOPES
- DRONE_GOOGLE_USERDATA
- DRONE_GOOGLE_USERDATA_FILE
- DRONE_GOOGLE_ZONE
- DRONE_HETZNERCLOUD_DATACENTER
- DRONE_HETZNERCLOUD_IMAGE
- DRONE_HETZNERCLOUD_SSHKEY
- DRONE_HETZNERCLOUD_TOKEN
- DRONE_HETZNERCLOUD_TYPE
- DRONE_HETZNERCLOUD_USERDATA
- DRONE_HETZNERCLOUD_USERDATA_FILE
- DRONE_HTTP_HOST
- DRONE_HTTP_PORT
- DRONE_INTERVAL
- DRONE_LOGS_COLOR
- DRONE_LOGS_DEBUG
- DRONE_LOGS_PRETTY
- DRONE_POOL_MAX
- DRONE_POOL_MIN
- DRONE_POOL_MIN_AGE
- DRONE_PROMETHEUS_TOKEN
- DRONE_SERVER_HOST
- DRONE_SERVER_PROTO
- DRONE_SERVER_TOKEN
- DRONE_SLACK_WEBHOOK
- DRONE_TLS_AUTOCERT
- DRONE_TLS_CERT
- DRONE_TLS_KEY
The following is the list of configuration parameters:
AWS_ACCESS_KEY_ID
A string field, provides the amazon driver with your access key security credentials.AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_IAM
A boolean field, indicates the amazon driver should use IAM for authorization. The default value isfalse
.AWS_IAM=true
AWS_SECRET_ACCESS_KEY
A string field, provides the amazon driver with your secret access key security credentials.AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
DRONE_AGENT_CONCURRENCY
An integer field, configures the maximum number of pipelines an agent can concurrently execute.DRONE_AGENT_CONCURRENCY=2
DRONE_AGENT_ENVIRON
Optional string map. Provides a set of environment variables that are used to configure the agent.DRONE_AGENT_ENVIRON=foo:bar,baz:qux
DRONE_AGENT_ENV_FILE
Optional string. Provides a path to an environment file containing environment variables used to configure the agent.DRONE_AGENT_ENV_FILE=/path/to/file.env
The environment file is a text file that defines environment variables in key value format. Please see the envfile documentation for more details about the file format.S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHEREDRONE_AGENT_IMAGE
A string field, configures the agent Docker image. The agent is a daemon that polls the central Drone server for tasks. When the autoscaler provisions an instance, it installs a single agent on the instance.DRONE_AGENT_IMAGE=drone/drone-runner-docker:1
DRONE_AGENT_LABELS
Optional string map. Provides a set of labels used by the scheduler to assign the pipeline to a specific runner. Note that a pipeline is only assigned to a runner when its configuration exactly matches the pipeline labels.DRONE_AGENT_LABELS=foo:bar,baz:qux
DRONE_AGENT_TOKEN
A string containing the shared secret (DRONE_RPC_SECRET) that authorizes agent to server communication. This value is used to configure new agents.DRONE_AGENT_TOKEN=f5064039f5
DRONE_AGENT_VOLUMES
A comma-separated string array containing a list of volumes that should be used when creating the agent container.DRONE_AGENT_VOLUMES=/path/on/host:/path/in/container
DRONE_AMAZON_DEVICE_NAME
An optional string field, provides the root device name of the instance.DRONE_AMAZON_DEVICE_NAME=/dev/xvda
DRONE_AMAZON_IAM_PROFILE_ARN
An optional string field, provides the AWS IAM profile resource name to be used as the instance profile.DRONE_AMAZON_IAM_PROFILE_ARN=arn:aws:iam::123456789012:root
DRONE_AMAZON_IMAGE
A string field, provides the image (AMI) you wish to use when creating instances. Overriding this value is not recommended.DRONE_AMAZON_IMAGE=ami-66506c1c
DRONE_AMAZON_INSTANCE
A string field, provides the instance type you wish to use when provisioning instances. The default value ist2.medium
.DRONE_AMAZON_INSTANCE=t2.medium
DRONE_AMAZON_PRIVATE_IP
A boolean field, indicates instances are to be created without a public IP address. The system will store and use the private IP address.DRONE_AMAZON_PRIVATE_IP=true
DRONE_AMAZON_REGION
A string field, provides the region you wish to use when provisioning instances. The default value isus-east-1
.DRONE_AMAZON_REGION=us-east-2
DRONE_AMAZON_RETRIES
An integer field, configures the number of retries the AWS client should make before returning an error.DRONE_AMAZON_RETRIES=5
DRONE_AMAZON_SECURITY_GROUP
A string field, provides the security group identifier you wish to use when provisioning instances.DRONE_AMAZON_SECURITY_GROUP=sg-770eabe1
DRONE_AMAZON_SSHKEY
A string field, provides the name of the ssh keypair that you wish to add to the server’s authorize_keys file upon creation.DRONE_AMAZON_SSHKEY=id_rsa
DRONE_AMAZON_SUBNET_ID
A string field, provides the subnet identifier you wish to use when provisioning instances.DRONE_AMAZON_SUBNET_ID=subnet-0b32177f
DRONE_AMAZON_TAGS
A map field, provides a comma-separated list ofkey:value
pairs that you wish to associate with your instances.DRONE_AMAZON_TAGS=name:agent,owner:octocat
DRONE_AMAZON_VOLUME_SIZE
An optional integer field, provides the root disk size of the instance in gigabytes.DRONE_AMAZON_VOLUME_SIZE=50
DRONE_AMAZON_VOLUME_TYPE
An optional integer field, provides the IOPS for Amazon EBS Provisioned IOPS volumes (io1). The default value is100
.DRONE_AMAZON_VOLUME_IOPS=100
DRONE_AMAZON_VOLUME_TYPE
An optional string field, provides the Amazon EBS volume type to be attached to the instance. Default value isgp2
.DRONE_AMAZON_VOLUME_TYPE=gp2
DRONE_CAPACITY_BUFFER
Integer value configures the autoscaler to keep a minimum number of idle servers available for future workloads. The default value is zero.DRONE_CAPACITY_BUFFER=1
DRONE_DATABASE_DATASOURCE
A string value, provides the database connection string. The default value is the path of the embedded sqlite database file.DRONE_DATABASE_DATASOURCE=/data/database.sqlite
MySQL
Example mysql connection string (below). See the official driver documentation for more connection string details.DRONE_DATABASE_DATASOURCE=root:password@tcp(1.2.3.4:3306)/drone?parseTime=true
Postgres
Example postgres connection string (below). See the official driver documentation for more connection string details.DRONE_DATABASE_DATASOURCE=postgres://root:password@1.2.3.4:5432/postgres?sslmode=disable
DRONE_DATABASE_DRIVER
String literal value provides the database driver name. The default value is the sqlite3 driver. Alternate drivers are postgres and mysql.DRONE_DATABASE_DRIVER=mysql
DRONE_DATABASE_DRIVER=postgres
DRONE_DATABASE_DRIVER=sqlite3DRONE_DIGITALOCEAN_REGION
A string field, provides the region you wish to use when creating instances. The default value isnyc1
.DRONE_DIGITALOCEAN_REGION=nyc1
DRONE_DIGITALOCEAN_SIZE
A string field, specifies the size of droplets you wish to provision. The default value iss-2vcpu-4gb
.DRONE_DIGITALOCEAN_SIZE=s-2vcpu-4gb
DRONE_DIGITALOCEAN_SSHKEY
A string field, provides the fingerprint of the ssh keypair that you wish to add to the server’s authorize_keys file upon creation.DRONE_DIGITALOCEAN_SSHKEY=3b:16:bf:e4:8b:00:8b:b8:59:8c:a9
DRONE_DIGITALOCEAN_TAGS
A string field, provides a comma-separated list of tags you wish to use when creating instances.DRONE_DIGITALOCEAN_TAGS=drone,agent
DRONE_DIGITALOCEAN_TOKEN
A string field, provides your personal authorization token used to authorize requests to the Digital Ocean API.DRONE_DIGITALOCEAN_TOKEN=docker-16-04
DRONE_GOOGLE_DISK_SIZE
An optional integer value, specifies the size of the disk in base-2 GB used when creating new instances.DRONE_GOOGLE_DISK_SIZE=25
DRONE_GOOGLE_DISK_TYPE
An optional string value, specifies the type of disk used when creating new instances.DRONE_GOOGLE_DISK_TYPE=pb-standard
DRONE_GOOGLE_DISK_TYPE=local-ssdDRONE_GOOGLE_LABELS
A map value, provides the metadata labels you wish to apply to the instance.DRONE_GOOGLE_LABELS=name:agent,owner:octocat
DRONE_GOOGLE_MACHINE_IMAGE
An optional string value, provides the machine image you wish to use when creating instances. This must be the fully qualified image path.DRONE_GOOGLE_MACHINE_IMAGE=ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20170721
DRONE_GOOGLE_MACHINE_TYPE
An optional string value, provides the machine type you wish to use when creating instances. Overriding this value is not recommended.DRONE_GOOGLE_MACHINE_TYPE=n1-standard-1
DRONE_GOOGLE_NETWORK
An optional string value, provides the vpc network you wish to use when creating instances.DRONE_GOOGLE_NETWORK=global/networks/default
DRONE_GOOGLE_PRIVATE_IP
A boolean field, indicates instances are to be created without a public IP address. The system will store and use the private IP address.DRONE_GOOGLE_PRIVATE_IP=true
DRONE_GOOGLE_PROJECT
A required string value, provides the unique identifier for your project.DRONE_GOOGLE_PROJECT=my-project
DRONE_GOOGLE_SCOPES
An optional comma-separate string, provides the list of scopes to be made available to newly created instances.DRONE_GOOGLE_USERDATA
An optional string value, provides a custom cloud-init script. This is an advanced feature and should not be customized without consulting the documentation.DRONE_GOOGLE_USERDATA_FILE
An optional string value, provides the path to a custom cloud-init script. This is an advanced feature and should not be customized without consulting the documentation.DRONE_GOOGLE_USERDATA_FILE=/path/to/cloud-init.yml
DRONE_GOOGLE_ZONE
An optional string value, specifies the zone in which instances are created.DRONE_GOOGLE_ZONE=us-central1-a
DRONE_HETZNERCLOUD_DATACENTER
A string field, specifies the datacenter in which instances are created. The default value isnbg1-dc3
.DRONE_HETZNERCLOUD_DATACENTER=nbg1-dc3
DRONE_HETZNERCLOUD_IMAGE
An string value, provides the server image you wish to use when creating instances. Overriding this value is not recommended.DRONE_HETZNERCLOUD_IMAGE=ubuntu-16.04
DRONE_HETZNERCLOUD_SSHKEY
An integer field, specifies the sshkey you wish to add to your instances.DRONE_HETZNERCLOUD_SSHKEY=2323
DRONE_HETZNERCLOUD_TOKEN
A string field, provides your personal authorization token used to authorize requests to the Hetzner Cloud API.DRONE_HETZNERCLOUD_TOKEN=LRK9DAWQ1ZAEFSrCNEEzLCUwhYX1U3g
DRONE_HETZNERCLOUD_TYPE
A string field, specifies the size of instances you wish to provision. The default value iscx11
.DRONE_HETZNERCLOUD_TYPE=cx11
DRONE_HETZNERCLOUD_USERDATA
An optional string value, provides a custom cloud-init script. This is an advanced feature and should not be customized without consulting the documentation.DRONE_HETZNERCLOUD_USERDATA_FILE
An optional string value, provides the path to a custom cloud-init script. This is an advanced feature and should not be customized without consulting the documentation.DRONE_HETZNERCLOUD_USERDATA_FILE=/path/to/cloud-init.yml
DRONE_HTTP_HOST
Defines the hostname or address of the autoscale API server. This configuration parameter is of typestring
and is optional.DRONE_HTTP_HOST=localhost
DRONE_HTTP_PORT
The port on which the autoscale API server listens for http requests. This configuration parameter is of typestring
and is required, with a default value of:8080
. Changing the default is not recommended.DRONE_HTTP_PORT=:8080
DRONE_INTERVAL
The interval at which the autoscaler algorithm is run. This configuration parameter is of type time.Duration and is optional, with a default value of 1 minute.DRONE_INTERVAL=1h
DRONE_INTERVAL=1m
DRONE_INTERVAL=60s
DRONE_INTERVAL=30sDRONE_LOGS_COLOR
Enables color formatting of the logs; used in conjunction with pretty printed logs. This configuration parameter is of typeboolean
and is optional.DRONE_LOGS_COLOR=true
DRONE_LOGS_COLOR=falseDRONE_LOGS_DEBUG
Enables debug logging. This configuration parameter is of typeboolean
and is optional.DRONE_LOGS_DEBUG=true
DRONE_LOGS_DEBUG=falseDRONE_LOGS_PRETTY
Enables human-readable logs as an alternate to the default json format. This configuration parameter is of typeboolean
and is optional.DRONE_LOGS_PRETTY=true
DRONE_LOGS_PRETTY=falseDRONE_POOL_MAX
Defines the maximum number of physical servers that the autoscaler can provision. This configuration parameter is of typeint
and is required, with a default value of 4 servers.DRONE_POOL_MAX=4
DRONE_POOL_MIN
Defines the minimum number of physical servers that the autoscaler must keep alive. This configuration parameter is of typeint
and is required, with a default value of 2 servers.DRONE_POOL_MIN=2
DRONE_POOL_MIN_AGE
Defines the minimum age a server must reach before it can be terminated. This configuration parameter is of typetime.Duration
and is required, with a default value of 1 hour.DRONE_POOL_MIN_AGE=24h
DRONE_POOL_MIN_AGE=60m
DRONE_POOL_MIN_AGE=30m
DRONE_POOL_MIN_AGE=15mDRONE_PROMETHEUS_TOKEN
Restricts access to the prometheus/metrics
endpoint and requires authentication using the provided token. If the token is empty or is not set, the prometheus endpoint allows guest access. This configuration parameter is of typestring
and is optional.DRONE_PROMETHEUS_TOKEN=b359e05e8
DRONE_SERVER_HOST
Provides the hostnames of your drone server installation. This configuration parameter is of typestring
and must be a valid hostname or ip address.DRONE_SERVER_HOST=company.drone.com
DRONE_SERVER_HOST=company.drone.com:8080
DRONE_SERVER_HOST=1.2.3.4
DRONE_SERVER_HOST=1.2.3.4:8080DRONE_SERVER_PROTO
Provides the protocol that should be used to access your drone server installation. This configuration parameter is of typestring
and must be either http or https.DRONE_SERVER_PROTO=http
DRONE_SERVER_PROTO=httpsDRONE_SERVER_TOKEN
Provides an access token that can be used to authorize access to your drone server installation. This parameter is of typestring
and is required.DRONE_SERVER_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
DRONE_SLACK_WEBHOOK
Enables Slack notifications when server instances are provisioned or destroyed. This configuration parameter is of typeURL
and is optional.DRONE_SLACK_WEBHOOK=https://hooks.slack.com/services/XXX/YYY/ZZZ
DRONE_TLS_AUTOCERT
Automatically generates an SSL certificate using Lets Encrypt, and configures the API server to accept HTTPS requests. This configuration parameter is of typeboolean
and is optional, and is disabled by default.DRONE_TLS_AUTOCERT=false
DRONE_TLS_AUTOCERT=trueDRONE_TLS_CERT
Path to an SSL certificate used by the autoscale server API to accept HTTPS requests. This configuration parameter is of typestring
and is optional.
Please note that the cert file should be the concatenation of the server’s certificate, any intermediates, and the certificate authority’s certificate.DRONE_TLS_CERT=/path/to/cert.pem
DRONE_TLS_KEY
Path to an SSL certificate key used by the autoscale server API to accept HTTPS requests. This configuration parameter is of typestring
and is optional.DRONE_TLS_KEY=/path/to/key.pem