A smart network card deployment method, device and medium
Through wireless communication and wireless transmission of virtual memory files, the problems of high resource consumption and low efficiency in deploying bare metal smart network cards are solved, large-scale automated batch deployment is achieved, and the deployment efficiency of smart network cards is improved.
Patent Information
- Application Number
- CN202210606768.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-05-31
Smart Images

Figure CN114995888B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, and medium for deploying a smart network card. Background Art
[0002] With the rapid development of cloud computing, Bare Metal (Ironic) is a computing service that combines the elasticity of virtual machines with the performance of physical machines, providing individuals or enterprises with dedicated physical servers on the cloud. It can provide excellent computing performance and ensure data security for critical application systems, high-performance computing, big data, core databases, and other businesses. However, the operation of Bare Metal requires the establishment of an overlay. An overlay network is a virtual network built on an existing physical network with independent control and forwarding planes. For terminal devices (such as servers) connected to the overlay, the physical network is transparent, thus achieving the separation of the bearer network and the business network.
[0003] Currently, bare metal overlay can be established with the help of smart network cards. Figure 1 A schematic diagram of a smart network card deployment method based on UBS line transmission provided in an embodiment of the present application. Figure 1 As shown in the figure, the Smart NIC installation method involves connecting one end of a USB cable to the Smart NIC and the other end to a Linux server. The Linux server then deploys the Smart NIC's operating system onto the Smart NIC via the USB cable. This Smart NIC installation method is cumbersome, requiring a USB cable to be installed on each bare metal Smart NIC and a dedicated Linux server for installation. This consumes a lot of resources and is inefficient, making it impractical for mass installation of Smart NICs in large-scale deployment scenarios.
[0004] In view of the above problems, designing a smart network card deployment method is an issue that needs to be urgently solved by technical personnel in this field. Summary of the Invention
[0005] The purpose of this application is to provide a smart network card deployment method, device and medium to solve the problem of high resource consumption and low efficiency when deploying smart network cards for bare metal via USB cables, and the inability to install smart network cards in batches in large-scale application scenarios.
[0006] To solve the above technical problems, the present application provides a smart network card deployment method, which is applied to a control node. The method includes:
[0007] Receive a request for deploying a smart network card sent by the bare metal through wireless communication;
[0008] Parsing the request and obtaining the identity of the bare metal;
[0009] Sending the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier, so that the bare metal obtains the virtual memory file according to the location;
[0010] Among them, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and the deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card.
[0011] Preferably, before receiving the request for deploying the smart network card sent by the bare metal through wireless communication, the method further includes:
[0012] Establishing wireless communication with the bare metal through a network card;
[0013] Start the dnsmasq service and the tftp-server service to monitor the request through the dnsmasq service;
[0014] The virtual memory file is stored in a directory under the tftp-server service.
[0015] Preferably, the receiving, through wireless communication, a request for deploying a smart network card sent by the bare metal device includes:
[0016] A DHCP request sent by the bare metal booted from PXE is received through wireless communication.
[0017] Preferably, the sending the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier includes:
[0018] The IP address and the tftp-server address are sent to the bare metal according to the DHCP request, so that the bare metal obtains the virtual memory file according to the IP address and the tftp-server address.
[0019] To solve the above technical problems, this application also provides another smart network card deployment method, which is applied to bare metal. The method includes:
[0020] Sending a request to deploy the smart network card to the control node via the wireless network, so that the control node can parse the request to obtain an identity identifier;
[0021] Obtain the location of the virtual memory file sent by the control node according to the identity identifier; wherein the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card;
[0022] Acquire the virtual memory file according to the location;
[0023] Writing the bfb image file into the hard disk of the smart network card according to the ofed driver and the deployment script;
[0024] Initialize the network configuration of the smart network card to complete the deployment of the smart network card.
[0025] Preferably, writing the bfb image file into the hard disk of the smart network card according to the ofed driver and the deployment script includes:
[0026] Start the rshim service driven by ofed to generate the rshim port;
[0027] The bfb image file is written into the hard disk of the smart network card according to the deployment script and the rshim port.
[0028] Preferably, initializing the network configuration of the smart network card includes:
[0029] Execute a screen command on the virtual memory file to log in to the smart network card and initialize the network configuration.
[0030] To solve the above technical problems, the present application further provides a smart network card deployment device, which is applied to a control node, and the device includes:
[0031] A receiving module, configured to receive a request for deploying a smart network card sent by the bare metal through wireless communication;
[0032] A parsing module, configured to parse the request and obtain the identity of the bare metal;
[0033] A first sending module is configured to send the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier, so that the bare metal obtains the virtual memory file according to the location;
[0034] Among them, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and the deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card.
[0035] Preferably, it also includes:
[0036] A communication module, configured to establish wireless communication with the bare metal through a network card;
[0037] A service startup module is used to start the dnsmasq service and the tftp-server service to monitor the request through the dnsmasq service; wherein the virtual memory file is stored in a directory under the tftp-server service.
[0038] To solve the above technical problems, the present application also provides a smart network card deployment device, which is applied to bare metal. The device includes:
[0039] A second sending module is used to send a request for deploying a smart network card to a control node via a wireless network, so that the control node can parse the request to obtain an identity identifier;
[0040] A first acquisition module is configured to acquire the location of a virtual memory file sent by the control node according to the identity identifier; wherein the virtual memory file includes the ofed driver, deployment script, and bfb image file of the smart network card;
[0041] A second acquisition module, configured to acquire the virtual memory file according to the location;
[0042] A writing module, configured to write the bfb image file into the hard disk of the smart network card according to the ofed driver and the deployment script;
[0043] The initialization module is used to initialize the network configuration of the smart network card to complete the deployment of the smart network card.
[0044] To solve the above technical problems, the present application also provides another smart network card deployment device, including:
[0045] memory for storing computer programs;
[0046] The processor is configured to implement the steps of the above-mentioned smart network card deployment method when executing the computer program.
[0047] To solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned smart network card deployment method are implemented.
[0048] The smart network card deployment method provided in this application receives a request for deploying a smart network card sent by bare metal through wireless communication, parses the request, and obtains the identity of the bare metal; sends the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity, so that the bare metal can obtain the virtual memory file according to the location; wherein, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card. It can be seen that the above scheme no longer relies on the USB physical connection cable when deploying the smart network card on bare metal, saving resource consumption; the automatic installation of the smart network card in the bare metal is realized by wirelessly transmitting the virtual memory file containing the smart network card deployment file, which can be applied to large-scale automated batch deployment in the bare metal smart network card scenario, with higher deployment efficiency.
[0049] In addition, the present application also provides a smart network card deployment device and a computer-readable storage medium, with the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0051] Figure 1 A schematic diagram of a method for deploying a smart network card based on UBS line transmission provided in an embodiment of the present application;
[0052] Figure 2 A flowchart of a method for deploying a smart network card applied to a control node provided in an embodiment of the present application;
[0053] Figure 3 A flowchart of another method for deploying a smart network card applied to a control node provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of wireless communication between a control node and bare metal provided in an embodiment of the present application;
[0055] Figure 5 A flowchart of a method for deploying a smart network card applied to bare metal provided in an embodiment of the present application;
[0056] Figure 6 A schematic diagram of the structure of a smart network card deployment device applied to a control node provided in an embodiment of the present application;
[0057] Figure 7 A schematic diagram of the structure of a smart network card deployment device applied to bare metal provided in an embodiment of the present application;
[0058] Figure 8 A schematic diagram of the structure of a smart network card deployment device provided in an embodiment of the present application;
[0059] Figure 9 This is a flowchart of the smart network card deployment method provided in the embodiment of the present application in an application scenario. DETAILED DESCRIPTION
[0060] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0061] The core of this application is to provide a smart network card deployment method, device and medium.
[0062] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0063] Bare metal refers to a physical server that does not have an operating system installed. Currently, the method for installing a bare metal smart network card is to connect one end of a USB cable to the smart network card and the other end to a Linux server. The Linux server deploys the operating system of the smart network card to the smart network card via the USB cable. However, this method of installing a smart network card is very cumbersome. It is necessary to install a USB cable for each smart network card on the bare metal, and a dedicated Linux server is also required. The resource consumption is large and the efficiency is low. In large-scale application scenarios, batch installation of smart network cards is not possible. Therefore, this application proposes a method for deploying smart network cards. Figure 2 A flowchart of a method for deploying a smart network card applied to a control node provided in an embodiment of the present application is applied to a control node, such as Figure 2 As shown, the method includes:
[0064] S10: Receive a request for deploying a smart network card sent by the bare metal through wireless communication.
[0065] S11: Parse the request and obtain the bare metal identity.
[0066] S12: The location of the virtual memory file corresponding to the bare metal is sent to the bare metal according to the identity identifier, so that the bare metal obtains the virtual memory file according to the location.
[0067] The virtual memory file contains the Smart NIC's ofed driver, deployment script, and bfb image file. The bare metal system writes the bfb image file to the Smart NIC's hard disk based on the ofed driver and deployment script, and completes the Smart NIC deployment after initializing the Smart NIC's network configuration.
[0068] It is understood that the Smart NIC deployment method in this embodiment is applied to a control node. The control node is the node that controls the deployment of Smart NICs on bare metal. It can be a server or other control terminal, and this is not limited in this embodiment. The control node can connect to multiple bare metals via wireless communication and deploy Smart NICs on these bare metals. In this embodiment, there is no limit on the number of bare metals that can be wirelessly connected, and this limit depends on the specific implementation.
[0069] In a specific implementation, the control node receives a request for deploying a smart network card sent by the bare metal through wireless communication to learn that there is a bare metal that needs to deploy a smart network card. After receiving the request, the control node parses the content of the request to obtain the identity of the bare metal; that is, it confirms the specific identity of the bare metal that needs to be deployed with the smart network card. There is no restriction on the type of bare metal identity. It can be the IP address of the bare metal or the unique identity number of the bare metal, depending on the specific implementation situation. After obtaining the identity of the bare metal, the location of the virtual memory file corresponding to the bare metal is sent to the bare metal according to the identity, so that the bare metal obtains the virtual memory file according to the location.
[0070] It should be noted that the virtual memory file is a virtual memory disk (Ramdisk). A virtual memory disk is a technology that uses software to simulate a portion of memory (RAM) as a hard disk. Compared to direct hard disk file access, this technology can greatly improve the speed of file access on it. However, the volatility of RAM also means that this part of the data will be lost when the power is turned off. However, in general, the data transferred to the RAM disk is a copy of the file permanently stored on the hard disk or elsewhere. Through appropriate configuration, it is possible to re-establish the virtual disk after the system restarts. In this embodiment, the virtual memory file needs to be specially customized. Specifically, DIB can be used to create a bare metal virtual memory file. Among them, DIB, the full name of which is Disk Image Builder, is a tool used by the Openstack community to create images. In the process of using DIB to create, it is necessary to install the ofed driver of the smart network card, the deployment script and the bfb image file of the smart network card operating system, and set it to start automatically at boot. Therefore, the virtual memory file stores the Smart NIC's ofed driver, deployment script, and bfb image file. After Bare Metal retrieves the virtual memory file based on the address, it uses the virtual memory file as a carrier and writes the bfb image file to the Smart NIC's hard disk according to the ofed driver and deployment script. After initializing the Smart NIC's network configuration, the Smart NIC's deployment is completed. In this embodiment, the specific writing process for the Smart NIC is not limited, and the initialization process for the network configuration is not limited, and it depends on the specific implementation.
[0071] In this way, booting the operating system for the SmartNIC using the virtual memory file in the bare metal can solve the problem of being unable to connect to the SmartNIC for installation due to the lack of a disk system within the bare metal. Furthermore, in this embodiment, the specific process of sending the location of the virtual memory file corresponding to the bare metal to the bare metal is not limited and depends on the specific implementation.
[0072] In this embodiment, a request for deploying a smart network card sent by a bare metal is received through wireless communication, the request is parsed, and the identity of the bare metal is obtained; the location of the virtual memory file corresponding to the bare metal is sent to the bare metal according to the identity, so that the bare metal can obtain the virtual memory file according to the location; wherein, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card. It can be seen from this that the above scheme no longer relies on the USB physical connection cable when deploying the smart network card on the bare metal, saving resource consumption; the automatic installation of the smart network card in the bare metal is achieved by wirelessly transmitting the virtual memory file containing the smart network card deployment file, which can be applied to large-scale automated batch deployment in the bare metal smart network card scenario, with higher deployment efficiency.
[0073] Figure 3 This is a flow chart of another method for deploying a smart network card in a control node provided in an embodiment of the present application. Figure 3 As shown in the figure, before receiving the request for deploying the smart network card sent by the bare metal through wireless communication, the following steps are also included:
[0074] S13: Establish wireless communication with the bare metal through the network card.
[0075] S14: Start the dnsmasq service and the tftp-server service to monitor requests through the dnsmasq service. The virtual memory file is stored in the directory under the tftp-server service.
[0076] It is understood that in the above embodiment, the control node is connected to the bare metal on which the SmartNIC is to be deployed via wireless communication. Therefore, before receiving the SmartNIC deployment request sent by the bare metal via wireless communication, wireless communication with the bare metal must also be established via the network card.
[0077] Figure 4 Schematic diagram of wireless communication between the control node and bare metal provided in the embodiment of the present application. Figure 4 As shown in the figure, a smart installation network is planned for bare metal Smart NIC deployment. Both the control node and the bare metal have network cards. Unlike Smart NICs, these are standard NICs. The standard NICs on the bare metal are connected to the standard NICs on the control node at Layer 2 via the network. Information exchange is performed through a switch, ultimately creating a smart installation network between the control node and the bare metal. This network is used for subsequent information exchange between the control node and the bare metal, including sending and receiving deployment requests, sending and receiving virtual memory file locations, and transferring virtual memory files.
[0078] Furthermore, start the dnsmasq service and the tftp-server service on the control node. dnsmasq is a compact and convenient tool for configuring the Domain Name System (DNS) and Dynamic Host Configuration Protocol (DHCP). In this application, it is primarily used to configure DHCP and act as a DHCP server, specifically listening for requests sent by the network port of the standard network card on the control node. The dmsmasq service can provide IP addresses and the address of the tftp-server for DHCP requests.
[0079] tftp-server is a multi-threaded tftp server that allows any number of client connections simultaneously. It supports tsize, blksize, and interval selection, PXE boot, and can run independently or as a daemon. Port ranges can be specified to work across firewalls. There is also a single-port version, which is mainly suitable for situations where multiple ports cannot be opened in certain environments. In this application, tftp-server stores the virtual memory file of the bfb image file with the ofed driver and smart network card in the / tftpboot / directory of the tftp-server for storage.
[0080] In this embodiment, wireless communication with the bare metal is established through the network card, and the dnsmasq service and tftp-server service are started, thereby realizing the establishment of wireless communication between the control node and the bare metal, monitoring of bare metal requests, and storage of virtual memory files.
[0081] Based on the above embodiment:
[0082] As a preferred embodiment, receiving a request for deploying a smart network card sent by a bare metal through wireless communication includes:
[0083] Receives DHCP requests sent by bare metal devices booted from PXE via wireless communication.
[0084] Based on the above embodiment, since the dmsmasq service of the control node monitors the requests sent by the network port of the ordinary network card on the control node, as a preferred embodiment, the DHCP request sent by the bare metal started from PXE is received through wireless communication, so that the control node is informed that there is a bare metal that needs to be deployed with an intelligent network card.
[0085] It's important to note that bare metal boots from PXE. PXE (Preboot eXecution Environment) provides a mechanism for booting a computer using a network interface. This mechanism allows the computer to boot independently of local data storage devices (such as hard drives) or a locally installed operating system. Since bare metal has no operating system, booting from PXE enables the sending of DHCP requests.
[0086] Specifically, during the bare metal PXE boot process, since the bare metal's ordinary network card is set to PXE boot, the DHCP request will be sent to the network port of the control node's intelligent network card through the network port of the bare metal's intelligent network card through the intelligent installation network. In the above embodiment, it can be seen that since the dnsmasq service is monitoring the network port of the ordinary network card of the control node, it will capture the DHCP request under the bare metal's PXE. During the DHCP interaction between the control node and the bare metal, the bare metal's identity is confirmed, and then the location of the virtual memory file is sent to the bare metal, so that the bare metal obtains the virtual memory file according to the location.
[0087] In this embodiment, a DHCP request sent by a bare metal booted from PXE is received through wireless communication, thereby achieving reception of a request for deploying a smart network card on the bare metal.
[0088] Based on the above embodiment:
[0089] As a preferred embodiment, sending the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier includes:
[0090] Send the IP address and TFTP server address to the bare metal device based on the DHCP request. The bare metal device then obtains the virtual memory file based on the IP address and TFTP server address.
[0091] In the above embodiment, the specific process of sending the location of the virtual memory file corresponding to the bare metal to the bare metal is not limited and depends on the specific implementation. As a preferred embodiment, in this embodiment, the IP address and tftp-server address are sent to the bare metal according to the DHCP request.
[0092] It is understood that in the above embodiment, the virtual memory file is stored in a directory under the tftp-server service; and when DHCP is exchanged between the control node and the bare metal, the control node passes the IP address and the tftp-server address to the bare metal's ordinary network card during the interaction, thereby allowing the bare metal to clearly know the location of the virtual memory file. Here, the IP address is the IP address of the control node, and the tftp-server address is the address where the virtual memory file is stored under the tftp-server service.
[0093] Note that the address of the tftp-server that stores virtual memory files is not necessarily located on the control node. Even if the tftp-server service is enabled on the control node, the directory storing virtual memory files may not be on the control node itself but may be located elsewhere. After obtaining the IP address and tftp-server address, the bare metal server can retrieve the virtual memory files from the storage directory under the tftp-server service.
[0094] In this embodiment, the IP address and the tftp-server address are sent to the bare metal according to the DHCP request. The bare metal obtains the virtual memory file according to the IP address and the tftp-server address, thereby realizing the bare metal's acquisition of the virtual memory file.
[0095] Figure 5 This is a flow chart of a method for deploying a smart network card applied to bare metal provided in an embodiment of the present application. The method is applied to bare metal, such as Figure 5 As shown, the method includes:
[0096] S15: Sending a request for deploying the smart network card to the control node via the wireless network, so that the control node can parse the request and obtain an identity.
[0097] S16: Obtain the location of the virtual memory file sent by the control node according to the identity identifier; wherein the virtual memory file includes the ofed driver, deployment script and bfb image file of the smart network card.
[0098] S17: Obtain the virtual memory file according to the location.
[0099] S18: Write the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script.
[0100] S19: Initialize the network configuration of the smart network card to complete the deployment of the smart network card.
[0101] It can be understood that the smart network card deployment method in this embodiment is applied to bare metal. Bare metal sends a request to deploy the smart network card to the control node via a wireless network. The control node parses the request to obtain the identity of the bare metal, and then sends the location of the virtual memory file. Bare metal obtains the location of the virtual memory file sent by the control node according to the identity, and obtains the virtual memory file according to the location of the virtual memory file. Among them, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card. Bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script, initializes the network configuration of the smart network card, and completes the deployment of the smart network card.
[0102] In this embodiment, a request for deploying a smart network card is sent to a control node via a wireless network, so that the control node can parse the request and obtain an identity identifier; the location of the virtual memory file sent by the control node according to the identity identifier is obtained; wherein the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card. The virtual memory file is obtained according to the location. The bfb image file is written to the hard disk of the smart network card according to the ofed driver and deployment script; the network configuration of the smart network card is initialized to complete the deployment of the smart network card. It can be seen from this that the above solution no longer relies on the USB physical connection cable when deploying the smart network card on bare metal, saving resource consumption; the automatic installation of the smart network card in the bare metal is achieved by wirelessly transmitting the virtual memory file containing the smart network card deployment file, which can be applied to large-scale automated batch deployment in the bare metal smart network card scenario, and has higher deployment efficiency.
[0103] Based on the above embodiment:
[0104] As a preferred embodiment, writing the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script includes:
[0105] Start the ofed-driven rshim service to generate the rshim port;
[0106] Write the bfb image file to the hard disk of the smart network card according to the deployment script and rshim port.
[0107] In the above embodiment, there is no restriction on the specific writing process of the smart network card, which depends on the specific implementation situation. As a preferred embodiment, after the virtual memory file in the bare metal is powered on, the rshim service in the ofed driver will start automatically at boot, thereby generating the rshim port; then the deployment script in the virtual memory file is started. The deployment script is specifically install-smart-img. install-smart-img writes the bfb image system of the smart network card in the virtual memory file to the hard disk of the smart network card through the cat command using the rshim port. After completing this operation, the operating system of the smart network card starts to power on and run.
[0108] In this embodiment, the ofed driver's rshim service is started to generate an rshim port; the bfb image file is written to the SmartNIC's hard drive according to the deployment script and rshim port, thus achieving writing of the SmartNIC image file. Furthermore, the ofed driver for the SmartNIC, along with the bfb image and deployment script, is inserted into a virtual memory file. Automatic installation is cleverly performed through the rshim port generated by the ofed driver, eliminating the previous requirement for writing the bfb file system via an external USB cable.
[0109] Based on the above embodiment:
[0110] As a preferred embodiment, initializing the network configuration of the smart network card includes:
[0111] Run the screen command on the virtual memory file to log in to the SmartNIC and initialize the network configuration.
[0112] As a preferred embodiment, after the cat command is executed in the virtual memory file, the screen command screen / dev / rshim0 / console 115200 is executed on the virtual memory file to log in to the smart network card, initialize the network configuration of the smart network card, ensure that the smart network card can be connected through the management network, and finally complete the installation and deployment of the smart network card in the bare metal.
[0113] In the above embodiments, the Smart NIC deployment method is described in detail. This application also provides corresponding embodiments of the Smart NIC deployment device. It should be noted that this application describes the embodiments of the device from two perspectives: one is based on the functional module perspective, and the other is based on the hardware structure perspective.
[0114] Figure 6 This is a schematic diagram of a structure of a smart network card deployment device applied to a control node provided in an embodiment of the present application. Figure 6As shown, the smart network card deployment device includes:
[0115] The receiving module 10 is configured to receive a request for deploying a smart network card sent by the bare metal through wireless communication.
[0116] The parsing module 11 is used to parse the request and obtain the identity of the bare metal.
[0117] The first sending module 12 is configured to send the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier, so that the bare metal obtains the virtual memory file according to the location.
[0118] The virtual memory file contains the Smart NIC's ofed driver, deployment script, and bfb image file. The bare metal system writes the bfb image file to the Smart NIC's hard disk based on the ofed driver and deployment script, and completes the Smart NIC deployment after initializing the Smart NIC's network configuration.
[0119] As a preferred embodiment, the smart network card deployment device further includes:
[0120] A communication module, used to establish wireless communication with the bare metal through a network card;
[0121] The service startup module is used to start the dnsmasq service and the tftp-server service to monitor requests through the dnsmasq service; wherein the virtual memory file is stored in the directory under the tftp-server service.
[0122] The smart network card deployment device provided in this embodiment includes a receiving module, a parsing module and a first sending module. Receive the request for deploying the smart network card sent by the bare metal through wireless communication, parse the request, and obtain the identity of the bare metal; send the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity, so that the bare metal can obtain the virtual memory file according to the location; wherein, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card. It can be seen from this that the above solution no longer relies on the USB physical connection cable when deploying the smart network card on the bare metal, saving resource consumption; the automatic installation of the smart network card in the bare metal is achieved by wirelessly transmitting the virtual memory file containing the smart network card deployment file, which can be applied to large-scale automated batch deployment in the bare metal smart network card scenario, with higher deployment efficiency.
[0123] Figure 7 This is a schematic diagram of a structure of a smart network card deployment device applied to bare metal provided in an embodiment of the present application. Figure 7 As shown, the smart network card deployment device includes:
[0124] The second sending module 13 is configured to send a request for deploying the smart network card to the control node via the wireless network, so that the control node can parse the request to obtain an identity.
[0125] The first acquisition module 14 is used to obtain the location of the virtual memory file sent by the control node according to the identity identifier; wherein the virtual memory file includes the ofed driver, deployment script and bfb image file of the smart network card.
[0126] The second acquisition module 15 is used to acquire the virtual memory file according to the location.
[0127] The writing module 16 is used to write the bfb image file into the hard disk of the smart network card according to the ofed driver and deployment script.
[0128] The initialization module 17 is used to initialize the network configuration of the smart network card to complete the deployment of the smart network card.
[0129] The smart network card deployment device provided in this embodiment includes a second sending module, a first obtaining module, a second obtaining module, a writing module and an initialization module. A request for deploying the smart network card is sent to the control node via a wireless network, so that the control node can parse the request and obtain an identity identifier; the location of the virtual memory file sent by the control node according to the identity identifier is obtained; wherein the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card. The virtual memory file is obtained according to the location. The bfb image file is written to the hard disk of the smart network card according to the ofed driver and deployment script; the network configuration of the smart network card is initialized to complete the deployment of the smart network card. It can be seen from this that the above solution no longer relies on the USB physical connection cable when deploying the smart network card on bare metal, saving resource consumption; the automatic installation of the smart network card in the bare metal is achieved by wirelessly transmitting the virtual memory file containing the smart network card deployment file, which can be applied to large-scale automated batch deployment in the bare metal smart network card scenario, with higher deployment efficiency.
[0130] Figure 8 A schematic diagram of a smart network card deployment device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the smart network card deployment device includes:
[0131] The memory 20 is used to store computer programs.
[0132] The processor 21 is configured to implement the steps of the smart network card deployment method mentioned in the above embodiment when executing a computer program.
[0133] The smart network card deployment device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0134] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0135] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the smart network card deployment method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to data related to the smart network card deployment method.
[0136] In some embodiments, the smart network card deployment device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0137] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the smart network card deployment device, and may include more or fewer components than shown in the figure.
[0138] The smart network card deployment device provided in the present application includes a memory and a processor. The processor is used to implement the steps of the smart network card deployment method mentioned in the above embodiment when executing a computer program. Receive a request for deploying a smart network card sent by the bare metal through wireless communication, parse the request, and obtain the identity of the bare metal; send the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity, so that the bare metal can obtain the virtual memory file according to the location; wherein, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card. It can be seen from this that the above scheme no longer relies on the USB physical connection cable when deploying the smart network card on the bare metal, saving resource consumption; the automatic installation of the smart network card in the bare metal is realized by wirelessly transmitting the virtual memory file containing the smart network card deployment file, which can be applied to large-scale automated batch deployment in the bare metal smart network card scenario, with higher deployment efficiency.
[0139] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiment (which may be a method corresponding to the control node side, a method corresponding to the bare metal side, or a method corresponding to both the control node side and the bare metal side).
[0140] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0141] The computer-readable storage medium provided by the present application stores a computer program, and when the computer program is executed by the processor, the steps described in the above method embodiment are implemented, the request for deploying the smart network card sent by the bare metal is received through wireless communication, the request is parsed, and the identity of the bare metal is obtained; the location of the virtual memory file corresponding to the bare metal is sent to the bare metal according to the identity, so that the bare metal obtains the virtual memory file according to the location; wherein, the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card. It can be seen from this that the above scheme no longer relies on the USB physical connection line when deploying the smart network card on the bare metal, saving resource consumption; the automatic installation of the smart network card in the bare metal is realized by wirelessly transmitting the virtual memory file containing the smart network card deployment file, which can be applied to large-scale automated batch deployment in the bare metal smart network card scenario, with higher deployment efficiency.
[0142] In order to enable those skilled in the art to better understand the technical solution of this application, Figure 9 The above application is further described in detail. Figure 9 This is a flow chart of the smart network card deployment method provided in the embodiment of this application in the application scenario. Figure 9 As shown, the method includes:
[0143] S20: Plans the intelligent network between the control node and the bare metal.
[0144] S21: The control node sends the location of the virtual memory file to the bare metal;
[0145] S22: Bare Metal obtains the virtual memory file based on its location.
[0146] S23: The bare metal server deploys the Smart NIC according to the Smart NIC deployment file in the virtual memory file.
[0147] This application scenario involves planning a smart network between the control node and the bare metal server, establishing wireless communication between the control node and the bare metal server. During this communication, the control node sends the location of the virtual memory file to the bare metal server, which then retrieves the virtual memory file based on the virtual memory file location. The virtual memory file contains the Smart NIC deployment file, which the bare metal server then deploys.
[0148] For example, first start the dnsmasq and tftp-server services on the controller node. Store the virtual memory file containing the ofed driver, deployment script, and bfb image file in the / tftpboot / directory of the tftp-server. Establish a Layer 2 connection between the standard NIC on the bare metal node and the standard NIC on the controller node to establish a smart network. The dnsmasq service on the controller node listens on the standard NIC port on the controller node. Upon receiving a DHCP request from the bare metal node, it sends the IP address and tftp-server address to the bare metal node. The bare metal node retrieves the virtual memory file based on the IP address and tftp-server address. After the bare metal node powers on the virtual memory file, the rshim service in the ofed driver automatically starts. The deployment script install-smart-img in the virtual memory file then automatically starts. install-smart-img writes the bfb image file previously loaded into the virtual memory file to the Smart NIC's hard disk using the rshim port generated by the rshim service. After this operation is completed, the operating system of the Smart NIC starts to power on. Execute the screen command screen / dev / rshim0 / console 115200 on the virtual memory file to log in to the Smart NIC and initialize the network configuration of the Smart NIC to ensure that the Smart NIC can connect to the management network. This completes the installation and deployment of the Smart NIC in the bare metal server.
[0149] The above is a detailed introduction to the intelligent network card deployment method, device and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0150] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A method for deploying an intelligent network card, characterized in that: Applied to a control node, the method includes: Receive a request for deploying a smart network card sent by the bare metal through wireless communication; Parsing the request and obtaining the identity of the bare metal; Sending the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier, so that the bare metal obtains the virtual memory file according to the location; The virtual memory file contains the ofed driver, deployment script, and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and the deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card; The bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and the deployment script, including: starting the rshim service service of the ofed driver to generate an rshim port; writing the bfb image file to the hard disk of the smart network card according to the deployment script and the rshim port; The bare metal initializes the network configuration of the smart network card, including: executing a screen command on the virtual memory file to log in to the smart network card, and initializing the network configuration.
2. The smart network card deployment method according to claim 1, wherein: Before receiving the request for deploying the smart network card sent by the bare metal through wireless communication, the method further includes: Establishing wireless communication with the bare metal through a network card; Start the dnsmasq service and the tftp-server service to monitor the request through the dnsmasq service; The virtual memory file is stored in a directory under the tftp-server service.
3. The smart network card deployment method according to claim 2, wherein: The receiving, through wireless communication, a request for deploying a smart network card sent by the bare metal device includes: A DHCP request sent by the bare metal booted from PXE is received through wireless communication.
4. The smart network card deployment method according to claim 3, wherein: The sending the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier includes: The IP address and the tftp-server address are sent to the bare metal according to the DHCP request, so that the bare metal obtains the virtual memory file according to the IP address and the tftp-server address.
5. A method for deploying an intelligent network card, characterized in that: Applied to bare metal, the method comprises: Sending a request to deploy the smart network card to the control node via the wireless network, so that the control node can parse the request to obtain an identity identifier; Obtain the location of the virtual memory file sent by the control node according to the identity identifier; wherein the virtual memory file contains the ofed driver, deployment script and bfb image file of the smart network card; Acquire the virtual memory file according to the location; Writing the bfb image file into the hard disk of the smart network card according to the ofed driver and the deployment script; Initializing the network configuration of the smart network card to complete the deployment of the smart network card; Writing the bfb image file into the hard disk of the smart network card according to the ofed driver and the deployment script includes: starting the rshim service of the ofed driver to generate an rshim port; writing the bfb image file into the hard disk of the smart network card according to the deployment script and the rshim port; Initializing the network configuration of the smart network card includes: executing a screen command on the virtual memory file to log in to the smart network card, and initializing the network configuration.
6. A smart network card deployment device, characterized in that: Applied to a control node, the device includes: A receiving module, configured to receive a request for deploying a smart network card sent by the bare metal through wireless communication; A parsing module, configured to parse the request and obtain the identity of the bare metal; A first sending module is configured to send the location of the virtual memory file corresponding to the bare metal to the bare metal according to the identity identifier, so that the bare metal obtains the virtual memory file according to the location; The virtual memory file contains the ofed driver, deployment script, and bfb image file of the smart network card; the bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and the deployment script, and completes the deployment of the smart network card after initializing the network configuration of the smart network card; The bare metal writes the bfb image file to the hard disk of the smart network card according to the ofed driver and the deployment script, including: starting the rshim service service of the ofed driver to generate an rshim port; writing the bfb image file to the hard disk of the smart network card according to the deployment script and the rshim port; The bare metal initializes the network configuration of the smart network card, including: executing a screen command on the virtual memory file to log in to the smart network card, and initializing the network configuration.
7. A smart network card deployment device, characterized in that: Applied to bare metal, the device comprises: A second sending module is used to send a request for deploying a smart network card to a control node via a wireless network, so that the control node can parse the request to obtain an identity identifier; A first acquisition module is configured to acquire the location of a virtual memory file sent by the control node according to the identity identifier; wherein the virtual memory file includes the ofed driver, deployment script, and bfb image file of the smart network card; A second acquisition module, configured to acquire the virtual memory file according to the location; A writing module, configured to write the bfb image file into the hard disk of the smart network card according to the ofed driver and the deployment script; An initialization module, configured to initialize the network configuration of the smart network card to complete the deployment of the smart network card; Writing the bfb image file into the hard disk of the smart network card according to the ofed driver and the deployment script includes: starting the rshim service of the ofed driver to generate an rshim port; writing the bfb image file into the hard disk of the smart network card according to the deployment script and the rshim port; Initializing the network configuration of the smart network card includes: executing a screen command on the virtual memory file to log in to the smart network card, and initializing the network configuration.
8. A smart network card deployment device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the smart network card deployment method according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the smart network card deployment method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Deployment method of bare metal server, deployment controller and server cluster
CN113918174A