Public Repository

Last pushed: a year ago
Short Description
Containerized version of Hashicorp's Nomad.
Full Description

To run a server nomad instance

docker run                        \
  -d                              \
  --name nomad                    \
  --net host                      \
  -v /root/server.hcl:/server.hcl \
  -v /var/nomad:/data:rw          \
  greyrhino/nomad:jessie-0.3.1    \
    agent                         \
    -config /server.hcl

This requires a configuration file to exist in the local directory called server.hcl with content like the following (ip addresses will be specific to your setup and the below assumes there to be three nomad server nodes):

bind_addr = "0.0.0.0"
data_dir = "/var/nomad"

advertise {
  rpc = "10.2.1.1:4647"
}

server {
  enabled = true
  bootstrap_expect = 3
  start_join = [
    "10.2.1.1",
    "10.2.1.2",
    "10.2.1.3",
  ]
}

To run an agent nomad instance

docker run                      \
  -d                            \
  --name nomad                  \
  --net host                    \
  -v /root/agent.hcl:/agent.hcl \
  -v /var/nomad:/data:rw        \
  greyrhino/nomad:jessie-0.3.1  \
    agent                       \
    -config /agent.hcl

This requires a configuration file to exist in the local directory called agent.hcl with content like the following (ip addresses will be specific to your setup and the below assumes there to be three nomad server nodes which the agent can connect to):

bind_addr = "0.0.0.0"
data_dir = "/var/nomad"

advertise {
  rpc = "10.2.2.1:4647"
}

client {
  enabled = true
  network_speed = 10
  options {
    "driver.raw_exec.enable" = "1"
  }
  servers = [
  "10.2.1.1",
  "10.2.1.2",
  "10.2.1.3",
  ]
}

To check the nomad cluster:

Servers:

docker exec nomad nomad server-members

Agents:

docker exec nomad nomad node-status

Docker Pull Command
Owner
greyrhino

Comments (0)