2015-12-02 19:33:44 +00:00
|
|
|
# Dist
|
|
|
|
|
|
|
|
The `dist` folder contains sample configs for various platforms.
|
|
|
|
|
2015-12-03 07:18:10 +00:00
|
|
|
## Conventions
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
On unixes we will place agent configs under `/etc/nomad.d` and store
|
|
|
|
data under `/var/lib/nomad/`. You will need to create both of these
|
|
|
|
directories. We assume that `nomad` is installed to
|
|
|
|
`/usr/local/bin/nomad`.
|
2015-12-02 19:33:44 +00:00
|
|
|
|
|
|
|
## Agent Configs
|
|
|
|
|
2015-12-03 07:18:10 +00:00
|
|
|
The following example configuration files are provided:
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2015-12-03 08:20:21 +00:00
|
|
|
- `server.hcl`
|
|
|
|
- `client.hcl`
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
Place one of these under `/etc/nomad.d` depending on the node's
|
|
|
|
role. You should use `server.hcl` to configure a node as a server
|
|
|
|
(which is responsible for scheduling) or `client.hcl` to configure a
|
|
|
|
node as a client (which is responsible for running workloads).
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
Read <https://nomadproject.io/docs/agent/configuration/index.html> to
|
|
|
|
learn which options are available and how to configure them.
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
## Systemd
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
On systems using systemd the basic systemd unit file under
|
|
|
|
`systemd/nomad.service` starts and stops the nomad agent. Place it
|
|
|
|
under `/etc/systemd/system/nomad.service`.
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
You can control Nomad with `systemctl start|stop|restart nomad`.
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
## Upstart
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
On systems using upstart the basic upstart file under
|
|
|
|
`upstart/nomad.conf` starts and stops the nomad agent. Place it under
|
|
|
|
`/etc/init/nomad.conf`.
|
2015-12-02 19:33:44 +00:00
|
|
|
|
2020-04-08 13:32:03 +00:00
|
|
|
You can control Nomad with `start|stop|restart nomad`.
|