Skip to content

justynroberts/set-roi-defaults-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Rundeck Set ROI Defaults Plugin

Rundeck Version Java Version License: Apache 2.0 Platform Plugin Version Development Status

A Rundeck Workflow Step Plugin to automatically manage ROI (Return on Investment) metrics for jobs

Quick Start โ€ข Features โ€ข Documentation โ€ข Build & Deploy โ€ข Contributing


๐Ÿ“‹ Overview

The Rundeck Set ROI Defaults Plugin is a Workflow Step Plugin that automatically manages ROI metrics in Rundeck job definitions. It detects existing ROI configurations, adds missing ROI fields, and tracks automation value across projects - all from within your Rundeck workflows.

This plugin is the Rundeck plugin version of the Python script for managing ROI metrics, providing seamless integration with Rundeck workflows and enhanced security through Key Storage integration.

๐ŸŽฏ Key Capabilities

  • โšก Bulk Processing: Processes single projects or all accessible projects
  • ๐Ÿ›ก๏ธ Dry-Run Mode: Preview changes before applying them
  • ๐Ÿ” Auto-Detection: Automatically detects existing ROI plugin configurations
  • ๐Ÿ”ง Workflow Integration: Runs as a standard Rundeck workflow step
  • ๐Ÿ“Š Progress Reporting: Provides detailed execution logs and summary statistics

โœจ Features

๐Ÿ”ง Core Functionality

  • โœ… Adds "hours" field to jobs that don't have ROI metrics
  • โœ… Supports dry-run mode for safe testing
  • โœ… Processes single projects or all accessible projects
  • โœ… Auto-detects existing ROI plugin names
  • โœ… Comprehensive error handling and logging

๐Ÿš€ Advanced Features

  • โœ… Configurable default values and API versions
  • โœ… Secure API token management via Key Storage
  • โœ… Project filtering capabilities
  • โœ… Workflow step output context for downstream steps
  • โœ… Network error handling with timeouts

๐Ÿš€ Quick Start

โšก 10-Minute Setup

  1. Build the Plugin:

    git clone https://github.com/your-org/rundeck-setroidefaults.git
    cd rundeck-setroidefaults
    gradle clean build
  2. Upload to Rundeck:

    • Go to System โ†’ Plugins โ†’ Upload Plugin
    • Select build/libs/set-roi-defaults-0.1.0.jar
    • Click Upload Plugin
  3. Setup API Token:

    • Generate API token in Profile โ†’ User API Tokens
    • Store in System โ†’ Key Storage as keys/roi-plugin-token
  4. Test the Plugin:

    • Create a job with Set ROI Defaults workflow step
    • Configure with Dry Run Mode: true
    • Run and verify output

๐Ÿ“– Detailed Instructions: See GETTING_STARTED.md


๐Ÿ“š Documentation

Document Description Use Case
๐Ÿ“– PLUGIN_README.md Complete plugin documentation Full reference guide
๐Ÿš€ GETTING_STARTED.md Quick setup guide First-time installation
๐Ÿ—๏ธ BUILD_DEPLOY.md Build and deployment guide Development and production deployment

๐Ÿ“‹ Requirements

Component Version Notes
Rundeck 5.x Commercial or Self-Hosted with ROI Metrics Plugin
Java 11+ Required for plugin execution
Operating System Linux Linux environment required
ROI Metrics Plugin Any Version Must be installed and enabled

โš ๏ธ Important: This plugin only works with commercial versions of Rundeck (Rundeck Enterprise or Rundeck Self-Hosted) that include the ROI metrics plugin.


๐ŸŽฎ Usage Examples

Basic Usage (Current Project)

Workflow Step: Set ROI Defaults
Configuration:
  API Token Path: keys/roi-plugin-token
  Project Filter: (blank - current project)
  Dry Run Mode: true

Bulk Processing (All Projects)

Workflow Step: Set ROI Defaults
Configuration:
  API Token Path: keys/roi-plugin-token
  Project Filter: all
  Dry Run Mode: false

Target Specific Project

Workflow Step: Set ROI Defaults
Configuration:
  API Token Path: keys/roi-plugin-token
  Project Filter: production
  Default Hours Saved: 0.25
  Dry Run Mode: false

๐Ÿ”ง How It Works

graph LR
    A[๐Ÿ” Plugin Detection] --> B[๐Ÿ“Š Job Analysis]
    B --> C[โž• Field Addition]
    C --> D[๐Ÿ”’ Safe Updates]
    
    A1[Auto-detect ROI plugin] --> A
    B1[Check existing ROI config] --> B
    C1[Add hours field] --> C
    D1[Rundeck job import API] --> D
Loading
  1. ๐Ÿ” Auto-Detection: Scans existing jobs to detect ROI plugin name
  2. ๐Ÿ“Š Job Analysis: Checks each job for existing ROI metrics configuration
  3. โž• Field Addition: Adds "hours" field to jobs that don't have it
  4. ๐Ÿ”’ Safe Updates: Uses Rundeck's job import API with update mode

๐Ÿ“‹ ROI Metrics Structure

The plugin adds ROI metrics in the standard Rundeck format:

{
  "plugins": {
    "ExecutionLifecycle": {
      "roi-metrics-data": {
        "userRoiData": "[{\"key\":\"hours\",\"label\":\"Hours Saved By automation\",\"desc\":\"Number of hours saved by this automation\",\"value\":\"0.1667\"}]"
      }
    }
  }
}

๐Ÿ—๏ธ Build & Deploy

Quick Build

# Standard build
gradle clean build

# Production build with tests
gradle clean test build

# Deploy to local Rundeck
sudo cp build/libs/set-roi-defaults-0.1.0.jar /var/lib/rundeck/libext/
sudo systemctl restart rundeckd

Docker Deployment

FROM rundeck/rundeck:5.0.2
COPY build/libs/set-roi-defaults-0.1.0.jar /home/rundeck/libext/

๐Ÿ“– Complete Build Guide: See BUILD_DEPLOY.md


๐Ÿ›ก๏ธ Security & Permissions

๐Ÿ” Security Features

  • โœ… API tokens stored securely in Rundeck Key Storage
  • โœ… No credentials in job definitions or logs
  • โœ… HTTPS support for API communications
  • โœ… Request timeouts to prevent hanging connections

๐Ÿ‘ฅ Required Permissions

The API token user must have:

  • Read Projects: List and access projects
  • Read Jobs: Retrieve job definitions
  • Update Jobs: Modify job configurations
  • Import Jobs: Use job import API

๐Ÿšจ Troubleshooting

Quick Fixes

Issue Solution
Plugin not visible Restart Rundeck: sudo systemctl restart rundeckd
Key storage error Verify token path: keys/roi-plugin-token
Permission denied Check API token has job read/write permissions
No jobs found Verify project filter and user access

๐Ÿ“– Complete Troubleshooting: See PLUGIN_README.md#troubleshooting


๐Ÿค Contributing

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create a feature branch
  3. ๐Ÿ”ง Make your changes
  4. ๐Ÿงช Test with dry-run mode
  5. โœ… Validate on test Rundeck instance
  6. ๐Ÿ“ค Submit a pull request

๐Ÿงช Development Workflow

# Build and test locally
gradle clean build test

# Deploy to development Rundeck
./deploy-roi-plugin.sh

# Test plugin functionality
# (Create test job with plugin step)

๐Ÿ“„ License

This project is licensed under the Apache License 2.0.

License: Apache 2.0


๐Ÿ†˜ Support

โš ๏ธ Support Disclaimer

This plugin is provided as-is and is not part of the general PagerDuty/Rundeck support program. Support is provided on a best-effort basis through community channels only.

  • โœ… Community support via GitHub issues
  • โŒ Not covered by PagerDuty commercial support
  • โŒ No SLA or guaranteed response times

๐Ÿ› Reporting Issues

When reporting issues, please include:

  • Rundeck version and plugin version
  • Complete error messages and logs
  • Plugin configuration (sanitized)
  • Steps to reproduce

Built for DevOps Teams

Rundeck Java Linux

Streamline your ROI metrics management with automated Rundeck workflows

[![Rundeck Version](https://img.shields.io/badge/Rundeck-5.x-blue.svg)](https://rundeck.com) [![Java Version](https://img.shields.io/badge/Java-11%2B-orange.svg)](https://openjdk.java.net/) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](https://opensource.org/licenses/Apache-2.0) [![Platform](https://img.shields.io/badge/platform-linux-lightgrey.svg)](https://www.linux.org/) [![Plugin Version](https://img.shields.io/badge/Plugin%20Version-0.1.0-green.svg)](https://github.com/your-org/rundeck-setroidefaults) [![Development Status](https://img.shields.io/badge/status-stable-green.svg)](https://github.com/your-org/rundeck-setroidefaults)

A Rundeck Workflow Step Plugin to automatically manage ROI (Return on Investment) metrics for jobs

Quick Start โ€ข Features โ€ข Documentation โ€ข Build & Deploy โ€ข Contributing


๐Ÿ“‹ Overview

The Rundeck Set ROI Defaults Plugin is a Workflow Step Plugin that automatically manages ROI metrics in Rundeck job definitions. It detects existing ROI configurations, adds missing ROI fields, and tracks automation value across projects - all from within your Rundeck workflows.

This plugin is the Rundeck plugin version of the Python script for managing ROI metrics, providing seamless integration with Rundeck workflows and enhanced security through Key Storage integration.

๐ŸŽฏ Key Capabilities

  • โšก Bulk Processing: Processes single projects or all accessible projects
  • ๐Ÿ›ก๏ธ Dry-Run Mode: Preview changes before applying them
  • ๐Ÿ” Auto-Detection: Automatically detects existing ROI plugin configurations
  • ๐Ÿ”ง Workflow Integration: Runs as a standard Rundeck workflow step
  • ๐Ÿ“Š Progress Reporting: Provides detailed execution logs and summary statistics

โœจ Features

๐Ÿ”ง Core Functionality

  • โœ… Adds "hours" field to jobs that don't have ROI metrics
  • โœ… Supports dry-run mode for safe testing
  • โœ… Processes single projects or all accessible projects
  • โœ… Auto-detects existing ROI plugin names
  • โœ… Comprehensive error handling and logging

๐Ÿš€ Advanced Features

  • โœ… Configurable default values and API versions
  • โœ… Secure API token management via Key Storage
  • โœ… Project filtering capabilities
  • โœ… Workflow step output context for downstream steps
  • โœ… Network error handling with timeouts

๐Ÿš€ Quick Start

โšก 10-Minute Setup

  1. Build the Plugin:

    git clone https://github.com/your-org/rundeck-setroidefaults.git
    cd rundeck-setroidefaults
    gradle clean build
  2. Upload to Rundeck:

    • Go to System โ†’ Plugins โ†’ Upload Plugin
    • Select build/libs/set-roi-defaults-0.1.0.jar
    • Click Upload Plugin
  3. Setup API Token:

    • Generate API token in Profile โ†’ User API Tokens
    • Store in System โ†’ Key Storage as keys/roi-plugin-token
  4. Test the Plugin:

    • Create a job with Set ROI Defaults workflow step
    • Configure with Dry Run Mode: true
    • Run and verify output

๐Ÿ“– Detailed Instructions: See GETTING_STARTED.md


๐Ÿ“š Documentation

Document Description Use Case
๐Ÿ“– PLUGIN_README.md Complete plugin documentation Full reference guide
๐Ÿš€ GETTING_STARTED.md Quick setup guide First-time installation
๐Ÿ—๏ธ BUILD_DEPLOY.md Build and deployment guide Development and production deployment

๐Ÿ“‹ Requirements

Component Version Notes
Rundeck 5.x Commercial or Self-Hosted with ROI Metrics Plugin
Java 11+ Required for plugin execution
Operating System Linux Linux environment required
ROI Metrics Plugin Any Version Must be installed and enabled

โš ๏ธ Important: This plugin only works with commercial versions of Rundeck (Rundeck Enterprise or Rundeck Self-Hosted) that include the ROI metrics plugin.


๐ŸŽฎ Usage Examples

Basic Usage (Current Project)

Workflow Step: Set ROI Defaults
Configuration:
  API Token Path: keys/roi-plugin-token
  Project Filter: (blank - current project)
  Dry Run Mode: true

Bulk Processing (All Projects)

Workflow Step: Set ROI Defaults
Configuration:
  API Token Path: keys/roi-plugin-token
  Project Filter: all
  Dry Run Mode: false

Target Specific Project

Workflow Step: Set ROI Defaults
Configuration:
  API Token Path: keys/roi-plugin-token
  Project Filter: production
  Default Hours Saved: 0.25
  Dry Run Mode: false

๐Ÿ”ง How It Works

graph LR
    A[๐Ÿ” Plugin Detection] --> B[๐Ÿ“Š Job Analysis]
    B --> C[โž• Field Addition]
    C --> D[๐Ÿ”’ Safe Updates]
    
    A1[Auto-detect ROI plugin] --> A
    B1[Check existing ROI config] --> B
    C1[Add hours field] --> C
    D1[Rundeck job import API] --> D
Loading
  1. ๐Ÿ” Auto-Detection: Scans existing jobs to detect ROI plugin name
  2. ๐Ÿ“Š Job Analysis: Checks each job for existing ROI metrics configuration
  3. โž• Field Addition: Adds "hours" field to jobs that don't have it
  4. ๐Ÿ”’ Safe Updates: Uses Rundeck's job import API with update mode

๐Ÿ“‹ ROI Metrics Structure

The plugin adds ROI metrics in the standard Rundeck format:

{
  "plugins": {
    "ExecutionLifecycle": {
      "roi-metrics-data": {
        "userRoiData": "[{\"key\":\"hours\",\"label\":\"Hours Saved By automation\",\"desc\":\"Number of hours saved by this automation\",\"value\":\"0.1667\"}]"
      }
    }
  }
}

๐Ÿ—๏ธ Build & Deploy

Quick Build

# Standard build
gradle clean build

# Production build with tests
gradle clean test build

# Deploy to local Rundeck
sudo cp build/libs/set-roi-defaults-0.1.0.jar /var/lib/rundeck/libext/
sudo systemctl restart rundeckd

Docker Deployment

FROM rundeck/rundeck:5.0.2
COPY build/libs/set-roi-defaults-0.1.0.jar /home/rundeck/libext/

๐Ÿ“– Complete Build Guide: See BUILD_DEPLOY.md


๐Ÿ›ก๏ธ Security & Permissions

๐Ÿ” Security Features

  • โœ… API tokens stored securely in Rundeck Key Storage
  • โœ… No credentials in job definitions or logs
  • โœ… HTTPS support for API communications
  • โœ… Request timeouts to prevent hanging connections

๐Ÿ‘ฅ Required Permissions

The API token user must have:

  • Read Projects: List and access projects
  • Read Jobs: Retrieve job definitions
  • Update Jobs: Modify job configurations
  • Import Jobs: Use job import API

๐Ÿšจ Troubleshooting

Quick Fixes

Issue Solution
Plugin not visible Restart Rundeck: sudo systemctl restart rundeckd
Key storage error Verify token path: keys/roi-plugin-token
Permission denied Check API token has job read/write permissions
No jobs found Verify project filter and user access

๐Ÿ“– Complete Troubleshooting: See PLUGIN_README.md#troubleshooting


๐Ÿค Contributing

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create a feature branch
  3. ๐Ÿ”ง Make your changes
  4. ๐Ÿงช Test with dry-run mode
  5. โœ… Validate on test Rundeck instance
  6. ๐Ÿ“ค Submit a pull request

๐Ÿงช Development Workflow

# Build and test locally
gradle clean build test

# Deploy to development Rundeck
./deploy-roi-plugin.sh

# Test plugin functionality
# (Create test job with plugin step)

๐Ÿ“„ License

This project is licensed under the Apache License 2.0.

License: Apache 2.0


๐Ÿ†˜ Support

โš ๏ธ Support Disclaimer

This plugin is provided as-is and is not part of the general PagerDuty/Rundeck support program. Support is provided on a best-effort basis through community channels only.

  • โœ… Community support via GitHub issues
  • โŒ Not covered by PagerDuty commercial support
  • โŒ No SLA or guaranteed response times

๐Ÿ› Reporting Issues

When reporting issues, please include:

  • Rundeck version and plugin version
  • Complete error messages and logs
  • Plugin configuration (sanitized)
  • Steps to reproduce

Built for DevOps Teams

Rundeck Java Linux

Streamline your ROI metrics management with automated Rundeck workflows

About

Runbook Automation Self Hosted Plugin to set ROI Metric Defaults

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages