Nomad 0.11 includes a new Web UI incarnation of the allocation exec feature that was first added to the CLI in Nomad 0.9.2. This lets operators connect to an allocation on a client and investigate without having to leave the browser.
You can find an exec button in the title area of running jobs, allocations, task groups, and tasks:
Clicking it will open an
exec popup for the job, listing its running task groups and tasks in the sidebar. Once you select a task (or if you arrived directly from a task detail page), you can customize the command that will be run on the client and submit it to open the session.
Run your commands as you would in any terminal and close the window when you’re done. If you need to probe another task within the job, you can click it in the sidebar to open another exec window.
The feature incorporates Xterm.js, a web-based open-source terminal implementation used in popular projects such as VS Code. The UI opens a WebSocket via the API using the specified shell command, translates incoming socket frames into terminal output, and sends transformed user input through the socket.
For now, the command used to open the exec session defaults to
/bin/bash. This can be customized before opening the session, but subsequent sessions will still have it as the default. The final implementation will include persistence of the specified command in local storage so if you always use
/bin/sh, for instance, you’ll only have to change it once in your browser.
The sidebar is static in the current implementation, which means tasks that stop running will remain despite it no longer being possible to exec into them, and new tasks will not show up. A live-updating sidebar is in active development.
As of the existing implementation, ACLs are not consulted to determine whether your token has permission to open an exec session, but we plan to add permission-checking to conditionally turn off the exec button.
HashiCorp Consul and Nomad use Azure managed identities to authenticate against Azure in order to read tags and manage service principal information.
Learn how secrets management in Kubernetes compares to HashiCorp Nomad, and see why HashiCorp Vault is a powerful solution for both.
Get helpful resources on a recent change to product license deployments and learn how to navigate this change.