Command dispatcher
From ControlTier
The Command Dispatcher is a core function of the ControlTier software that provides the mechanism to send commands over the network seamlessly to the correct Nodes. This facility is used whenever you run a command or script, via the command-line (ctl or ctl-exec) or via Jobcenter.
At the simplest level, you send scripts or shell commands directly to any Node or set of Nodes based on simple filtering options. The Command Dispatcher handles the details of using the correct hostname and username to do the connection, and invoking the script on the remote node(s).
When you develop a Resource Model, each deployable object that is attached to a Node object can be the target of a command. You can invoke the Dispatcher to look at your Resource model to send a command only to the appropriate set of Nodes.
The diagram below shows how a user invokes a command on an object, which is then dispatched from the server to the correct client node based on the Resource model configuration.
Features
The dispatcher allows you to reliably perform tasks in a multi-node heterogeneous environment, and lets you filter targeted nodes based on a common set of filtering options.
Together these features make up the command dispatching mechanism:
- Simplified Node addressing
- The Node metadata stored in the Resource model allows you to use simple names to specify nodes, rather than complex hostnames. The metadata also can store specific SSH authentication info like username and password if necessary.
- Node filtering
- Any metadata for Nodes can be used to filter the targets, such as OS name, family or architecture. Plus you can use free-form Tags to arbitrarily organize your Nodes.
- Execute multi-step procedures across distributed environments
- The Dispatcher handles the connection to Nodes, so you can focus on just getting the steps of your process correct.
- Parallelism
- You can use a Thread count option to execute on more than one Node at a time, and conveniently retry on only the set of failed Nodes if necessary.
Core type usage
The Dispatcher is also used by the core types such as Service and Site: they have predefined workflows that automatically use the Dispatcher to send commands to their Child resources.
For example, using Site and Service types it's a convenient method to remotely control sets of stop and start operations.
When defining a Type, you can create Dispatch Commands. This is a special command-type which use the Command Dispatcher to dispatch a command to a set of resources related to the main object.
ControlTier tool usage
- Use the ctl-exec tool to dispatch a script or shell command directly to a set of Nodes. See: Running ad hoc commands
- Use the ctl tool to dispatch defined commands. See: Running defined commands
- Use Jobcenter to have a web-based interface for both of these actions. See: Creating jobs
A set of common Dispatcher options control Node Dispatch behavior.
| ||||||||||||||
| ||||||||||||||
