Bare metal adaptive increment deployment method and device and storage medium

By splitting the bare metal mirror into basic mirror and incremental patches, adaptive incremental deployment is achieved, solving the problems of waste of resources and long delivery time, and improving deployment efficiency and adaptability.

CN120447915APending Publication Date: 2025-08-08CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510547741.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the existing bare metal deployment methods, there are problems of wasted resources and long delivery time, especially when the server hardware or functions do not match, re-creating images is required, resulting in inefficient deployment.

Method used

Split the bare metal mirror into basic mirror and incremental patches, select and install corresponding incremental patches according to business needs, and perform adaptive incremental deployment for different server hardware and services.

Benefits of technology

Improves deployment efficiency, saves system resources, shortens delivery time, and can adapt to the rapid deployment of new hardware or functions without re-imaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120447915A_ABST
    Figure CN120447915A_ABST
Patent Text Reader

Abstract

The invention discloses a bare metal adaptive incremental deployment method and device and a storage medium, and relates to the field of cluster deployment. The method comprises the following steps: determining service configurations needing to be deployed, forming a bare metal basic mirror image according to general configurations required by each service, and forming corresponding incremental patches for the service configurations except the general configurations; and after the target node is provided with the bare metal basic mirror image, the corresponding incremental patch is installed according to the service configuration required by the target node. According to the method, a single bare metal full-amount mirror image in the prior art can be split into bare metal basic mirror images suitable for all target nodes and incremental patches suitable for different services according to general requirements of the services and different requirements of individuals. When deployment is carried out on the basis, the corresponding incremental patch can be selected according to service requirements, self-adaptive incremental deployment can be carried out for different server hardware and different services, useless software is not installed, the deployment efficiency is improved, and system resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cluster deployment, and in particular to a bare metal adaptive incremental deployment method, device, and storage medium. Background Art

[0002] When deploying a cluster, you need to deploy the operating system and cloud services to a large number of servers. This deployment is usually done in batches. Among batch cluster deployment methods, PXE (Preboot eXecution Environment) is the most common. During the boot phase, the system boots from a PXE-enabled network card, obtains an IP address from a DHCP server, downloads the bootloader and operating system image from a TFTP server, and then boots the operating system into memory. Deployment is completed by downloading and reading the configuration.

[0003] There are currently two mainstream deployment methods:

[0004] (1) Traditional deployment method: specify the software source during the deployment process and configure the deployment according to the requirements.

[0005] (2) Bare metal deployment: During deployment, the pre-made bare metal image is directly written to the system disk of the target server to complete the deployment.

[0006] Cloud vendors often use bare metal deployment due to its efficiency and convenience.

[0007] Bare metal deployment requires pre-creating a series of images. These images, in addition to the bootloader image, must also include the kernel image for the PXE phase, an initramfs or initrd image, a rootfs image for installation and deployment, and a bare metal image. These images must be placed on the deployment machine and accessible via HTTP or TFTP.

[0008] The current bare metal deployment process is generally as follows:

[0009] 1. The target server is booted from PXE. After the PXE process, the operating system kernel is started and the initrd, installation rootfs, and installer are loaded into memory.

[0010] 2. The installer uses specific tools, such as qemu-img, to write the bare metal image to the system disk of the target server and sets the system disk as the priority boot disk through the startup management configuration program, such as efibootmgr.

[0011] However, the above process uses a bare metal image containing full drivers and full functionality, and writes the image to disk indiscriminately on multiple target servers. This can lead to the following drawbacks:

[0012] 1. When the target server only requires some drivers and functions from the full version, deploying the full version of the drivers and functions will cause unnecessary waste of resources, such as network ports, CPU resources, disk resources, and memory resources.

[0013] 2. When new hardware is installed on a server in the cluster that is not supported by the bare metal image, or when new functionality is required, the original bare metal image becomes unusable. In this case, the system will fail to start after forced deployment. The bare metal image must be recreated and upgraded to the deployment machine to support deployment of the target server. Due to the limitations of bare metal images, the recreating and deployment process significantly increases delivery time and deployment cycle. Summary of the Invention

[0014] In view of the defects in the prior art, the present invention solves the technical problem of how to adaptively configure a deployment solution according to deployment requirements.

[0015] To achieve the above objectives, in the first aspect, an embodiment of the present application provides a bare metal adaptive incremental deployment method, which includes the following steps: determining the business configuration that needs to be deployed, forming a bare metal basic image based on the general configuration required for each business, and forming corresponding incremental patches for business configurations other than the general configuration; after the target node installs the bare metal basic image, the corresponding incremental patch is installed according to the business configuration required by the target node.

[0016] In conjunction with the first aspect, in one embodiment, the configuration information of the service configuration includes node type, node function, and hardware information; and the process of installing the corresponding incremental patch according to the service configuration required by the target node includes:

[0017] If the node type and node functions required by the target node do not exist in the bare metal base image, install the incremental patches corresponding to the required node type and node functions.

[0018] When the target node requires hardware that is not included in the bare metal base image, install the incremental patch corresponding to the required hardware.

[0019] In combination with the first aspect, in one embodiment, before the target node installs the bare metal base image, the following process is also included: the target node loads the system installation software and the required business configuration file, and obtains the corresponding configuration information according to the business configuration file.

[0020] In combination with the first aspect, in one embodiment, the execution process of the target node loading the system installation software and the required business configuration file includes: starting the target node, loading the operating system kernel, initramfs image, rootfs image, installation program and business configuration file from the deployment end, starting the kernel and completing the network configuration.

[0021] In combination with the first aspect, in one embodiment, the process of installing the bare metal base image on the target node includes: after writing the bare metal base image to the installation area of the target node, adjusting the startup order of the bare metal base image to the highest.

[0022] In combination with the first aspect, in one embodiment, after the target node installs the bare metal base image, before the corresponding incremental patch is installed according to the business configuration required by the target node, the following steps are also included: configuring the target node according to the business configuration information.

[0023] In combination with the first aspect, in one embodiment, the process of installing the corresponding incremental patch according to the service configuration required by the target node includes: after obtaining the installation software of the incremental patch, mounting and installing it to the installation area of the target node.

[0024] In combination with the first aspect, in one embodiment, after installing the corresponding incremental patch according to the service configuration required by the target node, the following steps are further included: generating a temporary file system in the memory.

[0025] In a second aspect, an embodiment of the present application provides a bare metal adaptive incremental deployment device, which includes a processor, a memory, and a bare metal adaptive incremental deployment program stored on the memory and executable by the processor, wherein when the bare metal adaptive incremental deployment program is executed by the processor, the steps of the method provided in the first aspect are implemented.

[0026] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a bare metal adaptive incremental deployment program is stored, wherein when the bare metal adaptive incremental deployment program is executed, the steps of the method provided in the first aspect are implemented.

[0027] Compared with the prior art, the advantages of the present invention are:

[0028] The present invention can split a single bare metal full image in the prior art into a bare metal base image applicable to all target nodes and incremental patches applicable to different businesses according to the general needs of the business and different individual needs. When deployed on this basis, corresponding incremental patches can be selected according to business needs. Compared with the bare metal full image in the prior art, the present invention can perform adaptive incremental deployment for different server hardware and different businesses, does not install useless software, improves deployment efficiency, and saves system resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 This is a schematic diagram of the bare metal deployment effect in an embodiment of the present invention;

[0031] Figure 2 Schematic diagram of the process of the bare metal adaptive incremental deployment method according to an embodiment of the present invention;

[0032] Figure 3 This is a schematic diagram of the hardware structure of the bare metal adaptive incremental deployment device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0033] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0034] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0035] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0036] In a first aspect, embodiments of the present application provide a bare metal adaptive incremental deployment method, the method comprising the following steps: determining all service configurations that need to be deployed, forming a bare metal base image based on the common configurations required for each service, and forming corresponding incremental patches for service configurations other than the common configurations. After the target node installs the bare metal base image (i.e., writes the bare metal base image to the system disk), the corresponding incremental patches are installed based on the service configurations required by the target node.

[0037] It can be seen from this that the present invention can split a single bare metal full mirror image in the prior art into a bare metal base mirror image applicable to all target nodes and an incremental patch applicable to different businesses according to the general needs of the business and the different individual needs. When deployed on this basis, the corresponding incremental patch can be selected according to business needs, and this is compared with the bare metal full mirror image in the prior art. The present invention can carry out adaptive incremental deployment for different server hardware and different businesses, does not install useless software, improves deployment efficiency, and saves system resources.

[0038] See for example Figure 1 As shown, the bare metal base image and all incremental patches (drivers 1 and 2, functions 1 and 2 in the figure) are placed on the deployment machine. For target server 1, only driver 1 and function 1 need to be deployed. For target server 2, only driver 2 and function 2 need to be deployed. In the existing technology, drivers 1 and 2, as well as functions 1 and 2, are deployed on both target servers 1 and 2.

[0039] At the same time, when there is a new unsupported business (hardware or function), the present invention directly obtains the corresponding incremental patch based on the unsupported business, and can adapt to the business without the need to re-make the bare metal image in the existing technology, thereby significantly improving deployment efficiency and shortening delivery time.

[0040] In one embodiment, the configuration information of the above-mentioned business configuration includes node type, node function and hardware information. Special hardware information can be clearly specified in the configuration file, such as RAID card information, special storage device information, etc., which is used to install necessary drivers on the PXE environment in subsequent processes.

[0041] On this basis, the process of installing the corresponding incremental patch according to the service configuration required by the target node in the above method includes:

[0042] If the node type and node functions required by the target node do not exist in the bare metal base image, install the incremental patches corresponding to the required node type and node functions.

[0043] When the target node requires hardware that is not included in the bare metal base image, install the incremental patch corresponding to the required hardware.

[0044] In one embodiment, before the target node installs the bare metal base image, the above method also includes the following "necessary disk-down" process: the target node loads the system installation software and the required business configuration file, and obtains the corresponding configuration information according to the business configuration file.

[0045] The execution process of loading the system installation software and the required service configuration files on the target node is as follows: start the target node, load the operating system kernel, initramfs image, rootfs image, installation program, and service configuration files from the deployment end, start the kernel, and complete the network configuration.

[0046] In one embodiment, the process of installing the bare metal base image on the target node in the above method includes: after writing the bare metal base image to the installation area (system disk) of the target node, deploying basic components and functions. Adjusting the boot order of the bare metal base image to the highest level (the boot management tool adjusts the boot order of the system disk). It should be noted that the disk write operation is premised on the system being able to identify the current hard disk or disk array. For example, if the current server contains a RAID card driver that is not supported by the PXE image, the corresponding driver will be downloaded, installed, and loaded from the deployment machine. After the system recognizes the system disk, the disk write operation is performed.

[0047] In one embodiment, after installing the bare metal base image on the target node, the above method also includes the following steps before installing the corresponding incremental patch according to the business configuration required by the target node: configuring the target node according to the configuration information obtained from the business configuration file, such as network configuration, hostname configuration, machined-id configuration, etc.

[0048] In one embodiment, the process of installing the corresponding incremental patch according to the service configuration required by the target node in the above method includes: after obtaining the installation software of the incremental patch, mounting and installing it in the installation area of the target node.

[0049] After installing the corresponding incremental patch according to the service configuration required by the target node in the above method, the following steps are further included: generating a temporary file system in the memory.

[0050] See below Figure 2 As shown, the execution process of the above method is described through a specific embodiment.

[0051] Deployment Phase 1: Basic deployment, including:

[0052] 1. Start the target server, boot from PXE, load the operating system kernel, initramfs image, rootfs image, installation program and configuration files, then start the kernel and complete the network configuration;

[0053] 2. Read the configuration file to identify the deployed node type, node function, and other information. At the same time, special hardware information can be clearly specified in the configuration file, such as RAID card information and special storage device information, which is used to install the necessary drivers in the PXE environment in the subsequent process.

[0054] 3. Collect hardware information to provide information for subsequent adaptive deployment;

[0055] 4. Write the bare metal base image to the target system disk and deploy basic components and functions. At the same time, use the startup management tool to adjust the system disk boot order to the highest level. It is worth noting that the disk write operation is premised on the system being able to identify the current hard disk or disk array. For example, if the current server has a RAID card driver that is not supported by the PXE image, the corresponding driver will be downloaded and installed from the deployment machine and loaded. After the system recognizes the system disk, the disk write operation will be performed.

[0056] 5. Configure the node based on the configuration information obtained from the configuration file, such as network configuration, hostname configuration, machined-id configuration, etc.; this completes the first phase of deployment.

[0057] Deployment Phase 2: Adaptive incremental deployment, including:

[0058] 6. Determine whether incremental deployment is required.

[0059] Based on the node type and function information read from the configuration in step 2, if the function set of the base image in step 4 is exceeded, incremental deployment is required, and a list of incremental functions is obtained at the same time;

[0060] Based on the hardware information collected in step 3, if the base image driver set exceeds that in step 4, incremental deployment is required and the incremental driver list is obtained. Otherwise, the incremental deployment process is skipped.

[0061] 7. Download the corresponding software packages from the deployment machine based on the incremental function list and incremental driver list obtained in step 6;

[0062] 8. Mount the system disk to a specific directory. In this step, you need to pay attention to the relative paths where each partition of the system disk is mounted.

[0063] 9. Perform incremental deployment. First, install the software to the system disk according to the incremental feature list obtained in step 6. Then, install the driver to the system disk according to the incremental driver list obtained in step 6. If incremental drivers are installed, initramfs will be regenerated. initramfs (Initial RAM Filesystem) is a temporary file system loaded into memory during the Linux system startup process. For example, if the system uses dnf for software management, use the --installroot command to specify the root directory.

[0064] 10. Deployment is complete, restart.

[0065] In a second aspect, an embodiment of the present application provides a bare metal adaptive incremental deployment device, which can be a personal computer (PC), a laptop, a server, or other device with data processing capabilities.

[0066] Reference Figure 3 , Figure 3 Schematic diagram of the hardware structure of the bare metal adaptive incremental deployment device involved in the embodiment of the present application. In the embodiment of the present application, the bare metal adaptive incremental deployment device may include a processor, a memory, a communication interface and a communication bus.

[0067] The communication bus may be of any type and is used to interconnect the processor, memory, and communication interface.

[0068] Communication interfaces include input / output (I / O), physical, and logical interfaces, which interconnect components within the bare-metal adaptive incremental deployment device and connect the bare-metal adaptive incremental deployment device to other devices (such as other computing devices or user devices). Physical interfaces can be Ethernet, fiber, or ATM interfaces; user devices can be displays or keyboards.

[0069] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0070] The processor may be a general-purpose processor, which may call the bare metal adaptive incremental deployment program stored in the memory and execute the bare metal adaptive incremental deployment method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the bare metal adaptive incremental deployment program is called may refer to the various embodiments of the bare metal adaptive incremental deployment method of the present application, which will not be repeated here.

[0071] Those skilled in the art will understand that Figure 3 The hardware structure shown in the figure does not constitute a limitation to the present application and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0072] In a third aspect, an embodiment of the present application also provides a computer-readable storage medium.

[0073] The computer-readable storage medium of the present application stores a bare metal adaptive incremental deployment program, wherein when the bare metal adaptive incremental deployment program is executed by a processor, the steps of the bare metal adaptive incremental deployment method as described above are implemented.

[0074] Among them, the method implemented when the bare metal adaptive incremental deployment program is executed can refer to the various embodiments of the bare metal adaptive incremental deployment method of this application, and will not be repeated here.

[0075] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device to execute the methods described in each embodiment of the present application.

[0077] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit the "first", "second" and "third" to different types.

[0078] In the description of the embodiments of this application, the words "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary," "for example," or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.

[0079] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0080] In some processes described in the embodiments of the present application, multiple operations or steps are included that appear in a specific order. However, it should be understood that these operations or steps may not be performed in the order in which they appear in the embodiments of the present application or may be performed in parallel. The sequence numbers of the operations are only used to distinguish between different operations, and the sequence numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations or steps may be performed in sequence or in parallel, and these operations or steps may be combined.

[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device to execute the methods described in each embodiment of the present application.

[0082] The above are only specific implementations of the embodiments of the present invention, but the scope of protection of the embodiments of the present invention is not limited to them. Any person skilled in the art can easily conceive of various equivalent modifications or replacements within the technical scope disclosed in the embodiments of the present invention, and such modifications or replacements should be included in the scope of protection of the embodiments of the present invention. Therefore, the scope of protection of the embodiments of the present invention should be based on the scope of protection of the claims.

Claims

1. A bare metal adaptive incremental deployment method, characterized in that: The method includes the following steps: determining the business configuration that needs to be deployed, forming a bare metal base image based on the general configuration required for each business, and forming corresponding incremental patches for business configurations other than the general configuration; after the target node installs the bare metal base image, installing the corresponding incremental patch based on the business configuration required by the target node.

2. The bare metal adaptive incremental deployment method according to claim 1, characterized in that: The configuration information of the service configuration includes node type, node function and hardware information; the process of installing the corresponding incremental patch according to the service configuration required by the target node includes: If the node type and node functions required by the target node do not exist in the bare metal base image, install the incremental patches corresponding to the required node type and node functions. When the target node requires hardware that is not included in the bare metal base image, install the incremental patch corresponding to the required hardware.

3. The bare metal adaptive incremental deployment method according to claim 1, wherein: Before the target node installs the bare metal base image, the following process is also included: The target node loads the system installation software and the required service configuration files, and obtains the corresponding configuration information from the service configuration files.

4. The bare metal adaptive incremental deployment method according to claim 3, characterized in that: The execution process of the target node loading the system installation software and the required business configuration files includes: starting the target node, loading the operating system kernel, initramfs image, rootfs image, installation program and business configuration files from the deployment end, starting the kernel and completing network configuration.

5. The bare metal adaptive incremental deployment method according to claim 1, wherein: The process of installing the bare metal base image on the target node includes: after writing the bare metal base image to the installation area of the target node, adjusting the startup order of the bare metal base image to the highest.

6. The bare metal adaptive incremental deployment method according to claim 1, wherein: After the target node is installed with the bare metal base image, before the corresponding incremental patch is installed according to the business configuration required by the target node, the following steps are also included: configuring the target node according to the business configuration information.

7. The bare metal adaptive incremental deployment method according to claim 1, characterized in that: The process of installing the corresponding incremental patch according to the service configuration required by the target node includes: after obtaining the installation software of the incremental patch, mounting and installing it to the installation area of the target node.

8. The bare metal adaptive incremental deployment method according to claim 1, characterized in that: After installing the corresponding incremental patch according to the service configuration required by the target node, the method further includes the following steps: generating a temporary file system in the memory.

9. A bare metal adaptive incremental deployment device, characterized in that: The bare metal adaptive incremental deployment device includes a processor, a memory, and a bare metal adaptive incremental deployment program stored on the memory and executable by the processor, wherein when the bare metal adaptive incremental deployment program is executed by the processor, the steps of the bare metal adaptive incremental deployment method as described in any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a bare metal adaptive incremental deployment program, wherein when the bare metal adaptive incremental deployment program is executed, the steps of the bare metal adaptive incremental deployment method according to any one of claims 1 to 8 are implemented.