Nomad UI Job Templates Manager

I was perusing the “Manage Jobs Templates” feature of the UI today:


I am wondering if there is more information somewhere about this feature. Is this accessible via the API? Is this a place for me to store my template files?

It seems like this is more of a feature to allow people to demonstrate how Nomad works instead of being a useful tool for production systems.

Can anyone tell me more about this feature? Am I missing out on some functionality that I was unaware of before?

1 Like

Hi @SunSparc — you’re right that we’ve under-documented this feature. I’m considering this a good reminder for me to fix that.

As far as the feature goes: it’s a good way to store commonly-used job templates using Nomad Variables. We use a special prefix of nomad/job-templates/ for these job templates, and so you can use the Variables CLI to do something like this:

nomad var put nomad/job-templates/my-job description="job template description" template='job "my_job" {}'

Or similar using the PUT /v1/var/:path endpoint.

Keys of description and template will work nicely with the UI and CLI.

Additionally, nomad job init -list-templates and nomad job init -template=my-job will work the way you expect they might.

In short, this feature is meant to help facilitate re-use of common templates, but lacks the robustness of something like Nomad Pack. We wanted to give users something quick and easy to set up for this problem, but as you’ve pointed out, the documentation is currently lacking.

I hope this helps, and look for a tutorial/documentation on this in the near future.


This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.