Nomad is an orchestration tool for deploying and managing applications. It is flexible and can run either containerized or non-containerized workloads.
In these getting started guides, you will learn about Nomad's core capabilities by installing and running a local Nomad cluster.
You can install Nomad to your local machine or you can use a pre-built Vagrant environment to run the steps in this tutorial. Choose one of the following ways of installing Nomad, follow the steps, and then continue to "Verify the installation."
»Local install
Nomad is available as a pre-compiled binary or as a package for several operating systems.
To simplify the getting started experience, you can download a precompiled binary and run it on your machine locally.
After downloading Nomad, unzip the package. Make sure that the nomad
binary
is available on your PATH
, before continuing with the other guides.
You can inspect the locations available on your path by running this command.
The output is a list of locations separated by colons. You can make Nomad
available by moving the binary to one of the listed locations, or by adding
Nomad's location to your PATH
.
Tip (Linux-based or Mac): 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 Consul
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.
Tip (Windows): Add a location to your path via the GUI by navigating to
Environment Variables
in your system settings, and looking for the variable
called PATH
. You should see a semicolon-separated list of locations. Add the
Consul binary's location to that list and then launch a new console window.
»Use Vagrant
You can use a Vagrant to set up a development environment for Nomad. Vagrant is a tool for building and managing virtual machine environments.
NOTE: To use the Vagrant environment, first install Vagrant following these instructions. You also need a virtualization tool, such as VirtualBox.
You can download a Vagrantfile which starts a small Nomad cluster. First create a new directory for your Vagrant environment.
Change into the directory you made with the previous command.
Now you can get the Nomad installation configuration.
Now that you have created a new directory and downloaded the Vagrantfile
you must create the virtual machine with the vagrant up
command.
This takes a few minutes as the base Ubuntu box must be downloaded and provisioned with both Docker and Nomad. Once this completes, you should see this output.
At this point the Vagrant box is running and ready to use. Once the Vagrant box
is running, use the vagrant ssh
command to start a shell session on it.
If you connect to the virtual machine properly, you should find yourself at a
shell prompt for vagrant@nomad:~$
»Verify the installation
To verify Nomad was installed correctly, try the nomad
command.
You should see help output similar to the following.
»Next steps
In this tutorial you installed Nomad on your local machine. Continue to the next guide where you will be introduced to some of the critical vocabulary related to Nomad.