From e69fc1f459b8b1d8ed7da145b55721302cb4a18a Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Mon, 18 May 2020 16:53:06 -0400 Subject: [PATCH] fix shell-session snippet error --- website/pages/api-docs/agent.mdx | 2 +- website/pages/api-docs/jobs.mdx | 65 +++++++++----- website/pages/api-docs/json-jobs.mdx | 7 +- website/pages/api-docs/metrics.mdx | 8 +- website/pages/api-docs/namespaces.mdx | 18 ++-- website/pages/api-docs/nodes.mdx | 24 ++++-- website/pages/api-docs/operator.mdx | 23 +++-- website/pages/api-docs/plugins.mdx | 6 +- website/pages/api-docs/quotas.mdx | 27 ++++-- website/pages/api-docs/regions.mdx | 3 +- website/pages/api-docs/scaling-policies.mdx | 6 +- website/pages/api-docs/search.mdx | 6 +- website/pages/api-docs/sentinel-policies.mdx | 12 ++- website/pages/api-docs/status.mdx | 6 +- website/pages/api-docs/system.mdx | 6 +- website/pages/api-docs/validate.mdx | 3 +- website/pages/api-docs/volumes.mdx | 12 ++- website/pages/docs/commands/acl/bootstrap.mdx | 3 +- .../pages/docs/commands/acl/policy-apply.mdx | 3 +- .../pages/docs/commands/acl/policy-delete.mdx | 3 +- .../pages/docs/commands/acl/policy-info.mdx | 3 +- .../pages/docs/commands/acl/policy-list.mdx | 3 +- .../pages/docs/commands/acl/token-create.mdx | 3 +- .../pages/docs/commands/acl/token-delete.mdx | 3 +- .../pages/docs/commands/acl/token-info.mdx | 3 +- .../pages/docs/commands/acl/token-list.mdx | 3 +- .../pages/docs/commands/acl/token-self.mdx | 3 +- .../pages/docs/commands/acl/token-update.mdx | 3 +- website/pages/docs/commands/agent-info.mdx | 3 +- website/pages/docs/commands/agent.mdx | 2 +- website/pages/docs/commands/alloc/exec.mdx | 8 +- website/pages/docs/commands/alloc/fs.mdx | 3 +- website/pages/docs/commands/alloc/logs.mdx | 3 +- website/pages/docs/commands/alloc/restart.mdx | 3 +- website/pages/docs/commands/alloc/signal.mdx | 3 +- website/pages/docs/commands/alloc/status.mdx | 9 +- website/pages/docs/commands/alloc/stop.mdx | 3 +- .../pages/docs/commands/deployment/fail.mdx | 3 +- .../pages/docs/commands/deployment/list.mdx | 3 +- .../pages/docs/commands/deployment/pause.mdx | 3 +- .../docs/commands/deployment/promote.mdx | 4 +- .../pages/docs/commands/deployment/resume.mdx | 3 +- .../pages/docs/commands/deployment/status.mdx | 6 +- website/pages/docs/commands/eval-status.mdx | 6 +- website/pages/docs/commands/index.mdx | 6 +- .../pages/docs/commands/job/deployments.mdx | 3 +- website/pages/docs/commands/job/dispatch.mdx | 9 +- website/pages/docs/commands/job/eval.mdx | 9 +- website/pages/docs/commands/job/history.mdx | 6 +- website/pages/docs/commands/job/init.mdx | 3 +- website/pages/docs/commands/job/inspect.mdx | 3 +- .../docs/commands/job/periodic-force.mdx | 6 +- website/pages/docs/commands/job/plan.mdx | 12 ++- website/pages/docs/commands/job/promote.mdx | 4 +- website/pages/docs/commands/job/revert.mdx | 3 +- website/pages/docs/commands/job/run.mdx | 12 ++- website/pages/docs/commands/job/status.mdx | 21 +++-- website/pages/docs/commands/job/stop.mdx | 6 +- website/pages/docs/commands/job/validate.mdx | 6 +- website/pages/docs/commands/monitor.mdx | 3 +- .../pages/docs/commands/namespace/apply.mdx | 3 +- .../pages/docs/commands/namespace/delete.mdx | 3 +- .../pages/docs/commands/namespace/inspect.mdx | 3 +- .../pages/docs/commands/namespace/list.mdx | 3 +- .../pages/docs/commands/namespace/status.mdx | 3 +- website/pages/docs/commands/node/config.mdx | 6 +- website/pages/docs/commands/node/drain.mdx | 15 ++-- .../pages/docs/commands/node/eligibility.mdx | 6 +- website/pages/docs/commands/node/status.mdx | 21 +++-- .../operator/autopilot-get-config.mdx | 3 +- .../pages/docs/commands/operator/keygen.mdx | 3 +- .../pages/docs/commands/operator/keyring.mdx | 3 +- .../commands/operator/raft-list-peers.mdx | 3 +- website/pages/docs/commands/plugin/status.mdx | 9 +- website/pages/docs/commands/quota/apply.mdx | 3 +- website/pages/docs/commands/quota/delete.mdx | 3 +- website/pages/docs/commands/quota/init.mdx | 3 +- website/pages/docs/commands/quota/inspect.mdx | 3 +- website/pages/docs/commands/quota/list.mdx | 3 +- website/pages/docs/commands/quota/status.mdx | 3 +- .../pages/docs/commands/sentinel/apply.mdx | 3 +- .../pages/docs/commands/sentinel/delete.mdx | 3 +- website/pages/docs/commands/sentinel/list.mdx | 3 +- website/pages/docs/commands/sentinel/read.mdx | 3 +- .../docs/commands/server/force-leave.mdx | 3 +- website/pages/docs/commands/server/join.mdx | 3 +- .../pages/docs/commands/server/members.mdx | 6 +- website/pages/docs/commands/status.mdx | 12 ++- website/pages/docs/commands/system/gc.mdx | 3 +- .../commands/system/reconcile-summaries.mdx | 3 +- website/pages/docs/commands/ui.mdx | 9 +- website/pages/docs/commands/version.mdx | 3 +- website/pages/docs/commands/volume/status.mdx | 9 +- website/pages/docs/configuration/index.mdx | 4 +- website/pages/docs/devices/nvidia.mdx | 9 +- website/pages/docs/drivers/docker.mdx | 8 +- website/pages/docs/install/index.mdx | 9 +- .../docs/install/production/nomad-agent.mdx | 3 +- .../docs/install/production/requirements.mdx | 6 +- .../docs/integrations/consul-connect.mdx | 14 +-- .../docs/integrations/vault-integration.mdx | 85 ++++++++++--------- .../docs/internals/scheduling/preemption.mdx | 7 +- website/pages/docs/job-specification/job.mdx | 4 +- website/pages/docs/upgrade/index.mdx | 2 +- .../pages/docs/vault-integration/index.mdx | 12 +-- .../pages/intro/getting-started/cluster.mdx | 15 ++-- website/pages/intro/getting-started/index.mdx | 7 +- website/pages/intro/getting-started/jobs.mdx | 30 ++++--- .../pages/intro/getting-started/running.mdx | 9 +- 109 files changed, 527 insertions(+), 306 deletions(-) diff --git a/website/pages/api-docs/agent.mdx b/website/pages/api-docs/agent.mdx index d1c8ee711..0d46c5851 100644 --- a/website/pages/api-docs/agent.mdx +++ b/website/pages/api-docs/agent.mdx @@ -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 ``` diff --git a/website/pages/api-docs/jobs.mdx b/website/pages/api-docs/jobs.mdx index f1dd114bd..109608779 100644 --- a/website/pages/api-docs/jobs.mdx +++ b/website/pages/api-docs/jobs.mdx @@ -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 diff --git a/website/pages/api-docs/json-jobs.mdx b/website/pages/api-docs/json-jobs.mdx index 45954ecf3..36d454696 100644 --- a/website/pages/api-docs/json-jobs.mdx +++ b/website/pages/api-docs/json-jobs.mdx @@ -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, diff --git a/website/pages/api-docs/metrics.mdx b/website/pages/api-docs/metrics.mdx index 9917bf242..d2d540773 100644 --- a/website/pages/api-docs/metrics.mdx +++ b/website/pages/api-docs/metrics.mdx @@ -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 diff --git a/website/pages/api-docs/namespaces.mdx b/website/pages/api-docs/namespaces.mdx index 99c798baa..8173ddb14 100644 --- a/website/pages/api-docs/namespaces.mdx +++ b/website/pages/api-docs/namespaces.mdx @@ -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 ``` diff --git a/website/pages/api-docs/nodes.mdx b/website/pages/api-docs/nodes.mdx index 8de2bfa6b..3ff11dd0b 100644 --- a/website/pages/api-docs/nodes.mdx +++ b/website/pages/api-docs/nodes.mdx @@ -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 diff --git a/website/pages/api-docs/operator.mdx b/website/pages/api-docs/operator.mdx index 6ae229d68..bccd969a6 100644 --- a/website/pages/api-docs/operator.mdx +++ b/website/pages/api-docs/operator.mdx @@ -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. diff --git a/website/pages/api-docs/plugins.mdx b/website/pages/api-docs/plugins.mdx index f66da2e57..1d717995f 100644 --- a/website/pages/api-docs/plugins.mdx +++ b/website/pages/api-docs/plugins.mdx @@ -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 ``` diff --git a/website/pages/api-docs/quotas.mdx b/website/pages/api-docs/quotas.mdx index 42e17dddc..a9e2febd4 100644 --- a/website/pages/api-docs/quotas.mdx +++ b/website/pages/api-docs/quotas.mdx @@ -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 ``` diff --git a/website/pages/api-docs/regions.mdx b/website/pages/api-docs/regions.mdx index ac2284aba..dd0559f09 100644 --- a/website/pages/api-docs/regions.mdx +++ b/website/pages/api-docs/regions.mdx @@ -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 ``` diff --git a/website/pages/api-docs/scaling-policies.mdx b/website/pages/api-docs/scaling-policies.mdx index ffe076962..626c6986f 100644 --- a/website/pages/api-docs/scaling-policies.mdx +++ b/website/pages/api-docs/scaling-policies.mdx @@ -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 ``` diff --git a/website/pages/api-docs/search.mdx b/website/pages/api-docs/search.mdx index 107c6ccbb..cac8ff382 100644 --- a/website/pages/api-docs/search.mdx +++ b/website/pages/api-docs/search.mdx @@ -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 diff --git a/website/pages/api-docs/sentinel-policies.mdx b/website/pages/api-docs/sentinel-policies.mdx index 91a78c888..455a05010 100644 --- a/website/pages/api-docs/sentinel-policies.mdx +++ b/website/pages/api-docs/sentinel-policies.mdx @@ -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 ``` diff --git a/website/pages/api-docs/status.mdx b/website/pages/api-docs/status.mdx index 98df3387e..f56e328ba 100644 --- a/website/pages/api-docs/status.mdx +++ b/website/pages/api-docs/status.mdx @@ -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 ``` diff --git a/website/pages/api-docs/system.mdx b/website/pages/api-docs/system.mdx index a6829bfcd..6a8d5e4e6 100644 --- a/website/pages/api-docs/system.mdx +++ b/website/pages/api-docs/system.mdx @@ -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 ``` diff --git a/website/pages/api-docs/validate.mdx b/website/pages/api-docs/validate.mdx index 6ec01390c..92f04330b 100644 --- a/website/pages/api-docs/validate.mdx +++ b/website/pages/api-docs/validate.mdx @@ -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 diff --git a/website/pages/api-docs/volumes.mdx b/website/pages/api-docs/volumes.mdx index 599f3f902..74fc6a3e5 100644 --- a/website/pages/api-docs/volumes.mdx +++ b/website/pages/api-docs/volumes.mdx @@ -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 diff --git a/website/pages/docs/commands/acl/bootstrap.mdx b/website/pages/docs/commands/acl/bootstrap.mdx index 3efc82753..836c720e0 100644 --- a/website/pages/docs/commands/acl/bootstrap.mdx +++ b/website/pages/docs/commands/acl/bootstrap.mdx @@ -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 diff --git a/website/pages/docs/commands/acl/policy-apply.mdx b/website/pages/docs/commands/acl/policy-apply.mdx index b12de87d8..3f7c8d7cc 100644 --- a/website/pages/docs/commands/acl/policy-apply.mdx +++ b/website/pages/docs/commands/acl/policy-apply.mdx @@ -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! ``` diff --git a/website/pages/docs/commands/acl/policy-delete.mdx b/website/pages/docs/commands/acl/policy-delete.mdx index 5f3e92c82..95d88b971 100644 --- a/website/pages/docs/commands/acl/policy-delete.mdx +++ b/website/pages/docs/commands/acl/policy-delete.mdx @@ -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! ``` diff --git a/website/pages/docs/commands/acl/policy-info.mdx b/website/pages/docs/commands/acl/policy-info.mdx index 5d813d571..d2bf26165 100644 --- a/website/pages/docs/commands/acl/policy-info.mdx +++ b/website/pages/docs/commands/acl/policy-info.mdx @@ -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 = Rules = { diff --git a/website/pages/docs/commands/acl/policy-list.mdx b/website/pages/docs/commands/acl/policy-list.mdx index f4fa98916..417e797b7 100644 --- a/website/pages/docs/commands/acl/policy-list.mdx +++ b/website/pages/docs/commands/acl/policy-list.mdx @@ -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 diff --git a/website/pages/docs/commands/acl/token-create.mdx b/website/pages/docs/commands/acl/token-create.mdx index ab00195ea..678b9756b 100644 --- a/website/pages/docs/commands/acl/token-create.mdx +++ b/website/pages/docs/commands/acl/token-create.mdx @@ -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 diff --git a/website/pages/docs/commands/acl/token-delete.mdx b/website/pages/docs/commands/acl/token-delete.mdx index 3aab35ac4..6bd65565a 100644 --- a/website/pages/docs/commands/acl/token-delete.mdx +++ b/website/pages/docs/commands/acl/token-delete.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/acl/token-info.mdx b/website/pages/docs/commands/acl/token-info.mdx index 131e9bb29..6adcb7d5b 100644 --- a/website/pages/docs/commands/acl/token-info.mdx +++ b/website/pages/docs/commands/acl/token-info.mdx @@ -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 diff --git a/website/pages/docs/commands/acl/token-list.mdx b/website/pages/docs/commands/acl/token-list.mdx index e7240dc14..159964355 100644 --- a/website/pages/docs/commands/acl/token-list.mdx +++ b/website/pages/docs/commands/acl/token-list.mdx @@ -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 client false fcf2bf84-a257-8f39-9d16-a954ed25b5be diff --git a/website/pages/docs/commands/acl/token-self.mdx b/website/pages/docs/commands/acl/token-self.mdx index bc22ac419..a3544208d 100644 --- a/website/pages/docs/commands/acl/token-self.mdx +++ b/website/pages/docs/commands/acl/token-self.mdx @@ -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 diff --git a/website/pages/docs/commands/acl/token-update.mdx b/website/pages/docs/commands/acl/token-update.mdx index 15ba34fb0..6f5004ff6 100644 --- a/website/pages/docs/commands/acl/token-update.mdx +++ b/website/pages/docs/commands/acl/token-update.mdx @@ -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 diff --git a/website/pages/docs/commands/agent-info.mdx b/website/pages/docs/commands/agent-info.mdx index 5c231a261..ddbbe6ac4 100644 --- a/website/pages/docs/commands/agent-info.mdx +++ b/website/pages/docs/commands/agent-info.mdx @@ -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 diff --git a/website/pages/docs/commands/agent.mdx b/website/pages/docs/commands/agent.mdx index 4f001cfe1..6970eb821 100644 --- a/website/pages/docs/commands/agent.mdx +++ b/website/pages/docs/commands/agent.mdx @@ -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" ``` diff --git a/website/pages/docs/commands/alloc/exec.mdx b/website/pages/docs/commands/alloc/exec.mdx index f5ef28a02..6b84e32bc 100644 --- a/website/pages/docs/commands/alloc/exec.mdx +++ b/website/pages/docs/commands/alloc/exec.mdx @@ -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$ diff --git a/website/pages/docs/commands/alloc/fs.mdx b/website/pages/docs/commands/alloc/fs.mdx index ffc599aad..25a404924 100644 --- a/website/pages/docs/commands/alloc/fs.mdx +++ b/website/pages/docs/commands/alloc/fs.mdx @@ -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/ diff --git a/website/pages/docs/commands/alloc/logs.mdx b/website/pages/docs/commands/alloc/logs.mdx index 1a709bd19..62ffbb746 100644 --- a/website/pages/docs/commands/alloc/logs.mdx +++ b/website/pages/docs/commands/alloc/logs.mdx @@ -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 diff --git a/website/pages/docs/commands/alloc/restart.mdx b/website/pages/docs/commands/alloc/restart.mdx index 8b810dc9d..3f3509041 100644 --- a/website/pages/docs/commands/alloc/restart.mdx +++ b/website/pages/docs/commands/alloc/restart.mdx @@ -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: diff --git a/website/pages/docs/commands/alloc/signal.mdx b/website/pages/docs/commands/alloc/signal.mdx index a755a0a44..061c14b95 100644 --- a/website/pages/docs/commands/alloc/signal.mdx +++ b/website/pages/docs/commands/alloc/signal.mdx @@ -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: diff --git a/website/pages/docs/commands/alloc/status.mdx b/website/pages/docs/commands/alloc/status.mdx index bcba8554f..27a103b80 100644 --- a/website/pages/docs/commands/alloc/status.mdx +++ b/website/pages/docs/commands/alloc/status.mdx @@ -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] diff --git a/website/pages/docs/commands/alloc/stop.mdx b/website/pages/docs/commands/alloc/stop.mdx index 2c5446da8..646eb5328 100644 --- a/website/pages/docs/commands/alloc/stop.mdx +++ b/website/pages/docs/commands/alloc/stop.mdx @@ -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" diff --git a/website/pages/docs/commands/deployment/fail.mdx b/website/pages/docs/commands/deployment/fail.mdx index 3a9b6c40a..b1eaa2c9d 100644 --- a/website/pages/docs/commands/deployment/fail.mdx +++ b/website/pages/docs/commands/deployment/fail.mdx @@ -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" diff --git a/website/pages/docs/commands/deployment/list.mdx b/website/pages/docs/commands/deployment/list.mdx index dceabf589..9930700c5 100644 --- a/website/pages/docs/commands/deployment/list.mdx +++ b/website/pages/docs/commands/deployment/list.mdx @@ -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 diff --git a/website/pages/docs/commands/deployment/pause.mdx b/website/pages/docs/commands/deployment/pause.mdx index 82187bb19..569d233b8 100644 --- a/website/pages/docs/commands/deployment/pause.mdx +++ b/website/pages/docs/commands/deployment/pause.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/deployment/promote.mdx b/website/pages/docs/commands/deployment/promote.mdx index bcfac4103..1ee5ed8e9 100644 --- a/website/pages/docs/commands/deployment/promote.mdx +++ b/website/pages/docs/commands/deployment/promote.mdx @@ -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 diff --git a/website/pages/docs/commands/deployment/resume.mdx b/website/pages/docs/commands/deployment/resume.mdx index f04bcb6a0..582137151 100644 --- a/website/pages/docs/commands/deployment/resume.mdx +++ b/website/pages/docs/commands/deployment/resume.mdx @@ -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" diff --git a/website/pages/docs/commands/deployment/status.mdx b/website/pages/docs/commands/deployment/status.mdx index 914d10c83..c854211c1 100644 --- a/website/pages/docs/commands/deployment/status.mdx +++ b/website/pages/docs/commands/deployment/status.mdx @@ -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 diff --git a/website/pages/docs/commands/eval-status.mdx b/website/pages/docs/commands/eval-status.mdx index db8eb4f5c..eb7aaeaf7 100644 --- a/website/pages/docs/commands/eval-status.mdx +++ b/website/pages/docs/commands/eval-status.mdx @@ -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" diff --git a/website/pages/docs/commands/index.mdx b/website/pages/docs/commands/index.mdx index dc6165ccc..657686fa0 100644 --- a/website/pages/docs/commands/index.mdx +++ b/website/pages/docs/commands/index.mdx @@ -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=` 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 ``` diff --git a/website/pages/docs/commands/job/deployments.mdx b/website/pages/docs/commands/job/deployments.mdx index b05594ddb..d130f5696 100644 --- a/website/pages/docs/commands/job/deployments.mdx +++ b/website/pages/docs/commands/job/deployments.mdx @@ -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 diff --git a/website/pages/docs/commands/job/dispatch.mdx b/website/pages/docs/commands/job/dispatch.mdx index a855a86ed..926f9eb44 100644 --- a/website/pages/docs/commands/job/dispatch.mdx +++ b/website/pages/docs/commands/job/dispatch.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/job/eval.mdx b/website/pages/docs/commands/job/eval.mdx index 2a3038c0b..a4b77976a 100644 --- a/website/pages/docs/commands/job/eval.mdx +++ b/website/pages/docs/commands/job/eval.mdx @@ -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" diff --git a/website/pages/docs/commands/job/history.mdx b/website/pages/docs/commands/job/history.mdx index e5da75f66..e6ba1c89e 100644 --- a/website/pages/docs/commands/job/history.mdx +++ b/website/pages/docs/commands/job/history.mdx @@ -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 diff --git a/website/pages/docs/commands/job/init.mdx b/website/pages/docs/commands/job/init.mdx index ab76a870d..217f29cb4 100644 --- a/website/pages/docs/commands/job/init.mdx +++ b/website/pages/docs/commands/job/init.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/job/inspect.mdx b/website/pages/docs/commands/job/inspect.mdx index 07cd93791..9b0e151c4 100644 --- a/website/pages/docs/commands/job/inspect.mdx +++ b/website/pages/docs/commands/job/inspect.mdx @@ -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", diff --git a/website/pages/docs/commands/job/periodic-force.mdx b/website/pages/docs/commands/job/periodic-force.mdx index d7a425765..86b1fce68 100644 --- a/website/pages/docs/commands/job/periodic-force.mdx +++ b/website/pages/docs/commands/job/periodic-force.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/job/plan.mdx b/website/pages/docs/commands/job/plan.mdx index ada3589bd..46fdf0209 100644 --- a/website/pages/docs/commands/job/plan.mdx +++ b/website/pages/docs/commands/job/plan.mdx @@ -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) diff --git a/website/pages/docs/commands/job/promote.mdx b/website/pages/docs/commands/job/promote.mdx index a5ca36fc4..dbdde983a 100644 --- a/website/pages/docs/commands/job/promote.mdx +++ b/website/pages/docs/commands/job/promote.mdx @@ -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 diff --git a/website/pages/docs/commands/job/revert.mdx b/website/pages/docs/commands/job/revert.mdx index 0a64cf7f4..aafe64a0c 100644 --- a/website/pages/docs/commands/job/revert.mdx +++ b/website/pages/docs/commands/job/revert.mdx @@ -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 diff --git a/website/pages/docs/commands/job/run.mdx b/website/pages/docs/commands/job/run.mdx index 012f66877..4e039c3b5 100644 --- a/website/pages/docs/commands/job/run.mdx +++ b/website/pages/docs/commands/job/run.mdx @@ -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: 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" diff --git a/website/pages/docs/commands/job/status.mdx b/website/pages/docs/commands/job/status.mdx index 392ec97f1..490d2a4e6 100644 --- a/website/pages/docs/commands/job/status.mdx +++ b/website/pages/docs/commands/job/status.mdx @@ -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 diff --git a/website/pages/docs/commands/job/stop.mdx b/website/pages/docs/commands/job/stop.mdx index 00691bfb0..f31abde94 100644 --- a/website/pages/docs/commands/job/stop.mdx +++ b/website/pages/docs/commands/job/stop.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/job/validate.mdx b/website/pages/docs/commands/job/validate.mdx index 1ee7cddf3..0339a00d1 100644 --- a/website/pages/docs/commands/job/validate.mdx +++ b/website/pages/docs/commands/job/validate.mdx @@ -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): diff --git a/website/pages/docs/commands/monitor.mdx b/website/pages/docs/commands/monitor.mdx index b30b6b645..3fa44e165 100644 --- a/website/pages/docs/commands/monitor.mdx +++ b/website/pages/docs/commands/monitor.mdx @@ -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 diff --git a/website/pages/docs/commands/namespace/apply.mdx b/website/pages/docs/commands/namespace/apply.mdx index 9935ac4aa..e3417386b 100644 --- a/website/pages/docs/commands/namespace/apply.mdx +++ b/website/pages/docs/commands/namespace/apply.mdx @@ -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"! ``` diff --git a/website/pages/docs/commands/namespace/delete.mdx b/website/pages/docs/commands/namespace/delete.mdx index 10f6c1043..d25485ecd 100644 --- a/website/pages/docs/commands/namespace/delete.mdx +++ b/website/pages/docs/commands/namespace/delete.mdx @@ -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"! ``` diff --git a/website/pages/docs/commands/namespace/inspect.mdx b/website/pages/docs/commands/namespace/inspect.mdx index dfdc21883..b85906184 100644 --- a/website/pages/docs/commands/namespace/inspect.mdx +++ b/website/pages/docs/commands/namespace/inspect.mdx @@ -33,7 +33,8 @@ nomad namespace inspect [options] Inspect a namespace: -```shell-sessionnomad namespace inspect default +```shell-session +$ nomad namespace inspect default { "CreateIndex": 5, "Description": "Default shared namespace", diff --git a/website/pages/docs/commands/namespace/list.mdx b/website/pages/docs/commands/namespace/list.mdx index 26370d8d2..dc03ce9a0 100644 --- a/website/pages/docs/commands/namespace/list.mdx +++ b/website/pages/docs/commands/namespace/list.mdx @@ -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 diff --git a/website/pages/docs/commands/namespace/status.mdx b/website/pages/docs/commands/namespace/status.mdx index 6619c593e..3ee41fbef 100644 --- a/website/pages/docs/commands/namespace/status.mdx +++ b/website/pages/docs/commands/namespace/status.mdx @@ -29,7 +29,8 @@ nomad namespace status [options] 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 diff --git a/website/pages/docs/commands/node/config.mdx b/website/pages/docs/commands/node/config.mdx index 22d933599..7477749b6 100644 --- a/website/pages/docs/commands/node/config.mdx +++ b/website/pages/docs/commands/node/config.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/node/drain.mdx b/website/pages/docs/commands/node/drain.mdx index edb7ee005..1b8e3cf43 100644 --- a/website/pages/docs/commands/node/drain.mdx +++ b/website/pages/docs/commands/node/drain.mdx @@ -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 ... diff --git a/website/pages/docs/commands/node/eligibility.mdx b/website/pages/docs/commands/node/eligibility.mdx index b66fb018f..42c7354a9 100644 --- a/website/pages/docs/commands/node/eligibility.mdx +++ b/website/pages/docs/commands/node/eligibility.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/node/status.mdx b/website/pages/docs/commands/node/status.mdx index d39f4dfd4..15d38804b 100644 --- a/website/pages/docs/commands/node/status.mdx +++ b/website/pages/docs/commands/node/status.mdx @@ -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 false eligible ready 1f3f03ea dc1 node2 false eligible ready @@ -61,7 +62,8 @@ a72dfba2 dc1 node1 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 false eligible ready 1 34dfba32 dc1 node2 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 = @@ -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 = @@ -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 = @@ -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 = @@ -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 = diff --git a/website/pages/docs/commands/operator/autopilot-get-config.mdx b/website/pages/docs/commands/operator/autopilot-get-config.mdx index f6e46fb16..5464e951f 100644 --- a/website/pages/docs/commands/operator/autopilot-get-config.mdx +++ b/website/pages/docs/commands/operator/autopilot-get-config.mdx @@ -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 diff --git a/website/pages/docs/commands/operator/keygen.mdx b/website/pages/docs/commands/operator/keygen.mdx index c76e16a9c..3baf7bfd6 100644 --- a/website/pages/docs/commands/operator/keygen.mdx +++ b/website/pages/docs/commands/operator/keygen.mdx @@ -22,6 +22,7 @@ nomad operator keygen ## Example -```shell-sessionnomad operator keygen +```shell-session +$ nomad operator keygen YgZOXLMhC7TtZqeghMT8+w== ``` diff --git a/website/pages/docs/commands/operator/keyring.mdx b/website/pages/docs/commands/operator/keyring.mdx index c4507e3c5..1ac7282ba 100644 --- a/website/pages/docs/commands/operator/keyring.mdx +++ b/website/pages/docs/commands/operator/keyring.mdx @@ -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== diff --git a/website/pages/docs/commands/operator/raft-list-peers.mdx b/website/pages/docs/commands/operator/raft-list-peers.mdx index 13982911c..2a41bd2e4 100644 --- a/website/pages/docs/commands/operator/raft-list-peers.mdx +++ b/website/pages/docs/commands/operator/raft-list-peers.mdx @@ -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 diff --git a/website/pages/docs/commands/plugin/status.mdx b/website/pages/docs/commands/plugin/status.mdx index 65f11b1c7..df1cdf012 100644 --- a/website/pages/docs/commands/plugin/status.mdx +++ b/website/pages/docs/commands/plugin/status.mdx @@ -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 diff --git a/website/pages/docs/commands/quota/apply.mdx b/website/pages/docs/commands/quota/apply.mdx index d3e56e0b3..0f113d3f8 100644 --- a/website/pages/docs/commands/quota/apply.mdx +++ b/website/pages/docs/commands/quota/apply.mdx @@ -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"! ``` diff --git a/website/pages/docs/commands/quota/delete.mdx b/website/pages/docs/commands/quota/delete.mdx index 0783e9f71..ccfbf5679 100644 --- a/website/pages/docs/commands/quota/delete.mdx +++ b/website/pages/docs/commands/quota/delete.mdx @@ -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"! ``` diff --git a/website/pages/docs/commands/quota/init.mdx b/website/pages/docs/commands/quota/init.mdx index c87a3dd8d..c0d1168e3 100644 --- a/website/pages/docs/commands/quota/init.mdx +++ b/website/pages/docs/commands/quota/init.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/quota/inspect.mdx b/website/pages/docs/commands/quota/inspect.mdx index 46e63b85e..d34c100ef 100644 --- a/website/pages/docs/commands/quota/inspect.mdx +++ b/website/pages/docs/commands/quota/inspect.mdx @@ -33,7 +33,8 @@ nomad quota inspect [options] Inspect a quota specification: -```shell-sessionnomad quota inspect default-quota +```shell-session +$ nomad quota inspect default-quota { "Spec": { "CreateIndex": 8, diff --git a/website/pages/docs/commands/quota/list.mdx b/website/pages/docs/commands/quota/list.mdx index 23c53a98a..4ec7223d1 100644 --- a/website/pages/docs/commands/quota/list.mdx +++ b/website/pages/docs/commands/quota/list.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/quota/status.mdx b/website/pages/docs/commands/quota/status.mdx index 3cf923548..0ca235001 100644 --- a/website/pages/docs/commands/quota/status.mdx +++ b/website/pages/docs/commands/quota/status.mdx @@ -29,7 +29,8 @@ nomad quota status [options] 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 diff --git a/website/pages/docs/commands/sentinel/apply.mdx b/website/pages/docs/commands/sentinel/apply.mdx index 3fa6785e6..8f78ad97b 100644 --- a/website/pages/docs/commands/sentinel/apply.mdx +++ b/website/pages/docs/commands/sentinel/apply.mdx @@ -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! ``` diff --git a/website/pages/docs/commands/sentinel/delete.mdx b/website/pages/docs/commands/sentinel/delete.mdx index d8b6cf3a1..a57a18c59 100644 --- a/website/pages/docs/commands/sentinel/delete.mdx +++ b/website/pages/docs/commands/sentinel/delete.mdx @@ -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! ``` diff --git a/website/pages/docs/commands/sentinel/list.mdx b/website/pages/docs/commands/sentinel/list.mdx index 858e221e3..b80836ea0 100644 --- a/website/pages/docs/commands/sentinel/list.mdx +++ b/website/pages/docs/commands/sentinel/list.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/sentinel/read.mdx b/website/pages/docs/commands/sentinel/read.mdx index da641cd69..e49c1a38a 100644 --- a/website/pages/docs/commands/sentinel/read.mdx +++ b/website/pages/docs/commands/sentinel/read.mdx @@ -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 diff --git a/website/pages/docs/commands/server/force-leave.mdx b/website/pages/docs/commands/server/force-leave.mdx index 58e237ab4..61a437888 100644 --- a/website/pages/docs/commands/server/force-leave.mdx +++ b/website/pages/docs/commands/server/force-leave.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/server/join.mdx b/website/pages/docs/commands/server/join.mdx index df6d01e90..3f4eba7a5 100644 --- a/website/pages/docs/commands/server/join.mdx +++ b/website/pages/docs/commands/server/join.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/server/members.mdx b/website/pages/docs/commands/server/members.mdx index 6e9ed0a26..f45bcc513 100644 --- a/website/pages/docs/commands/server/members.mdx +++ b/website/pages/docs/commands/server/members.mdx @@ -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 diff --git a/website/pages/docs/commands/status.mdx b/website/pages/docs/commands/status.mdx index f7d08056b..a57901788 100644 --- a/website/pages/docs/commands/status.mdx +++ b/website/pages/docs/commands/status.mdx @@ -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 = diff --git a/website/pages/docs/commands/system/gc.mdx b/website/pages/docs/commands/system/gc.mdx index 7824340ae..aff2c3807 100644 --- a/website/pages/docs/commands/system/gc.mdx +++ b/website/pages/docs/commands/system/gc.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/system/reconcile-summaries.mdx b/website/pages/docs/commands/system/reconcile-summaries.mdx index e160d4993..f8d1cc071 100644 --- a/website/pages/docs/commands/system/reconcile-summaries.mdx +++ b/website/pages/docs/commands/system/reconcile-summaries.mdx @@ -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 ``` diff --git a/website/pages/docs/commands/ui.mdx b/website/pages/docs/commands/ui.mdx index 9f95713ff..903032844 100644 --- a/website/pages/docs/commands/ui.mdx +++ b/website/pages/docs/commands/ui.mdx @@ -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" ``` diff --git a/website/pages/docs/commands/version.mdx b/website/pages/docs/commands/version.mdx index c768bbebd..b3d756dd9 100644 --- a/website/pages/docs/commands/version.mdx +++ b/website/pages/docs/commands/version.mdx @@ -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) ``` diff --git a/website/pages/docs/commands/volume/status.mdx b/website/pages/docs/commands/volume/status.mdx index 9bf36ca1d..8788167d0 100644 --- a/website/pages/docs/commands/volume/status.mdx +++ b/website/pages/docs/commands/volume/status.mdx @@ -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 diff --git a/website/pages/docs/configuration/index.mdx b/website/pages/docs/configuration/index.mdx index 7febc986d..91d0e2b21 100644 --- a/website/pages/docs/configuration/index.mdx +++ b/website/pages/docs/configuration/index.mdx @@ -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 diff --git a/website/pages/docs/devices/nvidia.mdx b/website/pages/docs/devices/nvidia.mdx index d8fa7c63a..222c9ae53 100644 --- a/website/pages/docs/devices/nvidia.mdx +++ b/website/pages/docs/devices/nvidia.mdx @@ -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 = @@ -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 = @@ -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" diff --git a/website/pages/docs/drivers/docker.mdx b/website/pages/docs/drivers/docker.mdx index a6ab1b6cd..3b68ae233 100644 --- a/website/pages/docs/drivers/docker.mdx +++ b/website/pages/docs/drivers/docker.mdx @@ -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 diff --git a/website/pages/docs/install/index.mdx b/website/pages/docs/install/index.mdx index e3643640c..8be776939 100644 --- a/website/pages/docs/install/index.mdx +++ b/website/pages/docs/install/index.mdx @@ -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 ``` diff --git a/website/pages/docs/install/production/nomad-agent.mdx b/website/pages/docs/install/production/nomad-agent.mdx index c303b6aac..b97f40ce4 100644 --- a/website/pages/docs/install/production/nomad-agent.mdx +++ b/website/pages/docs/install/production/nomad-agent.mdx @@ -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: diff --git a/website/pages/docs/install/production/requirements.mdx b/website/pages/docs/install/production/requirements.mdx index 5c86f2cb3..da6eeb7ac 100644 --- a/website/pages/docs/install/production/requirements.mdx +++ b/website/pages/docs/install/production/requirements.mdx @@ -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 ``` diff --git a/website/pages/docs/integrations/consul-connect.mdx b/website/pages/docs/integrations/consul-connect.mdx index 2a2d0039b..c6adfe636 100644 --- a/website/pages/docs/integrations/consul-connect.mdx +++ b/website/pages/docs/integrations/consul-connect.mdx @@ -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 ``` diff --git a/website/pages/docs/integrations/vault-integration.mdx b/website/pages/docs/integrations/vault-integration.mdx index f27096d2e..f3e7f9e1d 100644 --- a/website/pages/docs/integrations/vault-integration.mdx +++ b/website/pages/docs/integrations/vault-integration.mdx @@ -57,8 +57,8 @@ Run the following command to initialize Vault server and receive an [unseal][seal] key and initial root [token][token]. Be sure to note the unseal key and initial root token as you will need these two pieces of information. -```shell-sessionvault operator init -key-shares=1 -key-threshold=1 - +```shell-session +$ vault operator init -key-shares=1 -key-threshold=1 ``` The `vault operator init` command above creates a single Vault unseal key for @@ -72,13 +72,13 @@ become standby nodes but should still be unsealed. Run the following command and then provide your unseal key to Vault. -```shell-sessionvault operator unseal - +```shell-session +$ vault operator unseal ``` The output of unsealing Vault will look similar to the following: -```shell +```text Key Value --- ----- Seal Type shamir @@ -102,13 +102,13 @@ initial root token you received earlier. You will need to authenticate to run the necessary commands to write policies, create roles, and configure a connection to your database. -```shell-sessionvault login - +```shell-session +$ vault login ``` If your login is successful, you will see output similar to what is shown below: -```shell +```text Success! You are now authenticated. The token information displayed below is already stored in the token helper. You do NOT need to run "vault login" again. Future Vault requests will automatically use this token. @@ -174,13 +174,13 @@ path "auth/token/renew-self" { You can now write a policy called `nomad-server` by running the following command: -```shell-sessionvault policy write nomad-server nomad-server-policy.hcl - +```shell-session +$ vault policy write nomad-server nomad-server-policy.hcl ``` You should see the following output: -```shell +```text Success! Uploaded policy: nomad-server ``` @@ -228,13 +228,13 @@ disallowed policies group. An example of this is shown below: Save the policy in a file named `nomad-cluster-role.json` and create the token role named `nomad-cluster`. -```shell-sessionvault write /auth/token/roles/nomad-cluster @nomad-cluster-role.json - +```shell-session +$ vault write /auth/token/roles/nomad-cluster @nomad-cluster-role.json ``` You should see the following output: -```shell +```text Success! Data written to: auth/token/roles/nomad-cluster ``` @@ -242,8 +242,8 @@ Success! Data written to: auth/token/roles/nomad-cluster Run the following command to create a token for your Nomad server: -```shell-sessionvault token create -policy nomad-server -period 72h -orphan - +```shell-session +$ vault token create -policy nomad-server -period 72h -orphan ``` The `-orphan` flag is included when generating the Nomad server token above to @@ -253,7 +253,7 @@ of its descendant tokens and their associated leases are revoked as well. If everything works, you should see output similar to the following: -```shell +```text Key Value --- ----- token 1gr0YoLyTBVZl5UqqvCfK9RJ @@ -292,8 +292,8 @@ vault { Restart the Nomad server -```shell-sessionsudo systemctl restart nomad - +```shell-session +$ sudo systemctl restart nomad ``` NOTE: Nomad servers will renew the token automatically. @@ -359,19 +359,19 @@ job "postgres-nomad-demo" { Run the job as shown below: -```shell-sessionnomad run db.nomad - +```shell-session +$ nomad run db.nomad ``` Verify the job is running with the following command: -```shell-sessionnomad status postgres-nomad-demo - +```shell-session +$ nomad status postgres-nomad-demo ``` The result of the status command will look similar to the output below: -```shell +```text ID = postgres-nomad-demo Name = postgres-nomad-demo Submit Date = 2018-11-15T21:01:00Z @@ -398,13 +398,13 @@ Now we can move on to configuring the connection between Vault and our database. We are using the database secrets engine for Vault in this exercise so that we can generate dynamic credentials for our PostgreSQL database. Run the following command to enable it: -```shell-sessionvault secrets enable database - +```shell-session +$ vault secrets enable database ``` If the previous command was successful, you will see the following output: -```shell +```text Success! Enabled the database secrets engine at: database/ ``` @@ -432,8 +432,8 @@ lifecycle. Run the following command to configure the connection between the database secrets engine and our database: -```shell-sessionvault write database/config/postgresql @connection.json - +```shell-session +$ vault write database/config/postgresql @connection.json ``` If the operation is successful, there will be no output. @@ -459,13 +459,14 @@ our application will need to access. Run the following command to create the role: -```shell-sessionvault write database/roles/accessdb db_name=postgresql \ +```shell-session +$ vault write database/roles/accessdb db_name=postgresql \ creation_statements=@accessdb.sql default_ttl=1h max_ttl=24h ``` You should see the following output after running the previous command: -```shell +```text Success! Data written to: database/roles/accessdb ``` @@ -474,13 +475,13 @@ Success! Data written to: database/roles/accessdb You should now be able to generate dynamic credentials to access your database. Run the following command to generate a set of credentials: -```shell-sessionvault read database/creds/accessdb - +```shell-session +$ vault read database/creds/accessdb ``` The previous command should return output similar to what is shown below: -```shell +```text Key Value --- ----- lease_id database/creds/accessdb/3JozEMSMqw0vHHhvla15sKTW @@ -515,13 +516,13 @@ path "database/creds/accessdb" { Create the `access-tables` policy with the following command: -```shell-sessionvault policy write access-tables access-tables-policy.hcl - +```shell-session +$ vault policy write access-tables access-tables-policy.hcl ``` You should see the following output: -```shell +```text Success! Uploaded policy: access-tables ``` @@ -621,8 +622,8 @@ There are a few key points to note here: Use the following command to run the job: -```shell-sessionnomad run web-app.nomad - +```shell-session +$ nomad run web-app.nomad ``` ### Step 15: Confirm the Application is Accessing the Database @@ -634,11 +635,13 @@ There are several ways to do this. - Use the `dig` command to query the SRV record of your service and obtain the port it is using. Then `curl` your service at the appropriate port and `names` path. -```shell-sessiondig +short SRV nomad-vault-demo.service.consul +```shell-session +$ dig +short SRV nomad-vault-demo.service.consul 1 1 30478 ip-172-31-58-230.node.dc1.consul. ``` -```shell-sessioncurl nomad-vault-demo.service.consul:30478/names +```shell-session +$ curl nomad-vault-demo.service.consul:30478/names diff --git a/website/pages/docs/internals/scheduling/preemption.mdx b/website/pages/docs/internals/scheduling/preemption.mdx index 545905b23..50f4119d8 100644 --- a/website/pages/docs/internals/scheduling/preemption.mdx +++ b/website/pages/docs/internals/scheduling/preemption.mdx @@ -29,8 +29,8 @@ into the plan queue. # Details ~> **Enterprise Functionality** System job preemption is available as an Open Source - feature, while Batch and Service job preemption are only available as - Enterprise features. +feature, while Batch and Service job preemption are only available as +Enterprise features. Preemption is enabled by default in Nomad 0.9. Operators can use the [scheduler config](/api-docs/operator#update-scheduler-configuration) API endpoint to disable preemption. @@ -72,7 +72,8 @@ in the API also has two additional fields related to preemption. preemption is necessary to place the job, it shows additional information in the CLI output for `nomad plan` as seen below. -```shell-sessionnomad plan example.nomad +```shell-session +$ nomad plan example.nomad + Job: "test" + Task Group: "test" (1 create) diff --git a/website/pages/docs/job-specification/job.mdx b/website/pages/docs/job-specification/job.mdx index 137d2df9a..2a00ee83b 100644 --- a/website/pages/docs/job-specification/job.mdx +++ b/website/pages/docs/job-specification/job.mdx @@ -232,8 +232,8 @@ job "docs" { When submitting this job, you would run: -```shell-sessionVAULT_TOKEN="..." nomad job run example.nomad - +```shell-session +$ VAULT_TOKEN="..." nomad job run example.nomad ``` [affinity]: /docs/job-specification/affinity 'Nomad affinity Job Specification' diff --git a/website/pages/docs/upgrade/index.mdx b/website/pages/docs/upgrade/index.mdx index e6f88f737..2f216ba88 100644 --- a/website/pages/docs/upgrade/index.mdx +++ b/website/pages/docs/upgrade/index.mdx @@ -78,7 +78,7 @@ Run `nomad agent-info` on the new servers and check that the `last_log_index` is of a similar value to the other servers. This step ensures that changes have been replicated to the new server. -```shell +```shell-session ubuntu@nomad-server-10-1-1-4:~$ nomad agent-info nomad bootstrap = false diff --git a/website/pages/docs/vault-integration/index.mdx b/website/pages/docs/vault-integration/index.mdx index d069b07bb..6a8b5bd75 100644 --- a/website/pages/docs/vault-integration/index.mdx +++ b/website/pages/docs/vault-integration/index.mdx @@ -114,7 +114,7 @@ path "auth/token/renew-self" { The above [`nomad-server` policy](/data/vault/nomad-server-policy.hcl) is available for download. Below is an example of writing this policy to Vault: -```shell +```shell-session # Download the policy $ curl https://nomadproject.io/data/vault/nomad-server-policy.hcl -O -s -L @@ -208,7 +208,7 @@ documentation for all possible fields and more complete documentation. The above [`nomad-cluster` token role](/data/vault/nomad-cluster-role.json) is available for download. Below is an example of writing this role to Vault: -```shell +```shell-session # Download the token role $ curl https://nomadproject.io/data/vault/nomad-cluster-role.json -O -s -L @@ -226,7 +226,7 @@ available for download. The below example assumes Vault is accessible, unsealed and the operator has appropriate permissions. -```shell +```shell-session # Download the policy and token role $ curl https://nomadproject.io/data/vault/nomad-server-policy.hcl -O -s -L $ curl https://nomadproject.io/data/vault/nomad-cluster-role.json -O -s -L @@ -244,7 +244,7 @@ After the token role is created, a token suitable for the Nomad servers may be retrieved by issuing the following Vault command: ```shell-session -vault token create -policy nomad-server -period 72h -orphan +$ vault token create -policy nomad-server -period 72h -orphan Key Value --- ----- token f02f01c2-c0d1-7cb7-6b88-8a14fada58c0 @@ -273,8 +273,8 @@ The token can then be set in the server configuration's [`vault` stanza][config], as a command-line flag, or via an environment variable. -```shell-sessionVAULT_TOKEN=f02f01c2-c0d1-7cb7-6b88-8a14fada58c0 nomad agent -config /path/to/config - +```shell-session +$ VAULT_TOKEN=f02f01c2-c0d1-7cb7-6b88-8a14fada58c0 nomad agent -config /path/to/config ``` An example of what may be contained in the configuration is shown below. For diff --git a/website/pages/intro/getting-started/cluster.mdx b/website/pages/intro/getting-started/cluster.mdx index 6e29b6023..88d1be5b2 100644 --- a/website/pages/intro/getting-started/cluster.mdx +++ b/website/pages/intro/getting-started/cluster.mdx @@ -42,7 +42,8 @@ corresponding `bootstrap_expect` value. Once the file is created, start the agent in a new tab: -```shell-sessionnomad agent -config server.hcl +```shell-session +$ nomad agent -config server.hcl ==> WARNING: Bootstrap mode enabled! Potentially unsafe operation. ==> Starting Nomad agent... ==> Nomad agent configuration: @@ -112,7 +113,8 @@ Copy that file to `client2.hcl`. Change the `data_dir` to be `/tmp/client2`, the `name` to `client2`, and the `http` port to 5657. Once you have created both `client1.hcl` and `client2.hcl`, open a tab for each and start the agents: -```shell-sessionsudo nomad agent -config client1.hcl +```shell-session +$ sudo nomad agent -config client1.hcl ==> Starting Nomad agent... ==> Nomad agent configuration: @@ -137,7 +139,8 @@ in managing the cluster or making scheduling decisions. Using the [`node status` command](/docs/commands/node/status) we should see both nodes in the `ready` state: -```shell-sessionnomad node status +```shell-session +$ nomad node status ID DC Name Class Drain Eligibility Status fca62612 dc1 client1 false eligible ready c887deef dc1 client2 false eligible ready @@ -155,7 +158,8 @@ verify that the `count` is still set to 3. Then, use the [`job run` command](/docs/commands/job/run) to submit the job: -```shell-sessionnomad job run example.nomad +```shell-session +$ nomad job run example.nomad ==> Monitoring evaluation "8e0a7cf9" Evaluation triggered by job "example" Evaluation within deployment: "0917b771" @@ -172,7 +176,8 @@ second client. We can again use the [`status` command](/docs/commands/status) to verify: -```shell-sessionnomad status example +```shell-session +$ nomad status example ID = example Name = example Submit Date = 07/26/17 16:34:58 UTC diff --git a/website/pages/intro/getting-started/index.mdx b/website/pages/intro/getting-started/index.mdx index 412231c2b..a9fff5335 100644 --- a/website/pages/intro/getting-started/index.mdx +++ b/website/pages/intro/getting-started/index.mdx @@ -23,8 +23,8 @@ Create a new directory, and download [this Once you have created a new directory and downloaded the `Vagrantfile` you must create the virtual machine: -```shell-sessionvagrant up - +```shell-session +$ vagrant up ``` This will take a few minutes as the base Ubuntu box must be downloaded @@ -47,7 +47,8 @@ After starting the Vagrant box, verify the installation worked by connecting to the box using SSH and checking that `nomad` is available. By executing `nomad`, you should see help output similar to the following: -```shell-sessionvagrant ssh +```shell-session +$ vagrant ssh ... vagrant@nomad:~$ nomad diff --git a/website/pages/intro/getting-started/jobs.mdx b/website/pages/intro/getting-started/jobs.mdx index e4983292a..a61a6dadf 100644 --- a/website/pages/intro/getting-started/jobs.mdx +++ b/website/pages/intro/getting-started/jobs.mdx @@ -21,7 +21,8 @@ however we recommend only using JSON when the configuration is generated by a ma To get started, we will use the [`job init` command](/docs/commands/job/init) which generates a skeleton job file: -```shell-sessionnomad job init +```shell-session +$ nomad job init Example job file written to example.nomad ``` @@ -34,7 +35,8 @@ jobs and to update existing jobs. We can register our example job now: -```shell-sessionnomad job run example.nomad +```shell-session +$ nomad job run example.nomad ==> Monitoring evaluation "13ebb66d" Evaluation triggered by job "example" Allocation "883269bf" created: node "e42d6f19", group "cache" @@ -50,7 +52,8 @@ local agent. To inspect the status of our job we use the [`status` command](/docs/commands/status): -```shell-sessionnomad status example +```shell-session +$ nomad status example ID = example Name = example Submit Date = 10/31/17 22:58:40 UTC @@ -85,7 +88,8 @@ allocation that is now running on the local node. An allocation represents an instance of Task Group placed on a node. To inspect an allocation we use the [`alloc status` command](/docs/commands/alloc/status): -```shell-sessionnomad alloc status 8ba85cef +```shell-session +$ nomad alloc status 8ba85cef ID = 8ba85cef Eval ID = 13ebb66d Name = example.cache[0] @@ -126,7 +130,8 @@ usage statistics will be reported. To see the logs of a task, we can use the [`logs` command](/docs/commands/alloc/logs): -````shell-sessionnomad alloc logs 8ba85cef redis +````shell-session +$ nomad alloc logs 8ba85cef redis _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.2.1 (00000000/0) 64 bit @@ -166,7 +171,8 @@ Once you have finished modifying the job specification, use the [`job plan` command](/docs/commands/job/plan) to invoke a dry-run of the scheduler to see what would happen if you ran the updated job: -```shell-sessionnomad job plan example.nomad +```shell-session +$ nomad job plan example.nomad +/- Job: "example" +/- Task Group: "cache" (2 create, 1 in-place update) +/- Count: "1" => "3" (forces create) @@ -197,7 +203,8 @@ been modified since the plan was run. This is useful if multiple people are interacting with the job at the same time to ensure the job hasn't changed before you apply your modifications. -```shell-sessionnomad job run -check-index 7 example.nomad +```shell-session +$ nomad job run -check-index 7 example.nomad ==> Monitoring evaluation "93d16471" Evaluation triggered by job "example" Evaluation within deployment: "0d06e1b6" @@ -255,7 +262,8 @@ a time. Once ready, use `run` to push the updated specification: -```shell-sessionnomad job run example.nomad +```shell-session +$ nomad job run example.nomad ==> Monitoring evaluation "293b313a" Evaluation triggered by job "example" Evaluation within deployment: "f4047b3a" @@ -278,7 +286,8 @@ scale. So far we've created, run and modified a job. The final step in a job lifecycle is stopping the job. This is done with the [`job stop` command](/docs/commands/job/stop): -```shell-sessionnomad job stop example +```shell-session +$ nomad job stop example ==> Monitoring evaluation "6d4cd6ca" Evaluation triggered by job "example" Evaluation within deployment: "f4047b3a" @@ -291,7 +300,8 @@ the existing allocations. If we now query the job status, we can see it is now marked as `dead (stopped)`, indicating that the job has been stopped and Nomad is no longer running it: -```shell-sessionnomad status example +```shell-session +$ nomad status example ID = example Name = example Submit Date = 11/01/17 17:30:40 UTC diff --git a/website/pages/intro/getting-started/running.mdx b/website/pages/intro/getting-started/running.mdx index 531286d08..b722e423b 100644 --- a/website/pages/intro/getting-started/running.mdx +++ b/website/pages/intro/getting-started/running.mdx @@ -25,7 +25,8 @@ is used to quickly start an agent that is acting as a client and server to test job configurations or prototype interactions. It should _**not**_ be used in production as it does not persist state. -```shell-sessionsudo nomad agent -dev +```shell-session +$ sudo nomad agent -dev ==> Starting Nomad agent... ==> Nomad agent configuration: @@ -75,7 +76,8 @@ certain task drivers will not be available. If you run [`nomad node status`](/docs/commands/node/status) in another terminal, you can see the registered nodes of the Nomad cluster: -```shell-sessionnomad node status +```shell-session +$ nomad node status ID DC Name Class Drain Eligibility Status 171a583b dc1 nomad false eligible ready ``` @@ -90,7 +92,8 @@ the [gossip protocol](/docs/internals/gossip) used to connect all the server instances together. We can view the members of the gossip ring using the [`server members`](/docs/commands/server/members) command: -```shell-sessionnomad server members +```shell-session +$ nomad server members Name Address Port Status Leader Protocol Build Datacenter Region nomad.global 127.0.0.1 4648 alive true 2 0.7.0 dc1 global ```