Receive updates in your Inbox.

HowTo: Controlling How and Where Rundeck Jobs Execute

Rundeck gives you two ways to control how and where actions execute. The first is the workflow of the Rundeck job itself. The second is the node dispatcher. Let's take a look at how to configure both.

A Rundeck job's most essential feature is its ability to execute one or more steps. This sequence of steps is called a workflow. The strategy determines how the workflow executes.




There are several out-of-the-box strategies from which you can choose. The "Node First" strategy executes all of the steps in the workflow on a node before moving to another node. The "Parallel" strategy runs all steps in parallel on each node. The "Sequential" strategy executes a step on all nodes before proceeding to the next step in the workflow (which is then executed on all nodes before proceeding to the next step). The "Ruleset" strategy is a feature exclusive to Rundeck Pro that gives you advanced control over the workflow (including forking and merging the workflow and conditional execution of steps).


Once you have decided on the execution strategy of the job's workflow, you can decide on what nodes you want the job's steps to execute. Rather than having to list out the names of the nodes you want, you can set up a node filter that determines which nodes to include when the job executes. You can filter by node attributes (name, type, or any other custom definable info) and/or node tags. You can also decide if you want the job runner to be able to edit the node filter before the job runs.




Finally, you can configure Rundeck's dispatcher mechanism at the job level. When running steps in parallel, you can decide on the maximum number of parallel threads to use (limiting the number of nodes on which the steps will execute at the same time).



You can change the order in which the dispatcher selects nodes by setting the "Rank Attribute" and "Rank Order." By default, the filtered list of nodes is ordered by name in ascending order. You can change the node attribute you want the list to be sorted by, and you can change the order of the sort.

You can also decide what to do if a node fails or if the node set is empty.

There is also a number of orchestrator plugins that give you advanced behaviors such as "Random Subset," "Ranked Tier," and "Max Percentage."




By default, Rundeck makes it easy to build workflows that take action on multiple nodes. When you find you need more control, Rundeck has you covered.

Be on the lookout for related advancements in future Rundeck releases.