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…
DMTF
OfRedfish®
It’s a standardAPI
For the purpose of integration and mixingIT
And software defined data center(SDDC
)Provides simple and secure management.
stayRedfish
Before 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.IPMI
It 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 basicIPMI
The function is not good enough to meet the large-scaleScale-out
In 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 andweb
Common protocol, structure and security model definition in service environmentAPI
。
Redfish
Scalable platform managementAPI
(The Redfish Scalable Platforms Management API
)Is a new specification for its useRESTful
Interface 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.
Redfish
Of the1
Version 2 focuses on servers, andIPMI-over-LAN
It provides a safe, multi node alternative. SubsequentRedfish
The new version of theNIC
、CNA
andFC HBA
)、PCIe
Local exchange, local storageNVDIMM
The management of firmware update service, software update push method and security privilege mapping. In addition,Redfish
The host interface specification allows applications and tools to run on the operating system, including the pre boot (Firmware) phase and theRedfish
Manage service communication.
In definitionRedfish
In 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 understandRedfish
In short, most of today’s server vendors (such asSupermicro
、Dell
And so onIPMI
The 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
conventionalIPMI
It 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-time100
Server installation system, and this100
Servers are not all from the same vendor or from different vendorsIPMI
The operation is different, such asDell
yesiDRAC
You also need to study specificallyiDRAC
Use and various docking, which will bring a lot of trouble. andRedfish
The 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 API
To achieve. So customers can take advantage of itansible
Tools such as easy to achieve automated batch management of large-scale servers.
Server vendors want to beRedfish
Part of the ecosystem, but they don’t want to give up the control of their servers. So, they will be inRedfish
Beyond the scope of its provisions, continued to strengthenAPI
Supported functions, such asDell
OfRedfish
Interface is better thanSupermicro
A 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
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