'Node aware of it's position on node list to execute

On Rundeck, I want my job to do a lot work and would like to slice this data by the number of nodes running the job.

Is there a way to query some of the context variables, where I can know how many nodes will run the current task and in which one we are running now ?

For example: On my current job execution there is a total of 10 nodes and I'm the shell at node 3.

Is this provided somehow by rundeck context ? or would I need to create some state file from an initial step ?

The goal is to split the work on the amount of nodes running the task.



Solution 1:[1]

  1. To see what is running on the N node just go to the activity page (left menu) and see the execution (you can see the execution by nodes by default or just click on the "Nodes" link).

  2. To "split the work on the amount of nodes running the task" the best approach is to create separate jobs pointing to desired nodes and then call it from a parent job using the Job Reference Step, take a look at this answer.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1