Batch deployment system, method and device of operating system, electronic equipment and medium
By grouping nodes in large-scale server deployments and utilizing leading nodes to provide installation resources for subsequent nodes, the problems of resource waste and inefficiency in PXE technology are solved, achieving more efficient resource utilization and installation efficiency, and adapting to the installation needs of different versions and quantities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-04-14
AI Technical Summary
In large-scale server deployment scenarios, existing PXE technology leads to resource waste and inefficiency, uneven network load, and a sharp increase in computing and I/O pressure, resulting in response delays and service interruptions. Furthermore, the download of RPM packages in modern Linux distributions consumes a large amount of network bandwidth and requires repetitive verification and installation operations.
The nodes to be installed are divided into multiple installation groups. Each group includes one leading node and at least two subsequent nodes. The leading node provides installation resources for the subsequent nodes when it is ready. Through collaborative download and verification, redundant transmission and single point overload are avoided, and resource reuse is achieved.
It improved resource utilization and deployment efficiency, reduced the burden on central nodes, shortened the overall installation time, optimized network traffic distribution, enhanced system flexibility and scalability, and reduced hardware costs and resource waste.
Smart Images

Figure CN121864590A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of batch deployment of operating systems, and specifically relates to a batch deployment system, method, apparatus, electronic device and medium for operating systems. Background Technology
[0002] In current large-scale server deployment scenarios, Preboot Execution Environment (PXE) technology is typically used to perform batch network installation of the operating system. The PXE server acts as a central node, providing all installation resources such as the operating system image and RPM packages, and distributing these resources to each server to be installed via the network.
[0003] However, this method suffers from resource waste and inefficiency. Specifically, during the installation process, all servers to be installed directly download the complete installation resources from the PXE server, resulting in high contention for the downlink bandwidth of the installation source server. Meanwhile, many clients only need to upload a small amount of requests or log data, causing a severe imbalance in the uplink and downlink network load. As the number of concurrent installation nodes increases, the network, computing, and I / O pressure on the PXE server rises sharply, easily leading to response delays or even service interruptions, significantly reducing overall installation efficiency. In addition, the total amount of RPM packages required for installation in modern Linux distributions is close to or even exceeds 1GB, and the download process consumes a large amount of network bandwidth. Furthermore, each target machine needs to independently perform integrity verification, local temporary storage, and unpacking and installation operations after downloading. These repetitive steps are repeatedly executed on multiple machines, not only wasting storage space and computing resources but also further exacerbating the overall resource consumption and deployment time of the system. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a batch deployment system, method, apparatus, electronic device and medium for an operating system that overcomes or at least partially solves the above problems.
[0005] In a first aspect, embodiments of the present invention provide a batch deployment system for an operating system, the batch deployment system including a central deployment node and multiple nodes to be installed; the multiple nodes to be installed are divided into multiple installation groups, each installation group including one preceding node and at least two subsequent nodes; The central deployment node starts the advance node for each of the installation groups; The leading node is guided by the first PXE service provided by the central deployment node, enters a memory-based temporary running environment, starts a resource distribution service in the temporary running environment, and sends ready status information to the central deployment node; wherein, the resource distribution service is used to provide installation resources to the subsequent nodes in the same group; The advance node downloads the operating system installation package from the central deployment node; After receiving the ready status information sent by the advance node, the central deployment node starts each subsequent node in the same group as the advance node. The central deployment node sends a resource allocation table to each subsequent node; the resource allocation table indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should obtain; The subsequent node connects to the preceding node in the same group according to the resource allocation table, and is guided by the second PXE service provided by the preceding node to enter a memory-based temporary running environment, and completes network configuration in the temporary running environment; The subsequent nodes obtain a partial subset of the operating system installation package from the preceding nodes and the remaining partial subset of the operating system installation package from other subsequent nodes according to the resource allocation table, so as to obtain a complete operating system installation package. The preceding node and each subsequent node use the operating system installation package to install the operating system; The subsequent node performs integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and sends the verification result to the preceding node; The advance node confirms the deployment status of the installation group corresponding to the advance node based on the verification result.
[0006] Optionally, the subsequent node performs integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and sends the verification result to the corresponding other subsequent nodes; The other subsequent nodes send the verification results to the preceding node.
[0007] Optionally, when the leading node confirms, based on the verification result, that the operating system installation packages of each subsequent node have passed the integrity verification, it determines that the installation group corresponding to the leading node has been successfully deployed.
[0008] Optionally, the advance node boots based on the first PXE service provided by the central deployment node, downloads the kernel and initial memory file system, and completes the startup of the initial memory file system based on the kernel to enter a memory-based temporary running environment.
[0009] Optionally, after entering a memory-based temporary operating environment, the subsequent node enables a resource distribution service in the temporary operating environment to provide a subset of the acquired operating system installation package to other subsequent nodes.
[0010] Secondly, embodiments of the present invention provide a batch deployment method for an operating system, applied to advance nodes in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group including one advance node and at least two subsequent nodes, the method comprising: Based on the first PXE service provided by the central deployment node, the system enters a memory-based temporary running environment. In this temporary running environment, a resource distribution service is started, and ready status information is sent to the central deployment node. The resource distribution service is used to provide installation resources to the subsequent nodes in the same group. Download the operating system installation package from the central deployment node; A second PXE service is started to bootstrap subsequent nodes in the same group, so that the subsequent nodes are booted by the second PXE service provided by the preceding node, enter a memory-based temporary running environment, and complete network configuration in the temporary running environment; Responding to the subsequent node's request to obtain a subset of the operating system installation package, and sending the subset to the subsequent node; Install the operating system using the aforementioned operating system installation package; Receive the verification result sent by the subsequent node; the verification result is the verification result obtained by the subsequent node through integrity verification of the remaining subset of the operating system installation package obtained from other subsequent nodes; Based on the verification results, the deployment status of the installation group corresponding to the advance node is confirmed.
[0011] Optionally, confirming the deployment status of the installation group corresponding to the advance node based on the verification result includes: When the verification results confirm that the operating system installation packages of each subsequent node have passed the integrity verification, the installation group corresponding to the preceding node is determined to have been successfully deployed.
[0012] Optionally, the booting from the first PXE service provided by the central deployment node into the memory-based temporary runtime environment includes: Based on the first PXE service provided by the central deployment node, the kernel and initial memory file system are downloaded; The kernel is used to start the initial memory file system, thereby entering a temporary memory-based running environment.
[0013] Thirdly, embodiments of the present invention provide a batch deployment method for an operating system, applied to subsequent nodes in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group including one preceding node and at least two subsequent nodes, the method comprising: The resource allocation table sent by the receiving center deployment node indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should acquire. Connect to the preceding nodes in the same group according to the resource allocation table, and boot from the second PXE service provided by the preceding nodes to enter a memory-based temporary running environment, and complete network configuration in the temporary running environment; According to the resource allocation table, a partial subset of the operating system installation package is obtained from the preceding nodes, and the remaining partial subset of the operating system installation package is obtained from other subsequent nodes to obtain a complete operating system installation package; Install the operating system using the aforementioned operating system installation package; The remaining subset of the operating system installation package obtained from other subsequent nodes is subjected to integrity verification, and the verification result is sent to the preceding node.
[0014] Optionally, the step of performing integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes and sending the verification result to the preceding node includes: The remaining subset of the operating system installation package obtained from other subsequent nodes is subjected to integrity verification, and the verification result is sent to the corresponding other subsequent nodes. The other subsequent nodes send the verification results to the preceding node.
[0015] Optionally, after entering a memory-based temporary runtime environment, a resource distribution service is enabled in the temporary runtime environment to provide a subset of the acquired operating system installation package to other subsequent nodes.
[0016] Fourthly, embodiments of the present invention provide a batch deployment apparatus for an operating system, applied to advance nodes in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group including one advance node and at least two subsequent nodes, the apparatus comprising: The readiness status sending module is used to boot from the first PXE service provided by the central deployment node, enter a memory-based temporary running environment, start a resource distribution service in the temporary running environment, and send readiness status information to the central deployment node; wherein, the resource distribution service is used to provide installation resources to the subsequent nodes in the same group; The installation package download module is used to download the operating system installation package from the central deployment node. The second PXE service startup module is used to start the second PXE service for bootstrapping subsequent nodes in the same group, so that the subsequent nodes are booted by the second PXE service provided by the preceding node, enter a memory-based temporary running environment, and complete network configuration in the temporary running environment; The request and response module is used to respond to the subsequent node's request to obtain a partial subset of the operating system installation package, and to send the partial subset to the subsequent node; The first installation module is used to install the operating system using the operating system installation package; The verification result receiving module is used to receive the verification result sent by the subsequent node; the verification result is the verification result obtained by the subsequent node through integrity verification of the remaining subset of the operating system installation package obtained from other subsequent nodes. The deployment status confirmation module is used to confirm the deployment status of the installation group corresponding to the advance node based on the verification result.
[0017] Fifthly, embodiments of the present invention provide a batch deployment apparatus for an operating system, applied to subsequent nodes in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group including one preceding node and at least two subsequent nodes, and the apparatus includes: The resource allocation table receiving module is used to receive the resource allocation table sent by the central deployment node; the resource allocation table indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should obtain; The network configuration module is used to connect to the preceding nodes in the same group according to the resource allocation table, and to boot into a memory-based temporary running environment based on the second PXE service provided by the preceding nodes, and to complete the network configuration in the temporary running environment. A subset acquisition module is used to obtain a subset of the operating system installation package from the preceding nodes and the remaining subset of the operating system installation package from other subsequent nodes according to the resource allocation table, so as to obtain a complete operating system installation package. The second installation module is used to install the operating system using the operating system installation package; The verification module is used to perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and send the verification result to the preceding node.
[0018] In a sixth aspect, embodiments of the present invention provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0019] In a seventh aspect, embodiments of the present invention provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0020] This invention discloses a batch deployment system for an operating system. The system includes a central deployment node and multiple nodes to be installed. These nodes are divided into multiple installation groups, each including one leading node and at least two subsequent nodes. The central deployment node starts the leading node in each installation group. The leading nodes are booted based on a first PXE service provided by the central deployment node, entering a memory-based temporary runtime environment. In this environment, they start a resource distribution service and send ready status information to the central deployment node. The resource distribution service provides installation resources to the subsequent nodes in the same group. The leading nodes download the operating system installation package from the central deployment node. After receiving the ready status information from the leading nodes, the central deployment node starts each subsequent node in the same group. The central deployment node sends a resource allocation table to each subsequent node. The resource allocation table indicates the leading nodes in each subsequent node's group and a subset of the operating system installation package that each subsequent node should acquire. The subsequent nodes connect to the leading nodes in their group according to the resource allocation table. Based on the second PXE service provided by the leading node, the system enters a memory-based temporary runtime environment and completes network configuration within this environment. Subsequent nodes, according to the resource allocation table, obtain a subset of the operating system installation package from the leading node and the remaining subset from other subsequent nodes to obtain the complete operating system installation package. The leading node and all subsequent nodes use the operating system installation package to install the operating system. Subsequent nodes perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes and send the verification result to the leading node. Based on the verification result, the leading node confirms the deployment status of the installation group corresponding to it. By transforming the leading node into a resource node after reaching the ready state to provide installation resources for subsequent nodes, and by enabling collaborative downloading and verification among subsequent nodes, redundant transmission and single-point overload are effectively avoided, thereby improving resource utilization and deployment efficiency. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of a batch deployment system for an operating system according to an embodiment of the present invention; Figure 2This is a flowchart illustrating the steps of a batch deployment method for an operating system according to an embodiment of the present invention. Figure 3 This is a flowchart illustrating the steps of another method for batch deployment of an operating system according to an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of a batch deployment device for an operating system according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of another operating system batch deployment device according to an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] In current large-scale server deployment scenarios, PXE technology is typically used for batch network installation of operating systems. The PXE server acts as a central node, providing all installation resources, including operating system images and RPM packages, and distributing these resources to each server to be installed via the network.
[0024] However, this method suffers from resource waste and inefficiency. Specifically, during the installation process, all servers to be installed directly download the complete installation resources from the PXE server, resulting in high contention for the downlink bandwidth of the installation source server. Meanwhile, many clients only need to upload a small amount of requests or log data, causing a severe imbalance in the uplink and downlink network load. As the number of concurrent installation nodes increases, the network, computing, and I / O pressure on the PXE server rises sharply, easily leading to response delays or even service interruptions, significantly reducing overall installation efficiency. In addition, the total amount of RPM packages required for installation in modern Linux distributions is close to or even exceeds 1GB, and the download process consumes a large amount of network bandwidth. Furthermore, each target machine needs to independently perform integrity verification, local temporary storage, and unpacking and installation operations after downloading. These repetitive steps are repeatedly executed on multiple machines, not only wasting storage space and computing resources but also further exacerbating the overall resource consumption and deployment time of the system.
[0025] One of the core concepts of this invention is that by transforming a leading node into a resource node after it is in a ready state, it provides installation resources for subsequent nodes, and the subsequent nodes cooperate in downloading and verification. This effectively avoids redundant transmission and single point overload, thereby improving resource utilization and deployment efficiency.
[0026] Reference Figure 1The diagram illustrates a batch deployment system for an operating system according to an embodiment of the present invention. The batch deployment system includes a central deployment node and multiple nodes to be installed. The multiple nodes to be installed are divided into multiple installation groups, and each installation group includes one preceding node and at least two subsequent nodes.
[0027] The central deployment node can be a PXE server, which acts as a coordination and control center. The nodes to be installed are the machines for which the operating system needs to be deployed. The PXE server can group the machines and pre-assign IP addresses based on their type, the version and number of systems to be installed, and a specific policy. The policy can be based on the machine architecture and the version of the system to be installed. For example, machines with the same architecture and version to be installed can be grouped into a large group, and then further divided into smaller groups (installation groups). For instance, the preceding node B, subsequent node C, and subsequent node D form one installation group.
[0028] The central deployment node starts the advance node for each installation group.
[0029] The PXE server is configured with DHCP / TFTP services, has the ability to control the power of all installed nodes, and is responsible for initializing the installation process, overall planning of the installation task, and orderly startup of machines. The client can also act as a data source. The PXE server first starts the leading node in each installation group.
[0030] The leading node is booted by the first PXE service provided by the central deployment node and enters a memory-based temporary running environment. In the temporary running environment, it starts the resource distribution service and sends ready status information to the central deployment node. The resource distribution service is used to provide installation resources to subsequent nodes in the same group.
[0031] After the lead node B completes the ramfs startup, which is to say, after setting up a temporary memory-based running environment, and after starting the TFTP, HTTP and network services, it can become a resource node and send ready status information to the central deployment node A.
[0032] The advance node B reports its readiness status to the central deployment node A through data download and status feedback path 1, and downloads the operating system installation package from the central deployment node A. The operating system installation package is an RPM package.
[0033] After receiving the ready status information sent by the preceding node, the central deployment node starts all subsequent nodes in the same group as the preceding node B.
[0034] The central deployment node sends a resource allocation table to each subsequent node; the resource allocation table indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should obtain.
[0035] For example, after the central deployment node A hears the ready signal of the preceding node B, it starts the subsequent nodes C and D and sends the resource allocation table to the subsequent nodes C and D.
[0036] Subsequent nodes connect to the preceding nodes in the same group according to the resource allocation table, and are guided by the second PXE service provided by the preceding nodes to enter a memory-based temporary running environment, where they complete network configuration.
[0037] Subsequent nodes obtain a subset of the operating system installation package from the preceding nodes and the remaining subset from other subsequent nodes based on the resource allocation table, in order to obtain the complete operating system installation package.
[0038] The resource allocation table can include the IP addresses for resource acquisition during PXE installation and a list of RPM package download allocations. This table instructs subsequent nodes from which nodes to obtain the bootloader, kernel, initramfs, RPM packages, etc., required for startup and installation. For example, if the RPM package consists of 10 packages, subsequent node C obtains the first 1-5 packages from preceding node B according to the resource allocation table. Subsequent node D obtains the last 6-10 packages from preceding node B according to the resource allocation table. Then, subsequent node C obtains the last 6-10 packages from subsequent node D, and subsequent node D then obtains the first 1-5 packages from subsequent node C. In this way, subsequent nodes C and D collaboratively download the complete RPM package.
[0039] The lead node and each subsequent node install the operating system using the operating system installation package. For example, lead node B, subsequent node C, and subsequent node D, after downloading the complete RPM package, each install the operating system using the RPM package.
[0040] Subsequent nodes perform integrity checks on the remaining subset of the operating system installation package obtained from other subsequent nodes and send the check results to the preceding nodes.
[0041] For example, subsequent node C performs integrity verification on the last 6-10 packets obtained from subsequent node D. If subsequent node C passes the verification, since subsequent node C obtains the packets from subsequent node D, and subsequent node D obtains the packets from preceding node B, it means that the integrity of the last 6-10 packets from both subsequent node D and preceding node B has also passed. The preceding and following nodes perform packet downloading, forwarding, integrity verification and confirmation, and packet installation almost simultaneously.
[0042] Based on the verification results, the lead node B confirms the deployment status of the installation group corresponding to the lead node B.
[0043] This invention discloses a batch deployment system for an operating system. The system includes a central deployment node and multiple nodes to be installed. These nodes are divided into multiple installation groups, each including one leading node and at least two subsequent nodes. The central deployment node starts the leading node in each installation group. The leading nodes are booted based on a first PXE service provided by the central deployment node, entering a memory-based temporary runtime environment. In this environment, they start a resource distribution service and send ready status information to the central deployment node. The resource distribution service provides installation resources to the subsequent nodes in the same group. The leading nodes download the operating system installation package from the central deployment node. After receiving the ready status information from the leading nodes, the central deployment node starts each subsequent node in the same group. The central deployment node sends a resource allocation table to each subsequent node. The resource allocation table indicates the leading nodes in each subsequent node's group and a subset of the operating system installation package that each subsequent node should acquire. The subsequent nodes connect to the leading nodes in their group according to the resource allocation table. Based on the second PXE service provided by the leading node, the system enters a memory-based temporary runtime environment and completes network configuration within this environment. Subsequent nodes, according to the resource allocation table, obtain a subset of the operating system installation package from the leading node and the remaining subset from other subsequent nodes to obtain the complete operating system installation package. The leading node and all subsequent nodes use the operating system installation package to install the operating system. Subsequent nodes perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes and send the verification result to the leading node. Based on the verification result, the leading node confirms the deployment status of the installation group corresponding to it. By transforming the leading node into a resource node after reaching the ready state to provide installation resources for subsequent nodes, and by enabling collaborative downloading and verification among subsequent nodes, redundant transmission and single-point overload are effectively avoided, thereby improving resource utilization and deployment efficiency.
[0044] In this embodiment of the invention, subsequent nodes perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and send the verification results to the corresponding other subsequent nodes; other subsequent nodes send the verification results to the preceding nodes.
[0045] For example, subsequent node C obtains the last 5-10 packets from subsequent node D, performs integrity verification on the last 5-10 packets, and sends the verification result to subsequent node D. Subsequent node D then sends the verification result to preceding node B.
[0046] In this embodiment of the invention, when the leading node confirms that the operating system installation packages of each subsequent node have passed the integrity verification based on the verification results, it determines that the installation group corresponding to the leading node has been successfully deployed.
[0047] After receiving the integrity verification result, the preceding node marks the corresponding RPM packet. If the integrity verification of the subsequent node fails, the preceding node needs to complete the integrity verification of the RPM packet. For example, it aggregates the verification bitmap of all subsequent nodes, marks the global RPM status (valid / invalid / pending confirmation), and performs local re-verification and re-forwards the RPM packets that report failure.
[0048] In this embodiment of the invention, the advance node is booted based on the first PXE service provided by the central deployment node, downloads the kernel and the initial memory file system, and completes the startup of the initial memory file system based on the kernel to enter the memory-based temporary running environment.
[0049] The lead node uses PXE to boot and download the kernel and initramfs (initial memory file system). After ramfs boots, it activates local resource services (HTTP / FTP) and sends a readiness message to the central deployment node.
[0050] In this embodiment of the invention, after a subsequent node enters a memory-based temporary operating environment, it enables a resource distribution service in the temporary operating environment to provide a subset of the acquired operating system installation packages to other subsequent nodes.
[0051] The resource distribution service can be an HTTP / FTP service used to provide a subset of the acquired operating system installation packages to other subsequent nodes.
[0052] This invention enables the reuse of node resources, effectively reducing the burden on the central node's PXE server and avoiding the problem of decreased installation efficiency as the number of servers to be installed increases. Before installation, based on the overall goals of the installation, a comprehensive grouping plan is made, allowing the system to adapt to different version installation requirements, different types and numbers of target servers, and to formulate effective strategies to avoid uneven resource allocation leading to prolonged installation time and reduced efficiency. Once the installation node has started in ramfs, it can become a resource-providing node, achieving the effect of pre-installation and subsequent nodes downloading and installing the installation package almost simultaneously without using unnecessary network, computing, and storage resources. Subsequent nodes complete the RPM package integrity verification, saving pre-installation nodes RPM package verification time. Simultaneously, multiple subsequent nodes can share the RPM package integrity verification results. This significantly reduces the overall time and resources spent on RPM package integrity verification. Compared to traditional network batch installation, the central node bandwidth can be reduced by 60%, and the overall installation time can be shortened by at least 50%.
[0053] In this embodiment of the invention, the system preparation phase can be divided into hardware and software environments. The hardware environment includes, for example, one high-performance server as the central deployment node (PXE Server), equipped with dual network cards (management network / data network), supporting IPMI remote power management; N bare-metal servers to be installed (target nodes), supporting PXE network boot; and a network of gigabit / 10-gigabit switches. The software environment includes, for example, CTyunOS installed on the central node, and the deployment of dhcpd, tftpd-hpa, and nginx services. A pre-prepared Kickstart unattended installation configuration file is provided. RPM package signing key pairs are generated using GPG.
[0054] Then, a tree topology is constructed, establishing a tree-like installation and triangular integrity verification link. The PXE server is responsible for initializing the installation process, overall planning the installation tasks, and orderly starting tasks on target machines. Simultaneously, the client can also act as a data source. Specifically, a PXE server is deployed as the central node, configured with DHCP / TFTP services, and possesses power control capabilities for all installed nodes. The tree topology is designed, the central node orchestrates the startup order of all machines, initializes the task scheduling module, and generates a machine startup dependency graph. For example: the central node loads the topology configuration file (JSON format): { "root": "node0", "topology": { "node0": ["node1", "node2"], "node1": ["node3", "node4"], "node2": ["node5", "node6"] } } Remotely control the power-on sequence of the target node using ipmitool: ipmitool -H<BMC_IP> -U admin -P password power on Next, the resource node is dynamically activated. After the lead node has fully booted the ramfs and completed the startup of TFTP, HTTP, and network services, it can become a resource node and send ready status information to the central node. Specifically, the lead node loads the kernel and initramfs via PXE bootloader, activates local resource services (HTTP / FTP) after ramfs boot, and sends ready status information to the central node. Example: Target node (e.g., node1) boot process: a) Load the kernel vmlinuz and initramfs via PXE, and start a lightweight HTTP service in initramfs (using busybox httpd): bash busybox httpd -p 8080 -h / mnt / rpm_cache b) Send a ready signal to the central node: bash curl -X POST http: / / pxe-server / status-d '{"node":"node1","status":"ready"}' Next, the central node coordinates and guides subsequent nodes. After receiving the readiness information from the preceding node, it can start the two subsequent nodes of the preceding node and designate the preceding node as the resource service node for the two subsequent nodes. After starting, the subsequent nodes obtain the ramfs from the preceding node and complete the ramfs startup. For example, the subsequent nodes connect to the designated preceding node according to the resource allocation table sent by the central node, download the ramfs image from the preceding node via the TFTP protocol, verify the ramfs signature, load it into memory and start it, and obtain RPM packages from the preceding node and the corresponding subsequent nodes according to the package list and download path specified in the resource allocation table. For example: after the central node receives the readiness of node1, it wakes up its successor nodes node3 and node4 and sends the resource allocation table to node3. { "resource_nodes": [ {"ip": "192.168.1.101", "protocol": "http", "port": 8080} ], "ramfs_url": "http: / / 192.168.1.101:8080 / initramfs.img" } node3 loads the verified ramfs and starts by downloading initramfs.img from node1 via HTTP (instead of traditional TFTP).
[0055] Then perform RPM packet verification chain, for example, a) node3's packet acquisition strategy: if rpm in local_cache: install_local(rpm) elif rpm in peer_nodes:# Get from peer nodes download_from_peer(rpm) verify_signature(rpm) # GPG verification report_status_to_center(rpm, "valid") else: forward_to_successors(rpm) # Forward to successor nodes b) Verification results are aggregated, and the central node maintains a global RPM status bitmap, as shown below: RPM Name node3 node4 Status kernel 10 glibc 01 Finally, for concurrent installation optimization, the node starts the installation thread while downloading the RPM: bash `yum -y install --downloadonly --installroot= / mnt / sysroot *.rpm` downloads files in the background. `yum -y install --skip-broken *.rpm` # Install in the foreground Once node3 completes the OS installation, it immediately activates its HTTP service to provide resources for node7 and node8, forming a new installation unit.
[0056] This invention improves installation efficiency by reusing resources from already installed devices, reducing the burden on the PXE server. Furthermore, compared to existing methods that prioritize resource sharing after ramfs startup but before successful installation, and rely on multiple machines to collaboratively perform time-consuming RPM package integrity checks, this significantly enhances installation efficiency, making the process more efficient, especially in large-scale device installation scenarios. It also enhances system flexibility and scalability: the entire installation architecture boasts excellent scalability and flexibility, adapting to the installation needs of devices of different sizes and types. Dynamic addition and removal of resource-providing nodes allow the system to automatically adjust resource allocation strategies based on actual conditions without manual intervention, improving system intelligence. This invention is applicable to both small LAN device installations and large-scale data center batch deployments, and can automatically optimize resource scheduling based on the increase or decrease in the number of devices. Finally, it reduces hardware requirements and costs: due to the resource reuse mechanism, the hardware performance requirements of the PXE server are relatively reduced, avoiding installation delays or failures caused by server performance bottlenecks. When enterprises or organizations deploy large-scale equipment, they do not need to purchase high-performance PXE servers, thereby reducing hardware procurement and maintenance costs. It also reduces additional costs associated with hardware upgrades, resulting in significant economic benefits. Furthermore, it improves resource utilization by fully utilizing the idle resources of already installed equipment, avoiding waste and maximizing resource utilization. In traditional installation methods, the stored installation resources of installed equipment are often idle after installation. In this invention, these resources are reused to support other devices awaiting installation, improving resource utilization across the entire network environment and aligning with the principles of green computing and sustainable development. Finally, it optimizes network traffic distribution by allocating resource requests among multiple resource-providing nodes, preventing excessive concentration of network traffic on the PXE server, thus optimizing network traffic distribution, reducing the likelihood of network congestion, and improving network stability and reliability. During large-scale equipment installation, the rational distribution of network traffic is crucial for ensuring installation speed and quality. This distributed resource provision method effectively alleviates network pressure and ensures a smooth installation process.
[0057] Reference Figure 2 The diagram illustrates a step-by-step flowchart of a batch deployment method for an operating system, applied to advance nodes in an installation group. Multiple nodes to be installed are divided into multiple installation groups, each including one advance node and at least two subsequent nodes. Specifically, the method may include the following steps: Step 101: Based on the first PXE service provided by the central deployment node, enter the memory-based temporary running environment, start the resource distribution service in the temporary running environment, and send ready status information to the central deployment node; wherein, the resource distribution service is used to provide installation resources to subsequent nodes in the same group.
[0058] Step 102: Download the operating system installation package from the central deployment node.
[0059] Step 103: Start the second PXE service to bootstrap subsequent nodes in the same group, so that subsequent nodes are booted by the second PXE service provided by the preceding node, enter the memory-based temporary running environment, and complete the network configuration in the temporary running environment.
[0060] Step 104: Respond to subsequent nodes' requests to obtain a subset of the operating system installation package, and send the subset to the subsequent nodes.
[0061] Step 105: Install the operating system using the operating system installation package.
[0062] Step 106: Receive the verification result sent by the subsequent node; the verification result is the result obtained by the subsequent node performing integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes.
[0063] Step 107: Based on the verification results, confirm the deployment status of the installation group corresponding to the advance node.
[0064] In this embodiment of the invention, step 107 may include the following sub-steps: When the verification results confirm that the operating system installation packages of each subsequent node have passed the integrity verification, the installation group corresponding to the preceding node is considered to have been successfully deployed.
[0065] In this embodiment of the invention, step 101 may include the following sub-steps: Booting from the first PXE service provided by the central deployment node, the kernel and initial memory file system are downloaded; The kernel completes the initial memory file system startup to enter a temporary memory-based running environment.
[0066] Reference Figure 3 This illustrates a flowchart of another method for batch deployment of an operating system, applied to subsequent nodes in an installation group. Multiple nodes to be installed are divided into multiple installation groups, each including one preceding node and at least two subsequent nodes. Specifically, it may include the following sub-steps: Step 201: Receive the resource allocation table sent by the central deployment node; the resource allocation table indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should obtain.
[0067] Step 202: Connect to the preceding nodes in the same group according to the resource allocation table, and boot from the second PXE service provided by the preceding nodes to enter the memory-based temporary running environment, and complete the network configuration in the temporary running environment.
[0068] Step 203: Based on the resource allocation table, obtain a partial subset of the operating system installation package from the preceding nodes and the remaining partial subset of the operating system installation package from other subsequent nodes to obtain the complete operating system installation package.
[0069] Step 204: Install the operating system using the operating system installation package.
[0070] Step 205: Perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and send the verification results to the preceding nodes.
[0071] In this embodiment of the invention, step 205 may include the following sub-steps: The remaining subset of the operating system installation package obtained from other subsequent nodes is subjected to integrity verification, and the verification result is sent to the corresponding other subsequent nodes. Other subsequent nodes send the verification results to the preceding nodes.
[0072] In this embodiment of the invention, after entering the memory-based temporary runtime environment, the method further includes: Enable resource distribution services in a temporary operating environment to provide a subset of the acquired operating system installation packages to other subsequent nodes.
[0073] Reference Figure 4 The diagram illustrates a structural schematic of a batch deployment apparatus for an operating system, applied to leading nodes in an installation group. Multiple nodes to be installed are divided into multiple installation groups, each including one leading node and at least two subsequent nodes. The apparatus includes: The readiness status sending module 301 is used to boot from the first PXE service provided by the central deployment node, enter a memory-based temporary running environment, start the resource distribution service in the temporary running environment, and send readiness status information to the central deployment node; wherein, the resource distribution service is used to provide installation resources to subsequent nodes in the same group.
[0074] The installation package download module 302 is used to download the operating system installation package from the central deployment node.
[0075] The second PXE service startup module 303 is used to start the second PXE service for bootstrapping subsequent nodes in the same group, so that the subsequent nodes are booted by the second PXE service provided by the preceding node, enter the memory-based temporary running environment, and complete the network configuration in the temporary running environment.
[0076] The request and response module 304 is used to respond to subsequent nodes' requests for a subset of the operating system installation package and to send the subset to the subsequent nodes.
[0077] The first installation module 305 is used to install an operating system using an operating system installation package.
[0078] The verification result receiving module 306 is used to receive the verification result sent by the subsequent node; the verification result is the verification result obtained by the subsequent node performing integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes.
[0079] The deployment status confirmation module 307 is used to confirm the deployment status of the installation group corresponding to the advance node based on the verification results.
[0080] In this embodiment of the invention, the deployment status confirmation module further includes: The deployment status confirmation submodule is used to determine that the installation group corresponding to the preceding node has been successfully deployed when the operating system installation packages of each subsequent node have passed the integrity verification based on the verification results.
[0081] In this embodiment of the invention, the ready state sending module 301 further includes: The kernel download submodule is used to boot from the first PXE service provided by the central deployment node, and download the kernel and initial memory file system. The temporary runtime environment entry submodule is used to complete the startup of the initial memory file system based on the kernel, so as to enter the memory-based temporary runtime environment.
[0082] Reference Figure 5 This diagram illustrates the structure of another batch deployment apparatus for an operating system, applied to subsequent nodes in an installation group. Multiple nodes to be installed are divided into multiple installation groups, each including one preceding node and at least two subsequent nodes. The apparatus includes: The resource allocation table receiving module 401 is used to receive the resource allocation table sent by the central deployment node; the resource allocation table indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should obtain.
[0083] The network configuration module 402 is used to connect to the preceding nodes in the same group according to the resource allocation table, and boot into a memory-based temporary running environment based on the second PXE service provided by the preceding nodes, and complete the network configuration in the temporary running environment.
[0084] The subset acquisition module 403 is used to obtain a subset of the operating system installation package from the preceding nodes and the remaining subset of the operating system installation package from other subsequent nodes according to the resource allocation table, so as to obtain the complete operating system installation package.
[0085] The second installation module 404 is used to install an operating system using an operating system installation package.
[0086] The verification module 405 is used to perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and send the verification results to the preceding nodes.
[0087] In this embodiment of the invention, the verification module further includes: The verification submodule is used to perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and send the verification result to the corresponding other subsequent nodes. The verification result sending submodule is used by the other subsequent nodes to send the verification result to the preceding node.
[0088] In this embodiment of the invention, the device further includes: The resource distribution service enablement submodule is used to enable the resource distribution service in the temporary operating environment to provide a subset of the acquired operating system installation package to other subsequent nodes.
[0089] This invention also provides an electronic device, comprising: It includes a processor, a memory, and a program stored in the memory and capable of running on the processor. When the program is executed by the processor, it implements the various processes of the above-described verification method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0090] It should be noted that the electronic devices in the embodiments of the present invention include the mobile electronic devices and non-mobile electronic devices described above.
[0091] This invention also provides a readable storage medium on which a program is stored. When the program is executed by a processor, it implements the various processes of the above-described verification method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0092] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0093] The terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0094] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of the present invention is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they 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 invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0096] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A batch deployment system for an operating system, characterized in that, The batch deployment system includes a central deployment node and multiple nodes to be installed; the multiple nodes to be installed are divided into multiple installation groups, and each installation group includes one preceding node and at least two subsequent nodes; The central deployment node starts the advance node for each of the installation groups; The leading node is guided by the first PXE service provided by the central deployment node, enters a memory-based temporary running environment, starts a resource distribution service in the temporary running environment, and sends ready status information to the central deployment node; wherein, the resource distribution service is used to provide installation resources to the subsequent nodes in the same group; The advance node downloads the operating system installation package from the central deployment node; After receiving the ready status information sent by the advance node, the central deployment node starts each subsequent node in the same group as the advance node. The central deployment node sends a resource allocation table to each subsequent node; the resource allocation table indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should obtain; The subsequent node connects to the preceding node in the same group according to the resource allocation table, and is guided by the second PXE service provided by the preceding node to enter a memory-based temporary running environment, and completes network configuration in the temporary running environment; The subsequent nodes obtain a partial subset of the operating system installation package from the preceding nodes and the remaining partial subset of the operating system installation package from other subsequent nodes according to the resource allocation table, so as to obtain a complete operating system installation package. The preceding node and each subsequent node use the operating system installation package to install the operating system; The subsequent node performs integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and sends the verification result to the preceding node; The advance node confirms the deployment status of the installation group corresponding to the advance node based on the verification result.
2. The batch deployment system according to claim 1, characterized in that, The subsequent node performs integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and sends the verification result to the corresponding other subsequent nodes; The other subsequent nodes send the verification results to the preceding node.
3. The batch deployment system according to claim 1, characterized in that, When the leading node confirms, based on the verification results, that the operating system installation packages of each subsequent node have passed the integrity verification, it determines that the installation group corresponding to the leading node has been successfully deployed.
4. The batch deployment system according to claim 1, characterized in that, The advance node boots from the first PXE service provided by the central deployment node, downloads the kernel and initial memory file system, and completes the startup of the initial memory file system based on the kernel to enter a memory-based temporary running environment.
5. The batch deployment system according to claim 1, characterized in that, After entering a memory-based temporary operating environment, the subsequent nodes enable a resource distribution service within that environment to provide other subsequent nodes with a subset of the acquired operating system installation package.
6. A method for batch deployment of an operating system, characterized in that, The method, applied to preceding nodes in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group comprising one preceding node and at least two subsequent nodes, includes: Based on the first PXE service provided by the central deployment node, the system enters a memory-based temporary running environment. In this temporary running environment, a resource distribution service is started, and ready status information is sent to the central deployment node. The resource distribution service is used to provide installation resources to the subsequent nodes in the same group. Download the operating system installation package from the central deployment node; A second PXE service is started to bootstrap subsequent nodes in the same group, so that the subsequent nodes are booted by the second PXE service provided by the preceding node, enter a memory-based temporary running environment, and complete network configuration in the temporary running environment; Responding to the subsequent node's request to obtain a subset of the operating system installation package, and sending the subset to the subsequent node; Install the operating system using the aforementioned operating system installation package; Receive the verification result sent by the subsequent node; the verification result is the verification result obtained by the subsequent node through integrity verification of the remaining subset of the operating system installation package obtained from other subsequent nodes; Based on the verification results, the deployment status of the installation group corresponding to the advance node is confirmed.
7. The batch deployment method according to claim 6, characterized in that, The step of confirming the deployment status of the installation group corresponding to the advance node based on the verification result includes: When the verification results confirm that the operating system installation packages of each subsequent node have passed the integrity verification, the installation group corresponding to the preceding node is determined to have been successfully deployed.
8. The batch deployment method according to claim 6, characterized in that, The booting process based on the first PXE service provided by the central deployment node, entering the memory-based temporary runtime environment, includes: Based on the first PXE service provided by the central deployment node, the kernel and initial memory file system are downloaded; The kernel is used to start the initial memory file system, thereby entering a temporary memory-based running environment.
9. A method for batch deployment of an operating system, characterized in that, The method, applied to subsequent nodes in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group comprising one preceding node and at least two subsequent nodes, includes: The resource allocation table sent by the receiving center deployment node indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should acquire. Connect to the preceding nodes in the same group according to the resource allocation table, and boot from the second PXE service provided by the preceding nodes to enter a memory-based temporary running environment, and complete network configuration in the temporary running environment; According to the resource allocation table, a partial subset of the operating system installation package is obtained from the preceding nodes, and the remaining partial subset of the operating system installation package is obtained from other subsequent nodes to obtain a complete operating system installation package; Install the operating system using the aforementioned operating system installation package; The remaining subset of the operating system installation package obtained from other subsequent nodes is subjected to integrity verification, and the verification result is sent to the preceding node.
10. The batch deployment method according to claim 9, characterized in that, The step of performing integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes and sending the verification result to the preceding node includes: The remaining subset of the operating system installation package obtained from other subsequent nodes is subjected to integrity verification, and the verification result is sent to the corresponding other subsequent nodes. The other subsequent nodes send the verification results to the preceding node.
11. The batch deployment method according to claim 9, characterized in that, After entering a memory-based temporary runtime environment, the method further includes: In the temporary operating environment, a resource distribution service is enabled to provide a subset of the acquired operating system installation package to other subsequent nodes.
12. A batch deployment device for an operating system, characterized in that, An apparatus for use as a leading node in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group including one leading node and at least two subsequent nodes, the apparatus comprising: The readiness status sending module is used to boot from the first PXE service provided by the central deployment node, enter a memory-based temporary running environment, start a resource distribution service in the temporary running environment, and send readiness status information to the central deployment node; wherein, the resource distribution service is used to provide installation resources to the subsequent nodes in the same group; The installation package download module is used to download the operating system installation package from the central deployment node. The second PXE service startup module is used to start the second PXE service for bootstrapping subsequent nodes in the same group, so that the subsequent nodes are booted by the second PXE service provided by the preceding node, enter a memory-based temporary running environment, and complete network configuration in the temporary running environment; The request and response module is used to respond to the subsequent node's request to obtain a partial subset of the operating system installation package, and to send the partial subset to the subsequent node; The first installation module is used to install the operating system using the operating system installation package; The verification result receiving module is used to receive the verification result sent by the subsequent node; the verification result is the verification result obtained by the subsequent node through integrity verification of the remaining subset of the operating system installation package obtained from other subsequent nodes. The deployment status confirmation module is used to confirm the deployment status of the installation group corresponding to the advance node based on the verification result.
13. A batch deployment device for an operating system, characterized in that, Applied to subsequent nodes in an installation group, wherein multiple nodes to be installed are divided into multiple installation groups, each installation group including one preceding node and at least two subsequent nodes, the device includes: The resource allocation table receiving module is used to receive the resource allocation table sent by the central deployment node; the resource allocation table indicates the preceding nodes in the same group as each subsequent node, as well as a subset of the operating system installation packages that each subsequent node should obtain; The network configuration module is used to connect to the preceding nodes in the same group according to the resource allocation table, and to boot into a memory-based temporary running environment based on the second PXE service provided by the preceding nodes, and to complete the network configuration in the temporary running environment. A subset acquisition module is used to obtain a subset of the operating system installation package from the preceding nodes and the remaining subset of the operating system installation package from other subsequent nodes according to the resource allocation table, so as to obtain a complete operating system installation package. The second installation module is used to install the operating system using the operating system installation package; The verification module is used to perform integrity verification on the remaining subset of the operating system installation package obtained from other subsequent nodes, and send the verification result to the preceding node.
14. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the batch deployment method of the operating system as described in claims 6-8 or 9-11.
15. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the batch deployment method of the operating system as described in claims 6-8 or 9-11.