Skip to content

Commit 954be09

Browse files
authored
[Docs] CE-984: Reorganized web UI content (#27000)
* Reorganized web UI content from tutorials to docs. * Fixed relative links and wrapped lines. * Styling edits. * Added suggestions from PR review.
1 parent 51140ed commit 954be09

File tree

5 files changed

+162
-1
lines changed

5 files changed

+162
-1
lines changed

website/content/docs/job-run/index.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,48 @@ file. The general flow for updating an existing job in Nomad is:
4444
Because the job specification defines the deployment strategy, the workflow
4545
remains the same regardless of whether this is an initial deployment or a
4646
long-running job.
47+
48+
## Run a job in the web UI
49+
50+
1. From the **Jobs** page in the web UI, click on the **Run Job** button in the
51+
top right of the page.
52+
1. Enter the job definition in HCL into the **Job Definition** field, upload
53+
a jobspec file with the **Upload file** button, or choose from a set of
54+
templated jobspecs with the **Choose from template** button.
55+
1. Click on the **Plan** button at the bottom of the page. Nomad plans the job
56+
and displays the scheduler dry-run results.
57+
1. Click on the **Run** button at the bottom of the page.
58+
59+
## View a running job in the web UI
60+
61+
Nomad serves the web UI alongside the API. You can open the web UI in a web
62+
browser with the [`nomad ui` command](/nomad/commands/ui) or you can use the
63+
cluster address and navigate to the `/ui` path.
64+
65+
```shell-session
66+
$ nomad ui
67+
Opening URL "https://127.0.0.1:4646"
68+
```
69+
70+
When accessing the web UI, the first page you see is a listing of all the jobs
71+
for the default namespace. Clicking on a job takes you to the Job details page.
72+
73+
### View a job from the CLI
74+
75+
You can open the details page for a job by providing the job name to the
76+
`nomad ui` command.
77+
78+
```shell-session
79+
$ nomad ui example-job-name
80+
Opening URL "https://127.0.0.1:4646/ui/jobs/example-job-name"
81+
```
82+
83+
### View an allocation from the CLI
84+
85+
You can open the details page for an allocation by providing the allocation ID
86+
to the `nomad ui` command.
87+
88+
```shell-session
89+
$ nomad ui 7dc9f2d6
90+
Opening URL "https://127.0.0.1:4646/ui/allocations/7dc9f2d6-15fc-7c39-4692-70fe653d960e"
91+
```

website/content/docs/job-run/inspect.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ application that did not start. Hypothetically assume a user meant to start a
165165
Docker container named "redis:2.8", but accidentally put a comma instead of a
166166
period, typing "redis:2,8".
167167

168-
When the job is executed, it produces a failed allocation. The `nomad alloc status` command will give the reason why.
168+
When the job is executed, it produces a failed allocation. The
169+
`nomad alloc status` command gives the reason why.
169170

170171
```shell-session
171172
$ nomad alloc status 04d9627d
@@ -205,6 +206,26 @@ discussed in the [accessing logs] section of this documentation.
205206
For more information on the `alloc status` command, please consult the
206207
documentation for the [`nomad alloc status` command].
207208

209+
## Monitoring a job in the web UI
210+
211+
To view the overview page for a job in the web UI, you can click on the job
212+
name from the list on the **Jobs** page. The overview page has several linked
213+
sub-pages at the top for viewing more details about the running job.
214+
215+
- **Overview**: A page with general information about the job including the job
216+
name, type, priority, namespace, the status of all current and previous
217+
allocations, any placement failures, and the associated task groups.
218+
- **Definition**: A page that displays the job definition in JSON.
219+
- **Versions**: A page with a timeline view of every version of the job. You
220+
can compare the differences between job versions on this page.
221+
- **Deployments**: A page with health information about job deployments,
222+
associated task groups, and allocations.
223+
- **Allocations**: A page with a list of associated allocations.
224+
- **Evaluations**: A page with a list of associated evaluations.
225+
- **Services**: A page with a list of services registered for service discover
226+
and any associated allocations.
227+
- **Variables**: A page with associated Nomad Variables used by the job.
228+
208229
[accessing logs]: /nomad/docs/job-run/logs
209230
[`nomad alloc status` command]: /nomad/commands/alloc/status
210231
[`nomad eval status` command]: /nomad/commands/eval/status
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
layout: docs
3+
page_title: Keyboard commands reference
4+
description: |-
5+
This page contains reference information for the available keyboard shortcut commands in the Nomad web UI.
6+
---
7+
8+
# Web UI keyboard commands reference
9+
10+
The Nomad Web UI supports keyboard shortcut commands to help you navigate and
11+
operate Nomad. You can use keyboard commands to inspect jobs, view logs,
12+
monitor evaluations, and more.
13+
14+
## Open the shortcuts panel
15+
16+
Type a question mark (`?`) on any web UI page to display the
17+
**Keyboard Shortcuts** panel. The available shortcuts and their corresponding
18+
commands are shown in the table below. To use commands with two letters
19+
separated by a space, type the letters one after the other.
20+
21+
|Shortcut|Keyboard command|
22+
|---|---|
23+
|Go to the **Jobs** page|`g j`|
24+
|Go to the **Storage** page|`g r`|
25+
|Go to the **Variables** page|`g v`|
26+
|Go to the **Servers** page|`g s`|
27+
|Go to the **Clients** page|`g c`|
28+
|Go to the **Topology** page|`g t`|
29+
|Go to the **Evaluations** page|`g e`|
30+
|Go to the **Profile** page|`g p`|
31+
|Go to the **Administration** page|`g a`|
32+
|Next Subnav|`Shift + right arrow`|
33+
|Previous Subnav|`Shift + left arrow`|
34+
|Previous Main Section|`Shift + up arrow`|
35+
|Next Main Section|`Shift + down arrow`|
36+
|Show Keyboard Shortcuts|`?`|
37+
|Hide Keyboard Shortcuts|`Escape key`|
38+
39+
## Toggle shortcut tooltip hints
40+
41+
Hold the `Shift` key on any page in the web UI to overlay inline tooltip hints.
42+
Tooltips are contextual and will only show certain hints when applicable.
43+
44+
## Disable shortcuts
45+
46+
1. Open the **Keyboard Shortcuts** panel.
47+
1. At the bottom of the panel, click on the toggle next to the
48+
**Keyboard shortcuts enabled** option.
49+
50+
## Re-bind shortcuts
51+
52+
You can re-bind a shortcut with the following steps:
53+
54+
1. Open the **Keyboard Shortcuts** panel.
55+
1. Click on the key combination next to the shortcut that you want to re-bind.
56+
1. Type the new key combination.
57+
58+
To reset the key combination, click on the red **reset to default** text next
59+
to the key combination that you want to reset.
60+
61+
## Traverse lists quickly
62+
63+
The web UI has pages that display a lot of data in list form. To navigate to a
64+
specific item in the list, hold the `Shift` key and type the corresponding
65+
number in the tooltip hint next to the item that you want to navigate to. Note
66+
that items with a single digit require a leading zero (0).

website/content/docs/secure/acl/bootstrap.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,31 @@ This is because the reset file is in place, but with the former index. The reset
293293
file can be deleted. However, if it is left behind, Nomad will not reset the
294294
bootstrap unless the file's contents match the actual reset index.
295295

296+
## Access an ACL-enabled web UI
297+
298+
If you access the web UI without specifying an ACL token, Nomad grants you
299+
the permissions of the anonymous policy. You can set an ACL token in the web UI
300+
or with the CLI.
301+
302+
### Provide a token in the web UI
303+
304+
Open the web UI in your web browser with the cluster address and navigate to
305+
the `/ui` path. Click on the user icon in the top-right of the page to open the
306+
**Settings** page. Enter your ACL token in the **Secret ID** field and click
307+
the **Sign in with secret** button. You can also open this page directly by
308+
navigating to the `/ui/settings/tokens` path.
309+
310+
### Provide a token with the CLI
311+
312+
You can use the [`nomad ui` command](/nomad/commands/ui) and the token you have
313+
set for the Nomad CLI to authenticate to the web UI. This exchanges your ACL
314+
token for a one-time token in the web UI.
315+
316+
```shell-session
317+
$ nomad ui -authenticate
318+
Opening URL "https://127.0.0.1:4646" with one-time token
319+
```
320+
296321
## Next steps
297322

298323
For a single cluster, the process is complete. For multi-region clusters, you

website/data/docs-nav-data.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,10 @@
13011301
"title": "Runtime variable interpolation",
13021302
"path": "reference/runtime-variable-interpolation"
13031303
},
1304+
{
1305+
"title": "Web UI keyboard shortcuts",
1306+
"path": "reference/keyboard-commands"
1307+
},
13041308
{
13051309
"title": "Sentinel policy",
13061310
"badge": {

0 commit comments

Comments
 (0)