Nomad
Installing Nomad
Nomad is available as a pre-compiled binary or as a package for several operating systems. You can also build Nomad from source.
If you are interested in trialing Nomad without installing it locally, see the Quickstart for options to get started with Nomad.
You can download a precompiled binary and
run it on your machine locally. You can also verify the binary using the
available SHA-256 sums. After downloading Nomad, unzip the package. Make sure
that the nomad binary is available on your PATH before continuing with the
other guides.
Post-installation steps
These steps are considered optional but can be helpful for running Nomad and to take advantage of additional Nomad functionalities.
Add the Nomad binary to your system path
Permanently add a new location to your path by editing your shell's settings
file (usually called something like ~/.bashrc, where the part of the filename
after the . and before rc is the name of your shell). In that file you
should see a line that starts with export PATH=, followed by a
colon-separated list of locations. Add the location of the Nomad binary to that
list and save the file. Then reload your shell's configuration with the command
source ~/.bashrc, replacing bash with the name of your shell.
Install CNI plugins
Nomad uses CNI plugins to configure network namespaces when using the bridge
network mode. All Linux Nomad client nodes using network namespaces must have
CNI plugins installed.
The following commands install the CNI reference plugins.
$ curl -L -o cni-plugins.tgz "https://github.com/containernetworking/plugins/releases/download/v1.0.0/cni-plugins-linux-$( [ $(uname -m) = aarch64 ] && echo arm64 || echo amd64)"-v1.0.0.tgz && \
  sudo mkdir -p /opt/cni/bin && \
  sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz
Ensure your Linux operating system distribution has been configured to allow container traffic through the bridge network to be routed via iptables. These tunables can be set as follows.
$ echo 1 | sudo tee /proc/sys/net/bridge/bridge-nf-call-arptables && \
  echo 1 | sudo tee /proc/sys/net/bridge/bridge-nf-call-ip6tables && \
  echo 1 | sudo tee /proc/sys/net/bridge/bridge-nf-call-iptables
To preserve these settings on startup of a client node, add a file including the
following to /etc/sysctl.d/ or remove the file your Linux distribution puts in
that directory.
/etc/sysctl.d/bridge.conf
net.bridge.bridge-nf-call-arptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
Verify the Installation
To verify Nomad was installed correctly, try the nomad command.
$ nomad
You should see help output, similar to the following.
Usage: nomad [-version] [-help] [-autocomplete-(un)install] <command> [args]
Common commands:
    run         Run a new job or update an existing job
    stop        Stop a running job
    status      Display the status output for a resource
    alloc       Interact with allocations
    job         Interact with jobs
    node        Interact with nodes
    agent       Runs a Nomad agent
Other commands:
    acl             Interact with ACL policies and tokens
    agent-info      Display status information about the local agent
    deployment      Interact with deployments
    eval            Interact with evaluations
    exec            Execute commands in task
    monitor         Stream logs from a Nomad agent
    namespace       Interact with namespaces
    operator        Provides cluster-level tools for Nomad operators
    quota           Interact with quotas
    sentinel        Interact with Sentinel policies
    server          Interact with servers
    system          Interact with the system API
    ui              Open the Nomad Web UI
    version         Prints the Nomad version
Compiling from Source
To compile from source, you will need Go installed and
configured properly (including a GOPATH environment variable set), as well
as a copy of git in your PATH.
Clone the Nomad repository from GitHub into your
GOPATH:$ mkdir -p $GOPATH/src/github.com/hashicorp && cd $_ $ git clone https://github.com/hashicorp/nomad.git $ cd nomadBootstrap the project. This will download and compile libraries and tools needed to compile Nomad:
$ make bootstrapBuild Nomad for your current system and put the binary in
./bin/(relative to the git checkout). Themake devtarget is just a shortcut that buildsnomadfor only your local build environment (no cross-compiled targets).$ make dev