Jobs
Main Jobs Page
https://docs.rundeck.com/docs/manual/04-jobs.html
The "Jobs" link on the left-hand column will take us to a listing of all the jobs in this project. From there, all runnable jobs are displayed in alphabetical order in their Job Group.
NOTE: Jobs do not have to have a Job Group. If they don't, they will be displayed at the bottom underneath all of the job groups.
New Job
The top right "Job Actions" button will provide an option to create a new job:
There are only two required fields:
- Details > Job Name
- Workflow > Step
Everything else is optional
Details
- Job Name: Shows up on main jobs page
- Job Group: Section on main jobs page
- Description: Shows up as small text under job on main jobs page
Workflow
https://docs.rundeck.com/docs/manual/job-workflows.html
This spells out the steps and variables to use for the job.
NOTE: Every change in each of the following sections has to be saved separately before the workflow itself can be saved.
Options
https://docs.rundeck.com/docs/manual/job-options.html
Arguments/variables that are set when the job is run. Notable options are:
- Option Name: The name you will use to pass it to the steps
- Option Label: The prompt you will see when you go to run the job
- Input Type: One of Text/Date/Secure (passwords)
- Allowed Values: comma-separated list
- Restrictions: Can enforce from the Allowed Values list
Workflow Control
Several options pertaining to the workflow itself are present separate from the steps:
- If a step fails either stop immediately or run the rest before failing
- Strategy: Node First/Parallel/Sequential
- See the "Explain" menu for more details
- Global Log Filters: https://docs.rundeck.com/docs/manual/log-filters/
- Mask Passwords
- Key/Value Data
Steps
Here are where the actual executions are structured. There are a lot of options and ways to construct this, so I'll only lay out what I'm familiar with:
- Node Steps: Runs once for every node
- Command: Run a command from the command line
- Script: Run a shell script
- Job Reference: Run another job
- Workflow Steps: Runs once per workflow
- Job Reference: Run another job
- Global Variable: Set global variables to be used in other steps or notifications
- Flow control: Halt indicates that the execution should halt. Enter a Status to halt with a custom status string. Otherwise, enable Fail to exit with failure, or not to exit with success.
NOTE: This is where plugins will usually be adding functionality.
Nodes
Remote nodes or locally. We always execute locally.
Schedule
- Run Repeatedly: Actually schedule when you want it to run
- Enable Scheduling: Turning the repeat runs on/off
- Enable Execution: Allow/Disallow ANYONE to run it at all
Notifications
https://docs.rundeck.com/docs/manual/jobs/job-notifications.html
- On Start
- On Success
- On Failure
- On Retryable Failure
- Average Duration Exceeded
Other
- Log Level: Debug level produces more output
- Multiple Executions: Allow this Job to be executed more than one time simultaneously
- Limit Multiple Executions: Max number of multiple executions
- Timeout
- Retry
- Default Tab: Nodes/Log Output/HTML
FWIW, the Log Output is very handy when executing locally to simply jump directly to the output.
No Comments