Hardware profiles are an efficient way to configure multiple servers in the cluster. You can apply a hardware profile to multiple servers using the server name or using profile selectors and labels.
spec:
apply: true
## the hardware profile is applied only to servers listed below
serverList:
- name: server22
namespace: metalweaver
- name: server21
namespace: metalweaver
- name: server30
namespace: metalweaver
## Add more fields below
server:
powerState: "Off"
Another method to target servers is user-defined selectors and labels. The selector that you add to the hardware profile targets servers that have a matching label attribute. If a server has multiple labels, the hardware profile selector only needs to match a subset of the server labels to get applied to the server.
The following shows an example hwprofile selector in the spec section of a hardware profile called hw-config001. Selector names are user defined.
spec:
selectors:
hwprofile: hw-config001
To target a specific server, use the server's YAML file to edit the server configuration and add a matching hwprofile label. The following example shows a matching hwprofile label in the metadata section of a server YAML file.
apiVersion: mw.dell.com/v4
kind: Server
metadata:
name: dell-r740xd
labels:
site: gc
hwprofile: hw-config001
Limitations
- Hardware profiles that are created using the Bare Metal Orchestrator web UI already have a default selector called profileName: profile. You can add custom selectors to these hardware profiles, but don't modify the default selector.
- The hardware profile will fail to apply if servers do not have a matching label.
- You must add server labels to the server metadata section of the server YAML file, and add the hardware profile selectors to the spec section of the hardware profile YAML file.
- If a server has multiple labels, the hardware profile selectors can match a subset of labels in the server metadata to be applied to the server.