Version 1.0.0
Language EN

Linux Amd64

The goal of this document is to give you enough technical specifics to configure and run one or many agents. The agent requests builds from the central server, allowing you to scale your CI/CD infrastructure across multiple machines, operating systems and architectures. You should install one agent per-server.

Download the Agent

The Drone agent is distributed as a lightweight Docker image. The image is self-contained and does not have any external dependencies.

docker pull drone/agent:1.0.0-rc.1

Start the Agent

The agent container can be started with the below command. The container is configured through environment variables.

$ docker run \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --env=DRONE_RPC_SERVER=${DRONE_RPC_SERVER} \
  --env=DRONE_RPC_SECRET=${DRONE_RPC_SECRET} \
  --env=DRONE_RUNNER_CAPACITY=2 \
  --env=DRONE_RUNNER_NAME=${HOSTNAME} \
  --restart=always \
  --detach=true \
  --name=agent \
  drone/agent:1.0.0-rc.1

Agent Reference

This section provides additional explanation of the configuration variables used earlier in this document. This represents a subset of configuration parameters. Please see the configuration reference for a complete list.

DRONE_RPC_SERVER

Required string literal value provides your drone server address. The string must be a valid url, and should omit the trailing slash.

DRONE_RPC_SERVER=http://drone.company.com

DRONE_RPC_SECRET

Required string literal value provides the drone shared secret. This is used to authenticate the rpc connection to the server. The server and agent must be provided the same secret value.

DRONE_RPC_SECRET=9c3921e3e748aff725d2e16ef31fbc42

DRONE_RUNNER_NAME

Optional string literal value defines the machine name. The machine name is stored for each build, allowing you to identify the server on which a build executed. Defaults to the container HOSTNAME.

DRONE_RUNNER_NAME=ec2-203-0-113-25.compute-1.amazonaws.com

DRONE_RUNNER_CAPACITY

An integer defining the maximum number of pipelines the agent should execute concurrently. The default value is two pipelines.

DRONE_RUNNER_CAPACITY=2

Docker Reference

Volumes

The agent requires access to your host machine Docker socket. This is used to launch pipelines in Docker containers on the host machine.

--volume=/var/run/docker.sock:/var/run/docker.sock

On This Page:

Getting Help

Mailing List
Search for information in the mailing list archives, or post a question.
Chat Support
Real-time chat support from maintainers and community members.