Skip to content

Commit 6d93b1a

Browse files
authored
update nomad deploy docs (#25)
1 parent 82cedf4 commit 6d93b1a

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

docs/aperture/nomad.md

+30-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nomad on Aperture - `distro`, `wizzdom`
22

3-
> Adapted from the [redbrick/nomad repo's README](https://github.com/redbrick/nomad/README.md)
3+
> Adapted from [redbrick/nomad README](https://github.com/redbrick/nomad/README.md)
44
55
## What is Nomad?
66

@@ -16,7 +16,27 @@ All Nomad job related configurations are stored in the `nomad` directory.
1616

1717
The terminology used here is explained [here](https://developer.hashicorp.com/nomad/tutorials/get-started/get-started-vocab). This is **required reading**.
1818

19-
All of the job files are stored in the `nomad` directory. To deploy a Nomad job manually, connect to a host and run
19+
- Install Nomad on your machine [here](https://developer.hashicorp.com/nomad/docs/install)
20+
- Clone this repo
21+
22+
```bash
23+
git clone [email protected]:redbrick/nomad.git
24+
```
25+
26+
- Connect to the [admin VPN](vpn.md)
27+
- Set the `NOMAD_ADDR` environment variable:
28+
29+
```bash
30+
export NOMAD_ADDR=http://<IP-ADDRESS-OF-HOST>:4646
31+
```
32+
33+
- Check you can connect to the nomad cluster:
34+
35+
```bash
36+
nomad status
37+
```
38+
39+
- You should receive a list back of all jobs, now you are ready to start deploying!
2040

2141
```bash
2242
nomad job plan path/to/job/file.hcl
@@ -42,22 +62,26 @@ This will plan and run the job file without the need for you to copy and paste t
4262

4363
## Restart a Nomad Job
4464

65+
- First, stop and purge the currently-running job
66+
4567
```bash
4668
nomad job stop -purge name-of-running-job
4769
```
4870

71+
- Run a garbage collection of jobs, evaluations, allocations, and nodes ad reconcile summaries of all registered jobs.
72+
4973
```bash
5074
nomad system gc
51-
```
5275

53-
```bash
5476
nomad system reconcile summaries
55-
```
5677

57-
```bash
5878
nomad system gc # (yes, again)
5979
```
6080

81+
- Plan and run the job
82+
6183
```bash
6284
nomad job plan path/to/job/file.hcl
85+
86+
nomad job run -check-index [id from last command] path/to/job/file.hcl
6387
```

0 commit comments

Comments
 (0)