This article explains how to install the Nomad. The Nomad runner is packaged as a minimal Docker image distributed on DockerHub.
Install Docker and pull the public image:
$ docker pull drone/drone-runner-nomad:latest
The Nomad runner is configured using environment variables. This article references the below configuration options. See Configuration for a complete list of configuration options.
- 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.
- provides the protocol used to connect to your Drone server. The value must be either http or https.
- provides the shared secret used to authenticate with your Drone server. This must match the secret defined in your Drone server configuration.
- provides the datacenter used when scheduling Nomad jobs. The value is optional and defaults to dc1 if unspecified.
- provides the region used when scheduling Nomad jobs.
- provides the namespace used when scheduling Nomad jobs.
- provides the Nomad token.
- the system supports all NOMAD_ client configuration parameters as defined in the Nomad client documentation.
The below command creates the a container and start the Docker runner. Remember to replace the environment variables below with your Drone server details.
$ docker run -d \ -v /var/run/docker.sock:/var/run/docker.sock \ -e DRONE_RPC_PROTO=https \ -e DRONE_RPC_HOST=drone.company.com \ -e DRONE_RPC_SECRET=super-duper-secret \ -e NOMAD_ADDR=http://nomad.company.com:4646 \ -e NOMAD_TOKEN=super-secret-token \ --restart always \ --name runner \ drone/drone-runner-nomad:latest
docker logs command to view the logs and verify the runner successfully established a connection with the Drone server.
$ docker logs runner INFO starting the server INFO successfully pinged the remote server