mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
Merge pull request #8005 from hashicorp/je.fix-shell-snippets
Fix shell-session snippet error
This commit is contained in:
@@ -31,7 +31,7 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-session-session
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/agent/members
|
||||
```
|
||||
|
||||
@@ -32,12 +32,12 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
https://localhost:4646/v1/jobs
|
||||
```shell-session
|
||||
$ curl https://localhost:4646/v1/jobs
|
||||
```
|
||||
|
||||
```shell-sessioncurl \
|
||||
https://localhost:4646/v1/jobs?prefix=team
|
||||
```shell-session
|
||||
$ curl https://localhost:4646/v1/jobs?prefix=team
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
@@ -219,7 +219,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/jobs
|
||||
@@ -274,7 +275,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/jobs/parse
|
||||
@@ -340,7 +342,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job
|
||||
```
|
||||
|
||||
@@ -552,7 +555,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job/versions
|
||||
```
|
||||
|
||||
@@ -733,7 +737,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job/allocations
|
||||
```
|
||||
|
||||
@@ -897,7 +902,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job/evaluations
|
||||
```
|
||||
|
||||
@@ -961,7 +967,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job/deployments
|
||||
```
|
||||
|
||||
@@ -1044,7 +1051,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job/deployment
|
||||
```
|
||||
|
||||
@@ -1102,7 +1110,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job/summary
|
||||
```
|
||||
|
||||
@@ -1180,7 +1189,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/job/my-job
|
||||
@@ -1236,7 +1246,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/job/my-job/dispatch
|
||||
@@ -1298,7 +1309,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/job/my-job/revert
|
||||
@@ -1352,7 +1364,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/job/my-job/stable
|
||||
@@ -1410,7 +1423,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
-d @sample.json \
|
||||
https://localhost:4646/v1/job/my-job/evaluate
|
||||
@@ -1469,7 +1483,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/job/my-job/plan
|
||||
@@ -1652,7 +1667,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/job/my-job/periodic/force
|
||||
```
|
||||
@@ -1693,7 +1709,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/job/my-job?purge=true
|
||||
```
|
||||
@@ -1731,7 +1748,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/job/my-job/scale
|
||||
```
|
||||
|
||||
@@ -1815,7 +1833,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/job/example/scale
|
||||
|
||||
@@ -12,8 +12,8 @@ description: |-
|
||||
This guide covers the JSON syntax for submitting jobs to Nomad. A useful command
|
||||
for generating valid JSON versions of HCL jobs is:
|
||||
|
||||
```shell-sessionnomad job run -output my-job.nomad
|
||||
|
||||
```shell-session
|
||||
$ nomad job run -output my-job.nomad
|
||||
```
|
||||
|
||||
## Syntax
|
||||
@@ -139,7 +139,8 @@ Below is the JSON representation of the job outputted by `$ nomad init`:
|
||||
|
||||
The example JSON could be submitted as a job using the following:
|
||||
|
||||
```shell-sessioncurl -XPUT -d @example.json http://127.0.0.1:4646/v1/job/example
|
||||
```shell-session
|
||||
$ curl -XPUT -d @example.json http://127.0.0.1:4646/v1/job/example
|
||||
{
|
||||
"EvalID": "5d6ded54-0b2a-8858-6583-be5f476dec9d",
|
||||
"EvalCreateIndex": 12,
|
||||
|
||||
@@ -29,12 +29,12 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl https://localhost:4646/v1/metrics
|
||||
|
||||
```shell-session
|
||||
$ curl https://localhost:4646/v1/metrics
|
||||
```
|
||||
|
||||
```shell-sessioncurl https://localhost:4646/v1/metrics?format=prometheus
|
||||
|
||||
```shell-session
|
||||
$ curl https://localhost:4646/v1/metrics?format=prometheus
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
@@ -35,11 +35,13 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/namespaces
|
||||
```
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/namespaces?prefix=prod
|
||||
```
|
||||
|
||||
@@ -86,7 +88,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/namespace/api-prod
|
||||
```
|
||||
|
||||
@@ -141,13 +144,15 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @namespace.json \
|
||||
https://localhost:4646/v1/namespace/api-prod
|
||||
```
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @namespace.json \
|
||||
https://localhost:4646/v1/namespace
|
||||
@@ -175,7 +180,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/namespace/api-prod
|
||||
```
|
||||
|
||||
@@ -34,11 +34,13 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
http://localhost:4646/v1/nodes
|
||||
```
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
http://localhost:4646/v1/nodes?prefix=f7476465
|
||||
```
|
||||
|
||||
@@ -143,7 +145,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
http://localhost:4646/v1/node/f7476465-4d6e-c0de-26d0-e383c49be941
|
||||
```
|
||||
|
||||
@@ -403,7 +406,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
http://localhost:4646/v1/node/e02b6169-83bd-9df6-69bd-832765f333eb/allocations
|
||||
```
|
||||
|
||||
@@ -775,7 +779,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
http://localhost:4646/v1/node/fb2170a8-257d-3c64-b14d-bc06cc94e34c/evaluate
|
||||
```
|
||||
|
||||
@@ -868,7 +873,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
-XPOST \
|
||||
--data @drain.json \
|
||||
http://localhost:4646/v1/node/fb2170a8-257d-3c64-b14d-bc06cc94e34c/drain
|
||||
@@ -910,7 +916,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
-XPOST http://localhost:4646/v1/node/f7476465-4d6e-c0de-26d0-e383c49be941/purge
|
||||
```
|
||||
|
||||
@@ -965,7 +972,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
-XPOST \
|
||||
--data @eligibility.json \
|
||||
http://localhost:4646/v1/node/fb2170a8-257d-3c64-b14d-bc06cc94e34c/eligibility
|
||||
|
||||
@@ -43,7 +43,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/raft/configuration
|
||||
```
|
||||
|
||||
@@ -116,7 +117,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/operator/raft/peer?address=1.2.3.4
|
||||
```
|
||||
@@ -139,7 +141,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/autopilot/configuration
|
||||
```
|
||||
|
||||
@@ -244,7 +247,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/autopilot/health
|
||||
```
|
||||
|
||||
@@ -342,7 +346,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/scheduler/configuration
|
||||
```
|
||||
|
||||
@@ -379,13 +384,13 @@ The table below shows this endpoint's support for
|
||||
- `PreemptionConfig` `(PreemptionConfig)` - Options to enable preemption for various schedulers.
|
||||
|
||||
- `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for system jobs is enabled. Note that
|
||||
this defaults to true.
|
||||
this defaults to true.
|
||||
|
||||
- `BatchSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for batch jobs is enabled. Note that
|
||||
this defaults to false and must be explicitly enabled.
|
||||
this defaults to false and must be explicitly enabled.
|
||||
|
||||
- `ServiceSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for service jobs is enabled. Note that
|
||||
this defaults to false and must be explicitly enabled.
|
||||
this defaults to false and must be explicitly enabled.
|
||||
|
||||
- `CreateIndex` - The Raft index at which the config was created.
|
||||
- `ModifyIndex` - The Raft index at which the config was modified.
|
||||
@@ -425,7 +430,7 @@ The table below shows this endpoint's support for
|
||||
}
|
||||
```
|
||||
|
||||
- `SchedulerAlgorithm` `(string: "binpack")` - Specifies whether scheduler binpacks or spreads allocations on available nodes. Possible values are `"binpack"` and `"spread"`
|
||||
- `SchedulerAlgorithm` `(string: "binpack")` - Specifies whether scheduler binpacks or spreads allocations on available nodes. Possible values are `"binpack"` and `"spread"`
|
||||
- `PreemptionConfig` `(PreemptionConfig)` - Options to enable preemption for various schedulers.
|
||||
- `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for system jobs is enabled. Note that
|
||||
if this is set to true, then system jobs can preempt any other jobs.
|
||||
|
||||
@@ -35,7 +35,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/plugins?type=csi
|
||||
```
|
||||
|
||||
@@ -76,7 +77,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/plugin/csi/example_plugin_id
|
||||
```
|
||||
|
||||
|
||||
@@ -35,11 +35,13 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quotas
|
||||
```
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quotas?prefix=sha
|
||||
```
|
||||
|
||||
@@ -102,7 +104,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
```
|
||||
|
||||
@@ -187,13 +190,15 @@ object](https://github.com/hashicorp/nomad/blob/master/api/quota.go#L100-L131).
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @spec.json \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
```
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @spec.json \
|
||||
https://localhost:4646/v1/quota
|
||||
@@ -222,7 +227,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
```
|
||||
@@ -250,11 +256,13 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota-usages
|
||||
```
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota-usages?prefix=sha
|
||||
```
|
||||
|
||||
@@ -305,7 +313,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
```
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/regions
|
||||
```
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/scaling/policies
|
||||
```
|
||||
|
||||
@@ -72,7 +73,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/scaling/policy/5e9f9ef2-5223-6d35-bac1-be0f3cb974ad
|
||||
```
|
||||
|
||||
|
||||
@@ -50,7 +50,8 @@ job related results will not be returned. If the token is only valid for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/search
|
||||
@@ -98,7 +99,8 @@ job related results will not be returned. If the token is only valid for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/search
|
||||
|
||||
@@ -36,7 +36,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/sentinel/policies
|
||||
```
|
||||
|
||||
@@ -101,7 +102,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/sentinel/policy/my-policy
|
||||
@@ -126,7 +128,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/sentinel/policy/foo
|
||||
```
|
||||
|
||||
@@ -168,7 +171,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/sentinel/policy/foo
|
||||
```
|
||||
|
||||
@@ -27,7 +27,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/status/leader
|
||||
```
|
||||
|
||||
@@ -55,7 +56,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/status/peers
|
||||
```
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request PUT \
|
||||
https://localhost:4646/v1/system/gc
|
||||
```
|
||||
@@ -52,6 +53,7 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/system/reconcile/summaries
|
||||
```
|
||||
|
||||
@@ -44,7 +44,8 @@ There are no parameters, but the request _body_ contains the entire job file.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @my-job.nomad \
|
||||
https://localhost:4646/v1/validate/job
|
||||
|
||||
@@ -43,7 +43,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/volumes?type=csi&node_id=foo&plugin_id=plugin-id1
|
||||
```
|
||||
|
||||
@@ -102,7 +103,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
https://localhost:4646/v1/volume/csi/volume-id1
|
||||
```
|
||||
|
||||
@@ -286,7 +288,8 @@ parameters.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request PUT \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/volume/csi/volume-id1
|
||||
@@ -317,7 +320,8 @@ The table below shows this endpoint's support for
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-sessioncurl \
|
||||
```shell-session
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
--data @payload.json \
|
||||
https://localhost:4646/v1/volume/csi/volume-id1
|
||||
|
||||
@@ -26,7 +26,8 @@ The `acl bootstrap` command requires no arguments.
|
||||
|
||||
Bootstrap the initial token:
|
||||
|
||||
```shell-sessionnomad acl bootstrap
|
||||
```shell-session
|
||||
$ nomad acl bootstrap
|
||||
Accessor ID = 5b7fd453-d3f7-6814-81dc-fcfe6daedea5
|
||||
Secret ID = 9184ec35-65d4-9258-61e3-0c066d0a45c5
|
||||
Name = Bootstrap Token
|
||||
|
||||
@@ -31,6 +31,7 @@ to file. The policy can be read from stdin by setting the path to "-".
|
||||
|
||||
Create a new ACL Policy:
|
||||
|
||||
```shell-sessionnomad acl policy apply my-policy my-policy.json
|
||||
```shell-session
|
||||
$ nomad acl policy apply my-policy my-policy.json
|
||||
Successfully wrote 'my-policy' ACL policy!
|
||||
```
|
||||
|
||||
@@ -26,6 +26,7 @@ The `acl policy delete` command requires the policy name as an argument.
|
||||
|
||||
Delete an ACL Policy:
|
||||
|
||||
```shell-sessionnomad acl policy delete my-policy
|
||||
```shell-session
|
||||
$ nomad acl policy delete my-policy
|
||||
Successfully deleted 'my-policy' ACL policy!
|
||||
```
|
||||
|
||||
@@ -28,7 +28,8 @@ The `acl policy info` command requires the policy name.
|
||||
|
||||
Fetch information on an existing ACL Policy:
|
||||
|
||||
```shell-sessionnomad acl policy info my-policy
|
||||
```shell-session
|
||||
$ nomad acl policy info my-policy
|
||||
Name = my-policy
|
||||
Description = <none>
|
||||
Rules = {
|
||||
|
||||
@@ -29,7 +29,8 @@ nomad acl policy list
|
||||
|
||||
List all ACL policies:
|
||||
|
||||
```shell-sessionnomad acl policy list
|
||||
```shell-session
|
||||
$ nomad acl policy list
|
||||
Name Description
|
||||
policy-1 The first policy
|
||||
policy-2 The second policy
|
||||
|
||||
@@ -39,7 +39,8 @@ The `acl token create` command requires no arguments.
|
||||
|
||||
Create a new ACL token:
|
||||
|
||||
```shell-sessionnomad acl token create -name="my token" -policy=foo -policy=bar
|
||||
```shell-session
|
||||
$ nomad acl token create -name="my token" -policy=foo -policy=bar
|
||||
Accessor ID = d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
Secret ID = 85310d07-9afa-ef53-0933-0c043cd673c7
|
||||
Name = my token
|
||||
|
||||
@@ -26,7 +26,8 @@ The `acl token delete` command requires an existing token's AccessorID.
|
||||
|
||||
Delete an existing ACL token:
|
||||
|
||||
```shell-sessionnomad acl token delete d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
```shell-session
|
||||
$ nomad acl token delete d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
|
||||
Token d532c40a-30f1-695c-19e5-c35b882b0efd successfully deleted
|
||||
```
|
||||
|
||||
@@ -27,7 +27,8 @@ The `acl token info` command requires an existing token's AccessorID.
|
||||
|
||||
Fetch information about an existing ACL token:
|
||||
|
||||
```shell-sessionnomad acl token info d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
```shell-session
|
||||
$ nomad acl token info d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
Accessor ID = d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
Secret ID = 85310d07-9afa-ef53-0933-0c043cd673c7
|
||||
Name = my token
|
||||
|
||||
@@ -29,7 +29,8 @@ nomad acl token list
|
||||
|
||||
List all ACL tokens:
|
||||
|
||||
```shell-sessionnomad acl token list
|
||||
```shell-session
|
||||
$ nomad acl token list
|
||||
Name Type Global Accessor ID
|
||||
Bootstrap Token management true 32b61154-47f1-3694-1430-a5544bafcd3e
|
||||
<none> client false fcf2bf84-a257-8f39-9d16-a954ed25b5be
|
||||
|
||||
@@ -26,7 +26,8 @@ nomad acl token self
|
||||
|
||||
Fetch information about an existing ACL token:
|
||||
|
||||
```shell-sessionexport NOMAD_TOKEN=85310d07-9afa-ef53-0933-0c043cd673c7
|
||||
```shell-session
|
||||
$ export NOMAD_TOKEN=85310d07-9afa-ef53-0933-0c043cd673c7
|
||||
|
||||
$ nomad acl token self
|
||||
Accessor ID = d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
|
||||
@@ -39,7 +39,8 @@ The `acl token update` command requires an existing token's accessor ID.
|
||||
|
||||
Update an existing ACL token:
|
||||
|
||||
```shell-sessionnomad acl token update -name="my updated token" -policy=foo -policy=bar d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
```shell-session
|
||||
$ nomad acl token update -name="my updated token" -policy=foo -policy=bar d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
Accessor ID = d532c40a-30f1-695c-19e5-c35b882b0efd
|
||||
Secret ID = 85310d07-9afa-ef53-0933-0c043cd673c7
|
||||
Name = my updated token
|
||||
|
||||
@@ -35,7 +35,8 @@ returned. These subsystems are described below:
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad agent-info
|
||||
```shell-session
|
||||
$ nomad agent-info
|
||||
raft
|
||||
commit_index = 0
|
||||
fsm_pending = 0
|
||||
|
||||
@@ -132,7 +132,7 @@ via CLI arguments. The `agent` command accepts the following arguments:
|
||||
- `-retry-join`: Similar to `-join` but allows retrying a join if the first
|
||||
attempt fails.
|
||||
|
||||
```sh
|
||||
```shell-session
|
||||
$ nomad agent -retry-join "127.0.0.1:4648"
|
||||
```
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ the given job will be chosen.
|
||||
To start an interactive debugging session in a particular alloc, invoke exec
|
||||
command with your desired shell available inside the task:
|
||||
|
||||
```shell-sessionnomad alloc exec eb17e557 /bin/bash
|
||||
```shell-session
|
||||
$ nomad alloc exec eb17e557 /bin/bash
|
||||
root@eb17e557:/data# # now run any debugging commands inside container
|
||||
root@eb17e557:/data# # ps -ef
|
||||
```
|
||||
@@ -73,7 +74,8 @@ that your host shell doesn't interpolate values before invoking `exec` command.
|
||||
For example, the following command would return the environment variable on
|
||||
operator shell rather than task containers:
|
||||
|
||||
```shell-sessionnomad alloc exec eb17e557 echo $NOMAD_ALLOC_ID # wrong
|
||||
```shell-session
|
||||
$ nomad alloc exec eb17e557 echo $NOMAD_ALLOC_ID # wrong
|
||||
...
|
||||
```
|
||||
|
||||
@@ -124,7 +126,7 @@ run sensitive workloads.
|
||||
When trying to `alloc exec` for a job that has more than one task associated
|
||||
with it, you may want to target a specific task.
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
# open a shell session in one of your allocation's tasks
|
||||
$ nomad alloc exec -i -t -task mytask a1827f93 /bin/bash
|
||||
a1827f93$
|
||||
|
||||
@@ -65,7 +65,8 @@ optional and it defaults to `/` of the allocation directory.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad alloc fs eb17e557
|
||||
```shell-session
|
||||
$ nomad alloc fs eb17e557
|
||||
Mode Size Modified Time Name
|
||||
drwxrwxr-x 4096 28 Jan 16 05:39 UTC alloc/
|
||||
drwxrwxr-x 4096 28 Jan 16 05:39 UTC redis/
|
||||
|
||||
@@ -50,7 +50,8 @@ the given job will be chosen.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad alloc logs eb17e557 redis
|
||||
```shell-session
|
||||
$ nomad alloc logs eb17e557 redis
|
||||
foobar
|
||||
baz
|
||||
bam
|
||||
|
||||
@@ -31,7 +31,8 @@ is optional and if omitted every task in the allocation will be restarted.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad alloc restart eb17e557
|
||||
```shell-session
|
||||
$ nomad alloc restart eb17e557
|
||||
|
||||
$ nomad alloc restart eb17e557 foo
|
||||
Could not find task named: foo, found:
|
||||
|
||||
@@ -32,7 +32,8 @@ is optional and if omitted every task in the allocation will be signaled.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad alloc signal eb17e557
|
||||
```shell-session
|
||||
$ nomad alloc signal eb17e557
|
||||
|
||||
$ nomad alloc signal eb17e557 foo
|
||||
Could not find task named: foo, found:
|
||||
|
||||
@@ -42,7 +42,8 @@ allocations and information will be displayed.
|
||||
|
||||
Short status of an alloc:
|
||||
|
||||
```shell-sessionnomad alloc status --short 0af996ed
|
||||
```shell-session
|
||||
$ nomad alloc status --short 0af996ed
|
||||
ID = 0af996ed
|
||||
Eval ID = be9bde98
|
||||
Name = example.cache[0]
|
||||
@@ -65,7 +66,8 @@ web running Started 07/25/17 16:12:49 UTC
|
||||
|
||||
Full status of an alloc, which shows one of the tasks dying and then being restarted:
|
||||
|
||||
```shell-sessionnomad alloc status 0af996ed
|
||||
```shell-session
|
||||
$ nomad alloc status 0af996ed
|
||||
ID = 0af996ed
|
||||
Eval ID = be9bde98
|
||||
Name = example.cache[0]
|
||||
@@ -123,7 +125,8 @@ Recent Events:
|
||||
|
||||
Verbose status can also be accessed:
|
||||
|
||||
```shell-sessionnomad alloc status -verbose 0af996ed
|
||||
```shell-session
|
||||
$ nomad alloc status -verbose 0af996ed
|
||||
ID = 0af996ed-aff4-8ddb-a566-e55ebf8969c9
|
||||
Eval ID = be9bde98-0490-1beb-ced0-012d10ddf22e
|
||||
Name = example.cache[0]
|
||||
|
||||
@@ -41,7 +41,8 @@ down. It is safe to exit the monitor early with ctrl-c.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad alloc stop c1488bb5
|
||||
```shell-session
|
||||
$ nomad alloc stop c1488bb5
|
||||
==> Monitoring evaluation "26172081"
|
||||
Evaluation triggered by job "example"
|
||||
Allocation "4dcb1c98" created: node "b4dc52b9", group "cache"
|
||||
|
||||
@@ -38,7 +38,8 @@ prefix.
|
||||
|
||||
Manually mark an ongoing deployment as failed:
|
||||
|
||||
```shell-sessionnomad deployment fail 8990cfbc
|
||||
```shell-session
|
||||
$ nomad deployment fail 8990cfbc
|
||||
Deployment "8990cfbc-28c0-cb28-ca31-856cf691b987" failed
|
||||
|
||||
==> Monitoring evaluation "a2d97ad5"
|
||||
|
||||
@@ -32,7 +32,8 @@ The `deployment list` command requires no arguments.
|
||||
|
||||
List all tracked deployments:
|
||||
|
||||
```shell-sessionnomad deployment list
|
||||
```shell-session
|
||||
$ nomad deployment list
|
||||
ID Job ID Job Version Status Description
|
||||
8990cfbc example 2 failed Deployment marked as failed
|
||||
62eb607c example 1 successful Deployment completed successfully
|
||||
|
||||
@@ -34,6 +34,7 @@ prefix.
|
||||
|
||||
Manually pause a deployment:
|
||||
|
||||
```shell-sessionnomad deployment pause 2f14ba55
|
||||
```shell-session
|
||||
$ nomad deployment pause 2f14ba55
|
||||
Deployment "2f14ba55-acfb-cb31-821c-facf1b9b0830" paused
|
||||
```
|
||||
|
||||
@@ -48,7 +48,7 @@ select particular groups to promote.
|
||||
|
||||
Promote canaries in all groups:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
# Have two task groups waiting for promotion.
|
||||
$ nomad status example
|
||||
ID = example
|
||||
@@ -136,7 +136,7 @@ f2409f7d a8dcce2d web 0 stop complete 07/25/17 18:31:34 UT
|
||||
|
||||
Promote canaries in a particular group:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
# Have two task groups waiting for promotion.
|
||||
$ nomad status example
|
||||
ID = example
|
||||
|
||||
@@ -37,7 +37,8 @@ prefix.
|
||||
|
||||
Manually resume a deployment:
|
||||
|
||||
```shell-sessionnomad deployment resume c848972e
|
||||
```shell-session
|
||||
$ nomad deployment resume c848972e
|
||||
Deployment "c848972e-dcd3-7354-e0d2-39d86642cdb1" resumed
|
||||
|
||||
==> Monitoring evaluation "5e266d42"
|
||||
|
||||
@@ -35,7 +35,8 @@ prefix.
|
||||
|
||||
Inspect the status of a complete deployment:
|
||||
|
||||
```shell-sessionnomad deployment status 06ca68a2
|
||||
```shell-session
|
||||
$ nomad deployment status 06ca68a2
|
||||
ID = 06ca68a2
|
||||
Job ID = example
|
||||
Job Version = 0
|
||||
@@ -50,7 +51,8 @@ web 2 2 2 0
|
||||
|
||||
Inspect the status of a deployment that is waiting for canary promotion:
|
||||
|
||||
```shell-sessionnomad deployment status 0b
|
||||
```shell-session
|
||||
$ nomad deployment status 0b
|
||||
ID = 0b23b149
|
||||
Job ID = example
|
||||
Job Version = 1
|
||||
|
||||
@@ -53,7 +53,8 @@ indicated by exit code 1.
|
||||
|
||||
Show the status of an evaluation that has placement failures
|
||||
|
||||
```shell-sessionnomad eval status 2ae0e6a5
|
||||
```shell-session
|
||||
$ nomad eval status 2ae0e6a5
|
||||
ID = 2ae0e6a5
|
||||
Status = complete
|
||||
Status Description = complete
|
||||
@@ -74,7 +75,8 @@ Evaluation "67493a64" waiting for additional capacity to place remainder
|
||||
|
||||
Monitor an existing evaluation
|
||||
|
||||
```shell-sessionnomad eval status -monitor 8262bc83
|
||||
```shell-session
|
||||
$ nomad eval status -monitor 8262bc83
|
||||
==> Monitoring evaluation "8262bc83"
|
||||
Allocation "bd6bd0de" created: node "6f299da5", group "group1"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
|
||||
@@ -30,7 +30,8 @@ command can be found on the left.
|
||||
Nomad's CLI supports command autocomplete. Autocomplete can be installed or
|
||||
uninstalled by running the following on bash or zsh shells:
|
||||
|
||||
```shell-sessionnomad -autocomplete-install
|
||||
```shell-session
|
||||
$ nomad -autocomplete-install
|
||||
$ nomad -autocomplete-uninstall
|
||||
```
|
||||
|
||||
@@ -53,7 +54,8 @@ local machine does not have a running Nomad agent. To do so, set the
|
||||
`NOMAD_ADDR` environment variable or use the `-address=<addr>` flag when running
|
||||
commands.
|
||||
|
||||
```shell-sessionNOMAD_ADDR=https://remote-address:4646 nomad status
|
||||
```shell-session
|
||||
$ nomad_ADDR=https://remote-address:4646 nomad status
|
||||
$ nomad status -address=https://remote-address:4646
|
||||
```
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ prefix of a job to display the list of deployments for.
|
||||
|
||||
List the deployment for a particular job:
|
||||
|
||||
```shell-sessionnomad job deployments example
|
||||
```shell-session
|
||||
$ nomad job deployments example
|
||||
ID Job ID Job Version Status Description
|
||||
0b23b149 example 1 running Deployment is running but requires manual promotion
|
||||
06ca68a2 example 0 successful Deployment completed successfully
|
||||
|
||||
@@ -63,7 +63,8 @@ client connection issues or internal errors, are indicated by exit code 1.
|
||||
Dispatch against a parameterized job with the ID "video-encode" and
|
||||
passing in a configuration payload via stdin:
|
||||
|
||||
```shell-sessioncat << EOF | nomad job dispatch video-encode -
|
||||
```shell-session
|
||||
$ cat << EOF | nomad job dispatch video-encode -
|
||||
{
|
||||
"s3-input": "https://video-bucket.s3-us-west-1.amazonaws.com/cb31dabb1",
|
||||
"s3-output": "https://video-bucket.s3-us-west-1.amazonaws.com/a149adbe3",
|
||||
@@ -85,7 +86,8 @@ Evaluation ID = 31199841
|
||||
Dispatch against a parameterized job with the ID "video-encode" and
|
||||
passing in a configuration payload via a file:
|
||||
|
||||
```shell-sessionnomad job dispatch video-encode video-config.json
|
||||
```shell-session
|
||||
$ nomad job dispatch video-encode video-config.json
|
||||
Dispatched Job ID = video-encode/dispatch-1485379325-cb38d00d
|
||||
Evaluation ID = 31199841
|
||||
|
||||
@@ -99,7 +101,8 @@ Evaluation ID = 31199841
|
||||
Dispatch against a parameterized job with the ID "video-encode" using the detach
|
||||
flag:
|
||||
|
||||
```shell-sessionnomad job dispatch -detach video-encode video-config.json
|
||||
```shell-session
|
||||
$ nomad job dispatch -detach video-encode video-config.json
|
||||
Dispatched Job ID = example/dispatch-1485380684-c37b3dba
|
||||
Evaluation ID = d9034c4e
|
||||
```
|
||||
|
||||
@@ -43,7 +43,8 @@ will be evaluated, forcing a scheduler run.
|
||||
|
||||
Evaluate the job with ID "job1":
|
||||
|
||||
```shell-sessionnomad job eval job1
|
||||
```shell-session
|
||||
$ nomad job eval job1
|
||||
==> Monitoring evaluation "0f3bc0f3"
|
||||
Evaluation triggered by job "test"
|
||||
Evaluation within deployment: "51baf5c8"
|
||||
@@ -53,13 +54,15 @@ Evaluate the job with ID "job1":
|
||||
|
||||
Evaluate the job with ID "job1" and return immediately:
|
||||
|
||||
```shell-sessionnomad job eval -detach job1
|
||||
```shell-session
|
||||
$ nomad job eval -detach job1
|
||||
Created eval ID: "4947e728"
|
||||
```
|
||||
|
||||
Evaluate the job with ID "job1", and reschedule any eligible failed allocations:
|
||||
|
||||
```shell-sessionnomad job eval -force-reschedule job1
|
||||
```shell-session
|
||||
$ nomad job eval -force-reschedule job1
|
||||
==> Monitoring evaluation "0f3bc0f3"
|
||||
Evaluation triggered by job "test"
|
||||
Evaluation within deployment: "51baf5c8"
|
||||
|
||||
@@ -38,7 +38,8 @@ of a job to display the history for.
|
||||
|
||||
Display the history showing differences between versions:
|
||||
|
||||
```shell-sessionnomad job history -p e
|
||||
```shell-session
|
||||
$ nomad job history -p e
|
||||
Version = 2
|
||||
Stable = false
|
||||
Submit Date = 07/25/17 20:35:43 UTC
|
||||
@@ -68,7 +69,8 @@ Submit Date = 07/25/17 20:35:28 UTC
|
||||
|
||||
Display the memory ask across submitted job versions:
|
||||
|
||||
```shell-sessionnomad job history -t "{{range .}}\
|
||||
```shell-session
|
||||
$ nomad job history -t "{{range .}}\
|
||||
v{{.Version}}: {{with index .TaskGroups 0}}{{with index .Tasks 0}}{{.Resources.MemoryMB}}{{end}}{{end}}\
|
||||
|
||||
{{end}}" example
|
||||
|
||||
@@ -35,7 +35,8 @@ template.
|
||||
|
||||
Generate an example job file:
|
||||
|
||||
```shell-sessionnomad job init
|
||||
```shell-session
|
||||
$ nomad job init
|
||||
Example job file written to example.nomad
|
||||
```
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ Nomad is running.
|
||||
|
||||
Inspect a submitted job:
|
||||
|
||||
```shell-sessionnomad job inspect redis
|
||||
```shell-session
|
||||
$ nomad job inspect redis
|
||||
{
|
||||
"Job": {
|
||||
"Region": "global",
|
||||
|
||||
@@ -43,7 +43,8 @@ scheduling has finished or failed.
|
||||
|
||||
Force the evaluation of the job `example`, monitoring placement:
|
||||
|
||||
```shell-sessionnomad job periodic force example
|
||||
```shell-session
|
||||
$ nomad job periodic force example
|
||||
==> Monitoring evaluation "54b2d6d9"
|
||||
Evaluation triggered by job "example/periodic-1555094493"
|
||||
Allocation "637aee17" created: node "a35ab8fc", group "cache"
|
||||
@@ -54,7 +55,8 @@ Force the evaluation of the job `example`, monitoring placement:
|
||||
|
||||
Force the evaluation of the job `example` and return immediately:
|
||||
|
||||
```shell-sessionnomad job periodic force -detach example
|
||||
```shell-session
|
||||
$ nomad job periodic force -detach example
|
||||
Force periodic successful
|
||||
Evaluation ID: 0865fbf3-30de-5f53-0811-821e73e63178
|
||||
```
|
||||
|
||||
@@ -67,7 +67,8 @@ Plan will return one of the following exit codes:
|
||||
|
||||
Plan a new job that has not been previously submitted:
|
||||
|
||||
```shell-sessionnomad job plan job1.nomad
|
||||
```shell-session
|
||||
$ nomad job plan job1.nomad
|
||||
nomad job plan example.nomad
|
||||
+ Job: "example"
|
||||
+ Task Group: "cache" (1 create)
|
||||
@@ -89,7 +90,8 @@ potentially invalid.
|
||||
|
||||
Increase the count of an existing without sufficient cluster capacity:
|
||||
|
||||
```shell-sessionnomad job plan example.nomad
|
||||
```shell-session
|
||||
$ nomad job plan example.nomad
|
||||
+/- Job: "example"
|
||||
+/- Task Group: "cache" (7 create, 1 in-place update)
|
||||
+/- Count: "1" => "8" (forces create)
|
||||
@@ -114,7 +116,8 @@ potentially invalid.
|
||||
|
||||
Update an existing job such that it would cause a rolling update:
|
||||
|
||||
```shell-sessionnomad job plan example.nomad
|
||||
```shell-session
|
||||
$ nomad job plan example.nomad
|
||||
+/- Job: "example"
|
||||
+/- Task Group: "cache" (3 create/destroy update)
|
||||
+/- Task: "redis" (forces create/destroy update)
|
||||
@@ -140,7 +143,8 @@ potentially invalid.
|
||||
|
||||
Add a task to the task group using verbose mode:
|
||||
|
||||
```shell-sessionnomad job plan -verbose example.nomad
|
||||
```shell-session
|
||||
$ nomad job plan -verbose example.nomad
|
||||
+/- Job: "example"
|
||||
+/- Task Group: "cache" (3 create/destroy update)
|
||||
+ Task: "my-website" (forces create/destroy update)
|
||||
|
||||
@@ -48,7 +48,7 @@ select particular groups to promote.
|
||||
|
||||
Promote canaries in all groups:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
# Have two task groups waiting for promotion.
|
||||
$ nomad status example
|
||||
ID = example
|
||||
@@ -136,7 +136,7 @@ f2409f7d a8dcce2d web 0 stop complete 07/25/17 18:31:34 UT
|
||||
|
||||
Promote canaries in a particular group:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
# Have two task groups waiting for promotion.
|
||||
$ nomad status example
|
||||
ID = example
|
||||
|
||||
@@ -59,7 +59,8 @@ job to revert to.
|
||||
|
||||
Revert to an older version of a job:
|
||||
|
||||
```shell-sessionnomad job history -p example
|
||||
```shell-session
|
||||
$ nomad job history -p example
|
||||
Version = 1
|
||||
Stable = false
|
||||
Submit Date = 07/25/17 21:27:30 UTC
|
||||
|
||||
@@ -86,7 +86,8 @@ precedence, going from highest to lowest: the `-vault-token` flag, the
|
||||
|
||||
Schedule the job contained in the file `job1.nomad`, monitoring placement:
|
||||
|
||||
```shell-sessionnomad job run job1.nomad
|
||||
```shell-session
|
||||
$ nomad job run job1.nomad
|
||||
==> Monitoring evaluation "52dee78a"
|
||||
Evaluation triggered by job "example"
|
||||
Evaluation within deployment: "62eb607c"
|
||||
@@ -98,7 +99,8 @@ Schedule the job contained in the file `job1.nomad`, monitoring placement:
|
||||
|
||||
<a id="check-index"></a> Update the job using `check-index`:
|
||||
|
||||
```shell-sessionnomad job run -check-index 5 example.nomad
|
||||
```shell-session
|
||||
$ nomad job run -check-index 5 example.nomad
|
||||
Enforcing job modify index 5: job exists with conflicting job modify index: 6
|
||||
Job not updated
|
||||
|
||||
@@ -113,14 +115,16 @@ $ nomad job run -check-index 6 example.nomad
|
||||
|
||||
Schedule the job contained in `job1.nomad` and return immediately:
|
||||
|
||||
```shell-sessionnomad job run -detach job1.nomad
|
||||
```shell-session
|
||||
$ nomad job run -detach job1.nomad
|
||||
4947e728
|
||||
```
|
||||
|
||||
Schedule a job which cannot be successfully placed. This results in a scheduling
|
||||
failure and the specifics of the placement are printed:
|
||||
|
||||
```shell-sessionnomad job run failing.nomad
|
||||
```shell-session
|
||||
$ nomad job run failing.nomad
|
||||
==> Monitoring evaluation "2ae0e6a5"
|
||||
Evaluation triggered by job "example"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
|
||||
@@ -48,7 +48,8 @@ shortened relative time format like `5m ago`.
|
||||
|
||||
List of all jobs:
|
||||
|
||||
```shell-sessionnomad job status
|
||||
```shell-session
|
||||
$ nomad job status
|
||||
ID Type Priority Status Submit Date
|
||||
job1 service 80 running 07/25/17 15:47:11 UTC
|
||||
job2 batch 40 complete 07/24/17 19:22:11 UTC
|
||||
@@ -57,7 +58,8 @@ job3 service 50 dead (stopped) 07/22/17 16:34:48 UTC
|
||||
|
||||
Short view of a specific job:
|
||||
|
||||
```shell-sessionnomad job status -short job1
|
||||
```shell-session
|
||||
$ nomad job status -short job1
|
||||
ID = job1
|
||||
Name = Test Job
|
||||
Submit Date = 07/25/17 15:47:11 UTC
|
||||
@@ -71,7 +73,8 @@ Parameterized = false
|
||||
|
||||
Full status information of a job:
|
||||
|
||||
```shell-sessionnomad job status example
|
||||
```shell-session
|
||||
$ nomad job status example
|
||||
ID = example
|
||||
Name = example
|
||||
Submit Date = 07/25/17 15:53:04 UTC
|
||||
@@ -102,7 +105,8 @@ ID Node ID Task Group Version Desired Status Created Modified
|
||||
|
||||
Full status information of a periodic job:
|
||||
|
||||
```shell-sessionnomad job status example
|
||||
```shell-session
|
||||
$ nomad job status example
|
||||
ID = example
|
||||
Name = example
|
||||
Submit Date = 07/25/17 15:59:52 UTC
|
||||
@@ -127,7 +131,8 @@ example/periodic-1500998420 running
|
||||
|
||||
Full status information of a parameterized job:
|
||||
|
||||
```shell-sessionnomad job status example
|
||||
```shell-session
|
||||
$ nomad job status example
|
||||
ID = example
|
||||
Name = example
|
||||
Submit Date = 07/25/17 15:59:52 UTC
|
||||
@@ -155,7 +160,8 @@ example/dispatch-1485411499-fa2ee40e running
|
||||
|
||||
Full status information of a job with placement failures:
|
||||
|
||||
```shell-sessionnomad job status example
|
||||
```shell-session
|
||||
$ nomad job status example
|
||||
ID = example
|
||||
Name = example
|
||||
Submit Date = 07/25/17 15:55:27 UTC
|
||||
@@ -196,7 +202,8 @@ Full status information showing evaluations with a placement failure. The in
|
||||
progress evaluation denotes that Nomad is blocked waiting for resources to
|
||||
become available so that it can place the remaining allocations.
|
||||
|
||||
```shell-sessionnomad job status -evals example
|
||||
```shell-session
|
||||
$ nomad job status -evals example
|
||||
ID = example
|
||||
Name = example
|
||||
Submit Date = 07/25/17 15:55:27 UTC
|
||||
|
||||
@@ -50,7 +50,8 @@ the request. It is safe to exit the monitor early using ctrl+c.
|
||||
|
||||
Stop the job with ID "job1":
|
||||
|
||||
```shell-sessionnomad job stop job1
|
||||
```shell-session
|
||||
$ nomad job stop job1
|
||||
==> Monitoring evaluation "43bfe672"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "43bfe672" finished with status "complete"
|
||||
@@ -58,7 +59,8 @@ Stop the job with ID "job1":
|
||||
|
||||
Stop the job with ID "job1" and return immediately:
|
||||
|
||||
```shell-sessionnomad job stop -detach job1
|
||||
```shell-session
|
||||
$ nomad job stop -detach job1
|
||||
507d26cb
|
||||
```
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ of 1 indicates an error.
|
||||
|
||||
Validate a job with invalid syntax:
|
||||
|
||||
```shell-sessionnomad job validate example.nomad
|
||||
```shell-session
|
||||
$ nomad job validate example.nomad
|
||||
Job validation errors:
|
||||
1 error(s) occurred:
|
||||
|
||||
@@ -45,7 +46,8 @@ Job validation errors:
|
||||
|
||||
Validate a job that has a configuration that causes warnings:
|
||||
|
||||
```shell-sessionnomad job validate example.nomad
|
||||
```shell-session
|
||||
$ nomad job validate example.nomad
|
||||
Job Warnings:
|
||||
1 warning(s):
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ The monitor command also allows you to specify a single client node id to follow
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad monitor -log-level=DEBUG -node-id=a57b2adb-1a30-2dda-8df0-25abb0881952
|
||||
```shell-session
|
||||
$ nomad monitor -log-level=DEBUG -node-id=a57b2adb-1a30-2dda-8df0-25abb0881952
|
||||
2019-11-04T12:22:08.528-0500 [DEBUG] http: request complete: method=GET path=/v1/agent/health?type=server duration=1.445739ms
|
||||
2019-11-04T12:22:09.892-0500 [DEBUG] nomad: memberlist: Stream connection from=127.0.0.1:53628
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ or updated.
|
||||
|
||||
Create a namespace with a quota
|
||||
|
||||
```shell-sessionnomad namespace apply -description "Prod API servers" -quota prod api-prod
|
||||
```shell-session
|
||||
$ nomad namespace apply -description "Prod API servers" -quota prod api-prod
|
||||
Successfully applied namespace "api-prod"!
|
||||
```
|
||||
|
||||
@@ -29,6 +29,7 @@ The `namespace delete` command requires the name of the namespace to be deleted.
|
||||
|
||||
Delete a namespace
|
||||
|
||||
```shell-sessionnomad namespace delete api-prod
|
||||
```shell-session
|
||||
$ nomad namespace delete api-prod
|
||||
Successfully deleted namespace "api-prod"!
|
||||
```
|
||||
|
||||
@@ -33,7 +33,8 @@ nomad namespace inspect [options] <namespace_name>
|
||||
|
||||
Inspect a namespace:
|
||||
|
||||
```shell-sessionnomad namespace inspect default
|
||||
```shell-session
|
||||
$ nomad namespace inspect default
|
||||
{
|
||||
"CreateIndex": 5,
|
||||
"Description": "Default shared namespace",
|
||||
|
||||
@@ -35,7 +35,8 @@ The `namespace list` command requires no arguments.
|
||||
|
||||
List all namespaces:
|
||||
|
||||
```shell-sessionnomad namespace list
|
||||
```shell-session
|
||||
$ nomad namespace list
|
||||
Name Description
|
||||
default Default shared namespace
|
||||
api-prod Production instances of backend API servers
|
||||
|
||||
@@ -29,7 +29,8 @@ nomad namespace status [options] <namespace_name>
|
||||
|
||||
View the status of a namespace:
|
||||
|
||||
```shell-sessionnomad namespace status default
|
||||
```shell-session
|
||||
$ nomad namespace status default
|
||||
Name = default
|
||||
Description = Default shared namespace
|
||||
Quota = shared-default-quota
|
||||
|
||||
@@ -43,14 +43,16 @@ description below for specific usage information and requirements.
|
||||
|
||||
Query the currently known servers:
|
||||
|
||||
```shell-sessionnomad node config -servers
|
||||
```shell-session
|
||||
$ nomad node config -servers
|
||||
server1:4647
|
||||
server2:4647
|
||||
```
|
||||
|
||||
Update the list of servers:
|
||||
|
||||
```shell-sessionnomad node config -update-servers server1:4647 server2:4647 server3:4647 server4
|
||||
```shell-session
|
||||
$ nomad node config -update-servers server1:4647 server2:4647 server3:4647 server4
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -81,7 +81,8 @@ operation is desired.
|
||||
|
||||
Enable drain mode on node with ID prefix "4d2ba53b":
|
||||
|
||||
```shell-sessionnomad node drain -enable f4e8a9e5
|
||||
```shell-session
|
||||
$ nomad node drain -enable f4e8a9e5
|
||||
Are you sure you want to enable drain mode for node "f4e8a9e5-30d8-3536-1e6f-cda5c869c35e"? [y/N] y
|
||||
2018-03-30T23:13:16Z: Ctrl-C to stop monitoring: will not cancel the node drain
|
||||
2018-03-30T23:13:16Z: Node "f4e8a9e5-30d8-3536-1e6f-cda5c869c35e" drain strategy set
|
||||
@@ -100,13 +101,15 @@ Are you sure you want to enable drain mode for node "f4e8a9e5-30d8-3536-1e6f-cda
|
||||
|
||||
Enable drain mode on the local node:
|
||||
|
||||
```shell-sessionnomad node drain -enable -self
|
||||
```shell-session
|
||||
$ nomad node drain -enable -self
|
||||
...
|
||||
```
|
||||
|
||||
Enable drain mode but do not stop system jobs:
|
||||
|
||||
```shell-sessionnomad node drain -enable -ignore-system 4d2ba53b
|
||||
```shell-session
|
||||
$ nomad node drain -enable -ignore-system 4d2ba53b
|
||||
...
|
||||
```
|
||||
|
||||
@@ -114,13 +117,15 @@ Disable drain mode but keep the node ineligible for scheduling. Useful for
|
||||
inspecting the current state of a misbehaving node without Nomad trying to
|
||||
start or migrate allocations:
|
||||
|
||||
```shell-sessionnomad node drain -disable -keep-ineligible 4d2ba53b
|
||||
```shell-session
|
||||
$ nomad node drain -disable -keep-ineligible 4d2ba53b
|
||||
...
|
||||
```
|
||||
|
||||
Enable drain mode and detach from monitoring, then reattach later:
|
||||
|
||||
```shell-sessionnomad node drain -enable -detach -self
|
||||
```shell-session
|
||||
$ nomad node drain -enable -detach -self
|
||||
...
|
||||
$ nomad node drain -self -monitor
|
||||
...
|
||||
|
||||
@@ -55,13 +55,15 @@ operation is desired.
|
||||
|
||||
Enable scheduling eligibility on node with ID prefix "574545c5":
|
||||
|
||||
```shell-sessionnomad node eligibility -enable 574545c5
|
||||
```shell-session
|
||||
$ nomad node eligibility -enable 574545c5
|
||||
Node "574545c5-c2d7-e352-d505-5e2cb9fe169f" scheduling eligibility set: eligible for scheduling
|
||||
```
|
||||
|
||||
Disable scheduling eligibility on the local node:
|
||||
|
||||
```shell-sessionnomad node eligibility -disable -self
|
||||
```shell-session
|
||||
$ nomad node eligibility -disable -self
|
||||
Node "574545c5-c2d7-e352-d505-5e2cb9fe169f" scheduling eligibility set: ineligible for scheduling
|
||||
```
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ information will be displayed. If running the command on a Nomad Client, the
|
||||
|
||||
List view:
|
||||
|
||||
```shell-sessionnomad node status
|
||||
```shell-session
|
||||
$ nomad node status
|
||||
ID DC Name Class Drain Eligibility Status
|
||||
a72dfba2 dc1 node1 <none> false eligible ready
|
||||
1f3f03ea dc1 node2 <none> false eligible ready
|
||||
@@ -61,7 +62,8 @@ a72dfba2 dc1 node1 <none> false eligible ready
|
||||
|
||||
List view, with running allocations:
|
||||
|
||||
```shell-sessionnomad node status -allocs
|
||||
```shell-session
|
||||
$ nomad node status -allocs
|
||||
ID DC Name Class Drain Eligibility Status Running Allocs
|
||||
4d2ba53b dc1 node1 <none> false eligible ready 1
|
||||
34dfba32 dc1 node2 <none> false eligible ready 3
|
||||
@@ -69,7 +71,8 @@ ID DC Name Class Drain Eligibility Status Running Allocs
|
||||
|
||||
Single-node view in short mode:
|
||||
|
||||
```shell-sessionnomad node status -short 1f3f03ea
|
||||
```shell-session
|
||||
$ nomad node status -short 1f3f03ea
|
||||
ID = c754da1f
|
||||
Name = nomad
|
||||
Class = <none>
|
||||
@@ -85,7 +88,8 @@ ID Eval ID Job ID Task Group Desired Status Client Status
|
||||
|
||||
Full output for a single node:
|
||||
|
||||
```shell-sessionnomad node status 1f3f03ea
|
||||
```shell-session
|
||||
$ nomad node status 1f3f03ea
|
||||
ID = c754da1f
|
||||
Name = nomad-server01
|
||||
Class = <none>
|
||||
@@ -127,7 +131,8 @@ ID Eval ID Job ID Task Group Desired Status Client Status
|
||||
|
||||
Using `-self` when on a Nomad Client:
|
||||
|
||||
```shell-sessionnomad node status -self
|
||||
```shell-session
|
||||
$ nomad node status -self
|
||||
ID = c754da1f
|
||||
Name = nomad-client01
|
||||
Class = <none>
|
||||
@@ -196,7 +201,8 @@ the following:
|
||||
|
||||
Using `-stats` to see detailed to resource usage information on the node:
|
||||
|
||||
```shell-sessionnomad node status -stats c754da1f
|
||||
```shell-session
|
||||
$ nomad node status -stats c754da1f
|
||||
ID = c754da1f
|
||||
Name = nomad-client01
|
||||
Class = <none>
|
||||
@@ -276,7 +282,8 @@ ed3665f5 8bf94335 example cache run running
|
||||
|
||||
To view verbose information about the node:
|
||||
|
||||
```shell-sessionnomad node status -verbose c754da1f
|
||||
```shell-session
|
||||
$ nomad node status -verbose c754da1f
|
||||
ID = c754da1f-6337-b86d-47dc-2ef4c71aca14
|
||||
Name = nomad
|
||||
Class = <none>
|
||||
|
||||
@@ -23,7 +23,8 @@ nomad operator autopilot get-config [options]
|
||||
|
||||
The output looks like this:
|
||||
|
||||
```shell-sessionnomad operator autopilot get-config
|
||||
```shell-session
|
||||
$ nomad operator autopilot get-config
|
||||
CleanupDeadServers = true
|
||||
LastContactThreshold = 200ms
|
||||
MaxTrailingLogs = 250
|
||||
|
||||
@@ -22,6 +22,7 @@ nomad operator keygen
|
||||
|
||||
## Example
|
||||
|
||||
```shell-sessionnomad operator keygen
|
||||
```shell-session
|
||||
$ nomad operator keygen
|
||||
YgZOXLMhC7TtZqeghMT8+w==
|
||||
```
|
||||
|
||||
@@ -52,7 +52,8 @@ The output of the `nomad operator keyring -list` command consolidates
|
||||
information from all the Nomad servers from all datacenters and regions to
|
||||
provide a simple and easy to understand view of the cluster.
|
||||
|
||||
```shell-sessionnomad operator keyring -list
|
||||
```shell-session
|
||||
$ nomad operator keyring -list
|
||||
==> Gathering installed encryption keys...
|
||||
Key
|
||||
PGm64/neoebUBqYR/lZTbA==
|
||||
|
||||
@@ -36,7 +36,8 @@ nomad operator raft list-peers [options]
|
||||
|
||||
An example output with three servers is as follows:
|
||||
|
||||
```shell-sessionnomad operator raft list-peers
|
||||
```shell-session
|
||||
$ nomad operator raft list-peers
|
||||
Node ID Address State Voter
|
||||
nomad-server01.global 10.10.11.5:4647 10.10.11.5:4647 follower true
|
||||
nomad-server02.global 10.10.11.6:4647 10.10.11.6:4647 leader true
|
||||
|
||||
@@ -45,14 +45,16 @@ of the most useful status fields for each.
|
||||
|
||||
List of all plugins:
|
||||
|
||||
```shell-sessionnomad plugin [-type csi] status
|
||||
```shell-session
|
||||
$ nomad plugin [-type csi] status
|
||||
ID Provider Controllers Healthy / Expected Nodes Healthy / Expected
|
||||
ebs-prod aws.ebs 1 / 1 1 / 1
|
||||
```
|
||||
|
||||
Short view of a specific plugin:
|
||||
|
||||
```shell-sessionnomad plugin [-type csi] status ebs-prod
|
||||
```shell-session
|
||||
$ nomad plugin [-type csi] status ebs-prod
|
||||
ID = ebs-prod
|
||||
Provider = aws.ebs
|
||||
Version = 1.0.1
|
||||
@@ -64,7 +66,8 @@ Nodes Expected = 1
|
||||
|
||||
Full status information of a plugin:
|
||||
|
||||
```shell-sessionnomad plugin [-type csi] status ebs-prod
|
||||
```shell-session
|
||||
$ nomad plugin [-type csi] status ebs-prod
|
||||
ID = ebs-prod
|
||||
Provider = aws.ebs
|
||||
Version = 1.0.1
|
||||
|
||||
@@ -34,6 +34,7 @@ specification can be read from stdin by setting the path to "-".
|
||||
|
||||
Create a new quota specification:
|
||||
|
||||
```shell-sessionnomad quota apply my-quota.hcl
|
||||
```shell-session
|
||||
$ nomad quota apply my-quota.hcl
|
||||
Successfully applied quota specification "my-quota"!
|
||||
```
|
||||
|
||||
@@ -29,6 +29,7 @@ The `quota delete` command requires the quota specification name as an argument.
|
||||
|
||||
Delete a quota specification:
|
||||
|
||||
```shell-sessionnomad quota delete my-quota
|
||||
```shell-session
|
||||
$ nomad quota delete my-quota
|
||||
Successfully deleted quota "my-quota"!
|
||||
```
|
||||
|
||||
@@ -28,6 +28,7 @@ nomad quota init
|
||||
|
||||
Create an example quota specification:
|
||||
|
||||
```shell-sessionnomad quota init
|
||||
```shell-session
|
||||
$ nomad quota init
|
||||
Example quota specification written to spec.hcl
|
||||
```
|
||||
|
||||
@@ -33,7 +33,8 @@ nomad quota inspect [options] <quota_name>
|
||||
|
||||
Inspect a quota specification:
|
||||
|
||||
```shell-sessionnomad quota inspect default-quota
|
||||
```shell-session
|
||||
$ nomad quota inspect default-quota
|
||||
{
|
||||
"Spec": {
|
||||
"CreateIndex": 8,
|
||||
|
||||
@@ -33,7 +33,8 @@ nomad quota list
|
||||
|
||||
List all quota specifications:
|
||||
|
||||
```shell-sessionnomad quota list
|
||||
```shell-session
|
||||
$ nomad quota list
|
||||
Name Description
|
||||
default Limit the shared default namespace
|
||||
```
|
||||
|
||||
@@ -29,7 +29,8 @@ nomad quota status [options] <quota_name>
|
||||
|
||||
View the status of a quota specification:
|
||||
|
||||
```shell-sessionnomad quota status default-quota
|
||||
```shell-session
|
||||
$ nomad quota status default-quota
|
||||
Name = default-quota
|
||||
Description = Limit the shared default namespace
|
||||
Limits = 1
|
||||
|
||||
@@ -43,6 +43,7 @@ file name.
|
||||
|
||||
Write a policy:
|
||||
|
||||
```shell-sessionnomad sentinel write -description "My test policy" foo test.sentinel
|
||||
```shell-session
|
||||
$ nomad sentinel write -description "My test policy" foo test.sentinel
|
||||
Successfully wrote "foo" Sentinel policy!
|
||||
```
|
||||
|
||||
@@ -29,6 +29,7 @@ The `sentinel delete` command requires a single argument, the policy name.
|
||||
|
||||
Delete a policy:
|
||||
|
||||
```shell-sessionnomad sentinel delete foo
|
||||
```shell-session
|
||||
$ nomad sentinel delete foo
|
||||
Successfully deleted "foo" Sentinel policy!
|
||||
```
|
||||
|
||||
@@ -30,7 +30,8 @@ The `sentinel list` command requires no arguments.
|
||||
|
||||
List all policies:
|
||||
|
||||
```shell-sessionnomad sentinel list
|
||||
```shell-session
|
||||
$ nomad sentinel list
|
||||
Name Scope Enforcement Level Description
|
||||
foo submit-job advisory my test policy
|
||||
```
|
||||
|
||||
@@ -33,7 +33,8 @@ The `sentinel read` command requires a single argument, the policy name.
|
||||
|
||||
Read all policies:
|
||||
|
||||
```shell-sessionnomad sentinel read foo
|
||||
```shell-session
|
||||
$ nomad sentinel read foo
|
||||
Name = foo
|
||||
Scope = submit-job
|
||||
Enforcement Level = advisory
|
||||
|
||||
@@ -31,6 +31,7 @@ to enter the "left" state.
|
||||
|
||||
Force-leave the server "node1":
|
||||
|
||||
```shell-sessionnomad server force-leave node1
|
||||
```shell-session
|
||||
$ nomad server force-leave node1
|
||||
|
||||
```
|
||||
|
||||
@@ -33,6 +33,7 @@ be 1.
|
||||
|
||||
Join the local server to a remote server:
|
||||
|
||||
```shell-sessionnomad server join 10.0.0.8:4648
|
||||
```shell-session
|
||||
$ nomad server join 10.0.0.8:4648
|
||||
Joined 1 servers successfully
|
||||
```
|
||||
|
||||
@@ -33,7 +33,8 @@ nomad server members [options]
|
||||
|
||||
Default view:
|
||||
|
||||
```shell-sessionnomad server members
|
||||
```shell-session
|
||||
$ nomad server members
|
||||
Name Addr Port Status Proto Build DC Region
|
||||
node1.global 10.0.0.8 4648 alive 2 0.1.0dev dc1 global
|
||||
node2.global 10.0.0.9 4648 alive 2 0.1.0dev dc1 global
|
||||
@@ -41,7 +42,8 @@ node2.global 10.0.0.9 4648 alive 2 0.1.0dev dc1 global
|
||||
|
||||
Detailed view:
|
||||
|
||||
```shell-sessionnomad server members -detailed
|
||||
```shell-session
|
||||
$ nomad server members -detailed
|
||||
Name Addr Port Tags
|
||||
node1 10.0.0.8 4648 bootstrap=1,build=0.1.0dev,vsn=1,vsn_max=1,dc=dc1,port=4647,region=global,role=nomad,vsn_min=1
|
||||
node2 10.0.0.9 4648 bootstrap=0,build=0.1.0dev,vsn=1,vsn_max=1,dc=dc1,port=4647,region=global,role=nomad,vsn_min=1
|
||||
|
||||
@@ -31,7 +31,8 @@ for backwards compatibility and should not be relied on.
|
||||
|
||||
Display the status of a job:
|
||||
|
||||
```shell-sessionnomad status example
|
||||
```shell-session
|
||||
$ nomad status example
|
||||
ID = example
|
||||
Name = example
|
||||
Submit Date = 08/28/17 23:01:39 UTC
|
||||
@@ -62,7 +63,8 @@ e1d14a39 f9dabe93 cache 0 run running 08/28/17 23:01:39 UTC
|
||||
|
||||
Display the status of an allocation:
|
||||
|
||||
```shell-sessionnomad status e1d14a39
|
||||
```shell-session
|
||||
$ nomad status e1d14a39
|
||||
ID = e1d14a39
|
||||
Eval ID = cc882755
|
||||
Name = example.cache[0]
|
||||
@@ -97,7 +99,8 @@ Time Type Description
|
||||
|
||||
Display the status of a deployment:
|
||||
|
||||
```shell-sessionnomad status f5506391
|
||||
```shell-session
|
||||
$ nomad status f5506391
|
||||
ID = f5506391
|
||||
Job ID = example
|
||||
Job Version = 0
|
||||
@@ -111,7 +114,8 @@ cache 1 1 1 0
|
||||
|
||||
Display the status of a node:
|
||||
|
||||
```shell-sessionnomad status f9dabe93
|
||||
```shell-session
|
||||
$ nomad status f9dabe93
|
||||
ID = f9dabe93
|
||||
Name = nomad-server01
|
||||
Class = <none>
|
||||
|
||||
@@ -25,6 +25,7 @@ nomad system gc [options]
|
||||
|
||||
Running the system gc command does not output unless an error occurs:
|
||||
|
||||
```shell-sessionnomad system gc
|
||||
```shell-session
|
||||
$ nomad system gc
|
||||
|
||||
```
|
||||
|
||||
@@ -25,6 +25,7 @@ nomad system reconcile summaries [options]
|
||||
Running the system reconcile summaries command does not output unless an error
|
||||
occurs:
|
||||
|
||||
```shell-sessionnomad system reconcile summaries
|
||||
```shell-session
|
||||
$ nomad system reconcile summaries
|
||||
|
||||
```
|
||||
|
||||
@@ -30,18 +30,21 @@ details for that object. Supported identifiers are jobs, allocations and nodes.
|
||||
|
||||
Open the UI homepage:
|
||||
|
||||
```shell-sessionnomad ui
|
||||
```shell-session
|
||||
$ nomad ui
|
||||
Opening URL "http://127.0.0.1:4646"
|
||||
```
|
||||
|
||||
Open the UI directly to look at a job:
|
||||
|
||||
```shell-sessionnomad ui redis-job
|
||||
```shell-session
|
||||
$ nomad ui redis-job
|
||||
http://127.0.0.1:4646/ui/jobs/redis-job
|
||||
```
|
||||
|
||||
Open the UI directly to look at an allocation:
|
||||
|
||||
```shell-sessionnomad ui d4005969
|
||||
```shell-session
|
||||
$ nomad ui d4005969
|
||||
Opening URL "http://127.0.0.1:4646/ui/allocations/d4005969-b16f-10eb-4fe1-a5374986083d"
|
||||
```
|
||||
|
||||
@@ -25,6 +25,7 @@ end, indicating that local, uncommitted changes were detected at build time.
|
||||
|
||||
## Examples
|
||||
|
||||
```shell-sessionnomad version
|
||||
```shell-session
|
||||
$ nomad version
|
||||
Nomad v0.0.0-615-gcf3c6aa-dev (cf3c6aa8a75a689987b689d75ae2ba73458465cb+CHANGES)
|
||||
```
|
||||
|
||||
@@ -49,14 +49,16 @@ of the most useful status fields for each.
|
||||
|
||||
List of all volumes:
|
||||
|
||||
```shell-sessionnomad volume [-type csi] status
|
||||
```shell-session
|
||||
$ nomad volume [-type csi] status
|
||||
ID Name Plugin ID Schedulable Access Mode
|
||||
ebs_prod_db1 database ebs-prod true single-node-writer
|
||||
```
|
||||
|
||||
Short view of a specific volume:
|
||||
|
||||
```shell-sessionnomad volume status [-verbose] [-plugin=ebs-prod] ebs_prod_db1
|
||||
```shell-session
|
||||
$ nomad volume status [-verbose] [-plugin=ebs-prod] ebs_prod_db1
|
||||
ID = ebs_prod_db1
|
||||
Name = database
|
||||
Type = csi
|
||||
@@ -77,7 +79,8 @@ Namespace = default
|
||||
|
||||
Full status information of a volume:
|
||||
|
||||
```shell-sessionnomad volume status [-verbose] [-plugin=ebs-prod] ebs_prod_db1
|
||||
```shell-session
|
||||
$ nomad volume status [-verbose] [-plugin=ebs-prod] ebs_prod_db1
|
||||
ID = ebs_prod_db1
|
||||
Name = database
|
||||
Type = csi
|
||||
|
||||
@@ -21,8 +21,8 @@ and merged in lexicographical order. Directories are not loaded recursively.
|
||||
|
||||
For example:
|
||||
|
||||
```shell-sessionnomad agent -config=server.conf -config=/etc/nomad -config=extra.json
|
||||
|
||||
```shell-session
|
||||
$ nomad agent -config=server.conf -config=/etc/nomad -config=extra.json
|
||||
```
|
||||
|
||||
This will load configuration from `server.conf`, from `.hcl` and `.json` files
|
||||
|
||||
@@ -139,7 +139,8 @@ tested or documented by Nomad.
|
||||
|
||||
Inspect a node with a GPU:
|
||||
|
||||
```shell-sessionnomad node status 4d46e59f
|
||||
```shell-session
|
||||
$ nomad node status 4d46e59f
|
||||
ID = 4d46e59f
|
||||
Name = nomad
|
||||
Class = <none>
|
||||
@@ -175,7 +176,8 @@ No allocations placed
|
||||
|
||||
Display detailed statistics on a node with a GPU:
|
||||
|
||||
```shell-sessionnomad node status -stats 4d46e59f
|
||||
```shell-session
|
||||
$ nomad node status -stats 4d46e59f
|
||||
ID = 4d46e59f
|
||||
Name = nomad
|
||||
Class = <none>
|
||||
@@ -259,7 +261,8 @@ job "gpu-test" {
|
||||
}
|
||||
```
|
||||
|
||||
```shell-sessionnomad run example.nomad
|
||||
```shell-session
|
||||
$ nomad run example.nomad
|
||||
==> Monitoring evaluation "21bd7584"
|
||||
Evaluation triggered by job "gpu-test"
|
||||
Allocation "d250baed" created: node "4d46e59f", group "smi"
|
||||
|
||||
@@ -501,8 +501,8 @@ client {
|
||||
plugin "docker" {
|
||||
config {
|
||||
auth {
|
||||
# Nomad will prepend "docker-credential-" to the helper value and call
|
||||
# that script name.
|
||||
# Nomad will prepend "docker-credential-" to the helper value and call
|
||||
# that script name.
|
||||
helper = "ecr"
|
||||
}
|
||||
}
|
||||
@@ -632,8 +632,8 @@ Nomad can communicate with the Docker daemon.
|
||||
For example, on Ubuntu you can use the `usermod` command to add the `vagrant`
|
||||
user to the `docker` group so you can run Nomad without root:
|
||||
|
||||
```sh
|
||||
sudo usermod -G docker -a vagrant
|
||||
```shell-session
|
||||
$ sudo usermod -G docker -a vagrant
|
||||
```
|
||||
|
||||
For the best performance and security features you should use recent versions
|
||||
|
||||
@@ -38,7 +38,7 @@ as a copy of [`git`](https://www.git-scm.com/) in your `PATH`.
|
||||
|
||||
1. Clone the Nomad repository from GitHub into your `GOPATH`:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ mkdir -p $GOPATH/src/github.com/hashicorp && cd $_
|
||||
$ git clone https://github.com/hashicorp/nomad.git
|
||||
$ cd nomad
|
||||
@@ -47,7 +47,7 @@ as a copy of [`git`](https://www.git-scm.com/) in your `PATH`.
|
||||
1. Bootstrap the project. This will download and compile libraries and tools
|
||||
needed to compile Nomad:
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ make bootstrap
|
||||
```
|
||||
|
||||
@@ -56,7 +56,7 @@ as a copy of [`git`](https://www.git-scm.com/) in your `PATH`.
|
||||
just a shortcut that builds `nomad` for only your local build environment (no
|
||||
cross-compiled targets).
|
||||
|
||||
```shell
|
||||
```shell-session
|
||||
$ make dev
|
||||
```
|
||||
|
||||
@@ -66,6 +66,7 @@ To verify Nomad is properly installed, run `nomad -v` on your system. You should
|
||||
see help output. If you are executing it from the command line, make sure it is
|
||||
on your `PATH` or you may get an error about `nomad` not being found.
|
||||
|
||||
```shell-sessionnomad -v
|
||||
```shell-session
|
||||
$ nomad -v
|
||||
|
||||
```
|
||||
|
||||
@@ -41,7 +41,8 @@ of configuration options, but most have sane defaults.
|
||||
|
||||
When running `nomad agent`, you should see output similar to this:
|
||||
|
||||
```shell-sessionnomad agent -dev
|
||||
```shell-session
|
||||
$ nomad agent -dev
|
||||
==> Starting Nomad agent...
|
||||
==> Nomad agent configuration:
|
||||
|
||||
|
||||
@@ -82,7 +82,8 @@ you should tune the OS to avoid this overlap.
|
||||
|
||||
On Linux this can be checked and set as follows:
|
||||
|
||||
```shell-sessioncat /proc/sys/net/ipv4/ip_local_port_range
|
||||
```shell-session
|
||||
$ cat /proc/sys/net/ipv4/ip_local_port_range
|
||||
32768 60999
|
||||
$ echo "49152 65535" > /proc/sys/net/ipv4/ip_local_port_range
|
||||
```
|
||||
@@ -93,7 +94,8 @@ Nomad's task group networks and Consul Connect integration use bridge networking
|
||||
|
||||
These tunables can be set to allow iptables processing for the bridge network as follows:
|
||||
|
||||
```shell-sessionecho 1 > /proc/sys/net/bridge/bridge-nf-call-arptables
|
||||
```shell-session
|
||||
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-arptables
|
||||
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables
|
||||
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
|
||||
```
|
||||
|
||||
@@ -61,8 +61,8 @@ run in dev mode with the following command:
|
||||
|
||||
**Note**: Nomad's Connect integration requires Consul in your `$PATH`
|
||||
|
||||
```shell-sessionconsul agent -dev
|
||||
|
||||
```shell-session
|
||||
$ consul agent -dev
|
||||
```
|
||||
|
||||
To use Connect on a non-dev Consul agent, you will minimally need to enable the
|
||||
@@ -103,8 +103,8 @@ Nomad must schedule onto a routable interface in order for the proxies to
|
||||
connect to each other. The following steps show how to start a Nomad dev agent
|
||||
configured for Connect.
|
||||
|
||||
```shell-sessionsudo nomad agent -dev-connect
|
||||
|
||||
```shell-session
|
||||
$ sudo nomad agent -dev-connect
|
||||
```
|
||||
|
||||
### CNI Plugins
|
||||
@@ -115,7 +115,8 @@ must have CNI plugins installed.
|
||||
|
||||
The following commands install CNI plugins:
|
||||
|
||||
```shell-sessioncurl -L -o cni-plugins.tgz https://github.com/containernetworking/plugins/releases/download/v0.8.4/cni-plugins-linux-amd64-v0.8.4.tgz
|
||||
```shell-session
|
||||
$ curl -L -o cni-plugins.tgz https://github.com/containernetworking/plugins/releases/download/v0.8.4/cni-plugins-linux-amd64-v0.8.4.tgz
|
||||
$ sudo mkdir -p /opt/cni/bin
|
||||
$ sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz
|
||||
```
|
||||
@@ -124,7 +125,8 @@ Ensure the your Linux operating system distribution has been configured to allow
|
||||
container traffic through the bridge network to be routed via iptables. These
|
||||
tunables can be set as follows:
|
||||
|
||||
```shell-sessionecho 1 > /proc/sys/net/bridge/bridge-nf-call-arptables
|
||||
```shell-session
|
||||
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-arptables
|
||||
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables
|
||||
$ echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
|
||||
```
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user