# Orchestrator Plugin
Orchestrators are configured in a Job definition, see: Jobs - Orchestrator.
# Java Plugin Type
Refer to Java Development for information about developing a Java plugin for Rundeck.
The plugin interface is OrchestratorPlugin (opens new window).
This is actually a Factory pattern, which produces an Orchestrator (opens new window) instance.
Orchestrator instance is responsible for determining what order and how many nodes are available to execute on.
All of the methods on the orchestrator will be called on the same thread, so your Orchestrator implementation does not need to worry about synchronization.
getNode() method will be called multiple times to retrieve any available Nodes for processing.
If it returns
null, that indicates no nodes are currently available.
isComplete method will be called to determine if any nodes will be available in the future if
null has been returned.
isComplete does not need to wait for all nodes to be returned via
it merely has to indicate if any new nodes will be returned from
The Orchestrator should return a node from getNode when it is ready to be executed on.
Once the execution is completed on a node the
returnNode(OrchestratorNodeResult) method will be called with the node and information about the success status of the execution,
allowing the Orchestrator to mark new nodes to be released.
Nodes may be executed on in the same or on multiple threads, the Orchestrator processor will manage the threads based on the configured Threadcount for the job.
In this manner, the Orchestrator allows some number of nodes to be executed on simultaneously, and manages when new nodes are available.
Note: The Orchestrator must abide by these limitations:
- A node may not be processed more than once, so getNode should always return a new node, or null.
- The Orchestrator must return nodes from the original set given to the OrchestratorPlugin, it cannot introduce new nodes