System configuration method and device, electronic equipment, storage medium and program product
By loading the system kernel and diskless image into the memory of the smart network card, the problems of restarting and wasting hard disk resources when deploying operating systems on smart network cards are solved, and efficient batch automated deployment is achieved.
Patent Information
- Application Number
- CN202310432748.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2024-10-22
AI Technical Summary
Existing technologies require multiple restarts and hard drive operations when deploying operating systems on smart network interface cards (NICs), resulting in long deployment times and wasted resources.
Using diskless mirroring technology, the smart network card loads the system kernel and diskless image in memory, avoiding hard disk operations, and the operating system deployment can be completed with just one reboot.
It improves the efficiency of automated batch deployment of smart network interface cards, saving hard disk resources and restart time.
Smart Images

Figure CN118827367A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a system configuration method, device, electronic device, storage medium and program product. Background Art
[0002] Smart network interface card (SmartNIC) is a flexible and programmable network card used in conjunction with servers. Because smart network cards have computing power, in order to release the computing power of the central processing unit (CPU), they will offload the data processing functions that are not suitable for CPU in network, security, and storage to programmable hardware chips for execution, reduce CPU consumption, enable servers to run key applications and operating systems more effectively, and optimize the overall effectiveness of business data processing.
[0003] Generally, the operating system of a smart network card is pre-installed on the hard disk of the physical machine when it leaves the factory. When a major version of the operating system of the smart network card needs to be updated, the operating system can be reinstalled or the operating system package can be upgraded. After that, the smart network card needs to be restarted for the new operating system to take effect.
[0004] In the existing technical solution, when deploying the operating system for the smart network card, the administrator restarts the smart network cards of thousands of physical machines from the management machine at the same time. The process of reinstalling the operating system or upgrading the operating system of the smart network card is basically the same. In this process, the smart network card needs to be restarted at least twice to make the operating system take effect. At the same time, it takes a long time and uses the hard disk, which makes the deployment and configuration time of the entire smart network card operating system longer. Summary of the invention
[0005] The embodiments of the present application provide a system configuration method, device, electronic device, storage medium and program product, which improve the efficiency of batch automated deployment of smart network cards. At the same time, since the operating system of the smart network card is deployed in the memory, the smart network card no longer needs to mount the hard disk to install the operating system, saving hard disk resources.
[0006] In a first aspect, an embodiment of the present application provides a system configuration method for a smart network card, the method comprising:
[0007] In response to a diskless image deployment operation request for a smart network card to be deployed, a first system deployment instruction is sent to the smart network card to be deployed, wherein the first system deployment instruction is used to instruct the smart network card to control itself to enter a pre-boot execution environment, download a system kernel and an initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image, wherein the smart network card to be deployed includes some or all of the smart network cards in the target smart network card cluster;
[0008] Sending a hardware restart instruction to the smart network card to be deployed, wherein the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and on;
[0009] Sending a second system deployment instruction to the smart network card to be deployed, where the second system deployment instruction is used to instruct the smart network card to control itself to enter the pre-boot execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory;
[0010] Based on the diskless image loaded in the memory of the smart network card to be deployed, an operating system is configured for the corresponding smart network card to be deployed.
[0011] In a second aspect, an embodiment of the present application further provides a system configuration method for a smart network card, the method comprising:
[0012] Receiving a first system deployment instruction sent by the management machine;
[0013] Control itself to enter the pre-start execution environment according to the first system deployment instruction, download the system kernel and memory file system from the management machine and load them into the memory;
[0014] Performing hardware program inspection of the smart network card based on the system kernel and memory file system;
[0015] Receive the hardware restart instruction sent by the management machine, and power off and on according to the hardware restart instruction;
[0016] Receiving a second system deployment instruction sent by the management machine;
[0017] According to the second system deployment instruction, the system controls itself to enter the pre-start execution environment, downloads the system kernel and the pre-generated diskless image of the smart network card from the management machine, and loads them into the memory.
[0018] In a third aspect, an embodiment of the present application further provides a system configuration device for a smart network card, characterized in that the device includes:
[0019] A first sending module, configured to respond to a diskless image deployment operation request for a smart network card to be deployed, and send a first system deployment instruction to the smart network card to be deployed, wherein the first system deployment instruction is used to instruct the smart network card to control itself to enter a pre-boot execution environment, download a system kernel and an initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image, wherein the smart network card to be deployed includes some or all of the smart network cards in the target smart network card cluster;
[0020] A second sending module is used to send a hardware restart instruction to the smart network card to be deployed, wherein the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and power on;
[0021] A third sending module is used to send a second system deployment instruction to the smart network card to be deployed, where the second system deployment instruction is used to instruct the smart network card to control itself to enter the pre-boot execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory;
[0022] The configuration module is used to configure an operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed.
[0023] In some embodiments of the present application, each smart network card corresponds to a host, and the configuration module is specifically used to:
[0024] Obtaining network attributes of the smart network card to be deployed;
[0025] Bind each smart network card to be deployed to the corresponding host based on the network attributes and set a common network address;
[0026] According to the diskless image loaded in the memory of the smart network card to be deployed, the ports and network services of the smart network card are restricted.
[0027] In some other embodiments of the present application, the configuration module is specifically used to:
[0028] Parsing a network card configuration toolkit of the smart network card from the diskless image;
[0029] The ports and network services of the smart network card are restricted according to the network card configuration toolkit.
[0030] In some other embodiments of the present application, the device further includes a diskless image generation module, and the diskless image generation module is specifically used to:
[0031] Before downloading the system kernel and the pre-generated diskless image of the smart NIC, in response to a request for making a diskless image of the target smart NIC cluster, a diskless image of the smart NIC in the target smart NIC cluster is generated.
[0032] In some other embodiments of the present application, the diskless image generation module is specifically used for:
[0033] Create a diskless image directory for the smart network card;
[0034] Obtaining an installation package of a diskless image, and installing the installation package in the diskless image directory;
[0035] The files in the diskless image directory are packaged and compressed to generate a diskless image of the smart network card in the target smart network card cluster.
[0036] In some other embodiments of the present application, the diskless image generation module is specifically used for:
[0037] Create the definition of the operating system image of the smart network card;
[0038] Create a diskless image directory for the smart network card according to the definition of the operating system image.
[0039] In some other embodiments of the present application, the installation package includes a hardware upgrade package preset for the smart network card and a network card configuration toolkit for a diskless image;
[0040] The diskless image generation module is specifically used for:
[0041] Obtain the operating system source files used to create the diskless image of the smart network card;
[0042] Obtaining a hardware upgrade package of the smart network card from the operating system source file;
[0043] Install the hardware upgrade package in the diskless image directory;
[0044] Download the network card configuration toolkit from a preset TFTP server;
[0045] The network card configuration toolkit is installed in the diskless image directory.
[0046] In some other embodiments of the present application, the definition of the operating system image includes a status tag for recording the life state of the diskless image of the current operating system;
[0047] The device further comprises a diskless image management module, wherein the diskless image management module is specifically used for:
[0048] After generating the diskless image of the smart NIC in the target smart NIC cluster, placing the diskless image into a preset directory of a preset TFTP server;
[0049] Find the system kernel from the operating system source file, and copy the system kernel to the TFTP server;
[0050] The status label of the diskless image is updated to be completed.
[0051] In other embodiments of the present application, the diskless image management module is further used to:
[0052] After configuring the operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed, the state of the state tag of the diskless image is updated to a published state.
[0053] In a fourth aspect, an embodiment of the present application further provides a system configuration device for a smart network card, the device comprising:
[0054] A first receiving module, used to receive a first system deployment instruction sent by the management machine;
[0055] A first loading module, used for controlling itself to enter a pre-boot execution environment according to the first system deployment instruction, downloading a system kernel and a memory file system from the management machine and loading them into the memory;
[0056] A checking module, used for checking the hardware program of the smart network card based on the system kernel and the memory file system;
[0057] A second receiving module is used to receive a hardware restart instruction sent by the management machine, and power off and power on according to the hardware restart instruction;
[0058] A third receiving module is used to receive a second system deployment instruction sent by the management machine;
[0059] The second loading module is used to control itself to enter the pre-start execution environment according to the second system deployment instruction, download the system kernel and the pre-generated diskless image of the smart network card from the management machine, and load them into the memory.
[0060] In some embodiments of the present application, the inspection module is specifically used to:
[0061] Performing an FPGA program version check based on the system kernel and memory file system to determine whether the smart network card needs to upgrade the FPGA version;
[0062] If the Smart NIC needs to upgrade the FPGA version, download the FPGA upgrade program from the preset TFTP server and execute the FPGA program upgrade;
[0063] After the FPGA program upgrade is complete, confirm that the hardware program check of the smart network card is completed.
[0064] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the system configuration method of the smart network card described in the embodiment of the present application.
[0065] In a sixth aspect, an embodiment of the present application further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the steps in the system configuration method of the smart network card described in the embodiment of the present application.
[0066] In a seventh aspect, an embodiment of the present application also provides a computer program product, comprising a computer program or instructions, characterized in that when the computer program or instructions are executed by a processor, the steps in the system configuration method of the smart network card described in the embodiment of the present application are implemented.
[0067] In an embodiment of the present application, in response to a diskless image deployment operation request for a smart network card to be deployed, a first system deployment instruction is sent to the smart network card to be deployed, the first system deployment instruction is used to instruct the smart network card to control itself to enter a pre-boot execution environment, download the system kernel and the initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image; a hardware restart instruction is sent to the smart network card to be deployed, the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and on; a second system deployment instruction is sent to the smart network card to be deployed, the second system deployment instruction is used to instruct the smart network card to control itself to enter a pre-boot execution environment, download the system kernel and a pre-generated diskless image of the smart network card, and load them into its own memory; based on the diskless image loaded in the memory of the smart network card to be deployed, an operating system is configured for the corresponding smart network card to be deployed. Compared with the related art, when the operating system of the smart network card is deployed in the embodiment of the present application, after entering the pre-boot execution environment for the second time, the system kernel and the pre-generated diskless image of the smart network card are downloaded and loaded into its own memory without writing to the hard disk. After the system deployment is completed, there is no need to restart the smart network card again. The entire process only restarts the operating system once, saving the time of restarting the operating system and improving the efficiency of batch automatic deployment of the smart network card. At the same time, since the operating system of the smart network card is deployed in the memory, the smart network card no longer needs to mount the hard disk to install the operating system, saving hard disk resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 It is a schematic diagram of a distributed system scenario for a diskless image deployment of a smart network card provided in an embodiment of the present application;
[0070] Figure 2 It is a flowchart of an embodiment of a method for configuring a system of a management machine-side intelligent network card provided in an embodiment of the present application;
[0071] Figure 3 It is a flowchart of an embodiment of configuring an operating system for a corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed in step 204 of the embodiment of the present application;
[0072] Figure 4 It is a schematic diagram of an embodiment of the process of generating a diskless image of a smart network card in a target smart network card cluster provided by an embodiment of the present application;
[0073] Figure 5 This is a flowchart of an embodiment of obtaining a diskless image installation package in step 402 and installing the diskless image installation package in a diskless image directory provided in an embodiment of the present application;
[0074] Figure 6 It is a flowchart of an embodiment of a method for configuring a system of an intelligent network card on an intelligent network card side provided by an embodiment of the present application;
[0075] Figure 7 It is a schematic diagram of a specific scenario of the system configuration method of the smart network card provided in the embodiment of the present application;
[0076] Figure 8 It is a structural diagram of a system configuration device for managing a machine-side smart network card provided in an embodiment of the present application;
[0077] Fig. 9 is another structural diagram of a system configuration device for a smart network card provided in an embodiment of the present application;
[0078] Fig.10 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0080] In the following description, the specific embodiments of the present application will be described with reference to the steps and symbols performed by one or more computers, unless otherwise specified. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to herein includes the operation of a computer processing unit by an electronic signal representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.
[0081] The terms "module" or "unit" used herein may be considered as software objects executed on the computing system. The different components, modules, engines and services described herein may be considered as implementation objects on the computing system. The devices and methods described herein are preferably implemented in software, but may also be implemented in hardware, all within the scope of protection of this application.
[0082] In the following description of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0083] In the following description of the present application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0084] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0085] The following first introduces some basic concepts involved in the embodiments of the present application:
[0086] Smart NIC: The core is to assist the CPU in processing network load and programming network interface functions through Field-Programmable Gate Array (FPGA). Smart NIC can install operating system.
[0087] Smart NICs can offload a large part of the CPU's work to the smart NIC, including network, storage, security and other services. The smart NIC integrates an operating system, which carries a variety of tool software. It uses a combination of software and hardware to provide offload services for the host where the smart NIC is located. The large-scale application of smart NICs has gradually exposed the problem of large-scale operation and maintenance deployment of smart NICs. Traditional servers are equipped with a complete set of BMC (Baseboard Management Controller) systems, which enables servers to perform large-scale operation and maintenance through remote commands such as ipmitool. Generally, smart NIC manufacturers install smart NICs through PXE (Preboot eXecution Environment).
[0088] Diskless node: A physical machine where the entire operating system is loaded into memory (RAMdisk).
[0089] Diskless image: an operating system image mounted directly on the memory.
[0090] DHCP: Dynamic Host Configuration Protocol, whose main function is to centrally manage and allocate IP addresses, so that hosts in the network environment can dynamically obtain IP (Internet Protocol) addresses, gateway addresses, Domain Name System (DNS) server addresses, etc.
[0091] TFTP: Trivial File Transfer Protocol is a simple file transfer protocol in the TCP / IP protocol suite used for simple file transfer between client and server.
[0092] PXE: Preboot Execution Environment, provides a mechanism to start a computer using a network interface, which allows the computer to start without relying on local data storage devices. It achieves this goal by using network protocols such as DHCP and TFTP and concepts such as globally unique identifiers, universal network driver interfaces, and universally unique identifiers, and by extending the preset application programming interface (Application Programming Interface, API) to the physical machine firmware.
[0093] Chroot: A Linux system call that can change the root directory that a process can see, similar to creating a sandbox. The process runs inside the sandbox, and whether the process runs normally or not does not affect other processes on the machine.
[0094] Out-of-band management: Network management can be divided into two modes: out-of-band management and in-band management. In-band management: Management control information and data information are transmitted using the same physical channel. The core concept of out-of-band management is to transmit management control information and data information through different physical channels. The two are completely independent and do not affect each other. Out-of-band commands are commands used in out-of-band management.
[0095] Cloud technology: refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0096] See also Figure 1 , Figure 1 A schematic diagram of a distributed system for deploying a diskless image of a smart network card provided in an embodiment of the present application. The distributed system may include a management machine 100 and at least one smart network card node 200 ( Figure 1 Three physical machines are shown in the example), and the management machine 100 and the smart network card node 200 can exchange data and instructions through the network.
[0097] The management machine 100 is the master control terminal of the entire smart NIC cluster, and is the DHCP server and TFTP server of the entire smart NIC cluster. It can initiate batch operation instructions to all smart NICs in the smart NIC cluster.
[0098] The management machine 100 can generate and save a diskless image of the smart network card, wherein the diskless image can be stored on a TFTP server, and the IP of the TFTP server and the location of the diskless image can be recorded in the configuration file of the DHCP server. When there is a need to generate a new diskless image, the administrator initiates the diskless image production process on the management machine to generate a new diskless image, and this process does not affect the production status of the smart network card.
[0099] It should be noted that in the embodiments of the present application, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0100] In the embodiment of the present application, the distributed system of the intelligent network card diskless image deployment may also include a cloud storage space for storing relevant data in the management machine or system, such as the historical diskless image of the intelligent network card.
[0101] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions. At present, the storage method of the storage system is to create a logical volume. When creating a logical volume, a physical storage space is allocated for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, the data is stored on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object. Therefore, when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
[0102] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.
[0103] In some embodiments of the present application, the smart network card node 200 may be a bare metal physical server where the smart network card is located, and may include a smart network card and a HOST host, wherein the smart network card may be a smart network card device, and the smart network card device may include a smart network card chip (System on Chip, SoC); the HOST host refers to a host device in the smart network card node that is different from the smart network card device.
[0104] Match the smart network card and the HOST host one by one, so that there will be no error when the management machine 100 controls a single smart network card node 200 (one HOST host + one smart network card). Since the smart network card takes over the HOST host, power failure of the smart network card will cause the HOST host and the smart network card to lose connection. Therefore, in the embodiment of the present application, the smart network card can have an independent power supply, which can be used to power the smart network card and the HOST host under power failure conditions. The independent power supply of the smart network card can be at the same level as the HOST host and is not affected by power failure of the HOST host.
[0105] In an embodiment of the present application, when the administrator initiates a diskless image deployment operation for a smart network card, all smart network cards are restarted, the diskless image is decompressed and run in the smart network card memory, and the network card configuration toolkit of the smart network card is also stored in the memory for network card configuration.
[0106] It should be noted that Figure 1 The scenario diagram of the distributed system shown is only an example. The distributed system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the distributed system deployed with diskless mirroring of smart network cards and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.
[0107] The following is a detailed description with reference to specific embodiments. It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0108] In the embodiments of the present application, the system configuration device of the smart network card will be described first from the perspective of the system configuration device of the smart network card, which can be specifically integrated in the management machine.
[0109] See also Figure 2 , Figure 2 1 is a flow chart of an embodiment of a method for configuring a smart network card system provided in an embodiment of the present application. The method for configuring a smart network card system includes the following steps:
[0110] 201. In response to a diskless image deployment operation request for a smart network card to be deployed, send a first system deployment instruction to the smart network card to be deployed.
[0111] Specifically, the smart NIC to be deployed is a smart NIC whose firmware (or operating system) can be refreshed. The smart NIC to be deployed may include some or all of the smart NICs in the target smart NIC cluster. The target smart NIC cluster may be a smart NIC cluster with an operating system to be deployed.
[0112] In an embodiment of the present application, before the system configuration of the smart network card, the data network port of the smart network card to be deployed and the data network port of the management machine are connected to a local area network so that they are physically connected to each other; the pre-execution environment and diskless image are deployed on the management machine (after production, they can be saved on the TFTP server).
[0113] Among them, the first system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter the preboot execution environment (Preboot Execution Environment, PXE), download the system kernel and the initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image.
[0114] After the administrator selects the smart network card to be deployed in the target smart network card cluster on the management machine, the management machine triggers a diskless image deployment operation request for the smart network card to be deployed, and sends a first system deployment instruction to the smart network card to be deployed. The management machine can use an out-of-band command pair operation to send the first system deployment instruction to the smart network card to be deployed, so that the smart network card enters the PXE process, downloads the system kernel and the initial memory image, and loads them into its own memory.
[0115] At the same time, the management machine can also instruct the smart network card to perform a hardware check through the first system deployment instruction, for example, check the FPGA version of the smart network card, and if an upgrade is required, download the corresponding hardware upgrade tool (such as an FPGA upgrade tool) to perform the upgrade.
[0116] The BIOS of the smart network card has many boot options to choose from during the boot process. In the embodiment of the present application, it is preferred to boot through the network by default, so that the smart network card can enter the PXE environment configured by the management machine first. PXE is also called the pre-execution environment, which provides a mechanism for starting a computer using a network interface (Network Interface). This mechanism allows the startup of the smart network card to be independent of local data storage devices (such as hard disks) or locally installed operating systems. The smart network card PXE automatically downloads the system kernel and initial memory image provided by the management machine and loads them into the memory of the smart network card. All subsequent operations are performed in memory, avoiding reading and writing modifications to the disk of the smart network card.
[0117] Specifically, the system kernel can be Kernel, which refers to a real-time operating system (RTOS). A real-time operating system is an operating system that can accept and process external events or data at a fast enough speed when they occur, and its processing results can control the production process or respond quickly to the processing system within a specified time, dispatch all available resources to complete real-time tasks, and control all real-time tasks to run in a coordinated manner. Providing timely response and high reliability are the main characteristics of a real-time operating system.
[0118] The initial memory image can be initrd, i.e. init ramdisk, which is a file system that exists in memory during startup. The original purpose of initrd is to divide the startup of the kernel into two stages: retain the minimum and most basic startup code in the kernel, and then place the support for various hardware devices in the initrd in the form of modules, so that the required modules can be loaded from the root file system mounted by initrd during the startup process. One advantage of this is that different hardware can be flexibly supported by modifying the content in initrd while keeping the kernel unchanged. In the embodiment of the present application, Initrd mounts the memory (RAM) as a disk, then finds the init in RAM for execution, mounts it to an initial root file system in the system before the actual root file system is available, and is loaded together with the system kernel (such as kernel) as part of the kernel boot process.
[0119] 202. Send a hardware restart instruction to the smart network card to be deployed.
[0120] Specifically, the management machine may send a hardware restart instruction to the smart network card to be deployed, thereby instructing the smart network card that has completed the hardware program check to power off and on, wherein the hardware restart instruction may also be an out-of-band instruction.
[0121] 203. Send a second system deployment instruction to the smart network card to be deployed.
[0122] The second system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter the pre-startup execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory.
[0123] Specifically, the smart network card controls itself to enter PXE, automatically downloads the diskless image of the smart network card generated in advance by the management machine and loads it into the memory of the smart network card. All subsequent operations are performed in the memory, avoiding reading and writing modifications to the disk of the smart network card.
[0124] 204. Based on the diskless image loaded in the memory of the smart network card to be deployed, configure an operating system for the corresponding smart network card to be deployed.
[0125] Each smart network card to be deployed has a diskless image loaded in its own memory. Therefore, an operating system can be configured for each smart network card based on the diskless image loaded in its own memory.
[0126] It should be noted that in some embodiments of the present application, sending a hardware restart instruction to the smart network card to be deployed in step 202 may be triggered after the management machine receives the first response information fed back by the smart network card to be deployed. The first response information may be that each smart network card to be deployed controls itself to enter the pre-boot execution environment, downloads the system kernel and the initial memory image and loads them into its own memory, performs a hardware program check on the smart network card based on the system kernel and the initial memory image, and then generates it and sends it to the management machine.
[0127] Similarly, sending the second system deployment instruction to the smart network card to be deployed in step 203 may be triggered after the management machine receives the second response information fed back by the smart network card to be deployed. The second response information may be that each smart network card to be deployed controls itself to enter the pre-boot execution environment, downloads the system kernel and the pre-generated diskless image of the smart network card, and loads them into its own memory before being generated and then sent to the management machine.
[0128] In some other embodiments of the present application, each smart network card to be deployed may not feedback response information after executing the corresponding instruction. At this time, in order to avoid delays in instructions due to network reasons, the first system deployment instruction, the hardware restart instruction, and the second system deployment instruction in steps 201 to 203 may include instruction execution priority information, which is used to instruct the receiving smart network card to execute the instruction according to the priority in the instruction execution priority information. For example, the instruction priority of the first system deployment instruction is 1, the instruction priority of the hardware restart instruction is 2, and the instruction priority of the second system deployment instruction is 3. In this way, the smart network card that receives these instructions can determine to execute the first system deployment instruction first, then execute the hardware restart instruction, and then execute the second system deployment instruction.
[0129] In some other embodiments of the present application, each smart network card to be deployed may not feedback response information after executing the corresponding instruction. At this time, in order to avoid delays in instructions due to network reasons, the first system deployment instruction, the hardware restart instruction, and the second system deployment instruction in steps 201 to 203 may also include instruction generation time information, which is used to indicate the time information when the management machine generates the instruction. The receiving smart network card can execute the corresponding instructions in the order of the instruction generation time. For example, the first system deployment instruction is generated first, followed by the hardware restart instruction, and then the second system deployment instruction. The receiving smart network card can execute the first system deployment instruction first, then the hardware restart instruction, and then the second system deployment instruction in chronological order.
[0130] In an embodiment of the present application, in response to a diskless image deployment operation request for a smart network card to be deployed, a first system deployment instruction is sent to the smart network card to be deployed, the first system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter a pre-boot execution environment, download the system kernel and the initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image; a hardware restart instruction is sent to the smart network card to be deployed, the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and on; a second system deployment instruction is sent to the smart network card to be deployed, the second system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter a pre-boot execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory; based on the diskless image loaded in the memory of the smart network card to be deployed, an operating system is configured for the corresponding smart network card to be deployed. Compared with the related art, when the operating system of the smart network card is deployed in the embodiment of the present application, after entering the pre-boot execution environment for the second time, the system kernel and the pre-generated diskless image of the smart network card are downloaded and loaded into its own memory without writing to the hard disk. After the system deployment is completed, there is no need to restart the smart network card again. The entire process only restarts the operating system once, saving the time of restarting the operating system and improving the efficiency of batch automatic deployment of the smart network card. At the same time, since the operating system of the smart network card is deployed in the memory, the smart network card no longer needs to mount the hard disk to install the operating system, saving hard disk resources.
[0131] In some other embodiments of the present application, in each smart network card node, each smart network card corresponds to a host host, such as Figure 3 As shown, in step 204, configuring an operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed may further include the following steps 301 to 303:
[0132] 301. Obtain network attributes of the smart network card to be deployed.
[0133] During the configuration phase of the smart network card diskless operating system, the network properties of the smart network card to be deployed can be obtained, and the smart network card and the host can be bound and configured. Among them, obtaining the network properties of the smart network card to be deployed can be obtaining the IP properties of the smart network card node. The IP properties may include the IP address, mask, and gateway. The smart network card can communicate normally only when the IP properties are correct.
[0134] 302. Bind each smart network card to be deployed to a corresponding host based on the network attributes of the smart network card and set a common network address.
[0135] In the related art, the smart network card and the corresponding host host use different network addresses (such as IP addresses). In the embodiment of the present application, based on the network properties obtained in step 301, each smart network card to be deployed and the corresponding host host are bound and a common network address is set. Specifically, the smart network card and the corresponding host host can be bound and a common IP address can be set.
[0136] 303. According to the diskless image loaded in the memory of the smart network card to be deployed, limit the port and network service of the smart network card.
[0137] In an embodiment of the present application, in order to configure an operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed, it is necessary to limit the ports and network services of the smart network card according to the diskless image loaded in the memory of the smart network card to be deployed.
[0138] In other embodiments of the present application, step 303 limits the ports and network services of the smart network card according to the diskless image loaded in the memory of the smart network card to be deployed, and may further include: parsing the network card configuration toolkit of the smart network card from the diskless image; and limiting the ports and network services of the smart network card according to the network card configuration toolkit.
[0139] Specifically, you can limit the ports and network services of the smart network card by writing ebtables rules. Ebtables is an Ethernet bridge firewall. The Ethernet bridge works at the data link layer. Ebtables is mainly used to filter data packets at the data link layer.
[0140] In an embodiment of the present application, the smart network card may include two network ports. The port that limits the smart network card may be a network port that is blocked by ebtables. The blocked network port is used for the PXE process of the smart network card, and the other network port is used for the PXE process of the host.
[0141] Limiting the network service of the smart network card can be stopping eth0, which is a fiber Ethernet interface card, scientifically known as FiberEthernet Adapter 0. In the embodiment of the present application, eth0 is used in the PXE process of the smart network card, and eth1 is used in the PXE process of the host. The purpose of stopping eth0 is to prevent eth0 from obtaining the IP address of the DHCP server when the host is installing the operating system, thereby affecting eth1 from obtaining the IP address of the DHCP server.
[0142] In the embodiment of the present application, since the smart network card and the host host share the same IP, this configuration can prevent the smart network card from interfering with the host host when the host host initiates PXE installation.
[0143] In the embodiments of the present application, the TFTP server of the management machine can store the toolkits necessary for the intelligent network card system configuration. The toolkits can include hardware upgrade tools (such as FPGA upgrade tools) and intelligent network card configuration tools, both of which are placed in the TFTP server of the management machine. Among them, the hardware upgrade tool can be downloaded by the intelligent network card to be deployed for corresponding hardware upgrades. For example, in the process of deploying the intelligent network card without a disk image, when the intelligent network card needs to perform a hardware program upgrade after checking the hardware program after receiving the first deployment instruction, it can download the hardware upgrade tool from the TFTP server.
[0144] The intelligent network card configuration tool includes a BOND script and an ebtables rule configuration script. Among them, the BOND script is used for the binding configuration of the intelligent network card and the Host host (binding a shared IP address), and the ebtables rule configuration script is used for the ebtables configuration of the intelligent network card. The ports and network services of the intelligent network card are restricted through the ebtables rules in the ebtables rule configuration script, and then the intelligent network card to be deployed is adapted to the corresponding diskless image.
[0145] Specifically, in the embodiments of the present application, various different types of toolkits can be managed according to a preset data structure, as follows:
[0146] {Toolkit name: <unique identifier>, Type: <tool type>, Version: <version number>, Date: <upload date>, Path: }
[0147] Among them, the toolkit name is the unique identifier of the toolkit; the type includes hardware upgrade tools (FPGA upgrade tools) or intelligent network card configuration tools; the version records the version number of each toolkit; the path is the storage location of the toolkit on the TFTP server.
[0148] In other embodiments of the present application, when there is a need to generate a new image, the administrator initiates the process of making a diskless image on the management machine to generate a new diskless image. Specifically, before downloading the system kernel and the pre-generated diskless image of the intelligent network card, the system configuration method of the intelligent network card in the embodiments of the present application further includes: responding to a request for making a diskless image of a target intelligent network card cluster, and generating a diskless image of the intelligent network cards in the target intelligent network card cluster. Since the process of making and configuring the diskless image of the intelligent network card is carried out on the management machine, it will not affect the intelligent network cards in production.
[0149] As Figure 4 shown, in other embodiments of the present application, generating a diskless image of the intelligent network cards in the target intelligent network card cluster can further include the following steps 401 to 403:
[0150] 401. Create a diskless image directory for the smart network card.
[0151] The diskless image directory for the smart network card can be created in chroot mode. For example, the diskless image directory / tmp / mirror / new can be created in chroot mode. The initial memory image (such as initrd) can be decompressed to this directory later, and the software package can be installed in / tmp / mirror / new after chroot.
[0152] Specifically, creating a diskless image directory of the smart network card may include: creating a definition of an operating system image of the smart network card; and creating a diskless image directory of the smart network card according to the definition of the operating system image.
[0153] The definition of the operating system image is created on the management machine, and the definition includes: the file system structure of the operating system image, the list of software packages required for the operating system image, the list of drivers required for the operating system image, the basic configuration script defined in the operating system image, the status label, etc.
[0154] In the embodiment of the present application, the basic configuration script may include a system default script (such as a network card configuration script, a system log configuration script, a port configuration script) and a custom script. The custom script may be a script that can be scheduled for execution and is used to perform a custom task. The status label is used to record the life state of the diskless image of the current operating system, and may specifically include status labels such as initialization, generating, production completed, and release. In the embodiment of the present application, the life state of the diskless image during initial production may include two status labels, "initialization" and "generating". After the diskless image is produced, the status label of the diskless image may be "production completed". After the diskless image is released, the status label of the diskless image may be "released".
[0155] 402. Obtain the installation package of the diskless image, and install the installation package of the diskless image in the diskless image directory.
[0156] 403. Pack and compress the files in the diskless image directory to generate a diskless image of the smart NIC in the target smart NIC cluster.
[0157] Package the diskless image network card configuration tool in the diskless image directory, package and compress to complete the image file production, and then put the diskless image file into the preset directory of the TFTP server.
[0158] When the diskless image of the smart network card operating system needs to be updated, after the management machine regenerates and packages the diskless image, the smart network card can download and load the new operating system diskless image in the memory as long as the smart network card is restarted to update the operating system of the smart network card.
[0159] Specifically, when the diskless image installation package includes a hardware upgrade package preset for the smart network card and a network card configuration tool package for the diskless image. Figure 5 As shown, the step of obtaining the installation package of the diskless image in step 402 and installing the installation package of the diskless image in the diskless image directory may specifically include the following steps 501 to 505:
[0160] 501. Obtain an operating system source file for creating a diskless image of a smart network card.
[0161] Among them, the operating system source file can be an industry standard operating system source file, the operating system source file is used to create a diskless image, and the operating system source file can be an ISO file obtained from the operating system manufacturer, including a fixed software package (including a hardware upgrade package), driver, Kernel, Initrd, operating system description file, etc.
[0162] Obtain fixed software packages from the operating system source files. Install the obtained fixed software packages into the diskless image directory. The installation process may include installation, driver loading, configuration modification, and configuration script execution.
[0163] 502. Obtain a hardware upgrade package of the smart network card from an operating system source file.
[0164] 503. Install the hardware upgrade package in the diskless image directory.
[0165] 504. Download the network card configuration tool package from the preset TFTP server.
[0166] 505. Install the network card configuration toolkit in the diskless image directory.
[0167] After steps 501 to 505, the installation package of the diskless image is installed in the diskless image directory.
[0168] In other embodiments of the present application, when the definition of the operating system image includes a status tag for recording the life status of the diskless image of the current operating system, the status tag of the diskless image can be updated. In an embodiment of the present application, for example, after the diskless image is produced, the status tag of the diskless image is "production completed".
[0169] Specifically, after generating the diskless image of the smart NIC in the target smart NIC cluster, the system configuration method of the smart NIC in the embodiment of the present application may further include: placing the diskless image into a preset directory of a preset TFTP server; finding the system kernel from the operating system source file, and copying the system kernel into the TFTP server; updating the status label of the diskless image to be made. In other embodiments of the present application, the system configuration method of the smart NIC in the embodiment of the present application may further include: after configuring the operating system for the corresponding smart NIC to be deployed based on the diskless image loaded in the memory of the smart NIC to be deployed, updating the status of the status label of the diskless image to the published status.
[0170] The embodiment of the present application also provides a system configuration method for a smart network card, and a system configuration device for a smart network card that executes the system configuration method for a smart network card can be specifically integrated in the smart network card. Figure 6 As shown, the system configuration method of the smart network card may specifically include the following steps 601 to 606:
[0171] 601. Receive a first system deployment instruction sent by a management machine.
[0172] 602. Control itself to enter the pre-start execution environment according to the first system deployment instruction, download the system kernel and memory file system from the management machine and load them into the memory.
[0173] 603. Perform hardware program check of the smart network card based on the system kernel and memory file system;
[0174] 604. Receive a hardware restart instruction sent by the management machine, and power off and on according to the hardware restart instruction.
[0175] 605. Receive a second system deployment instruction sent by the management machine.
[0176] 606. Control itself to enter the pre-start execution environment according to the second system deployment instruction, download the system kernel and the pre-generated diskless image of the smart network card from the management machine, and load them into the memory.
[0177] In some embodiments of the present application, the hardware program check of the smart network card based on the system kernel and the memory file system in step 603 may include: performing an FPGA program version check based on the system kernel and the memory file system to determine whether the smart network card needs to upgrade the FPGA version; if the smart network card needs to upgrade the FPGA version, downloading the FPGA upgrade program from a preset TFTP server, and executing the FPGA program upgrade; after the FPGA program upgrade is completed, determining that the hardware program check of the smart network card is completed.
[0178] It should be noted that the above steps 601 to 606 are Figure 2The system configuration method of the smart network card corresponding to the smart network card end in the embodiment shown in the figure, and the implementation of the corresponding steps can be specifically referred to Figure 2 The embodiments shown are not described in detail here.
[0179] In the embodiment of the present application, a first system deployment instruction sent by a management machine is received; according to the first system deployment instruction, the system kernel and memory file system are controlled to enter the pre-start execution environment, and the system kernel and memory file system are downloaded from the management machine and loaded into the memory; the hardware program of the smart network card is checked based on the system kernel and memory file system; the hardware restart instruction sent by the management machine is received, and the power is turned off and on according to the hardware restart instruction; the second system deployment instruction sent by the management machine is received; according to the second system deployment instruction, the system kernel and the pre-generated diskless image of the smart network card are controlled to enter the pre-start execution environment, and the system kernel and the pre-generated diskless image of the smart network card are downloaded from the management machine, and loaded into the memory. Compared with the related art, when the operating system of the smart network card is deployed in the embodiment of the present application, after entering the pre-start execution environment for the second time, the system kernel and the pre-generated diskless image of the smart network card are downloaded and loaded into its own memory, without writing to the hard disk. After the system deployment is completed, the smart network card does not need to be restarted again. The whole process only restarts the operating system once, which saves the time of restarting the operating system once, and improves the efficiency of batch automatic deployment of the smart network card. At the same time, since the operating system of the smart network card is deployed in the memory, the smart network card no longer needs to mount the hard disk to install the operating system, saving hard disk resources.
[0180] The following describes the system configuration method of the smart network card in the embodiment of the present application in conjunction with a specific application scenario.
[0181] When it is necessary to create a diskless image of the smart network card, the administrator initiates a diskless image creation process on the management machine to generate a new diskless image.
[0182] The generation of diskless images is as follows Figure 7 As shown, firstly, the operating system source file is obtained. The operating system source file is used to create a diskless image. The operating system source file can be an ISO file obtained from the operating system manufacturer, including fixed software packages (including hardware upgrade packages), drivers, Kernel, Initrd, operating system description files, etc. Secondly, the definition of the operating system image is created on the management machine, and the definition includes: the file system structure of the operating system image, the software package list required by the operating system image, the driver list required by the operating system image, the basic configuration script defined in the operating system image, the status label, etc.
[0183] Among them, the basic configuration script may include the system default script (such as the network card configuration script, the system log configuration script, the port configuration script) and the custom script. The custom script may be a script that can be scheduled to execute and is used to execute a custom task. The status label is used to record the life state of the diskless image of the current operating system, and may specifically include status labels such as initialization, generating, production completed, and release. In this embodiment, the life state of the diskless image may include two status labels, "initialization" and "generating" during the initial production. After the diskless image is produced, the status label of the diskless image may be "production completed". After the diskless image is released, the status label of the diskless image may be "released".
[0184] Then, when the management machine initiates image generation, according to the definition of the operating system image, use the Chroot method to create a diskless image directory / tmp / mirror / new, find initrd from the operating system source file, copy the kernel file to / tmp / mirror, unzip initrd to / tmp / mirror / new, obtain the software package from the operating system source file, install it, load the driver, modify the configuration and execute the configuration script, package the diskless image network card configuration tool into the image, package and compress it to complete the image file production, and then put the image file into the preset directory of the TFTP server.
[0185] The management machine finds the kernel from the operating system source file and copies the kernel to the TFTP server, thus completing the production of the diskless image. After the production is completed, the status label in the image definition is updated to "Production Completed".
[0186] When the diskless image of the smart network card operating system needs to be updated, after the management machine regenerates and packages the diskless image, the smart network card can download and load the new operating system diskless image in the memory as long as the smart network card is restarted to update the operating system of the smart network card.
[0187] When deploying the operating system for the Smart NIC, the administrator selects the Smart NIC nodes of tens of thousands of physical machines from the target Smart NIC cluster from the management machine. After selecting the Smart NIC node, use the out-of-band command to operate the Smart NIC node, so that the Smart NIC enters the PXE process, downloads and loads the kernel and initrd image, enters the Smart NIC memory system, and further determines whether it is a Smart NIC.
[0188] Check the FPGA version for the Smart NIC. If an upgrade is required, download the FPGA upgrade tool and perform the upgrade. After the upgrade is complete, use out-of-band commands to power off and on the entire Smart NIC to make the hardware upgrade effective. Initiate PXE installation for the Smart NIC again, download the kernel and diskless image, and load the kernel and diskless image into memory.
[0189] Then enter the smart NIC diskless operating system configuration stage, obtain the IP attributes of the smart NIC node, configure BONDING for the smart NIC to bind the smart NIC to the corresponding Host and set a shared IP address, write ebtables rules to limit the ports and services of the smart NIC, stop eth0, and finally adapt the smart NIC and diskless mirror operating system.
[0190] The purpose of stopping eth0 is to prevent eth0 from obtaining the IP address of the DHCP server when the host operating system is installed, thereby affecting eth1 from obtaining the IP address of the DHCP server.
[0191] Because the Smart NIC and the host share the same IP address, this configuration can prevent the Smart NIC's network card and services from interfering with the host when the host initiates PXE installation.
[0192] In order to facilitate better implementation of the system configuration method of the smart network card provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the system configuration method of the smart network card, and the system configuration device of the smart network card is integrated in the management machine. The meaning of the terms is the same as that in the system configuration method of the smart network card on the management machine side, and the specific implementation details can refer to the description in the method embodiment.
[0193] See also Figure 8 , Figure 8 A schematic diagram of the structure of a system configuration device for a smart network card provided in an embodiment of the present application, wherein the system configuration device 800 of the smart network card may include a first sending module 801, a second sending module 802, a third sending module 803 and a configuration module 804, as follows:
[0194] The first sending module 801 is used to respond to the diskless image deployment operation request for the smart network card to be deployed, and send a first system deployment instruction to the smart network card to be deployed, wherein the first system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter the pre-boot execution environment, download the system kernel and the initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image. The smart network card to be deployed includes some or all of the smart network cards in the target smart network card cluster;
[0195] The second sending module 802 is used to send a hardware restart instruction to the smart network card to be deployed, where the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and on;
[0196] The third sending module 803 is used to send a second system deployment instruction to the smart network card to be deployed, and the second system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter the pre-start execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory;
[0197] The configuration module 804 is used to configure an operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed.
[0198] In some embodiments of the present application, each smart network card corresponds to a host, and the configuration module 804 is specifically used to:
[0199] Obtain the network attributes of the smart network card to be deployed;
[0200] Bind each smart network card to be deployed to the corresponding host based on network attributes and set a shared network address;
[0201] Limit the ports and network services of the Smart NIC to be deployed based on the diskless image loaded in the memory of the Smart NIC.
[0202] In some other embodiments of the present application, the configuration module 804 is specifically used to:
[0203] Analyze the network card configuration toolkit of smart network cards from diskless images;
[0204] Limit the ports and network services of the SmartNIC according to the NIC Configuration Toolkit.
[0205] In some other embodiments of the present application, the system configuration device of the smart network card further includes a diskless image generation module, and the diskless image generation module is specifically used for:
[0206] Before downloading the system kernel and the pre-generated diskless image of the smart NIC, in response to a request for making a diskless image of the target smart NIC cluster, a diskless image of the smart NIC in the target smart NIC cluster is generated.
[0207] In other embodiments of the present application, the diskless image generation module is specifically used for:
[0208] Create a diskless image directory for the smart network card;
[0209] Get the diskless image installation package and install it in the diskless image directory;
[0210] Package and compress the files in the diskless image directory to generate a diskless image for the SmartNIC in the target SmartNIC cluster.
[0211] In other embodiments of the present application, the diskless image generation module is specifically used for:
[0212] Create the definition of the operating system image of the smart network card;
[0213] Create a diskless image directory for the Smart NIC according to the definition of the operating system image.
[0214] In other embodiments of the present application, the diskless image installation package includes a hardware upgrade package preset for the smart network card and a diskless image network card configuration toolkit;
[0215] The diskless image generation module is specifically used for:
[0216] Obtain the operating system source files used to create the diskless image of the smart network card;
[0217] Obtain the hardware upgrade package of the smart network card from the operating system source file;
[0218] Install the hardware upgrade package in the diskless image directory;
[0219] Download the network card configuration tool package from the preset TFTP server;
[0220] Install the network card configuration tool package in the diskless image directory.
[0221] In some other embodiments of the present application, the definition of the operating system image includes a state tag for recording the life state of the diskless image of the current operating system;
[0222] The system configuration device of the intelligent network card also includes a diskless image management module, which is specifically used for:
[0223] After generating the diskless image of the smart NIC in the target smart NIC cluster, put the diskless image into a preset directory of the preset TFTP server;
[0224] Find the system kernel from the operating system source files and copy the system kernel to the TFTP server;
[0225] Update the status label of the diskless image to Completed.
[0226] In other embodiments of the present application, the diskless image management module is further used to:
[0227] After configuring the operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed, the state of the state tag of the diskless image is updated to the release state.
[0228] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0229] In an embodiment of the present application, the first sending module 801 sends a first system deployment instruction to the smart network card to be deployed in response to a diskless image deployment operation request for the smart network card to be deployed, and the first system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter a pre-boot execution environment, download the system kernel and the initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image; the second sending module 802 sends a hardware restart instruction to the smart network card to be deployed, and the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and power on; the third sending module 803 sends a second system deployment instruction to the smart network card to be deployed, and the second system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter a pre-boot execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory; the configuration module 804 configures the operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed. Compared with the related art, when the operating system of the smart network card is deployed in the embodiment of the present application, after entering the pre-boot execution environment for the second time, the system kernel and the pre-generated diskless image of the smart network card are downloaded and loaded into its own memory without writing to the hard disk. After the system deployment is completed, there is no need to restart the smart network card again. The entire process only restarts the operating system once, saving the time of restarting the operating system and improving the efficiency of batch automatic deployment of the smart network card. At the same time, since the operating system of the smart network card is deployed in the memory, the smart network card no longer needs to mount the hard disk to install the operating system, saving hard disk resources.
[0230] In order to facilitate better implementation of the system configuration method of the smart network card provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the system configuration method of the smart network card, and the system configuration device of the smart network card is integrated in the physical network card. The meaning of the terms is the same as that in the system configuration method of the smart network card on the smart network card side, and the specific implementation details can refer to the description in the method embodiment.
[0231] See also Fig. 9 , Fig. 9 A schematic diagram of the structure of a system configuration device for a smart network card provided in an embodiment of the present application, wherein the system configuration device 900 of the smart network card may include a first receiving module 901, a first loading module 902, a checking module 903, a second receiving module 904, a third receiving module 905, and a second loading module 906, as follows:
[0232] The first receiving module 901 is used to receive a first system deployment instruction sent by the management machine;
[0233] The first loading module 902 is used to control itself to enter the pre-boot execution environment according to the first system deployment instruction, download the system kernel and memory file system from the management machine and load them into the memory;
[0234] The inspection module 903 is used to perform hardware program inspection of the smart network card based on the system kernel and the memory file system;
[0235] The second receiving module 904 is used to receive the hardware restart instruction sent by the management machine, and power off and power on according to the hardware restart instruction;
[0236] The third receiving module 905 is used to receive the second system deployment instruction sent by the management machine;
[0237] The second loading module 906 is used to control itself to enter the pre-start execution environment according to the second system deployment instruction, download the system kernel and the pre-generated diskless image of the smart network card from the management machine, and load them into the memory.
[0238] In some embodiments of the present application, the inspection module 903 is specifically used to:
[0239] Perform FPGA program version check based on the system kernel and memory file system to determine whether the Smart NIC needs to upgrade the FPGA version;
[0240] If the Smart NIC needs to upgrade the FPGA version, download the FPGA upgrade program from the preset TFTP server and execute the FPGA program upgrade;
[0241] After the FPGA program upgrade is complete, confirm that the hardware program check of the smart network card is completed.
[0242] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0243] In an embodiment of the present application, a first receiving module 901 receives a first system deployment instruction sent by a management machine; a first loading module 902 controls itself to enter a pre-boot execution environment according to the first system deployment instruction, downloads a system kernel and a memory file system from the management machine, and loads them into the memory; an inspection module 903 performs a hardware program inspection of the smart network card based on the system kernel and the memory file system; a second receiving module 904 receives a hardware restart instruction sent by the management machine, and performs power-off and power-on according to the hardware restart instruction; a third receiving module 905 receives a second system deployment instruction sent by the management machine; a second loading module 906 controls itself to enter a pre-boot execution environment according to the second system deployment instruction, downloads a system kernel and a pre-generated diskless image of the smart network card from the management machine, and loads them into the memory. Compared with the related art, when the operating system of the smart network card is deployed in the embodiment of the present application, after entering the pre-boot execution environment for the second time, the system kernel and the pre-generated diskless image of the smart network card are downloaded and loaded into its own memory without writing to the hard disk. After the system deployment is completed, there is no need to restart the smart network card again. The entire process only restarts the operating system once, saving the time of restarting the operating system and improving the efficiency of batch automatic deployment of the smart network card. At the same time, since the operating system of the smart network card is deployed in the memory, the smart network card no longer needs to mount the hard disk to install the operating system, saving hard disk resources.
[0244] The present application also provides an electronic device, such as Fig.10 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0245] The electronic device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will appreciate that Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0246] The processor 1001 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 1002, and calling data stored in the memory 1002. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operation storage medium, user interface and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1001.
[0247] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating storage medium, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0248] The electronic device also includes a power supply 1003 for supplying power to each component. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management storage medium, so as to manage charging, discharging, and power consumption through the power management storage medium. The power supply 1003 can also include any components such as one or more DC or AC power supplies, recharge storage media, power failure detection circuits, power converters or inverters, and power status indicators.
[0249] The electronic device may further include an input unit 1004, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0250] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 1001 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 1002 according to the following instructions, and the processor 1001 will run the application program stored in the memory 1002 to execute the steps in the system configuration method of the smart network card provided in this application, such as:
[0251] In response to a diskless image deployment operation request for a smart network card to be deployed, a first system deployment instruction is sent to the smart network card to be deployed, where the first system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter a pre-boot execution environment, download a system kernel and an initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image. The smart network card to be deployed includes some or all of the smart network cards in the target smart network card cluster;
[0252] Send a hardware restart instruction to the smart network card to be deployed, where the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and on;
[0253] Sending a second system deployment instruction to the smart network card to be deployed, where the second system deployment instruction is used to instruct each smart network card to be deployed to control itself to enter the pre-startup execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory;
[0254] Based on the diskless image loaded in the memory of the smart network card to be deployed, an operating system is configured for the corresponding smart network card to be deployed.
[0255] Alternatively, the processor 1001 in the electronic device may load the executable file corresponding to the process of one or more application programs into the memory 1002 according to the following instructions, and the processor 1001 may run the application program stored in the memory 1002 to execute the steps in the system configuration method of the smart network card provided in the present application, for example:
[0256] Receiving a first system deployment instruction sent by the management machine;
[0257] Control itself to enter the pre-start execution environment according to the first system deployment instruction, download the system kernel and memory file system from the management machine and load them into the memory;
[0258] Perform hardware program checks on smart network cards based on the system kernel and memory file system;
[0259] Receive the hardware restart command sent by the management machine, and power on and off according to the hardware restart command;
[0260] Receiving a second system deployment instruction sent by the management machine;
[0261] According to the second system deployment instruction, the system controls itself to enter the pre-start execution environment, downloads the system kernel and the pre-generated diskless image of the smart network card from the management machine, and loads them into the memory.
[0262] It should be noted that the electronic device provided in the embodiment of the present application and the system configuration method of the smart network card in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above related embodiments and will not be repeated here.
[0263] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program stored therein is executed on the processor of the electronic device provided in the embodiment of the present application, the processor of the electronic device executes the steps in the system configuration method of the smart network card provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0264] The present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes various optional implementations of the system configuration method of the above-mentioned smart network card.
[0265] The above is a detailed introduction to the system configuration method, device, electronic device, storage medium and program product of a smart network card provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0266] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, the relevant data of the user is involved, and the user's permission or consent is required, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
Claims
1. A system configuration method for a smart network card, It is characterized in that The method comprises: In response to a diskless image deployment operation request for a smart network card to be deployed, a first system deployment instruction is sent to the smart network card to be deployed, wherein the first system deployment instruction is used to instruct the smart network card to control itself to enter a pre-boot execution environment, download a system kernel and an initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image. , The smart network cards to be deployed include some or all of the smart network cards in the target smart network card cluster; Sending a hardware restart instruction to the smart network card to be deployed, wherein the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and on; Sending a second system deployment instruction to the smart network card to be deployed, where the second system deployment instruction is used to instruct the smart network card to control itself to enter the pre-boot execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory; Based on the diskless image loaded in the memory of the smart network card to be deployed, an operating system is configured for the corresponding smart network card to be deployed.
2. The system configuration method of the smart network card according to claim 1, It is characterized in that Each smart network card corresponds to a host host, and the diskless image loaded in the memory of the smart network card to be deployed is used to configure the operating system for the corresponding smart network card to be deployed, including: Obtaining network attributes of the smart network card to be deployed; Bind each smart network card to be deployed to the corresponding host based on the network attributes and set a common network address; According to the diskless image loaded in the memory of the smart network card to be deployed, the ports and network services of the smart network card are restricted.
3. The system configuration method of the smart network card according to claim 2, It is characterized in that According to the diskless image loaded in the memory of the smart network card to be deployed, the ports and network services of the smart network card are restricted, including: Parsing a network card configuration toolkit of the smart network card from the diskless image; The ports and network services of the smart network card are restricted according to the network card configuration toolkit.
4. The system configuration method of the smart network card according to any one of claims 1 to 3, It is characterized in that Before downloading the system kernel and the pre-generated diskless image of the smart network card, the method further includes: In response to a request for making a diskless image of the target smart network card cluster, a diskless image of smart network cards in the target smart network card cluster is generated.
5. The system configuration method of the smart network card according to claim 4, It is characterized in that The generating of the diskless image of the smart network card in the target smart network card cluster includes: Create a diskless image directory for the smart network card; Obtaining an installation package of a diskless image, and installing the installation package in the diskless image directory; The files in the diskless image directory are packaged and compressed to generate a diskless image of the smart network card in the target smart network card cluster.
6. The system configuration method of the smart network card according to claim 5, It is characterized in that The step of creating a diskless image directory of the smart network card includes: Create the definition of the operating system image of the smart network card; Create a diskless image directory for the smart network card according to the definition of the operating system image.
7. The system configuration method of the smart network card according to claim 5, It is characterized in that The installation package includes a preset hardware upgrade package for the smart network card and a diskless image network card configuration toolkit; The step of obtaining the installation package of the diskless image and installing the installation package in the diskless image directory includes: Obtain the operating system source files used to create the diskless image of the smart network card; Obtaining a hardware upgrade package of the smart network card from the operating system source file; Install the hardware upgrade package in the diskless image directory; Download the network card configuration toolkit from a preset TFTP server; The network card configuration toolkit is installed in the diskless image directory.
8. The system configuration method of the smart network card according to any one of claims 1 to 7, It is characterized in that The definition of the operating system image includes a status tag for recording the life state of the diskless image of the current operating system; After generating the diskless image of the smart network card in the target smart network card cluster, the method further includes: Put the diskless image into a preset directory of a preset TFTP server; Find the system kernel from the operating system source file, and copy the system kernel to the TFTP server; The status label of the diskless image is updated to be completed.
9. The system configuration method of the smart network card according to claim 8, It is characterized in that The method further comprises: After configuring the operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed, the state of the state tag of the diskless image is updated to a published state.
10. A system configuration method for a smart network card, It is characterized in that The method comprises: Receiving a first system deployment instruction sent by the management machine; Control itself to enter the pre-start execution environment according to the first system deployment instruction, download the system kernel and memory file system from the management machine and load them into the memory; Performing hardware program inspection of the smart network card based on the system kernel and memory file system; Receive the hardware restart instruction sent by the management machine, and power off and on according to the hardware restart instruction; Receiving a second system deployment instruction sent by the management machine; According to the second system deployment instruction, the system controls itself to enter the pre-start execution environment, downloads the system kernel and the pre-generated diskless image of the smart network card from the management machine, and loads them into the memory.
11. The system configuration method of the smart network card according to claim 10, It is characterized in that The hardware program check of the smart network card based on the system kernel and the memory file system includes: Performing an FPGA program version check based on the system kernel and memory file system to determine whether the smart network card needs to upgrade the FPGA version; If the Smart NIC needs to upgrade the FPGA version, download the FPGA upgrade program from the preset TFTP server and execute the FPGA program upgrade; After the FPGA program upgrade is complete, confirm that the hardware program check of the smart network card is completed.
12. A system configuration device for a smart network card, It is characterized in that The device comprises: A first sending module, configured to respond to a diskless image deployment operation request for a smart network card to be deployed, and send a first system deployment instruction to the smart network card to be deployed, wherein the first system deployment instruction is used to instruct the smart network card to control itself to enter a pre-boot execution environment, download a system kernel and an initial memory image and load them into its own memory, and perform a hardware program check of the smart network card based on the system kernel and the initial memory image, wherein the smart network card to be deployed includes some or all of the smart network cards in the target smart network card cluster; A second sending module is used to send a hardware restart instruction to the smart network card to be deployed, wherein the hardware restart instruction is used to instruct the smart network card that has completed the hardware program check to power off and power on; A third sending module is used to send a second system deployment instruction to the smart network card to be deployed, where the second system deployment instruction is used to instruct the smart network card to control itself to enter the pre-boot execution environment, download the system kernel and the pre-generated diskless image of the smart network card, and load them into its own memory; The configuration module is used to configure an operating system for the corresponding smart network card to be deployed based on the diskless image loaded in the memory of the smart network card to be deployed.
13. An electronic device, It is characterized in that The system comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the system configuration method of the smart network card according to any one of claims 1 to 11.
14. A storage medium, It is characterized in that The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the system configuration method of the smart network card according to any one of claims 1 to 11.
15. A computer program product comprising a computer program or instructions, It is characterized in that When the computer program or instruction is executed by a processor, the steps in the system configuration method of the smart network card according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Method and a system for installing Linux systems in batches
CN109614113A
Deployment method and device for OpenStack bare computer containing intelligent network card
CN112486522A
Method and system for realizing RAID division of system disk and installing operating system
CN113391828A
Method and device for automatically testing PXE function stability of intelligent network card and storage medium
CN113746694A
Remote automatic deployment method and device for operating system, terminal and storage medium
CN114138283A
Cited By
Transmission method of duration instruction, starting method of equipment and electronic equipment
CN120750988A
