Everyday Usage

Jobs

Main Jobs Page

https://docs.rundeck.com/docs/manual/04-jobs.html 

image-1633308972681.png

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:

image-1633309408066.png

There are only two required fields:

  1. Details > Job Name
  2. Workflow > Step

Everything else is optional

Details

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:

Workflow Control

Several options pertaining to the workflow itself are present separate from the steps:

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:

NOTE: This is where plugins will usually be adding functionality.

Nodes

Remote nodes or locally. We always execute locally.

Schedule

Notifications

https://docs.rundeck.com/docs/manual/jobs/job-notifications.html 

Other

FWIW, the Log Output is very handy when executing locally to simply jump directly to the output.

Activity

https://docs.rundeck.com/docs/manual/08-activity.html

Execution history for commands and Jobs is stored by the Rundeck server. Execution history can be filtered and viewed inside the "Activity" page.

Execution State

image-1638330999439.png

  1. Currently Running Jobs
  2. Successful Job (green check mark and "1 ok" text)
  3. Failed Job (red dash, and "1 failed" text)
NOTE: The currently running jobs needs to be refreshed to get the latest update on this page, or the 'Auto refresh' box in the top right selected.

Selecting any of these executions will take you to their Log Outputs.

Searching for Prior Executions

Searching is most successful when using the "Name" field to search the name of the job you would like to find. The rest of the filters likely aren't going to be of much help. From there, you can look through the job executions to find the one you were looking for.

NOTE: There is currently no way to search by options (variables) passed.

 

Nodes and Commands

Nodes

https://docs.rundeck.com/docs/manual/05-nodes.html

Node is a resource that is either a physical or virtual instance of a network accessible host. Nodes have a few basic attributes but a Node's attributes can be extended to include arbitrary named key/value pairs. Attributes typically describe the properties of a node or reflect the state of the node. One of a Node's built in attributes is called "tags" which is a list of classifications or categories about that Node.

NOTE: To get a listing of all nodes, place .* into the filter on top.

In the docker container, Rundeck will always list itself as a node. The executable directory is the home directory of the user that runs the Rundeck service, in docker's case, the rundeck user.

Node actions

The Node Actions menu contains links to

Commands

https://docs.rundeck.com/docs/manual/06-commands.html

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.

NOTE: The default node executor is /bin/sh
Simply type into the Command field what you would like to be ran in order to execute it on the nodes specified. This is going to be typically one-off commands or status retrieving commands. This is formatted in the same style as Job steps, and can use the same tricks.