mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 01:45:44 +03:00
Merge pull request #771 from hashicorp/d-getting-started
Update getting started with short ids
This commit is contained in:
@@ -140,9 +140,9 @@ we should see both nodes in the `ready` state:
|
||||
|
||||
```
|
||||
$ nomad node-status
|
||||
ID DC Name Class Drain Status
|
||||
f7780117-2cae-8ee9-4b36-f34dd796ab02 dc1 nomad <none> false ready
|
||||
ffb5b55a-6059-9ec7-6108-23a2bbba95da dc1 nomad <none> false ready
|
||||
ID Datacenter Name Class Drain Status
|
||||
fca62612 dc1 nomad <none> false ready
|
||||
c887deef dc1 nomad <none> false ready
|
||||
```
|
||||
|
||||
We now have a simple three node cluster running. The only difference
|
||||
@@ -159,13 +159,13 @@ Then, use the [`run` command](/docs/commands/run.html) to submit the job:
|
||||
|
||||
```
|
||||
$ nomad run example.nomad
|
||||
==> Monitoring evaluation "77e5075f-2a1b-9cce-d14e-fe98cca9e17f"
|
||||
==> Monitoring evaluation "8e0a7cf9"
|
||||
Evaluation triggered by job "example"
|
||||
Allocation "711edd85-f183-99ea-910a-6445b23d79e4" created: node "ffb5b55a-6059-9ec7-6108-23a2bbba95da", group "cache"
|
||||
Allocation "98218a8a-627c-308f-8941-acdbffe1940c" created: node "f7780117-2cae-8ee9-4b36-f34dd796ab02", group "cache"
|
||||
Allocation "e8957a7f-6fff-f61f-2878-57715c26725d" created: node "f7780117-2cae-8ee9-4b36-f34dd796ab02", group "cache"
|
||||
Allocation "501154ac" created: node "c887deef", group "cache"
|
||||
Allocation "7e2b3900" created: node "fca62612", group "cache"
|
||||
Allocation "9c66fcaf" created: node "c887deef", group "cache"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "77e5075f-2a1b-9cce-d14e-fe98cca9e17f" finished with status "complete"
|
||||
==> Evaluation "8e0a7cf9" finished with status "complete"
|
||||
```
|
||||
|
||||
We can see in the output that the scheduler assigned two of the
|
||||
@@ -181,17 +181,19 @@ Name = example
|
||||
Type = service
|
||||
Priority = 50
|
||||
Datacenters = dc1
|
||||
Status = <none>
|
||||
Status = running
|
||||
Periodic = false
|
||||
|
||||
==> Evaluations
|
||||
ID Priority TriggeredBy Status
|
||||
77e5075f-2a1b-9cce-d14e-fe98cca9e17f 50 job-register complete
|
||||
ID Priority Triggered By Status
|
||||
54dd2ae3 50 job-register complete
|
||||
|
||||
==> Allocations
|
||||
ID EvalID NodeID TaskGroup Desired Status
|
||||
711edd85-f183-99ea-910a-6445b23d79e4 77e5075f-2a1b-9cce-d14e-fe98cca9e17f ffb5b55a-6059-9ec7-6108-23a2bbba95da cache run running
|
||||
98218a8a-627c-308f-8941-acdbffe1940c 77e5075f-2a1b-9cce-d14e-fe98cca9e17f f7780117-2cae-8ee9-4b36-f34dd796ab02 cache run running
|
||||
e8957a7f-6fff-f61f-2878-57715c26725d 77e5075f-2a1b-9cce-d14e-fe98cca9e17f f7780117-2cae-8ee9-4b36-f34dd796ab02 cache run running
|
||||
ID Eval ID Node ID Task Group Desired Status
|
||||
102225ab 54dd2ae3 56b590e6 cache run running
|
||||
f327d2b1 54dd2ae3 e4235508 cache run running
|
||||
f91137f8 54dd2ae3 56b590e6 cache run running
|
||||
|
||||
```
|
||||
|
||||
We can see that all our tasks have been allocated and are running.
|
||||
|
||||
@@ -50,6 +50,7 @@ Available commands are:
|
||||
alloc-status Display allocation status information and metadata
|
||||
client-config View or modify client configuration details
|
||||
eval-monitor Monitor an evaluation interactively
|
||||
fs Inspect the contents of an allocation directory
|
||||
init Create an example job file
|
||||
node-drain Toggle drain mode on a given node
|
||||
node-status Display status information about nodes
|
||||
|
||||
@@ -46,11 +46,11 @@ We can register our example job now:
|
||||
|
||||
```
|
||||
$ nomad run example.nomad
|
||||
==> Monitoring evaluation "3d823c52-929a-fa8b-c50d-1ac4d00cf6b7"
|
||||
==> Monitoring evaluation "26cfc69e"
|
||||
Evaluation triggered by job "example"
|
||||
Allocation "85b839d7-f67a-72a4-5a13-104020ae4807" created: node "2512929f-5b7c-a959-dfd9-bf8a8eb022a6", group "cache"
|
||||
Allocation "8ba85cef" created: node "171a583b", group "cache"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "3d823c52-929a-fa8b-c50d-1ac4d00cf6b7" finished with status "complete"
|
||||
==> Evaluation "26cfc69e" finished with status "complete"
|
||||
```
|
||||
|
||||
Anytime a job is updated, Nomad creates an evaluation to determine what
|
||||
@@ -67,15 +67,16 @@ Name = example
|
||||
Type = service
|
||||
Priority = 50
|
||||
Datacenters = dc1
|
||||
Status = <none>
|
||||
Status = running
|
||||
Periodic = false
|
||||
|
||||
==> Evaluations
|
||||
ID Priority TriggeredBy Status
|
||||
3d823c52-929a-fa8b-c50d-1ac4d00cf6b7 50 job-register complete
|
||||
ID Priority Triggered By Status
|
||||
26cfc69e 50 job-register complete
|
||||
|
||||
==> Allocations
|
||||
ID EvalID NodeID TaskGroup Desired Status
|
||||
85b839d7-f67a-72a4-5a13-104020ae4807 3d823c52-929a-fa8b-c50d-1ac4d00cf6b7 2512929f-5b7c-a959-dfd9-bf8a8eb022a6 cache run running
|
||||
ID Eval ID Node ID Task Group Desired Status
|
||||
8ba85cef 26cfc69e 171a583b cache run running
|
||||
```
|
||||
|
||||
Here we can see that our evaluation that was created has completed, and that
|
||||
@@ -100,13 +101,13 @@ push the updated version of the job:
|
||||
|
||||
```
|
||||
$ nomad run example.nomad
|
||||
==> Monitoring evaluation "ec199c63-2022-f5c7-328d-1cf85e61bf66"
|
||||
==> Monitoring evaluation "127a49d0"
|
||||
Evaluation triggered by job "example"
|
||||
Allocation "21551679-5224-cb6b-80a2-d0b091612d2e" created: node "2512929f-5b7c-a959-dfd9-bf8a8eb022a6", group "cache"
|
||||
Allocation "b1be1410-a01c-20ad-80ff-96750ec0f1da" created: node "2512929f-5b7c-a959-dfd9-bf8a8eb022a6", group "cache"
|
||||
Allocation "ed32a35d-8086-3f04-e299-4432e562cbf2" created: node "2512929f-5b7c-a959-dfd9-bf8a8eb022a6", group "cache"
|
||||
Allocation "8ab24eef" created: node "171a583b", group "cache"
|
||||
Allocation "f6c29874" created: node "171a583b", group "cache"
|
||||
Allocation "8ba85cef" modified: node "171a583b", group "cache"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "ec199c63-2022-f5c7-328d-1cf85e61bf66" finished with status "complete"
|
||||
==> Evaluation "127a49d0" finished with status "complete"
|
||||
```
|
||||
|
||||
Because we set the count of the task group to three, Nomad created two
|
||||
@@ -132,13 +133,23 @@ specification now:
|
||||
|
||||
```
|
||||
$ nomad run example.nomad
|
||||
==> Monitoring evaluation "d34d37f4-19b1-f4c0-b2da-c949e6ade82d"
|
||||
==> Monitoring evaluation "ebcc3e14"
|
||||
Evaluation triggered by job "example"
|
||||
Allocation "5614feb0-212d-21e5-ccfb-56a394fc41d5" created: node "2512929f-5b7c-a959-dfd9-bf8a8eb022a6", group "cache"
|
||||
Allocation "bf7e3ad5-b217-14fe-f3f8-2b83af9dbb42" created: node "2512929f-5b7c-a959-dfd9-bf8a8eb022a6", group "cache"
|
||||
Allocation "e3978af2-f61e-c601-7aa1-90aea9b23cf6" created: node "2512929f-5b7c-a959-dfd9-bf8a8eb022a6", group "cache"
|
||||
Allocation "9a3743f4" created: node "171a583b", group "cache"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "d34d37f4-19b1-f4c0-b2da-c949e6ade82d" finished with status "complete"
|
||||
==> Evaluation "ebcc3e14" finished with status "complete"
|
||||
==> Monitoring next evaluation "b508d8f0-7f21-8d66-ec59-7f5b2573435a" in 0
|
||||
==> Monitoring evaluation "b508d8f0"
|
||||
Evaluation triggered by job "example"
|
||||
Allocation "926e5876" created: node "171a583b", group "cache"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "b508d8f0" finished with status "complete"
|
||||
==> Monitoring next evaluation "ea78c05a-a15f-92ae-8c3d-59f4a1edd091" in 10s
|
||||
==> Monitoring evaluation "ea78c05a"
|
||||
Evaluation triggered by job "example"
|
||||
Allocation "3c8589d5" created: node "171a583b", group "cache"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "ea78c05a" finished with status "complete"
|
||||
```
|
||||
|
||||
We can see that Nomad handled the update in three phases, only updating a single task
|
||||
@@ -152,10 +163,10 @@ is stopping the job. This is done with the [`stop` command](/docs/commands/stop.
|
||||
|
||||
```
|
||||
$ nomad stop example
|
||||
==> Monitoring evaluation "bb407de4-02cb-f009-d986-646d6c11366d"
|
||||
==> Monitoring evaluation "fd03c9f8"
|
||||
Evaluation triggered by job "example"
|
||||
Evaluation status changed: "pending" -> "complete"
|
||||
==> Evaluation "bb407de4-02cb-f009-d986-646d6c11366d" finished with status "complete"
|
||||
==> Evaluation "fd03c9f8" finished with status "complete"
|
||||
```
|
||||
|
||||
When we stop a job, it creates an evaluation which is used to stop all
|
||||
@@ -164,7 +175,7 @@ If we try to query the job status, we can see it is no longer registered:
|
||||
|
||||
```
|
||||
$ nomad status example
|
||||
Error querying job: Unexpected response code: 404 (job not found)
|
||||
No job(s) with prefix or id "example" found
|
||||
```
|
||||
|
||||
If we wanted to start the job again, we could simply `run` it again.
|
||||
|
||||
@@ -83,8 +83,8 @@ $ vagrant ssh
|
||||
...
|
||||
|
||||
$ nomad node-status
|
||||
ID DC Name Class Drain Status
|
||||
72d3af97-144f-1e5f-94e5-df1516fe4add dc1 nomad <none> false ready
|
||||
ID Datacenter Name Class Drain Status
|
||||
171a583b dc1 nomad <none> false ready
|
||||
```
|
||||
|
||||
The output shows our Node ID, which is a randomly generated UUID,
|
||||
@@ -99,8 +99,8 @@ ring using the [`server-members`](/docs/commands/server-members.html) command:
|
||||
|
||||
```text
|
||||
$ nomad server-members
|
||||
Name Addr Port Status Proto Build DC Region
|
||||
nomad.global 127.0.0.1 4648 alive 2 0.1.0dev dc1 global
|
||||
Name Address Port Status Protocol Build Datacenter Region
|
||||
nomad.global 127.0.0.1 4648 alive 2 0.3.0dev dc1 global
|
||||
```
|
||||
|
||||
The output shows our own agent, the address it is running on, its
|
||||
|
||||
Reference in New Issue
Block a user