Detailed explanation and practice of redfish next generation data center management standard

Time:2020-11-29

Detailed explanation and practice of redfish next generation data center management standard

preface

Looking at the current server from the previous closed source management systems, such as Dell’s OpenManage and Idrac, Huawei’s IBMC, HP’s OneView and ILO, Lenovo’s xclarity and xclarity controller’s embedded management, imm2 (acquired from IBM’s systemx PC) Server Series) are actively embracing open source automation tools such as ansible. In this case, redfish, known as the next generation of data center management standards, has emerged.

Update history

April 28, 2020 – first draft

Read the original- https://wsgzao.github.io/post…


Introduction to redfish

DMTF’s Redfish® is a standard designed to deliver simple and secure management for converged, hybrid IT and the Software Defined Data Center (SDDC). Both human readable and machine capable, Redfish leverages common Internet and web services standards to expose information directly to the modern tool chain.

https://www.dmtf.org/standard…

DMTFOfRedfish®It’s a standardAPIFor the purpose of integration and mixingITAnd software defined data center(SDDC)Provides simple and secure management.

stayRedfishBefore the advent, there was a lack of interoperability management standards in modern data center environments. As organizations increasingly favor large-scale solutions, traditional standards are not enough to successfully manage a large number of simple multi node servers or hybrid infrastructure.IPMIIt is an earlier out of band management standard, limited to the “minimum common set” command set (e.g., power on / off / restart, temperature value, text console, etc.), because vendor extensions are not common on all platforms, resulting in a reduction in the set of features commonly used by customers. Many users have developed their own tight integration tools, but they also have to rely on in band management software.

For enterprise users, there are thousands of devices, which need a unified management interface, and they need to connect with different suppliersAPI。 When basicIPMIThe function is not good enough to meet the large-scaleScale-outIn the environment, how to call the server advanced management function in a more convenient way is a new requirement.

In order to find a modern interface based on widely used tools to accelerate the development, nowadays, customers need to use the Internet andwebCommon protocol, structure and security model definition in service environmentAPI

RedfishScalable platform managementAPIThe Redfish Scalable Platforms Management API)Is a new specification for its useRESTfulInterface semantics to access the data defined in the model format for out of band system management(out of band systems management)。 It is suitable for large-scale servers, from stand-alone servers to rack and blade server environments, and also suitable for large-scale cloud environments.

RedfishOf the1Version 2 focuses on servers, andIPMI-over-LANIt provides a safe, multi node alternative. SubsequentRedfishThe new version of theNICCNAandFC HBA)、PCIeLocal exchange, local storageNVDIMMThe management of firmware update service, software update push method and security privilege mapping. In addition,RedfishThe host interface specification allows applications and tools to run on the operating system, including the pre boot (Firmware) phase and theRedfishManage service communication.

In definitionRedfishIn standard time, the protocol can be separated from the data model and can be modified independently. Schema based data model is scalable and extensible, and with the development of the industry, it will become more and more human readable.

Redfish application scenarios

Maybe the big obscure description above is hard for you to understandRedfishIn short, most of today’s server vendors (such asSupermicroDellAnd so onIPMIThe system is installed on the main board chip independently. Users can remotely control the server through the browser, such as switching, installing the system, entering the server terminal, etc., without running to the computer room to endure the high or low temperature, the noisy sound of the server, and the poor display

conventionalIPMIIt brings a lot of convenience, but when the size of the server becomes larger, the management of a single server can not meet the needs. Users expect to manage the server in batch, for example, the author wants to give the server one-time100Server installation system, and this100Servers are not all from the same vendor or from different vendorsIPMIThe operation is different, such asDellyesiDRACYou also need to study specificallyiDRACUse and various docking, which will bring a lot of trouble. andRedfishThe emergence of standards has completely changed this situation. It is a standard that is superior to all servers. The basic operation of servers is unified and based onRestful APITo achieve. So customers can take advantage of itansibleTools such as easy to achieve automated batch management of large-scale servers.

Server vendors want to beRedfishPart of the ecosystem, but they don’t want to give up the control of their servers. So, they will be inRedfishBeyond the scope of its provisions, continued to strengthenAPISupported functions, such asDellOfRedfishInterface is better thanSupermicroA lot more, a lot more.

Why rest, HTTP and JSON?

Redfish combines language support with ubiquitous rest, HTTP, and JSON, enabling it management tasks to be used in combination with skill sets and tool chains of other it and dev / OPS tasks. With the adoption of rest in cloud ecosystem, restful protocol is rapidly replacing soap, followed by web API interface. Restful protocol learns much faster than soap, and it has the simplicity of data schema (because rest is not strictly a protocol) and can be mapped directly to HTTP operations.

HTTP is well known to administrators for its common security model and network configuration.

JSON is rapidly becoming a modern data format. It is essentially human readable, more concise than XML, with a large number of modern language support, and is the fastest growing data format in Web Services API.

For the embedded manageability environment, JSON has an additional advantage: most of the substrate management controllers (BMCs) already support web servers, and it is very common to manage servers through browsers (usually through Java script driven interfaces). By using JSON in redfish, you can directly view the data from redfish service in the browser, so as to ensure that the data and programming interface are consistent in semantics and value.

In addition to rest, HTTP, and JSON, redfish also uses common OData V4 conventions to describe patterns, URL conventions and naming, as well as the structure of common attributes in JSON payloads. More and more common client libraries, applications and tool ecosystems use redfish.

How simple is it? Here’s a sample Python code that uses redfish to retrieve the serial number from the server: the output in this example is as follows

rawData= urllib.urlopen(‘http://192.168.1.135/redfish/v1/Systems/1’) jsonData=json.loads(rawData)print(jsonData[‘SerialNumber’])

1A87CA442K

Redfish practice

For more hardware vendors’ redfish API interfaces, please refer to the article

The python-redfish project

Get Taishan server and Kunpeng CPU information by redfish interface in Python environment

pip install python-redfish

import redfish
 
login_host="https://10.93.20.10"
login_account="ADMIN"
login_password="ADMIN"
REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account, password=login_password, default_prefix='/redfish/v1')
REDFISH_OBJ.login(auth="session")
response = REDFISH_OBJ.get("/redfish/v1/Systems/1", None)
print(response)
REDFISH_OBJ.logout()

Based on redfish, you can get detailed hardware asset information and linkage with CMDB

Detailed explanation and practice of redfish next generation data center management standard

Reference articles

DMTF’s Redfish

Simple and security management of redfish fusion and hybrid it

Redfish white paper

Redfish: next generation data center management standard

Redfish details

Supermicro Redfish Reference Guide

Redfish API with Dell integrated Remote Access Controller

Huawei server IBMC redfish interface description

Recommended Today

Regular expression sharing for checking primes

This regular expression is shown as follows: Regular expressions for checking prime numbers or not To use this positive regular expression, you need to convert the natural number into multiple 1 strings. For example, 2 should be written as “11”, 3 should be written as “111”, 17 should be written as “11111111111”. This kind of […]