2015-09-12 00:01:02 +00:00
|
|
|
---
|
|
|
|
layout: "intro"
|
2015-09-17 23:33:37 +00:00
|
|
|
page_title: "Install Nomad"
|
2015-09-20 20:37:22 +00:00
|
|
|
sidebar_current: "getting-started-install"
|
2015-09-12 00:01:02 +00:00
|
|
|
description: |-
|
2015-09-17 23:33:37 +00:00
|
|
|
The first step to using Nomad is to get it installed.
|
2015-09-12 00:01:02 +00:00
|
|
|
---
|
|
|
|
|
2015-09-17 23:33:37 +00:00
|
|
|
# Install Nomad
|
2015-09-12 00:01:02 +00:00
|
|
|
|
2018-08-20 23:21:13 +00:00
|
|
|
To simplify the getting started experience, we will be working in a Vagrant
|
|
|
|
environment. Create a new directory, and download [this
|
|
|
|
`Vagrantfile`](https://raw.githubusercontent.com/hashicorp/nomad/master/demo/vagrant/Vagrantfile).
|
2015-09-12 00:01:02 +00:00
|
|
|
|
2015-09-22 22:24:01 +00:00
|
|
|
## Vagrant Setup
|
2015-09-12 00:01:02 +00:00
|
|
|
|
2016-06-21 21:43:44 +00:00
|
|
|
Note: To use the Vagrant Setup first install Vagrant following these instructions: https://www.vagrantup.com/docs/installation/
|
|
|
|
|
2015-09-22 22:24:01 +00:00
|
|
|
Once you have created a new directory and downloaded the `Vagrantfile`
|
2015-10-10 17:31:22 +00:00
|
|
|
you must create the virtual machine:
|
2015-09-12 00:01:02 +00:00
|
|
|
|
2017-11-01 18:15:44 +00:00
|
|
|
```shell
|
|
|
|
$ vagrant up
|
|
|
|
```
|
2015-09-12 00:01:02 +00:00
|
|
|
|
2015-09-22 22:24:01 +00:00
|
|
|
This will take a few minutes as the base Ubuntu box must be downloaded
|
|
|
|
and provisioned with both Docker and Nomad. Once this completes, you should
|
|
|
|
see output similar to:
|
|
|
|
|
2017-11-01 18:15:44 +00:00
|
|
|
```text
|
|
|
|
Bringing machine 'default' up with 'virtualbox' provider...
|
|
|
|
==> default: Importing base box 'bento/ubuntu-16.04'...
|
|
|
|
...
|
|
|
|
==> default: Running provisioner: docker...
|
|
|
|
|
|
|
|
```
|
2015-09-22 22:24:01 +00:00
|
|
|
|
|
|
|
At this point the Vagrant box is running and ready to go.
|
2015-09-12 00:01:02 +00:00
|
|
|
|
|
|
|
## Verifying the Installation
|
|
|
|
|
2015-09-22 22:24:01 +00:00
|
|
|
After starting the Vagrant box, verify the installation worked by connecting
|
|
|
|
to the box using SSH and checking that `nomad` is available. By executing
|
2015-09-20 20:37:22 +00:00
|
|
|
`nomad`, you should see help output similar to the following:
|
2015-09-12 00:01:02 +00:00
|
|
|
|
2017-11-01 18:15:44 +00:00
|
|
|
```shell
|
2015-09-22 22:24:01 +00:00
|
|
|
$ vagrant ssh
|
|
|
|
...
|
|
|
|
|
|
|
|
vagrant@nomad:~$ nomad
|
2018-03-22 20:39:18 +00:00
|
|
|
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
|
|
|
|
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
|
|
|
|
ui Open the Nomad Web UI
|
|
|
|
version Prints the Nomad version
|
2015-09-12 00:01:02 +00:00
|
|
|
```
|
|
|
|
|
2015-09-22 22:24:01 +00:00
|
|
|
If you get an error that Nomad could not be found, then your Vagrant box
|
2015-10-10 17:45:34 +00:00
|
|
|
may not have provisioned correctly. Check for any error messages that may have
|
2017-11-01 18:15:44 +00:00
|
|
|
been emitted during `vagrant up`. You can always [destroy the box][destroy] and
|
2015-09-22 22:24:01 +00:00
|
|
|
re-create it.
|
2015-09-12 00:01:02 +00:00
|
|
|
|
2015-09-22 22:57:12 +00:00
|
|
|
## Next Steps
|
|
|
|
|
|
|
|
Vagrant is running and Nomad is installed. Let's [start Nomad](/intro/getting-started/running.html)!
|
|
|
|
|
2017-11-01 18:15:44 +00:00
|
|
|
[destroy]: https://www.vagrantup.com/docs/cli/destroy.html
|