Skip to content

Commit 5bb9b83

Browse files
authored
nomad: add exec docs, fixup links etc. (#36)
1 parent 2527753 commit 5bb9b83

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/services/nomad.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ This will plan and run the job file without the need for you to copy and paste t
7878
nomad job stop -purge name-of-running-job
7979
```
8080

81-
- Run a garbage collection of jobs, evaluations, allocations, and nodes ad reconcile summaries of all registered jobs.
81+
- Run a garbage collection of jobs, evaluations, allocations, nodes and reconcile summaries of all registered jobs.
8282

8383
```bash
8484
nomad system gc
@@ -96,11 +96,25 @@ nomad job plan path/to/job/file.hcl
9696
nomad job run -check-index [id from last command] path/to/job/file.hcl
9797
```
9898

99+
## Exec into Container
100+
101+
At times it is necessary to exec into a docker container to complete maintenance, perform tests or change configurations. The syntax to do this on nomad is similar to `docker exec` with some small additions:
102+
103+
```bash
104+
nomad alloc exec -i -t -task <task-name> <nomad-alloc-id> <command>
105+
```
106+
107+
Where:
108+
109+
- `<task-name>` is the name of the task you want to exec into *(only needed when there is more than one task in job)*
110+
- `<nomad-alloc-id>` is the id for the currently running allocation, obtained from the web UI, nomad CLI, or nomad API
111+
- `<command>` is the command you want to run. e.g. `sh`, `rcon-cli`
112+
99113
## Cluster Configuration
100114

101115
[`nomad/cluster-config`](https://github.com/redbrick/nomad/tree/master/cluster-config) contains configuration relating to the configuration of the cluster including:
102116

103-
- node pools
117+
- [Node Pools](#node-pools)
104118
- agent config
105119

106120
### Node Pools

0 commit comments

Comments
 (0)