Skip to content

Commit

Permalink
dist: make README consistent with service unit (#7648)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Apr 8, 2020
1 parent edb8646 commit 0046646
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
29 changes: 20 additions & 9 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ The `dist` folder contains sample configs for various platforms.

## Conventions

On unixes we will place agent configs under `/etc/nomad` and store data under `/var/lib/nomad/`. You will need to create both of these directories. We assume that `nomad` is installed to `/usr/bin/nomad`.
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`.

## Agent Configs

Expand All @@ -13,18 +16,26 @@ The following example configuration files are provided:
- `server.hcl`
- `client.hcl`

Place one of these under `/etc/nomad` 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).
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).

Read <https://nomadproject.io/docs/agent/configuration/index.html> to learn which options are available and how to configure them.
Read <https://nomadproject.io/docs/agent/configuration/index.html> to
learn which options are available and how to configure them.

## Upstart
## Systemd

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`.
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`.

You can control Nomad with `start|stop|restart nomad`.
You can control Nomad with `systemctl start|stop|restart nomad`.

## Systemd
## Upstart

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`.
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`.

You can control Nomad with `systemctl start|stop|restart nomad`.
You can control Nomad with `start|stop|restart nomad`.
2 changes: 1 addition & 1 deletion dist/upstart/nomad.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]

exec /usr/bin/nomad agent -config /etc/nomad
exec /usr/local/bin/nomad agent -config /etc/nomad.d

0 comments on commit 0046646

Please sign in to comment.