Skip to main content

Rundeck: Runbook Automation and Job Scheduling

Rundeck is a free and open-source automation engine that provides powerful job scheduling and runbook automation capabilities. It's designed to streamline and centralize operational tasks across your infrastructure by providing a web-based interface for defining, executing, and monitoring jobs.

Key Concepts

  • Projects: A logical grouping of Rundeck resources, such as jobs, nodes, and access control policies.
  • Nodes: The systems that Rundeck manages. Nodes can be defined statically or dynamically through integrations with cloud providers and configuration management tools.
  • Jobs: A set of steps that define a specific operational task. Jobs can be executed manually or scheduled to run automatically.
  • Steps: The individual actions that make up a job, such as running a command on a node, transferring a file, or executing a script.
  • Workflows: A sequence of steps that define the overall flow of a job. Workflows can include conditional logic, error handling, and parallel execution.
  • Plugins: Rundeck's plugin architecture allows for extending its functionality with custom integrations and features.
  • Access Control Policies (ACLs): Define who can access and interact with Rundeck resources.

Benefits of Using Rundeck

  • Centralized Automation: Provides a single point of control for automating operational tasks across your infrastructure.
  • Job Scheduling: Schedule jobs to run automatically on a recurring basis.
  • Runbook Automation: Digitize and automate your standard operating procedures (SOPs).
  • Self-Service Operations: Empower authorized users to execute jobs without requiring direct access to servers.
  • Audit Logging: Tracks all job executions and user activity for auditing and compliance purposes.
  • Extensibility: The plugin architecture allows for integrating with a wide range of tools and technologies.
  • Collaboration: Facilitates collaboration between operations teams by providing a shared platform for managing and executing jobs.

Basic Usage: Local Installation and Configuration

This guide outlines a simple local installation of Rundeck on a Linux system using a package manager. The exact steps may vary depending on your distribution.

  1. Download and Install Rundeck:

    Download the Rundeck package for your distribution from the official website: https://www.rundeck.com/open-source/download

    Example (Debian/Ubuntu):

    wget https://dl.bintray.com/rundeck/rundeck-deb/rundeck_4.15.0-1_all.deb  # Replace with the latest version
    sudo apt install ./rundeck_4.15.0-1_all.deb

    Example (RHEL/CentOS):

    wget https://dl.bintray.com/rundeck/rundeck-rpm/rundeck-4.15.0-1.21.noarch.rpm  # Replace with the latest version
    sudo yum install ./rundeck-4.15.0-1.21.noarch.rpm
  2. Start Rundeck Service:

    sudo systemctl start rundeckd
    sudo systemctl enable rundeckd # Enable on boot
  3. Access the Rundeck Web Interface:

    Open your web browser and navigate to http://localhost:4440. The default username is admin and the default password is admin. Important: Change the default password immediately after logging in for the first time!

  4. Create a New Project:

    • Click on "Create Project".
    • Enter a name for your project (e.g., "MyProject").
    • Click "Create".
  5. Adding Nodes:

    • Go to your Project.
    • Click "Nodes".
    • Click "Edit Nodes".
    • Choose "File" tab. Paste content below with your server details inside example.com:
    all-nodes:
    description: "All Nodes"
    type: "ResourceModelSource"
    config:
    generateFileAutomatically: "true"
    file: "/var/rundeck/projects/MyProject/etc/resources.yaml"
    script-resource:
    description: "Script Resource"
    type: "ResourceModelSource"
    config:
    script: |
    #!/bin/bash
    echo "host: node1\n description: Webserver\n hostname: example.com\n tags: webserver tag1\n osFamily: unix\n osArch: x86_64\n osName: Linux\n osVersion: 5.4\n"
    cache: "true"
    cacheTtl: "30"
  6. Create Your First Job:

    • Go to your Project.
    • Click "Jobs".
    • Click "Create Job".
    • Enter a name for your job (e.g., "Check Disk Space").
    • Add a description (optional).
    • Under "Workflow", add a new "Command" step.
    • Enter the command you want to execute (e.g., df -h).
    • Click "Save".
  7. Run Your Job:

    • Find your newly created job in the Jobs list.
    • Click the "Run Job" button.
    • You will see the output of the command in the job execution log.

Further Resources