docker.recipes

Rundeck Job Scheduler

intermediate

Self-service operations platform for runbook automation and job scheduling.

Overview

Rundeck is an open-source job scheduler and runbook automation platform designed for operational teams who need to execute scripts, deploy applications, and manage infrastructure tasks across distributed environments. Originally developed by SimplifyOps and now maintained by PagerDuty, Rundeck provides a centralized web interface where teams can define, schedule, and execute jobs while maintaining detailed audit logs and role-based access controls. The platform excels at bridging the gap between development and operations by allowing complex workflows to be packaged as self-service operations that can be safely executed by team members with varying levels of technical expertise. This deployment creates a production-ready Rundeck environment using two specialized containers: the main Rundeck application server running version 5.0.0 and a PostgreSQL 15 database for persistent storage. The Rundeck container handles job execution, workflow management, user authentication, and the web interface, while connecting to the dedicated PostgreSQL database for storing job definitions, execution history, user accounts, and system configuration. This architecture separates compute and storage concerns, allowing for better resource allocation and data persistence across container restarts. This stack is ideal for DevOps teams, system administrators, and organizations implementing ChatOps or Infrastructure as Code practices who need a robust job scheduling platform with enterprise-grade features. The PostgreSQL backend ensures data integrity and supports complex queries for reporting and analytics, while the containerized approach simplifies deployment and scaling. Teams managing multiple environments, automated deployments, or routine operational tasks will benefit from Rundeck's workflow orchestration capabilities and its ability to integrate with existing tools through plugins and APIs.

Key Features

  • Web-based job designer with drag-and-drop workflow creation and visual job execution monitoring
  • Multi-node SSH execution with built-in key management and secure credential storage
  • Flexible scheduling system supporting cron expressions, job dependencies, and manual triggers
  • Role-based access control with project-level permissions and user group management
  • RESTful API and webhook integration for programmatic job management and external system integration
  • Plugin architecture supporting cloud providers, configuration management tools, and notification systems
  • Comprehensive audit logging with detailed execution history and compliance reporting
  • Resource model management for dynamic node discovery and inventory synchronization

Common Use Cases

  • 1Automated deployment pipelines with approval workflows and rollback capabilities
  • 2Scheduled maintenance tasks like database backups, log rotation, and system health checks
  • 3Self-service operations portal allowing developers to deploy applications without direct server access
  • 4Incident response runbooks with step-by-step guided procedures and automated remediation
  • 5Multi-environment configuration management and infrastructure provisioning workflows
  • 6Compliance automation for security scans, patch management, and audit report generation
  • 7CI/CD integration for executing build, test, and deployment jobs across distributed infrastructure

Prerequisites

  • Docker Engine 20.x or higher with Docker Compose v2 support
  • Minimum 2GB RAM for combined Rundeck and PostgreSQL containers under normal workload
  • Port 4440 available for Rundeck web interface access
  • Environment variables configured: DB_PASSWORD, ADMIN_PASSWORD, and RUNDECK_URL
  • Basic understanding of SSH key management and Unix/Linux command execution
  • Network connectivity to target nodes and systems that jobs will manage

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 rundeck:
3 image: rundeck/rundeck:5.0.0
4 container_name: rundeck
5 environment:
6 - RUNDECK_DATABASE_DRIVER=org.postgresql.Driver
7 - RUNDECK_DATABASE_USERNAME=rundeck
8 - RUNDECK_DATABASE_PASSWORD=${DB_PASSWORD}
9 - RUNDECK_DATABASE_URL=jdbc:postgresql://db/rundeck
10 - RUNDECK_GRAILS_URL=${RUNDECK_URL}
11 - RUNDECK_SERVER_ADDRESS=0.0.0.0
12 - RUNDECK_ADMIN_PASSWORD=${ADMIN_PASSWORD}
13 volumes:
14 - rundeck-data:/home/rundeck/server/data
15 - rundeck-logs:/home/rundeck/var/logs
16 - rundeck-plugins:/home/rundeck/libext
17 ports:
18 - "4440:4440"
19 depends_on:
20 - db
21 networks:
22 - rundeck-network
23 restart: unless-stopped
24
25 db:
26 image: postgres:15-alpine
27 container_name: rundeck-db
28 environment:
29 - POSTGRES_USER=rundeck
30 - POSTGRES_PASSWORD=${DB_PASSWORD}
31 - POSTGRES_DB=rundeck
32 volumes:
33 - postgres-data:/var/lib/postgresql/data
34 networks:
35 - rundeck-network
36 restart: unless-stopped
37
38volumes:
39 rundeck-data:
40 rundeck-logs:
41 rundeck-plugins:
42 postgres-data:
43
44networks:
45 rundeck-network:
46 driver: bridge

.env Template

.env
1# Rundeck
2RUNDECK_URL=http://localhost:4440
3ADMIN_PASSWORD=secure_admin_password
4DB_PASSWORD=secure_rundeck_password

Usage Notes

  1. 1Web UI at http://localhost:4440
  2. 2Login: admin / (ADMIN_PASSWORD)
  3. 3Define jobs and workflows
  4. 4Schedule with cron expressions
  5. 5Node management and SSH execution

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

rundeck
rundeck:
  image: rundeck/rundeck:5.0.0
  container_name: rundeck
  environment:
    - RUNDECK_DATABASE_DRIVER=org.postgresql.Driver
    - RUNDECK_DATABASE_USERNAME=rundeck
    - RUNDECK_DATABASE_PASSWORD=${DB_PASSWORD}
    - RUNDECK_DATABASE_URL=jdbc:postgresql://db/rundeck
    - RUNDECK_GRAILS_URL=${RUNDECK_URL}
    - RUNDECK_SERVER_ADDRESS=0.0.0.0
    - RUNDECK_ADMIN_PASSWORD=${ADMIN_PASSWORD}
  volumes:
    - rundeck-data:/home/rundeck/server/data
    - rundeck-logs:/home/rundeck/var/logs
    - rundeck-plugins:/home/rundeck/libext
  ports:
    - "4440:4440"
  depends_on:
    - db
  networks:
    - rundeck-network
  restart: unless-stopped
db
db:
  image: postgres:15-alpine
  container_name: rundeck-db
  environment:
    - POSTGRES_USER=rundeck
    - POSTGRES_PASSWORD=${DB_PASSWORD}
    - POSTGRES_DB=rundeck
  volumes:
    - postgres-data:/var/lib/postgresql/data
  networks:
    - rundeck-network
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 rundeck:
5 image: rundeck/rundeck:5.0.0
6 container_name: rundeck
7 environment:
8 - RUNDECK_DATABASE_DRIVER=org.postgresql.Driver
9 - RUNDECK_DATABASE_USERNAME=rundeck
10 - RUNDECK_DATABASE_PASSWORD=${DB_PASSWORD}
11 - RUNDECK_DATABASE_URL=jdbc:postgresql://db/rundeck
12 - RUNDECK_GRAILS_URL=${RUNDECK_URL}
13 - RUNDECK_SERVER_ADDRESS=0.0.0.0
14 - RUNDECK_ADMIN_PASSWORD=${ADMIN_PASSWORD}
15 volumes:
16 - rundeck-data:/home/rundeck/server/data
17 - rundeck-logs:/home/rundeck/var/logs
18 - rundeck-plugins:/home/rundeck/libext
19 ports:
20 - "4440:4440"
21 depends_on:
22 - db
23 networks:
24 - rundeck-network
25 restart: unless-stopped
26
27 db:
28 image: postgres:15-alpine
29 container_name: rundeck-db
30 environment:
31 - POSTGRES_USER=rundeck
32 - POSTGRES_PASSWORD=${DB_PASSWORD}
33 - POSTGRES_DB=rundeck
34 volumes:
35 - postgres-data:/var/lib/postgresql/data
36 networks:
37 - rundeck-network
38 restart: unless-stopped
39
40volumes:
41 rundeck-data:
42 rundeck-logs:
43 rundeck-plugins:
44 postgres-data:
45
46networks:
47 rundeck-network:
48 driver: bridge
49EOF
50
51# 2. Create the .env file
52cat > .env << 'EOF'
53# Rundeck
54RUNDECK_URL=http://localhost:4440
55ADMIN_PASSWORD=secure_admin_password
56DB_PASSWORD=secure_rundeck_password
57EOF
58
59# 3. Start the services
60docker compose up -d
61
62# 4. View logs
63docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/rundeck-automation/run | bash

Troubleshooting

  • Database connection failed errors: Verify DB_PASSWORD environment variable matches between rundeck and db services, check that PostgreSQL container is fully started
  • Rundeck web interface shows 'Grails application error': Ensure RUNDECK_GRAILS_URL matches the actual URL users will access, restart rundeck container after environment changes
  • Job execution fails with SSH connection timeout: Verify target nodes are accessible from rundeck container, check SSH key configuration and node definitions in resource model
  • Plugin installation issues with libext directory: Ensure rundeck-plugins volume is properly mounted and rundeck container has write permissions to /home/rundeck/libext
  • PostgreSQL data loss after container restart: Verify postgres-data volume is correctly configured and mounted to /var/lib/postgresql/data in db container
  • High memory usage during job execution: Monitor rundeck container resources and adjust memory limits, consider tuning Java heap settings via RUNDECK_JVM_SETTINGS environment variable

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space