Hardware Profiles¶
Hardware profiles are DRP Blueprint objects that describe the physical or virtual characteristics of a class of machines. They are used by the classifier system to automatically match discovered machines to appropriate workflows and configuration sets based on detected hardware attributes such as CPU architecture, memory capacity, NIC count, storage layout, and vendor/model identifiers. Hardware profiles provide a declarative way to encode "this type of hardware should be provisioned this way" without hard-coding machine-specific logic into tasks or stages.
How Hardware Profiles Work¶
When a machine boots into the DRP discovery environment (Sledgehammer), DRP collects hardware inventory data and stores it as machine parameters (e.g., inventory/data). The DRP classifier then evaluates a set of rules against the machine's parameters and profiles. When a hardware profile's classifier rules match, DRP automatically applies the associated profiles, parameters, and workflow to the machine.
Hardware profiles are typically delivered as part of a content pack. They reference other profiles (containing parameter defaults), a target bootenv, and a workflow that should run when a machine of that hardware type is detected. This means operators write hardware profiles once and DRP handles the classification automatically at discovery time.
Creating a Hardware Profile¶
A hardware profile is a content pack object that embeds classifier rules and associated configuration. The following YAML shows the structure:
Name: my-hw-profile-dell-r640
Description: "Dell PowerEdge R640 hardware profile"
Meta:
color: blue
icon: server
Params:
# Parameters applied to machines matching this profile
hardware/model: "Dell PowerEdge R640"
hardware/cpu-cores: 32
Profiles:
- dell-r640-bios-settings
Tasks:
- hardware-validate
- bios-configure
To create the profile from a YAML file:
Classifier Rules and Matching¶
Classifiers are rules that DRP evaluates against machine parameters at discovery time. They use a simple expression language to test parameter values. For example, a classifier might check that inventory/data contains a specific vendor string and that the memory capacity exceeds a threshold. Classifiers are ordered — the first matching hardware profile wins. Place more specific rules before general fallback profiles.
A typical classifier rule set embedded in a hardware profile:
Classifiers:
- Field: "Param.inventory/data.System.Vendor"
Op: "eq"
Value: "Dell Inc."
- Field: "Param.inventory/data.System.ProductName"
Op: "contains"
Value: "R640"
Iterating on Hardware Profiles¶
During development, use drpcli machines commands to inspect what parameters the discovery agent collected for a test machine, then write classifier rules that match those values:
# See what inventory data was collected for a machine
drpcli machines show <machine-uuid> | jq '.Params["inventory/data"]'
# Apply a profile manually to test configuration before automating
drpcli machines addprofile <machine-uuid> my-hw-profile-dell-r640
# Remove a manually applied profile
drpcli machines removeprofile <machine-uuid> my-hw-profile-dell-r640
Deliver finalized hardware profiles as part of a content pack so they are version-controlled and can be installed across multiple DRP endpoints. See the content pack developer guide for packaging details.