### Example: Single Server Filesystem Setup Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/storage-facility.md Example configuration for a single Rundeck server using the filesystem backend for both keys and projects. This setup is simple but not cluster-ready. ```properties # Key Storage - filesystem rundeck.storage.provider.1.type=filesystem rundeck.storage.provider.1.path=/keys # Project Storage - filesystem rundeck.projectsStorageType=filesystem ``` -------------------------------- ### Run Runnable WAR - Start with skip install Source: https://github.com/rundeck/docs/blob/4.0.x/docs/upgrading/upgrading.md Use this command to start the Rundeck WAR file with the skip install option, directing output to a log file. This is part of the preparation for upgrading a server. ```bash java %RDECK_CLI_OPTS% %RDECK_SSL_OPTS% -jar rundeckpro-enterprise-4.10.2-20201111.war --skipinstall -d >> %CURDIR%\var\logs\service.log 2>&1 ``` -------------------------------- ### Example: Production Single Server Database Setup Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/storage-facility.md Example configuration for a production single server using the database backend for keys and projects. This provides better performance and is easier to back up. ```properties # Key Storage - database rundeck.storage.provider.1.type=db rundeck.storage.provider.1.path=/keys # Project Storage - database rundeck.projectsStorageType=db # Database connection configured separately dataSource.url=jdbc:postgresql://dbhost:5432/rundeck ``` -------------------------------- ### Start Rundeck Server (Launcher) Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/maintenance/startup.md Use this command to start the Rundeck server when installed using the Launcher. The script location depends on your RDECK_BASE directory. ```bash $RDECK_BASE/server/sbin/rundeckd start ``` -------------------------------- ### Example: Hybrid Storage (Keys in DB, Projects on Filesystem) Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/storage-facility.md Example configuration for a hybrid storage setup, where keys are stored in the database and projects on a shared filesystem (e.g., NFS). This is useful for legacy migrations. ```properties # Key Storage - database rundeck.storage.provider.1.type=db rundeck.storage.provider.1.path=/keys # Project Storage - shared NFS mount rundeck.projectsStorageType=filesystem framework.projects.dir=/mnt/shared-nfs/rundeck/projects ``` -------------------------------- ### Start Minikube with VirtualBox Driver Source: https://github.com/rundeck/docs/blob/4.0.x/docs/learning/howto/how2kube.md Launch Minikube using the VirtualBox driver for local Kubernetes cluster setup. ```bash minikube start --driver=virtualbox ``` -------------------------------- ### Start Rundeck Server (RPM/DEB) Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/maintenance/startup.md Use this command to start the Rundeck server on systems with RPM or DEB installations. Ensure the script path is correct for your system. ```bash /etc/init.d/rundeckd start ``` -------------------------------- ### Successful SCM Plugin Setup Response Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/index.md This JSON response confirms a successful SCM plugin setup. It includes a success message and indicates if any follow-up actions are expected. ```json { "message": "$string", "nextAction": null, "success": true, "validationErrors": null } ``` -------------------------------- ### Start WAR Installation with SSL Configuration Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/security/ssl.md When running a WAR installation, specify the SSL configuration file and optionally the HTTPS port using Java system properties. ```shell java -Drundeck.ssl.config=$RDECK_BASE/server/config/ssl.properties -jar rundeck-{{$rundeckVersionFull}}.war ``` ```shell java -Drundeck.ssl.config=$RDECK_BASE/server/config/ssl.properties -Dserver.https.port=1234 -jar rundeck-{{$rundeckVersionFull}}.war ``` -------------------------------- ### Start Rundeck Community Edition Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/windows.md Launches the Rundeck Community WAR file for the first time to generate configuration files. This command should be run from the Rundeck installation directory. ```java java -jar rundeck-{{$rundeckVersionFull}}.war ``` -------------------------------- ### Example ssl.properties Configuration Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/security/ssl.md An example of the ssl.properties file content, showing the paths to the keystore and truststore, and their passwords. This example is typical for RPM and DEB packages. ```properties keystore=/etc/rundeck/ssl/keystore keystore.password=adminadmin key.password=adminadmin truststore=/etc/rundeck/ssl/truststore truststore.password=adminadmin ``` -------------------------------- ### Create Installation Directory Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/jar.md Create the directory where Rundeck will be installed. ```bash mkdir -p $RDECK_BASE ``` -------------------------------- ### Start Rundeck Enterprise Edition Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/windows.md Launches the Rundeck Enterprise WAR file for the first time to generate configuration files. This command should be run from the Rundeck installation directory. ```java java -jar rundeckpro-enterprise-{{$rundeckVersionFull}}.war ``` -------------------------------- ### Setup SCM Plugin Request Body Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/index.md This JSON object is used to configure and enable an SCM plugin for a project. It should contain entries for all required input fields. ```json { "config":{ "key":"value", "key2":"value2..." } } ``` -------------------------------- ### Install Rundeck 3.X WAR File Source: https://github.com/rundeck/docs/blob/4.0.x/docs/upgrading/upgrading-to-rundeck3.md Install the new Rundeck 3.X WAR file using the provided command. This command handles the installation process. ```sh java -jar rundeck-3.X.war --installonly ``` -------------------------------- ### Build and Install UI Plugin Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/ui-plugins.md Commands to build the UI plugin using Gradle and install it into the Rundeck environment. No server restart is required after installation; a page reload is sufficient. ```bash # Build ./gradlew clean build # Install cp build/distributions/ui-helloworld-1.0.0.zip $RDECK_BASE/libext/ # No restart required - just reload the page ``` -------------------------------- ### Start Rundeck Service Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/linux-rpm.md Start the Rundeck daemon service. ```bash sudo service rundeckd start ``` -------------------------------- ### Install Rundeck CLI with Homebrew Source: https://github.com/rundeck/docs/blob/4.0.x/docs/rd-cli/install.md Use Homebrew to tap the Rundeck CLI repository and install the package. ```bash brew tap rundeck/rundeck-cli brew install rundeck-cli ``` -------------------------------- ### Start Rundeck Server Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/maintenance/backup.md Command to start the Rundeck server after backup or recovery operations. ```bash rundeckd start ``` -------------------------------- ### Complete Example Configuration Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/system-properties.md A comprehensive example demonstrating how to configure JVM memory, network ports, custom paths, security, and session timeouts for a production environment. ```bash # /etc/sysconfig/rundeckd (RPM) or /etc/default/rundeckd (DEB) # JVM Memory Settings RDECK_JVM_SETTINGS="-Xmx8g -Xms2g -server" # Network Configuration RDECK_HTTP_PORT=8080 RDECK_JVM_OPTS="-Drundeck.jetty.connector.forwarded=true" # Custom Paths RDECK_BASE="/opt/rundeck" RUNDECK_LOGDIR="/var/log/rundeck" RDECK_PROJECTS="/data/rundeck/projects" # Security DISABLED_LOCAL_EXECUTOR=true # Session Timeout RDECK_JVM_OPTS="$RDECK_JVM_OPTS -Dserver.servlet.session.timeout=7200" ``` -------------------------------- ### Use Plugin Namespaces Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/ui-plugins.md Example demonstrating the recommended way to use namespaces for UI plugins to avoid polluting the global scope. The 'Good' example shows proper namespacing, while the 'Bad' example illustrates a common mistake. ```javascript // Good window.RDPRO["ui-myplugin"] = { /* ... */ }; // Bad - pollutes global namespace window.myPluginData = { /* ... */ }; ``` -------------------------------- ### Get Job Tags Response Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/index.md Example JSON response when retrieving job tags. ```json [ "taga", "tagb" ] ``` -------------------------------- ### Install and Run Docker Runner with docker-compose Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/runner/runner-installation/creating-runners.md This docker-compose configuration installs and starts the Runner as a Docker container. ```yaml version: "3" services: runner: image: "rundeck/runner:latest" environment: - RUNNER_HOST=https://YOUR_RUNNER_HOST - RUNNER_TOKEN=YOUR_API_TOKEN volumes: - runner-data:/mnt/runner volumes: runner-data: ``` -------------------------------- ### Example AND Logic Condition Source: https://github.com/rundeck/docs/blob/4.0.x/docs/manual/jobs/conditional-logic.md This example demonstrates how to define multiple conditions that must all be true (AND logic) for a step to execute. It checks the node's operating system family and a tag. ```text `${node.osFamily} equals unix` AND `${node.tags} contains web` ``` -------------------------------- ### Remove and Reinstall Rundeck Enterprise Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/linux-deb.md Removes an existing Rundeck Enterprise installation and then installs it again for a clean setup. ```bash apt remove rundeckpro-enterprise dpkg --purge rundeckpro-enterprise && apt install rundeckpro-enterprise ``` -------------------------------- ### Install Plugin Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/plugins/installing.md Copy the plugin file to the Rundeck server's libext directory to enable it. The server does not need to be restarted. ```bash cp some-plugin.zip $RDECK_BASE/libext ``` -------------------------------- ### Install Docker Runner with Docker Compose Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/runner/runner-installation/creating-runners.md This snippet installs and starts the Runner as a Docker container using docker-compose. ```yaml version: "3" services: runner: image: "rundeck/runner:latest" environment: - RUNDECK_TOKEN=YOUR_API_TOKEN - RUNDECK_URL=https://YOUR_HOST volumes: - runner-data:/mnt/rundeck volumes: runner-data: ``` -------------------------------- ### Get Job UI Metadata Response Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/index.md Example JSON response when retrieving job UI metadata. ```json [ { "name":"name", "data":{ ... } }, { "name":"name2", "data":{ ... } }, ] ``` -------------------------------- ### Example Log Path Configuration Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/logging-plugins.md This example shows a server configuration for the ExecutionFileStorage path, demonstrating how to use job context variables like `${job.project}` and `${job.execid}` to construct dynamic log file paths. ```properties # The server has the following path configured for the ExecutionFileStorage path = path/to/logs/${job.project}/${job.execid}.log ``` -------------------------------- ### Install Only Mode for Updating Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/jar.md When updating Rundeck, use the --installonly flag to perform the installation without starting the server. ```bash java -jar rundeck-{{$rundeckVersionFull}}.war --installonly ``` -------------------------------- ### Configure Project GUI to Display README Source: https://github.com/rundeck/docs/blob/4.0.x/docs/manual/projects/project-readme.md Set the project's home page to display the README content. This configuration is applied via the CLI. ```bash rd projects configure set -p MyProject -- \ --project.gui.readme.display=projectHome ``` -------------------------------- ### Start Rundeck Service for RPM/DEB Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/security/ssl.md Start the Rundeck service using the standard service management command for RPM or DEB installations. ```shell service rundeckd start ``` -------------------------------- ### GET /api/V/plugin/list Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/rundeck-api-versions.md Lists all installed plugins within the Rundeck system. ```APIDOC ## GET /api/V/plugin/list ### Description List the installed plugins. ### Method GET ### Endpoint /api/V/plugin/list ### Response #### Success Response (200) - A list of installed plugins and their details. #### Response Example (Response details vary by version, refer to specific version notes for exact structure.) ``` -------------------------------- ### Install and Run Automation Actions Runner Source: https://github.com/rundeck/docs/blob/4.0.x/docs/learning/solutions/automated-diagnostics/examples/auto-diagnostics-github-script.md These commands install Java, create a directory for the runner, download the runner JAR, and launch it in detached mode. Verify the runner's status using `tail -f`. ```bash sudo apt install openjdk-11-jre-headless ``` ```bash mkdir rundeck_runner ``` ```bash cd rundeck_runner ``` ```bash wget https://runbook-actions.pagerduty.com/pd-runner.jar ``` ```bash java -jar pd-runner.jar & ``` ```bash tail -f /home/ubuntu/rundeck_runner/runner/logs/runner.log ``` -------------------------------- ### Start New Runner on VM Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/runner/runner-management/upgrading-runners.md Execute this command on the Runner's host to start the newly downloaded Runner JAR file. ```bash java -jar your-runner-id.jar ``` -------------------------------- ### Example OR Logic Condition Sets Source: https://github.com/rundeck/docs/blob/4.0.x/docs/manual/jobs/conditional-logic.md This example shows how to define multiple condition sets where the step executes if any set is true (OR logic). It covers different operating systems and tags for web servers. ```text - Set 1: `${node.osFamily} equals unix` AND `${node.tags} contains web` - OR - Set 2: `${node.osFamily} equals windows` AND `${node.tags} contains iis` ``` -------------------------------- ### Start Runner with JMX Monitoring Enabled Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/runner/runner-management/monitoring-runners.md Start the Runner with these Java options to enable remote JMX monitoring on port 9010. Authentication and SSL are disabled for simplicity in this example. ```bash java -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=9010 \ -Dcom.sun.management.jmxremote.local.only=false \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false \ -Djava.rmi.server.hostname=localhost \ -jar runner-6281cf48-37a2-4659-93c9-907539177022.jar ``` -------------------------------- ### Full Option Configuration Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/manual/document-format-reference/job-yaml-v12.md An example of a comprehensive option configuration including default value, regex, multiple values, and multivalued settings. ```yaml test: required: true description: a test option value: dvalue regex: ^[abcd]value$ values: - avalue - bvalue - cvalue multivalued: true delimiter: ',' ``` -------------------------------- ### Initial Plugin Load Test Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/groovy-plugin-development.md Use the `onstart` handler to verify that the plugin is loaded correctly and to inspect initial configuration and execution data. ```groovy // Add a simple test handler onstart { executionData, config -> println("Plugin loaded successfully!") println("Config: ${config}") true } ``` -------------------------------- ### SCM Plugin Setup Validation Error Response Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/index.md This JSON response indicates a validation error occurred during SCM plugin setup. It details which input values were not valid and why. ```json { "message": "Some input values were not valid.", "nextAction": null, "success": false, "validationErrors": { "dir": "required", "url": "required" } } ``` -------------------------------- ### Script-copy Command Example (Framework-Wide) Source: https://github.com/rundeck/docs/blob/4.0.x/docs/manual/projects/node-execution/script.md Example of configuring a default script-copy command for all projects. This is set in the framework.properties file. ```properties plugin.script-copy.default.command=/bin/copyremote -host ${node.hostname} -user ${node.username} -- ${file-copy.file} ${file-copy.destination} ``` -------------------------------- ### Rundeck Executions Log Entries Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/learning/howto/workinglogs.md These entries show the start and finish of an execution. ```log [[2m2022-03-28T12:48:46,664[m] [32mINFO [m [36mexecution.status[m admin start [1:running] ProjectEXAMPLE admin/- "-/HelloWorld -"[bbddae57-0b20-4fe2-9118-74d124f63943] [[2m2022-03-28T12:48:47,748[m] [32mINFO [m [36mexecution.status[m admin finish [1:succeeded] ProjectEXAMPLE admin/- "-/HelloWorld -"[bbddae57-0b20-4fe2-9118-74d124f63943] ``` -------------------------------- ### Complete Service Manager Plugin Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/step-plugins.md An example implementation of a RemoteScriptNodeStep plugin that manages services (start, stop, restart, status) on remote nodes, differentiating between Windows and Linux commands. ```java import com.dtolabs.rundeck.core.common.INodeEntry; import com.dtolabs.rundeck.core.execution.workflow.steps.node.NodeStepException; import com.dtolabs.rundeck.core.plugins.Plugin; import com.dtolabs.rundeck.plugins.ServiceNameConstants; import com.dtolabs.rundeck.plugins.step.GeneratedScript; import com.dtolabs.rundeck.plugins.step.GeneratedScriptBuilder; import com.dtolabs.rundeck.plugins.step.PluginStepContext; import com.dtolabs.rundeck.plugins.step.RemoteScriptNodeStepPlugin; import com.dtolabs.rundeck.plugins.descriptions.*; @Plugin(name = "service-manager", service = ServiceNameConstants.RemoteScriptNodeStep) @PluginDescription(title = "Service Manager", description = "Start, stop, or restart services on remote nodes") public class ServiceManagerPlugin implements RemoteScriptNodeStepPlugin { @PluginProperty(title = "Service Name", required = true) private String serviceName; @PluginProperty(title = "Action", required = true) @SelectValues(values = {"start", "stop", "restart", "status"}) private String action; @Override public GeneratedScript generateScript(PluginStepContext context, Map configuration, INodeEntry node) throws NodeStepException { context.getLogger().log(2, String.format("Generating %s command for service %s on %s", action, serviceName, node.getNodename())); // Determine OS type from node attributes String osFamily = node.getOsFamily(); if ("windows".equalsIgnoreCase(osFamily)) { // Generate Windows PowerShell command return GeneratedScriptBuilder.command( "powershell.exe", "-Command", action + "-Service", "-Name", serviceName ); } else { // Generate Linux systemctl command return GeneratedScriptBuilder.command( "systemctl", action, serviceName ); } } } ``` -------------------------------- ### Quick Install Rundeck Community with apt Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/linux-deb.md Uses a script to quickly set up the Rundeck Community repository and install the package. ```bash curl https://raw.githubusercontent.com/rundeck/packaging/main/scripts/deb-setup.sh 2> /dev/null | sudo bash -s rundeck ``` -------------------------------- ### Define Server Tags Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/remote-job-execution.md Example of how server tags are defined in the framework.properties file. ```properties rundeck.server.uuid=... rundeck.server.tags=worker,linux ``` -------------------------------- ### Quick Install Rundeck Enterprise with apt Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/linux-deb.md Uses a script to quickly set up the Rundeck Enterprise repository and install the package. ```bash curl https://raw.githubusercontent.com/rundeck/packaging/main/scripts/deb-setup.sh 2> /dev/null | sudo bash -s rundeckpro ``` -------------------------------- ### Configure Java Heap Size (RPM Install) Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/maintenance/tuning-rundeck.md For RPM installations, set the `RDECK_JVM_SETTINGS` variable in `/etc/sysconfig/rundeckd` to adjust the initial and maximum Java heap sizes. This example sets a maximum of 4096MB and an initial of 1024MB. ```bash RDECK_JVM_SETTINGS="$RDECK_JVM_SETTINGS -Xmx4096m -Xms1024m" ``` -------------------------------- ### Build Documentation Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/install/source.md Build the project documentation. This requires pandoc and groovy to be installed. ```bash make ``` -------------------------------- ### Script Load Order Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/ui-plugins.md Illustrates the correct order for loading scripts, ensuring that libraries and initialization code are loaded before your main code. ```yaml scripts: - js/lib/chart.min.js # Third-party library - js/init.js # Initialize namespace - js/main.js # Your main code ``` -------------------------------- ### Get SCM plugin setup input fields Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/index.md Retrieves the input fields required for setting up an SCM plugin. ```APIDOC ## Get SCM plugin setup input fields ### Description Retrieves the necessary input fields and their descriptions for configuring a specific SCM plugin for a project. ### Method GET ### Endpoint /api/V/project/[PROJECT]/scm/[INTEGRATION]/plugin/[TYPE]/input ### Parameters #### Path Parameters - **PROJECT** (string) - Required - The name of the project. - **INTEGRATION** (string) - Required - The SCM integration type. - **TYPE** (string) - Required - The type of the SCM plugin. ``` -------------------------------- ### Example JAR File Listing Source: https://github.com/rundeck/docs/blob/4.0.x/docs/history/cves/cve-2023-34034.md This listing shows the JAR files found in the WAR build, which can be a source of confusion for security scanners. ```text 583548 Mon May 05 12:39:28 PDT 2025 WEB-INF/lib/spring-security-core-6.1.1.jar 494949 Mon May 05 12:39:28 PDT 2025 WEB-INF/lib/spring-security-core-5.8.15.jar ``` -------------------------------- ### Check Java Heap Size Settings (Launcher Install) Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/maintenance/tuning-rundeck.md For launcher installations, check the `profile` file in `$RDECK_BASE/etc/` to view the current initial (`-Xms`) and maximum (`-Xmx`) Java heap size settings. ```bash egrep '(Xmx|Xms)' $RDECK_BASE/etc/profile ``` -------------------------------- ### Get Rundeck System Information Source: https://github.com/rundeck/docs/blob/4.0.x/docs/learning/howto/learn-rd-cli.md Retrieve comprehensive information about your Rundeck instance. This command is useful for verifying installation and configuration. ```bash rd system info ``` -------------------------------- ### Framework-Level Configuration Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/webhook-plugins.md Example properties in a framework.properties file for configuring webhook plugins globally across all projects. ```properties # framework.properties framework.plugin.WebhookEvent.my-webhook-plugin.api-timeout=60 framework.plugin.WebhookEvent.my-webhook-plugin.retry-attempts=3 ``` -------------------------------- ### Get Rundeck System Info via Postman Source: https://github.com/rundeck/docs/blob/4.0.x/docs/api/api_basics.md Configure a GET request in Postman to retrieve system information from your Rundeck instance. This example assumes you have set up environment variables for hostname, port, and API version, and configured API key authentication. ```json { "method": "GET", "url": "{{rdeck_hostname}}:{{rdeck_port}}/api/{{rdeck_api_version}}/system/info", "header": [ { "key": "Accept", "value": "application/json" } ] } ``` -------------------------------- ### Content Converter Chaining Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/manual/content-converters/index.md Illustrates a typical chaining of content converters, starting with JSON input and progressing through intermediate formats to final HTML output. ```text .----------------. +----------------+ | input: text/json +---->| JSON converter | '----------------' +-------+--------+ | v .------------------. +----------------------+ | result: x-java-map +-->| HTML Table converter | '------------------' +----------+-----------+ | v .------------------. | result: text/html | '------------------' ``` -------------------------------- ### Initial Rundeck Launcher Run (WAR) Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/security/ssl.md Perform an initial run of the standalone launcher to generate base directories and configuration files. This is not required for RPM/DEB installations. Shut down the server after the initial startup message. ```properties cd $RDECK_BASE; java -jar rundeck-{{$rundeckVersionFull}}.war ``` ```log Grails application running at http://localhost:4440 in environment: production ``` -------------------------------- ### UI Plugin Configuration Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/ui-plugins.md Defines scripts and styles to load on specific pages. Ensure script order is correct, listing dependencies first. ```yaml ui: # Load on job list with full dashboard - pages: ['menu/jobs'] scripts: - js/init.js - js/dashboard.js - js/charts.min.js styles: - css/styles.css # Load on job detail with minimal code - pages: ['scheduledExecution/show'] scripts: - js/init.js - js/job-detail.js styles: - css/styles.css ``` -------------------------------- ### Run Development Server Source: https://github.com/rundeck/docs/blob/4.0.x/README.md Starts the documentation development server, which compiles and hot-reloads changes automatically. Ideal for active development. ```bash npm run docs:dev ``` -------------------------------- ### Log Path Examples Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/logging-plugins.md Demonstrates how log paths are determined for local and imported executions using context variables. ```plaintext log-path = path/to/logs/P-example/5.log ``` ```plaintext log-path = other/path/to/logs/Other-Project/999.log ``` ```plaintext path = path/to/logs/${job.project}/${job.execid}.log ``` ```plaintext log-path = 'path/to/logs/my-project/5.log' ``` ```plaintext log-path = 'other/path/to/logs/Other-Project/999.log' # If the log file is present in the same storage configured in the server and the server has access to the path, the log will be retrieved corretly ``` -------------------------------- ### Enable Consul Integration via Java Argument Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/hashicorp-consul.md For WAR installations, pass this Java system property when starting Runbook Automation to enable Consul configuration management. ```java java -Xmx4g -Drundeck.consul.enabled=true -jar rundeck-{{$rundeckVersionFull}}.war ``` -------------------------------- ### Configure Job Notifications Source: https://github.com/rundeck/docs/blob/4.0.x/docs/manual/document-format-reference/job-v20.md Define email, webhook, or plugin notifications for job success and failure. This example shows notifications for failure, success, start, average duration, and retryable failures. ```xml ``` -------------------------------- ### Sequential Workflow Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/learning/getting-started/jobs/workflow-strategies.md Demonstrates the 'Sequential' strategy, where each step is executed across all nodes before proceeding to the next step. This ensures steps are completed in order on every node. ```text 1. NodeA step#1 2. NodeB " 3. NodeA step#2 4. NodeB " 5. NodeA step#3 6. NodeB " ``` -------------------------------- ### Test Enterprise Runner Connectivity Source: https://github.com/rundeck/docs/blob/4.0.x/docs/learning/howto/runner-service-windows.md Manually start the Enterprise Runner from a PowerShell terminal to test connectivity with the Runbook Automation instance. Ensure Java 11 JRE is installed and JAVA_HOME is configured. ```powershell java -jar runner.jar ``` -------------------------------- ### Generate Script Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/step-plugins.md An example demonstrating how to generate a shell script with multiple commands for execution on a remote node. ```java @Override public GeneratedScript generateScript(PluginStepContext context, Map configuration, INodeEntry node) throws NodeStepException { // Generate a script to be executed String script = "#!/bin/bash\n" + "echo 'Checking disk space...'\n" + "df -h\n" + "echo 'Checking memory...'\n" + "free -m\n"; return GeneratedScriptBuilder.script(script, null); } ``` -------------------------------- ### Launch Runbook Automation with Custom Encryption Settings Source: https://github.com/rundeck/docs/blob/4.0.x/docs/administration/configuration/encryptable-properties.md When starting Runbook Automation, ensure that the same system properties used during encryption are set. This example uses a custom algorithm and specifies the configuration name. ```shell java -jar -Drd.encryption.STRONG.algorithm=PBEWITHSHA256AND256BITAES-CBC-BC -Drundeck.encrypter.config.name=STRONG rundeckpro-cluster-3.0.0-SNAPSHOT.war ``` -------------------------------- ### Complete Webhook Notification Plugin Example Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/notification-plugins.md A full Groovy script for a notification plugin that sends job status updates to a specified webhook URL. It includes configuration for the webhook URL, an optional channel, and options to notify on job start. The plugin handles start, success, failure, average duration exceeded, and retryable failure events. ```groovy import com.dtolabs.rundeck.plugins.notification.NotificationPlugin import groovy.json.JsonOutput rundeckPlugin(NotificationPlugin) { title = 'Webhook Notifier' description = 'Sends job notifications to a webhook endpoint' version = '1.0' author = 'Ops Team' metadata = [ faicon: 'bell' ] configuration { webhook_url( title: 'Webhook URL', description: 'URL to send notifications', required: true ) channel( title: 'Channel', description: 'Notification channel (optional)', required: false ) notify_on_start( title: 'Notify on Start', type: 'Boolean', defaultValue: 'false', description: 'Send notification when job starts' ) } onstart { execution, config -> if (config.notify_on_start == 'true') { def message = [ event: 'start', job: execution.job.name, user: execution.user, execution_id: execution.id, href: execution.href ] return sendWebhook(config.webhook_url, config.channel, message) } true } onsuccess { execution, config -> def duration = execution.dateEnded.time - execution.dateStarted.time def message = [ event: 'success', job: execution.job.name, user: execution.user, execution_id: execution.id, duration_ms: duration, href: execution.href, succeeded_nodes: execution.succeededNodeList?.size() ?: 0 ] sendWebhook(config.webhook_url, config.channel, message) } onfailure { execution, config -> def message = [ event: 'failure', job: execution.job.name, user: execution.user, execution_id: execution.id, href: execution.href, failed_nodes: execution.failedNodeList ?: [], status: execution.status ] sendWebhook(config.webhook_url, config.channel, message) } onavgduration { execution, config -> def duration = execution.dateEnded.time - execution.dateStarted.time def avgDuration = execution.job.averageDuration def message = [ event: 'avg_duration_exceeded', job: execution.job.name, duration_ms: duration, average_duration_ms: avgDuration, href: execution.href ] sendWebhook(config.webhook_url, config.channel, message) } onretryablefailure { execution, config -> def message = [ event: 'retryable_failure', job: execution.job.name, execution_id: execution.id, href: execution.href, status: 'Will be retried' ] sendWebhook(config.webhook_url, config.channel, message) } } def sendWebhook(String url, String channel, Map message) { try { if (channel) { message.channel = channel } def json = JsonOutput.toJson(message) def connection = new URL(url).openConnection() connection.setRequestMethod('POST') connection.setRequestProperty('Content-Type', 'application/json') connection.setDoOutput(true) connection.outputStream.withWriter { writer -> writer.write(json) } def responseCode = connection.responseCode println("Webhook response: ${responseCode}") return responseCode >= 200 && responseCode < 300 } catch (Exception e) { System.err.println("Failed to send webhook: ${e.message}") e.printStackTrace() return false } } ``` -------------------------------- ### Bash Script with All Best Practices Source: https://github.com/rundeck/docs/blob/4.0.x/docs/developer/option-values-plugins.md This script demonstrates implementing all best practices for Option Values plugins, including configuration with defaults, fallback options, fetching with timeouts, error handling, and always outputting start/end markers. ```bash #!/bin/bash set -euo pipefail # Configuration with defaults API_URL="${RD_CONFIG_API_URL:-https://api.example.com}" TIMEOUT="${RD_CONFIG_TIMEOUT:-10}" # Fallback options FALLBACK_OPTIONS="default:Default\nbackup:Backup" # Fetch with timeout and error handling fetch_options() { curl -sf --max-time "$TIMEOUT" "$API_URL" 2>&1 } # Always output markers echo "==START_OPTIONS==" if OPTIONS=$(fetch_options); then echo "$OPTIONS" | jq -r '.[] | "\(.value):\(.label)"' else echo "ERROR: Failed to fetch options, using fallback" >&2 echo -e "$FALLBACK_OPTIONS" fi echo "==END_OPTIONS==" exit 0 ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/rundeck/docs/blob/4.0.x/README.md Run this command after setting the correct Node version to install all necessary project dependencies. ```bash npm install ```