From f473d72ceb319f7d2fb9149e6d3646c40543dc76 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Mon, 2 Apr 2018 14:26:18 -0700 Subject: [PATCH 1/5] Remove an extraneous component of the service job page --- ui/app/templates/components/job-page/system.hbs | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/app/templates/components/job-page/system.hbs b/ui/app/templates/components/job-page/system.hbs index 47343c49a..74b7f5c28 100644 --- a/ui/app/templates/components/job-page/system.hbs +++ b/ui/app/templates/components/job-page/system.hbs @@ -25,8 +25,6 @@ {{job-page/parts/placement-failures job=job}} - {{job-page/parts/running-deployment job=job}} - {{job-page/parts/task-groups job=job sortProperty=sortProperty From f09c2e9dad09ef750fadfd494ea1618317e62d87 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Mon, 2 Apr 2018 14:26:39 -0700 Subject: [PATCH 2/5] Update the UI routes in the API docs --- website/source/api/ui.html.md | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/website/source/api/ui.html.md b/website/source/api/ui.html.md index 42f4c9db1..d3cf0750e 100644 --- a/website/source/api/ui.html.md +++ b/website/source/api/ui.html.md @@ -44,6 +44,29 @@ This page shows an overview of a specific job. Details include name, status, typ priority, allocation statuses, and task groups. Additionally, if there is a running deployment for the job, it will be shown on the overview. +This page shows an overview of a specific job. The exact information shown varies +based on the type of job. + +- **Service Job** - Includes job metadata (name, status, priority, namespace), allocation + statuses, placement failures, active deployment, task groups, and evaluations. + +- **Batch Job** - Includes job metadata, allocation statuses, placement failures, task + groups, and evaluations. + +- **System Job** - Includes job metadata, allocation statuses, placement failures, task + groups, and evaluations. + +- **Periodic Job** - Includes job metadata, cron information force launch action, children statuses, + and children list. + +- **Parameterized Job** - Includes job metadata, children statuses, and children list. + +- **Periodic Child** - Includes job metadata, link to parent job, allocation statuses, placement + failures, task groups, and evaluations. + +- **Parameterized Child** - Includes job metadata, link to parent job, allocation statuses, + placement failures, task groups, evaluations, and dispatch payload. + | Path | Produces | | ------------------ | ----------- | | `/ui/jobs/:job_id` | `text/html` | @@ -143,6 +166,27 @@ description of the event. or ascending. This is specified as a querystring parameter. +## Task Detail + +This page shows details and events for a specific task. Details include when the task started +and stopped, all static and dynamic addresses, and all recent events. + +| Path | Produces | +| -------------------------------------- | ----------- | +| `/ui/allocations/:alloc_id/:task_name` | `text/html` | + + +## Task Logs + +This page streams `stdout` and `stderr` logs for a task. By default, `stdout` is tailed, but +there are available actions to see the head of the log, pause and play streaming, and switching +to `stderr`. + +| Path | Produces | +| ------------------------------------------- | ----------- | +| `/ui/allocations/:alloc_id/:task_name/logs` | `text/html` | + + ## Nodes List This page lists all nodes in the Nomad cluster in a sortable, searchable, paginated From 3ef93afbbea2b35c5403b2036094d9f34ec9f825 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Mon, 2 Apr 2018 14:45:59 -0700 Subject: [PATCH 3/5] Update existing UI guide to include information about live updating views --- website/source/guides/ui.html.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/website/source/guides/ui.html.md b/website/source/guides/ui.html.md index 81d9414aa..0222f3de2 100644 --- a/website/source/guides/ui.html.md +++ b/website/source/guides/ui.html.md @@ -10,7 +10,7 @@ description: |- # Web UI The Nomad Web UI offers an easy to use web experience for inspecting a Nomad cluster. -Jobs, Deployments, Task Groups, Allocations, Clients, and Servers can all be +Jobs, Deployments, Evaluations, Task Groups, Allocations, Logs, Clients, and Servers can all be monitored from the Web UI. The Web UI also supports the use of ACL tokens for clusters that are using the [ACL system](/guides/acl.html). @@ -21,12 +21,13 @@ under `/ui`, but visiting the root of the Nomad server in your browser will redi to the Web UI. If you are unsure what port the Nomad HTTP API is running under, try the default port, `4646`. -~> **Live Demo!** For a quick test drive, see our online Web UI demo at [demo.nomadproject.io](https://demo.nomadproject.io). +~> **Live Demo!** For a quick test drive, see our online Web UI demo at [demo.nomadproject.io](https://demo.nomadproject.io). ## Reviewing Jobs The home page of the Web UI is the jobs list view. This page has a searchable, sortable, -paginated table of all jobs in the cluster, regardless of job status. +paginated table of all jobs in the cluster, regardless of job status. This page will automatically +update as jobs are started, stopped, and allocations transition through states. [![Jobs List][img-jobs-list]][img-jobs-list] @@ -47,6 +48,9 @@ number of task groups, and an aggregation of all allocations by allocation statu Clicking on a job will navigate to the Job Detail page. This page shows a list of task groups for the job as well as the status of each allocation for each task group by allocation status. +This page will automatically update as deployments start and finish, new versions fail to be placed, +allocations transition through states, and evaluations update. + [![Job Detail][img-job-detail]][img-job-detail] ### Reading a Job Definition @@ -61,6 +65,8 @@ job definition is shown as an interactive JSON object. Job Versions can be found on the Versions tab on the Job Detail page. This page has a timeline view of every tracked version for the job. +This page will automatically update as new versions are submitted to the cluster. + [![Job Versions][img-job-versions]][img-job-versions] Each version can be toggled to also show the diff between job versions. @@ -72,6 +78,8 @@ Each version can be toggled to also show the diff between job versions. Job Deployments are listed on the Deployments tab on the Job Detail page. Every tracked deployment is listed in a timeline view. +This page will automatically update as new versions are submitted to the cluster and deployments proceed. + [![Job Deployments][img-job-deployments]][img-job-deployments] Each deployment can be toggle to show information about the deployment, including canaries placed and desired, @@ -81,7 +89,8 @@ allocations placed and desired, healthy and unhealthy allocations, task group me ### Monitoring a Current Job Deployment -When a deployment is currently running, it is called out on the Job Detail Overview tab. +When a deployment is currently running, it is called out on the Job Detail Overview tab. It will update +automatically as canaries and allocations are placed and deemed healthy or unhealthy. [![Active Job Deployment][img-active-job-deployment]][img-active-job-deployment] @@ -90,6 +99,8 @@ When a deployment is currently running, it is called out on the Job Detail Overv Clicking on a task group from the Job Detail page will navigate to the Task Group Detail page. This page shows the aggregated resource metrics for a task group as well as a list of all associated allocations. +This page will automatically update as the allocations in the task group change states. + [![Task Group Detail][img-task-group-detail]][img-task-group-detail] ## Inspecting an Allocation @@ -97,6 +108,8 @@ the aggregated resource metrics for a task group as well as a list of all associ From the Task Group Detail page, each allocation in the allocations table will report basic information about the allocation, including utilized CPU and memory. +Each allocation will poll for updates to current stats. + [![Allocation Stats][img-allocation-stats]][img-allocation-stats] ~> **Note.** To collect current CPU and memory statistics, the Web UI makes requests directly to the client @@ -106,6 +119,8 @@ the allocation, including utilized CPU and memory. Clicking an allocation will navigate to the Allocation Detail page. From here, the event history for each task in the allocation can be seen. +This page will automatically update as new task events are emitted. + [![Allocation Detail][img-allocation-detail]][img-allocation-detail] ## Reviewing Clients @@ -119,6 +134,8 @@ sharing links easier. In addition to name, each client in the table includes details such as current status, address, datacenter, and number of allocations. +This page will automatically update as nodes change states and work is allocated. + [![Clients List][img-clients-list]][img-clients-list] ## Inspecting a Client @@ -127,6 +144,9 @@ Clicking on a client will navigate to the Client Detail page. This page shows th well as the list of all allocations placed on the client. Additionally, all attributes of the machine are itemized. +This page will automatically update as allocations come and go on the client and the usage stats for an +allocation change. + [![Client Detail][img-client-detail]][img-client-detail] ## Inspecting Servers From cda93405672bc9c8360fba783bbb19cb64e0b462 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Mon, 2 Apr 2018 14:50:00 -0700 Subject: [PATCH 4/5] Remove note about stats being requested from clients This is no longer true :tada: --- website/source/guides/ui.html.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/website/source/guides/ui.html.md b/website/source/guides/ui.html.md index 0222f3de2..27f5b688a 100644 --- a/website/source/guides/ui.html.md +++ b/website/source/guides/ui.html.md @@ -112,10 +112,6 @@ Each allocation will poll for updates to current stats. [![Allocation Stats][img-allocation-stats]][img-allocation-stats] -~> **Note.** To collect current CPU and memory statistics, the Web UI makes requests directly to the client -~> the allocation is running on. These requests will fail unless the browser session is running in the same -~> subnet as the Nomad client. - Clicking an allocation will navigate to the Allocation Detail page. From here, the event history for each task in the allocation can be seen. From bf4d349a86b0ee722d1d2b0f14a65d60a96ff48c Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Mon, 2 Apr 2018 18:18:15 -0700 Subject: [PATCH 5/5] Update the UI guide to add instructions & screenshots for new features --- ...uide-ui-parameterized-dispatch-payload.png | 3 ++ .../guide-ui-periodic-force-launch-button.png | 3 ++ .../images/guide-ui-periodic-job-detail.png | 3 ++ .../assets/images/guide-ui-task-logs.png | 3 ++ website/source/guides/ui.html.md | 43 +++++++++++++++++++ 5 files changed, 55 insertions(+) create mode 100644 website/source/assets/images/guide-ui-parameterized-dispatch-payload.png create mode 100644 website/source/assets/images/guide-ui-periodic-force-launch-button.png create mode 100644 website/source/assets/images/guide-ui-periodic-job-detail.png create mode 100644 website/source/assets/images/guide-ui-task-logs.png diff --git a/website/source/assets/images/guide-ui-parameterized-dispatch-payload.png b/website/source/assets/images/guide-ui-parameterized-dispatch-payload.png new file mode 100644 index 000000000..4df463a72 --- /dev/null +++ b/website/source/assets/images/guide-ui-parameterized-dispatch-payload.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2de690a09fc6a853c2d4be53f251d6ad846a3aceb25734f1ba5058b42ddd7d27 +size 528537 diff --git a/website/source/assets/images/guide-ui-periodic-force-launch-button.png b/website/source/assets/images/guide-ui-periodic-force-launch-button.png new file mode 100644 index 000000000..57861cc28 --- /dev/null +++ b/website/source/assets/images/guide-ui-periodic-force-launch-button.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a985d04e79b6c55937c2fc7a32ae925edd40a85dcdfc1413ad3d5e4fe735076e +size 81097 diff --git a/website/source/assets/images/guide-ui-periodic-job-detail.png b/website/source/assets/images/guide-ui-periodic-job-detail.png new file mode 100644 index 000000000..0841a007a --- /dev/null +++ b/website/source/assets/images/guide-ui-periodic-job-detail.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a9c232804813df68a83009eff6eaa02c6e2e5edd731c8712616907893fa8d25 +size 569215 diff --git a/website/source/assets/images/guide-ui-task-logs.png b/website/source/assets/images/guide-ui-task-logs.png new file mode 100644 index 000000000..ad2839412 --- /dev/null +++ b/website/source/assets/images/guide-ui-task-logs.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edd95f240f40ee1488c82e8568784d07594a739584c59289593d1f33af5d8ed2 +size 410685 diff --git a/website/source/guides/ui.html.md b/website/source/guides/ui.html.md index 27f5b688a..ff77b6d69 100644 --- a/website/source/guides/ui.html.md +++ b/website/source/guides/ui.html.md @@ -94,6 +94,28 @@ automatically as canaries and allocations are placed and deemed healthy or unhea [![Active Job Deployment][img-active-job-deployment]][img-active-job-deployment] +### Inspecting Child Jobs + +Child jobs are only listed on the parent periodic or parameterized job detail pages. This leaves the global +jobs list view uncluttered. + +[![Periodic Job Detail Showing Children Jobs][img-periodic-job-detail]][img-periodic-job-detail] + +### Forcing a Periodic Launch + +From the job detail page for a periodic job, a child instance can be launched on demand rather than waiting +the scheduled amount of time as defined by the cron in the job definition. + +[![Periodic Force Launch Button][img-periodic-force-launch-button]][img-periodic-force-launch-button] + +### Inspecting a Dispatch Payload + +When a parameterized job is dispatched, the payload is captured and accessible from the bottom of the +parameterized child job detail page. The Web UI will attempt to parse the payload as JSON for improved +inspecting capabilities. + +[![Parameterized Dispatch Payload][img-parameterized-dispatch-payload]][img-parameterized-dispatch-payload] + ## Inspecting a Task Group Clicking on a task group from the Job Detail page will navigate to the Task Group Detail page. This page shows @@ -119,6 +141,23 @@ This page will automatically update as new task events are emitted. [![Allocation Detail][img-allocation-detail]][img-allocation-detail] +## Reviewing Logs + +Clicking on a task from the allocation detail will navigate to the Task Detail page. The Task Detail page includes +a list of recent events as well as a tab for logs. + +On the Logs tab, anything the task writes to `stdout` or `stderr` is accessible. The log stream component allows +for pausing and playing log streaming, jumping to the head or tail of the log, and toggling between `stdout` and +`stderr`. + +~> **Note.** The Web UI will first attempt to stream logs directly from the client agent to avoid unnecessary load +~> on server agents. If the client is not accessible, the Web UI will fallback to using the server for convenience. + +[![Task Logs][img-task-logs]][img-task-logs] + +~> **Note.** Only `stdout` and `stderr` are available in the UI. Any logs written to a file are available from the +~> CLI using the [`nomad alloc fs`]('/docs/commands/alloc/fs.html'), but filesystem access is not yet in the Web UI. + ## Reviewing Clients Clicking the Clients link in the left-hand menu of the Web UI will navigate to the Clients List page. This page @@ -182,3 +221,7 @@ Web UI makes will provide the Secret ID as the ACL Token via the `X-Nomad-Token` [img-client-detail]: /assets/images/guide-ui-client-detail.png [img-server-detail]: /assets/images/guide-ui-server-detail.png [img-acl-tokens]: /assets/images/guide-ui-acl-tokens.png +[img-task-logs]: /assets/images/guide-ui-task-logs.png +[img-parameterized-dispatch-payload]: /assets/images/guide-ui-parameterized-dispatch-payload.png +[img-periodic-force-launch-button]: /assets/images/guide-ui-periodic-force-launch-button.png +[img-periodic-job-detail]: /assets/images/guide-ui-periodic-job-detail.png