-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iDRAC9 F/W ver up and RedFish ver up (#88)
* Adapting latest OMSA version * add comments * Improve Dockerfile * change for OMSA v11.0.0.0 * add redfish rule for v1.17 * fix issue * rebuild rules for v.1.17 * add the entries of base-rule for v1.11 * fix typo * change unreleased section * change for review comment * run go run ../pkg/render-rules * re-make collector rule * add the test cases with real data * revert changing converter.go * name change to appropriate * add base-rule for v1.17 and shell * change filename to avoid confusing * change for review comment * change for review comment * delete rule.yaml
- Loading branch information
Showing
15 changed files
with
183,658 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
Traverse: | ||
Root: /redfish/v1 | ||
Excludes: | ||
# Schemas | ||
- /JsonSchemas | ||
# Non-metric properties | ||
- /Accounts | ||
- /Certificates | ||
- /Jobs | ||
- /Logs | ||
- /Registries | ||
- /Roles | ||
- /Sessions | ||
- /Settings | ||
# Services | ||
- /AccountService | ||
- /CertificateService | ||
- /EventService | ||
- /JobService | ||
- /LogServices | ||
- /SessionService | ||
- /TaskService | ||
- /TelemetryService | ||
- /UpdateService | ||
- /LicenseService | ||
# Sub-metrics included in /Power or /Thermal | ||
- /Power/ | ||
- /Power#/ | ||
- /Thermal#/ | ||
- /Assembly#/ | ||
# Redundant page with extra trailing slash | ||
- /redfish/v1/Chassis/$ | ||
|
||
Metrics: | ||
## Chassis | ||
- Path: /redfish/v1/Chassis/{chassis} | ||
- Path: /redfish/v1/Chassis/{chassis}/Assembly | ||
- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{nic} | ||
- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{nic}/NetworkDeviceFunctions/{function} | ||
- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{nic}/NetworkPorts/{port} | ||
- Path: /redfish/v1/Chassis/{chassis}/NetworkAdapters/{nic}/Ports/{port} | ||
- Path: /redfish/v1/Chassis/{chassis}/PCIeDevices/{device} | ||
- Path: /redfish/v1/Chassis/{chassis}/PCIeDevices/{device}/PCIeFunctions/{function} | ||
- Path: /redfish/v1/Chassis/{chassis}/PCIeSlots | ||
- Path: /redfish/v1/Chassis/{chassis}/Power | ||
- Path: /redfish/v1/Chassis/{chassis}/PowerSubsystem | ||
- Path: /redfish/v1/Chassis/{chassis}/PowerSubsystem/PowerSupplies/{unit} | ||
- Path: /redfish/v1/Chassis/{chassis}/PowerSubsystem/PowerSupplies/{unit}/Metrics | ||
- Path: /redfish/v1/Chassis/{chassis}/Sensors/{sensor} | ||
- Path: /redfish/v1/Chassis/{chassis}/Thermal | ||
- Path: /redfish/v1/Chassis/{chassis}/ThermalSubsystem | ||
- Path: /redfish/v1/Chassis/{chassis}/ThermalSubsystem/Fans/{unit} | ||
- Path: /redfish/v1/Chassis/{chassis}/ThermalSubsystem/ThermalMetrics | ||
|
||
## Dell | ||
- Path: /redfish/v1/Dell/Chassis/{system}/DellAssembly/{assembly} | ||
- Path: /redfish/v1/Dell/Systems/{system}/DellNumericSensor/{sensor} | ||
- Path: /redfish/v1/Dell/Systems/{system}/DellPCIeFunction/{function} | ||
- Path: /redfish/v1/Dell/Systems/{system}/DellPSNumericSensor/{sensor} | ||
- Path: /redfish/v1/Dell/Systems/{system}/DellSensor/{sensor} | ||
- Path: /redfish/v1/Dell/Systems/{system}/DellSlot/{slot} | ||
- Path: /redfish/v1/Dell/Systems/{system}/Memory/DellMemory/{memory} | ||
- Path: /redfish/v1/Dell/Systems/{system}/NetworkAdapters/NetworkDeviceFunctions/DellNICPortMetrics/{port} | ||
- Path: /redfish/v1/Dell/Systems/{system}/NetworkDeviceFunctions/DellNIC/{nic} | ||
- Path: /redfish/v1/Dell/Systems/{system}/NetworkDeviceFunctions/DellNICCapabilities/{nic} | ||
- Path: /redfish/v1/Dell/Systems/{system}/NetworkPorts/DellSwitchConnection/{connection} | ||
- Path: /redfish/v1/Dell/Systems/{system}/Processors/DellProcessor/{processor} | ||
- Path: /redfish/v1/Dell/Systems/{system}/Storage/DellController/{controller} | ||
- Path: /redfish/v1/Dell/Systems/{system}/Storage/DellPCIeSSD/{disk} | ||
- Path: /redfish/v1/Dell/Systems/{system}/Storage/Drives/DellPhysicalDisk/{disk} | ||
- Path: /redfish/v1/Dell/Systems/{system}/Storage/Volumes/DellVirtualDisk/{disk} | ||
## Fabrics | ||
- Path: /redfish/v1/Fabrics/{fabric} | ||
- Path: /redfish/v1/Fabrics/{fabric}/Switches | ||
## Managers | ||
- Path: /redfish/v1/Managers/{manager} | ||
- Path: /redfish/v1/Managers/{manager}/Attributes | ||
- Path: /redfish/v1/Managers/{manager}/EthernetInterfaces/{interface} | ||
- Path: /redfish/v1/Managers/{manager}/HostInterfaces/{host} | ||
- Path: /redfish/v1/Managers/{manager}/NetworkProtocol | ||
## Systems | ||
- Path: /redfish/v1/Systems/{system} | ||
- Path: /redfish/v1/Systems/{system}/BootOptions/{option} | ||
- Path: /redfish/v1/Systems/{system}/EthernetInterfaces/{interface} | ||
- Path: /redfish/v1/Systems/{system}/Memory/{memory} | ||
- Path: /redfish/v1/Systems/{system}/Memory/{memory}/MemoryMetrics | ||
- Path: /redfish/v1/Systems/{system}/NetworkAdapters/{nic} | ||
- Path: /redfish/v1/Systems/{system}/NetworkAdapters/{nic}/NetworkDeviceFunctions/{function} | ||
- Path: /redfish/v1/Systems/{system}/NetworkAdapters/{nic}/NetworkPorts/{port} | ||
- Path: /redfish/v1/Systems/{system}/NetworkInterfaces/{nic} | ||
- Path: /redfish/v1/Systems/{system}/PCIeDevices/{device} | ||
- Path: /redfish/v1/Systems/{system}/PCIeDevices/{device}/PCIeFunctions/{function} | ||
- Path: /redfish/v1/Systems/{system}/Processors/{processor} | ||
- Path: /redfish/v1/Systems/{system}/SimpleStorage/{controller} | ||
- Path: /redfish/v1/Systems/{system}/Storage/{storage} | ||
- Path: /redfish/v1/Systems/{system}/Storage/{storage}/Controllers/{controller} | ||
- Path: /redfish/v1/Systems/{system}/Storage/{storage}/Drives/{device} | ||
- Path: /redfish/v1/Systems/{system}/Storage/{storage}/StorageControllers/{controller} | ||
- Path: /redfish/v1/Systems/{system}/Storage/{storage}/Volumes | ||
- Path: /redfish/v1/Systems/{system}/Storage/{storage}/Volumes/{volume} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/bash | ||
# | ||
# Shell for collector generate-rule execute on container | ||
# | ||
# 2023/7/14 RedFish v1.17 | ||
# | ||
|
||
# Please edit for your environment | ||
RULE="dell-redfish-v117.yaml" # Base rule | ||
INPUT1="r7525-data-omsa1100.json" # Output by "collector show" command | ||
INPUT2="r6525-data-omsa1100.json" # for each PowerEdge Model | ||
OUTPUT="dell_redfish_1.17.0.yml" # Output rule file for Promethus/Grafana | ||
SETUP_HW="quay.io/neco_test/setup-hw:dev" # Latest container image if there is dell command upgrade. | ||
|
||
docker run -it --name=setup-hw \ | ||
-v ${PWD}:/mnt \ | ||
--rm \ | ||
${SETUP_HW} collector generate-rule \ | ||
--base-rule=/mnt/${RULE} \ | ||
--key=Health:health \ | ||
--key=State:state \ | ||
--key=FailurePredicted:bool \ | ||
--key=PredictedMediaLifeLeftPercent:number \ | ||
--key=AddressParityError:bool \ | ||
--key=CorrectableECCError:bool \ | ||
--key=SpareBlock:bool \ | ||
--key=Temperature:bool \ | ||
--key=UncorrectableECCError:bool \ | ||
--key=DataLossDetected:bool \ | ||
--key=ReadingCelsius:number \ | ||
--key=PowerConsumedWatts:number \ | ||
--key=Reading:number \ | ||
/mnt/${INPUT1} /mnt/${INPUT2} > ${OUTPUT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
FROM centos:7 as stage1 | ||
FROM ubuntu:22.04 as stage1 | ||
|
||
COPY setup-hw /usr/local/bin/setup-hw | ||
COPY monitor-hw /usr/local/sbin/monitor-hw | ||
COPY collector /usr/local/sbin/collector | ||
COPY setup-apply-firmware /usr/local/sbin/setup-apply-firmware | ||
COPY setup-isoreboot /usr/local/sbin/setup-isoreboot | ||
|
||
CMD ["/usr/local/sbin/monitor-hw"] | ||
|
||
|
||
# Install vendor tools | ||
FROM stage1 | ||
|
||
ARG DSU_VERSION=21.11.26 | ||
# See https://linux.dell.com/repo/community/openmanage/ | ||
ARG OMSA_VERSION=11000 | ||
ARG UBUNTU_VERSION=jammy | ||
|
||
# Setup DELL repository | ||
RUN apt-get update -y && apt-get install -y --no-install-recommends wget gnupg ca-certificates \ | ||
&& echo "deb http://linux.dell.com/repo/community/openmanage/${OMSA_VERSION}/${UBUNTU_VERSION} ${UBUNTU_VERSION} main" | tee -a /etc/apt/sources.list.d/linux.dell.com.sources.list \ | ||
&& wget https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc \ | ||
&& apt-key add 0x1285491434D8786F.asc \ | ||
&& rm 0x1285491434D8786F.asc | ||
|
||
RUN curl -sf -o bootstrap.cgi https://linux.dell.com/repo/hardware/DSU_${DSU_VERSION}/bootstrap.cgi \ | ||
&& bash bootstrap.cgi \ | ||
&& rm bootstrap.cgi \ | ||
&& yum update -y \ | ||
&& yum install -y syscfg srvadmin-idracadm7 dmidecode \ | ||
&& yum clean all | ||
# To avoid error postinstall script of srvadmin-all in the contaioner enviroment. | ||
COPY systemctl-dummy /usr/bin/systemctl | ||
|
||
ENV PATH /opt/dell/srvadmin/bin:$PATH | ||
# Install DELL's tools | ||
RUN apt-get update -y \ | ||
&& ln -s /usr/lib/x86_64-linux-gnu/libssl.so.3 /usr/lib/libssl.so \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install srvadmin-all -y \ | ||
&& rm /usr/bin/systemctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
/bin/true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.