RedFish Platform Management
What is Redfish?
Scalable Platform Management API for out of band system-management…
- … defined by the DMTF (Distributed Management Task Force)
- …many improvements over IPMI standard
- …modern technology stack based on HTTPS, JSON and OData
- …secure replacement for IPMI-over-LAN
- …purposefully designed for automation around physical platforms
- …cross-vendor …interoperable management interface
- …intended to meet OCP (Open Compute Project) remote machine management requirements
- …brought support from industry, i.e. Supermicro, Dell, Mellanox, HP, Intel
Standard design for SDDC (Software Defined Data Center)…
- …monitor equipment health …automate alerts
- …power cycling …configure/update firmware
- …bare-metal provisioning …console sessions
- …power & thermal management
- …inventory management
- …logging data aggregation
Used along with SNIA Swordfish a standard for remote storage management
RESTful
Platform management REST API
- …HTTPS in JSON format based on OData v4
- …schema-backed but human-readable …usable by web-apps, GUIs and CLI scripts
- …supports custom extension (i.e. SNMP) with OEM schema
Resource map (simplified)…
- …
GET https://<ip-addr>/redfish/v1/Systems/<id>/Processors/<id>
- …major resources in collections …allow aggregation over many nodes/racks
…all resources linked from service entry point:
/redfish/v1/ # service entry point...
/Accounts/...
/Events/...
/Systems/... # logical view of a computer systems
/<id>/Processor
/Disk
/...
/Chassis/... # physical view of a computer system
/<id>/Power
/Termal
/...
/Managers/... # administrative functions aka BMC
/<id>/LogService
/SerialInterface
/...
/...
Data Model (Schema)
First versions mimics functionality provided by IPMI…
- System data…
/redfish/v1/Systems
- …status & health …fan speed …temperatures
- …hardware inventory …CPUs, memory, storage, network devices
- …host OS information
- Hardware management functionality…
/redfish/v1/Chassis
- …power cycle …reboot …boot device order
- …power thresholds
- …alerting …notifications (via email)
- …event logs
- …SSH serial console
- BMC management…
/redfish/v1/Managers
- …network configuration …user accounts
- …chassis inventory …DCIM sensors
Beyond the first versions …added support for data center equipment…
- Power (meters, generators, UPS, PDUs) …
/redfish/v1/DCMICooling
- Cooling (chillers, pumps, fans, sensors) …
/redfish/v1/DCMIPower
- …alarm modeling …triggers & notifications
Mockup explorer for the data schema: https://redfish.dmtf.org/redfish/mockups/v1
# ...get the container
podman pull dmtf/redfish-mockup-server:latest
# ...start the container
podman run --rm dmtf/redfish-mockup-server:latest
# ...send a simple query
curl 0.0.0.0:8000/redfish
Command-Line Interfaces
Redfish Utility – https://dmtf.github.io/python-redfish-utility – https://github.com/DMTF/python-redfish-utility
curl
Query the Redfish API with curl
…
# set variables..
bmc=
user=
password=
# get the security token and store it to a file
curl -k -H "Content-Type: application/json" \
-X POST https://${bmc}/redfish/v1/SessionService/Sessions \
-d '{"UserName" : "$user", "Password" : "$password"}' \
-D headers.txt
# read the security token into a variable
token=$(grep X-Auth-Token headers.txt |cut -d ':' -f 2)
# query the chassis information
curl -k -H "${token}" -X GET https://${bmc}/redfish/v1/Chassis/1 | jq '.'
Modify data…
>>> curl -s ${address}/redfish/v1/Chassis/1U | jq .Location.Placement
>>> cat location_update.json
{
"Location": {
"Placement": {
"Rack": "DB06",
"RackOffset": 8,
"RackOffsetUnits": "EIA_310",
"Row": "North"
}
}
}
# ...send the patch request
>>> curl -s -X PATCH -d @./location_update.json \
-H 'Content-Type: application/json' \
${address}/redfish/v1/Chassis/1U
redfishtool
Redfishtool – https://github.com/DMTF/Redfishtool
- …negotiates the latest Redfish protocol version …send and receive Redfish requests
- …automatically handles multiple queries to a redfish service (to traverse the data schema)
- …common functionality like …power-on/off/reset …setting power limits …indicator LEDs
Install Redfish tools…
sudo dnf install -y python3-pip
pip install redfishtool
The redfishtool
requires authentication options…
- …
-u
for the user name - …
-p
to set the password - …
-r
sets the address of the BMC to connect to - …
-1
select first system if it is only one
# ...get power status
redfishtool -u $bmc_user -p "$bmc_password" -r $bmc -1 Systems | jq '.PowerState'
rf_*
sudo dnf install -y python3-pip
pip install redfish_utilities
Redfish Tacklebox – https://github.com/DMTF/Redfish-Tacklebox
Commands are prefixed with rf_*
…
# read all sensores from a node...
>>> rf_sensor_list.py -u $user -p "$password" -r $node
Chassis '1' Status
Sensor | Reading | Health | LF #...
State | Enabled | OK | N/A #...
Power Supply Bay 1 State | Enabled | OK | N/A #...
Power Supply Bay 1 LineIn | 229V | N/A | N/A #...
Power Supply Bay 1 PowerC | 800W | N/A | N/A #...
#...
# boot configuration optiond...
>>> rf_boot_override.py -u $bmc_user -p "$bmc_password" -r https://$bmc
Boot Override Settings:
Target: None; Allowable Values: None, Pxe, Floppy, Cd, Usb, Hdd, BiosSetup, UsbCd, UefiBootNext
Enabled: Disabled
Mode: Legacy
Boot Next:
# reset the node for PXE boot
rf_boot_override.py -u $bmc_user -p "$bmc_password" -r https://$bmc --target Pxe --reset
References
- DMTF’s Redfish Developer Hub
- Redfish Standard & Specifications
- OpenStack Redfish Python Libraries
- Configuration Management Support
- Redfish User Guide (2022)