Nomad System Jobs - Are the first to deploy?

Hello,

I would like to deploy a job (docker) as system job, in all the nodes of the cluster.
This job should be deployed before any other job (non-system) in a given node.

Does Nomad ensures that System jobs are deployed before other jobs in a new node?

If this is not guaranteed, is there any workaround?

I have tried to find any references in the documentation but I have not found any clarification on this point.

Thank you very much,

Alejandro

1 Like

Hi, as it stands today, there is no native support for inter-job dependency, inter-group, or inter-task dependency (or any combination there of).

There is one PR about task lifecycle that I know of:


which tries to implement “pre” tasks within a single group.

I do not see how, on a newly created node, it can be enforced, how “job2” (service) should wait for say, “job1” (system) to be “running”, etc.
(I am assuming that is the use case, here)

There are a few tools which try to create dependency chains while launching, etc.
(Apache Airflow with Nomad provider, or https://github.com/sagarrakshe/nomad-dtree)

Maybe setting a higher job priority might achieve this, I dunno (I think priorities have to do with preemption)

That said, I would let folks from HashiCorp confirm if things can be done exactly the way you want it.

Side thought: If not directly through Nomad, is it possible for you to try this using the Consul service status ?