Redfish on Openbmc
Total Page:16
File Type:pdf, Size:1020Kb
Redfish on OpenBMC Gunnar Mills IBM What is Redfish Getting Started with Redfish OpenBMC’s Redfish Implementation Agenda OpenBMC Releases Redfish Data Model Redfish Sessions Redfish Major Collections • Open industry standard specification for hardware management • Definition community-driven • Distributed Management Task Force (DMTF) • History • Redfish Forum created in 2014 • First Redfish specification Aug 2015 • Latest 2019.2 (3Q 2019) • 30 companies • Broadcom Inc., Cisco, Dell Inc., Ericsson AB, Hewlett Packard Enterprise, Intel Corporation, Lenovo, Supermicro, Vertiv, VMware Inc. What is • American Megatrends, Inc., ARM, Inc, Artesyn Embedded Technologies, Atosm, Cray, Inc., Eaton, Fujitsu, Google LLC, Huawei, IBM, Insyde Software Corp., Mellanox Technologies, Microchip Technology Inc., NetApp, New H3C Technologies Co., OSIsoft, LLC, Quanta Computer Inc, Solarflare Redfish? Communications, Toshiba Memory Corporation, Western Digital Corporation • First release focused on Servers • Intended to meet OCP Remote Machine Management requirement • Full server category: Rackmount, Blades, HPC, Racks, Etc • Replacement for IPMI-over-LAN • New specification every 4 months • Working with SNIA to cover more advanced Storage (Swordfish) • Working with The Green Grid & ASHRAE to cover Facilities (Power/Cooling) • Working with the IETF to cover some level of Ethernet Switching Redfish • RESTful API, HTTPS, JSON • Don’t invent anything new if robust solutions exist • Schema-backed but human-readable • OData (Open Data Protocol) • Usable by Apps, GUIs, browser plug-ins, and scripts • Extensible, Secure, Interoperable • 80+ schemas, 2000+ properties • Most optional • OCP Server and Baseline manageable device profiles • Can target for implementation • Tools – redfishtool, Redfish-Service-Validator Redfish Standard • https://www.dmtf.org/standards/redfish Developer Hub Getting started • https://redfish.dmtf.org/ with Redfish Private repo • https://github.com/dmtf/redfish Redfish Mockups • Simple Rack Mounted Server • https://redfish.dmtf.org/redfish/mockups/v1/863 OpenBMC’s Redfish Implementation • Bmcweb • “Do everything" embedded webserver • Configurable • Authentication middleware • Virtual media, KVM • Redfish • Transposes D-Bus interfaces to REST • Static file hosting for Web Interface • Async • Replaces phosphor-rest-server • Uses Boost::Beast • Adding translation layer • Means changes to our D-Bus API do not impact users Object Mapper Phosphor bmcweb mapper inventory manager GetSubTree (Inventory.Item.Cpu) xyz.openbmc_project.Inventory.manager GetAll Processor properties dbus-send --system --print-reply \ --dest=xyz.openbmc_project.ObjectMapper \ /xyz/openbmc_project/object_mapper \ xyz.openbmc_project.ObjectMapper.GetSubTree \ string:"/" int32:0 array:string:"xyz.openbmc_project.Inventory.Item.Cpu" method return time=1567567965.616423 sender=:1.23 -> destination=:1.148 serial=3 932 reply_serial=2 array [ dict entry( string "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0" array [ dict entry( string "xyz.openbmc_project.Inventory.Manager" array [ string "org.freedesktop.DBus.Introspectable" string "org.freedesktop.DBus.Peer" string "org.freedesktop.DBus.Properties" string "xyz.openbmc_project.Inventory.Decorator.Asset" string "xyz.openbmc_project.Inventory.Decorator.Cacheable" string "xyz.openbmc_project.Inventory.Decorator.Replaceable" string "xyz.openbmc_project.Inventory.Decorator.Revision" string "xyz.openbmc_project.Inventory.Item" string "xyz.openbmc_project.Inventory.Item.Cpu" string "xyz.openbmc_project.State.Decorator.OperationalStatus" ] ) ] ) dict entry( string "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1" array [ dict entry( string "xyz.openbmc_project.Inventory.Manager" array [ string "org.freedesktop.DBus.Introspectable" string "org.freedesktop.DBus.Peer" string "org.freedesktop.DBus.Properties" string "xyz.openbmc_project.Inventory.Decorator.Asset" string "xyz.openbmc_project.Inventory.Decorator.Cacheable" string "xyz.openbmc_project.Inventory.Decorator.Replaceable" string "xyz.openbmc_project.Inventory.Decorator.Revision" string "xyz.openbmc_project.Inventory.Item" string "xyz.openbmc_project.Inventory.Item.Cpu" string "xyz.openbmc_project.State.Decorator.OperationalStatus" ] ) ] ) ] dbus-send --system --print-reply \ --dest=xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1 \ org.freedesktop.DBus.Properties.GetAll string:"" method return time=1567569558.219323 sender=:1.14 -> destination=:1.168 serial=1338 reply_serial=2 array [ dict entry( string "Functional" variant boolean true ) dict entry( string "PrettyName" variant string "PROCESSOR MODULE" ) dict entry( string "Present" variant boolean true ) dict entry( string "Version" variant string "22" ) dict entry( string "FieldReplaceable" variant boolean true ) dict entry( string "Cached" variant boolean false ) dict entry( string "PartNumber" variant string "02CY211" ) dict entry( string "SerialNumber" variant string "YA1934302965" ) dict entry( string "Manufacturer" variant string "IBM" ) dict entry( string "BuildDate" variant string "1996-01-01 - 00:00:00" ) dict entry( string "Model" variant string "" ) ] • Release planning work group • Release every 6 months following Yocto releases • 2.6 • February 2019 • First release as Linux foundation community OpenBMC • 2.7 • August 2019 Community • Redfish a big part • 2.8 Releases • February 2020 Firmware Inventory Logging Update 2.7 Redfish Partial Power & Network Functionality Certificates Thermal State Time User Management Management Management SSL certificate panel using Redfish API All Sensors Event Service Full Certificate Management LDAP 2.8 Redfish LED Functionality Multiple Firmware Image Support Telemetry Service Subscription Collection Virtual Media Moving OpenBMC Interfaces to Redfish • 2.7 release – August 2019 • Properties that were already in the Redfish • Today web Interface and openbmctool use both D-Bus REST API and Redfish • Needs SNMP (not in the spec), multiple firmware image Redfish support (2019.2), etc. • Continue to upstream properties to Redfish • Eventually will move away from exposing D-Bus API • Web interface will use all Redfish • All resources linked from the Service root • /redfish/v1/ • Root can be read unauthenticated • 3 major collections • ComputerSystem • Logical view of the system as seen from OS • Memory • Processors • Chassis • A physical view of a box • Fans • Power supplies • Sensors • Managers Redfish data model • BMC Basic Authorization • Curl • Postman • Passing the username and password as part of URI • root:<password>@<bmc> Token based authorization Sessions /redfish/v1/SessionService/Sessions/ Python3 code to get the system model: How simple is REST using JSON? Output: • "@odata.type“: specifies the schema and version. format "#<schema>.<version>.<entity>” • "@odata.id“: the URI of the Resource – a “self” pointer. • "@odata.context“: used by OData clients. Common • "Id": a unique ID within the current URI. Usually the last segment of the URI. Redfish • "Name": a human friendly name for the resource. • "Status“: includes the "State“, “Health”, and "HealthRollUp“ of Properties resource and children. • "Links“: contains references to related resources. • "Actions“: the list of actions supported. • "OEM“: is used to separate vendor extensions from the standard. curl -k https://${bmc}/redfish/v1/ { "@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot", "@odata.id": "/redfish/v1", "@odata.type": "#ServiceRoot.v1_5_0.ServiceRoot", "AccountService": { "@odata.id": "/redfish/v1/AccountService" }, "CertificateService": { "@odata.id": "/redfish/v1/CertificateService" }, "Chassis": { "@odata.id": "/redfish/v1/Chassis" Service Root }, "Id": "RootService", "JsonSchemas": { "@odata.id": "/redfish/v1/JsonSchemas" }, "Links": { "Sessions": { "@odata.id": "/redfish/v1/SessionService/Sessions" } }, "Managers": { "@odata.id": "/redfish/v1/Managers" }, "Name": "Root Service", "RedfishVersion": "1.6.1", "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_6_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "[email protected]": [ "On", "ForceOff", "ForceOn", "ForceRestart", "GracefulRestart", "GracefulShutdown", "PowerCycle", "Nmi" ], "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset" } System }, "AssetTag": "", "BiosVersion": "IBM-witherspoon-OP9-v2.3-rc2-3.28", "NameBoot": "{system ", " PartNumber "BootSourceOverrideEnabled": "", ": "Disabled", " PowerState "BootSourceOverrideMode": "Off", ": "Legacy", " ProcessorSummary "BootSourceOver"rideTarget: { ": "None", "[email protected]": 2, ": [ " Status "None":, { "StatePxe"," : "Enabled" } "Hdd", } , "Cd", " Processors "Diags"",: { " @odata.id "BiosSetup": "" /redfish/v1/Systems/system/Processors" } , ] }, "Description": "Computer System", "Id": "0000000000000000", Host power on curl -k https://${bmc}/redfish/v1/Chassis/chassis { "@odata.context": "/redfish/v1/$metadata#Chassis.Chassis", "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_4_0.Chassis", "ChassisType": "RackMount", "Id": "chassis", "Links": { "ComputerSystems": [ Chassis { "@odata.id": "/redfish/v1/Systems/system" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "Name": "chassis", Fans "Power": { Thermal "@odata.id": "/redfish/v1/Chassis/chassis/Power" }, Temperatures