Pipeline Elements¶
Pipeline Elements (PEs) are a consistent workflow template pattern used in DRP pipelines. They are NOT a separate runner mode — PEs are workflows delivered as content packs that follow a standardized stage structure, making them composable building blocks for the provisioning pipeline.
The reference implementations are in the universal content pack: universal-discover, universal-hardware, universal-burnin, and universal-linux-install. All follow the same stage pattern:
- Initial unique work — stages specific to this pipeline element's purpose
- pre-callback — announces pipeline entry (e.g.,
universal-hardware-start-callback) - pre-flexiflow — injection point for pre-work customization (e.g.,
universal-hardware-pre-flexiflow) - Specific work stages — the core work (e.g.,
ipmi-inventory,raid-configure,bios-configure) - post-flexiflow — injection point for post-work customization (e.g.,
universal-hardware-post-flexiflow) - Classification — classification validation point to select next pipeline step (e.g.,
universal-hardware-classification) - Validation — post-work validation injection point (e.g.,
universal-hardware-post-validation) - post-callback — announces pipeline completion (e.g.,
universal-hardware-complete-callback) - Chain task —
universal-chain-workflowselects and starts the next pipeline element
Example: universal-hardware Workflow¶
The following is the actual stage list from the universal-hardware content pack:
---
Name: universal-hardware
Description: "Hardware IPMI, Flash, RAID and BIOS"
Documentation: |
Universal Workflow for the hardware
Meta:
pipeline: start
color: olive
icon: map signs
title: RackN Content
Stages:
- discover
- universal-hardware-start-callback
- universal-hardware-pre-classification
- universal-hardware-pre-flexiflow
- hardware-tools-install
- raid-tools-install
- ipmi-inventory
- ipmi-configure
- flash
- ipmi-reset-to-factory
- ipmi-inventory
- raid-enable-encryption
- raid-configure
- bios-reset-to-factory
- bios-inventory
- bios-configure
- universal-hardware-post-flexiflow
- bios-complete
- universal-hardware-classification
- universal-hardware-post-validation
- universal-hardware-complete-callback
- universal-chain-workflow
- complete-nobootenv
Flexiflow Injection Points¶
The pre-flexiflow and post-flexiflow stages are the primary way developers add custom behavior to existing pipeline elements WITHOUT modifying the PE itself. Each flexiflow stage reads a parameter that contains the list of stages to inject. For example, universal-hardware-post-flexiflow reads universal/hardware-post-flexiflow. Set that parameter to inject stages after the hardware work:
# Inject a custom stage into the post-flexiflow of universal-hardware
drpcli profiles set global param universal/hardware-post-flexiflow \
to '["my-custom-hardware-validate"]'
This allows site-specific customization to be delivered as a separate content pack without forking the upstream PE. The PE itself remains unmodified and upgradeable independently.
Building a Pipeline Element¶
The recommended starting point for a new Pipeline Element is to clone the universal-runbook PE from the rackn/content/universal content pack. universal-runbook is the simplest reference PE — it provides the full standard stage structure with application delivery via during-flexiflow injection — making it the right template to copy and adapt.
The universal-runbook workflow (rackn/content/universal/content/workflows/universal-runbook.yaml) provides:
Stages:
- start
- universal-runbook-start-callback
- universal-runbook-pre-classification
- universal-runbook-pre-flexiflow
- universal-runbook-during-flexiflow
- universal-runbook-post-flexiflow
- universal-runbook-classification
- universal-runbook-post-validation
- universal-runbook-complete-callback
- universal-chain-workflow
- complete-nobootenv
The universal-runbook-during-flexiflow stage uses the parameter universal/runbook-during-flexiflow (a list of task names) as its task list. This is where you inject the work specific to your PE:
# Set the tasks to run during your runbook execution
drpcli profiles set global param universal/runbook-during-flexiflow \
to '["my-install-task", "my-configure-task"]'
To build a new PE from this template:
- Copy the
universal-runbookworkflow YAML, its stage YAMLs, and the associated classification and flexiflow parameter YAMLs fromrackn/content/universal/content/ - Rename every object: replace the
universal-runbookprefix with your PE's name (e.g.,my-app-deploy) - Rename the flexiflow parameter:
universal/runbook-during-flexiflow→my-app-deploy/during-flexiflow - Write the tasks your PE needs and add their names to the
my-app-deploy/during-flexiflowparameter default - Bundle workflow, stages, tasks, templates, and parameters into a single content pack YAML
The universal-runbook-classification, universal-runbook-complete-callback, and universal-chain-workflow stages can be referenced from universal as-is — they do not need to be renamed or copied.
Do not create bare workflows when a PE pattern exists — If a pipeline element already covers your phase, use the flexiflow injection points instead of creating a new workflow.