A command is a single executable string executed on a Node. Rundeck invokes commands on nodes via a node executor which evaluates the command string and executes it. Node executors evaluate the command string in a data context containing information about the Node resource. Command strings can reference this data and thus avoid hard coding node or environment specific values.
The Rundeck graphical console provides the ability to execute commands to a set of filtered Node resources. The Command page can accept any command string you might run via an SSH command or via the rd adhoc shell tool.
Note, your ability to view Nodes and execute commands on them depends on your ACL policy.
Navigate to this page by clicking on the “Commands” tab in the navigation bar. Alternatively, go to the Nodes tab and choose the “Node Actions” menu and select the “Run a command …” menu item.
The screenshot above shows the elements of the Commands page user interface.
Enter the command string you wish to execute on the Nodes. This command string must be a valid command statement that can be executed on the nodes.
The dispatch settings let you control the amount of concurrency and error handling for the command execution.
You can choose the nodes by either choosing a saved filter or typing in your own filter expression. Press the “Set Filter” button to find the matched nodes. You can get help on filter expression syntax by pressing the help button.
Each of the matched nodes is linked to a detail view where you can inspect the Node’s attribute values (1).
You can click the filter links inside the detail view to continue building your filter expression (2).
With the command string and filter entered you are ready to run the command. Press the “Run on x Nodes” button to begin the execution.
The command will be dispatched to all the Nodes matched by the filter. The command prompt and run button become disabled until the execution completes. Output from the command execution is shown below.
You can dismiss the output by pressing the “X” button above the Download link.
Once the command execution begins you can monitor its progress on the Commands page or a separate execution follow page discussed later.
This page section provides several views to read the output using different formats.
Displays output messages from the command execution as if you were running the Unix
tail -f command on the output log file.
Output messages are sorted into Node specific sections and are not interlaced. By default, the messages are collapsed but can be revealed by pressing the disclosure icon to the right.
Sometimes it is useful to have a page where just the execution output is displayed separately. One purpose is to share a link to others interested in following the output messages. Click the progress bar in the “Activity” section to go to the execution follow page.
Notice the URL in the location bar of your browser. This URL can be shared to others interested in the progress of execution. The URL contains the execution ID (EID) and has a form like:
After execution completes, the command will have a status:
The Commands page provides several views about execution history.
You can further search activity history by clicking the “Filter activity…” link.