A system and method for intelligent software upgrade and deployment

By leveraging P2P network technology and a multi-mode operating system, intelligent software upgrades for distributed systems were achieved, solving the problem of low efficiency in manual operations, enabling rapid and efficient automated upgrades, and reducing operation and maintenance costs and the risk of business interruption.

CN119342057BActive Publication Date: 2025-10-31BEIJING INST OF COMP TECH & APPL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411402708.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-10-31
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

In existing technologies, the software upgrade process of distributed systems relies on manual operation, which leads to low efficiency and is prone to errors, increasing operation and maintenance costs and business interruption risks. In particular, it is difficult to achieve fast and efficient parallel upgrades in large-scale systems.

Method used

By employing P2P network technology, software upgrade packages are rapidly distributed in a distributed system through torrent seeds and BitTorrent trackers. Combining online and offline upgrade modes, and utilizing multi-mode operating systems of upgrade terminal devices and servers, an automated software upgrade process is achieved.

Benefits of technology

It enables rapid and efficient upgrades of nodes in a distributed system, reduces the probability of human error, improves operational efficiency and system stability, and reduces the risk of business interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342057B_ABST
    Figure CN119342057B_ABST
Patent Text Reader

Abstract

This invention relates to a system and method for intelligent software upgrade deployment, belonging to the field of distributed system technology. The software upgrade scheme provided by this invention adopts a P2P network download mode, which can quickly distribute software upgrade packages. Furthermore, the more nodes simultaneously being upgraded in the distributed system, the faster the software upgrade package distribution speed. Compared to multicast mode, which can also distribute data, P2P does not require network devices to support special functions, while multicast functionality requires network device support; otherwise, multicast communication cannot be achieved. In addition, this invention supports automated online and offline upgrade operations, which is convenient, fast, and reduces the probability of erroneous operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of distributed system technology, specifically relating to a system and method for intelligent software upgrade and deployment. Background Technology

[0002] The increasing demands of current IT services and the growing scale of distributed systems have led to more complex deployments and upgrades, increasing the difficulty of efficient operation and maintenance. In non-virtualized scenarios, distributed systems are built on physical hardware devices, and their operation and maintenance primarily rely on manual, sequential operations by maintenance personnel. If maintenance takes too long, it will impact normal business operations.

[0003] Furthermore, most software system upgrades can be performed directly without interrupting business operations, while some upgrades, similar to redeployment, require business interruption. In traditional manual operations and maintenance (O&M) models, efficiency is often limited by manpower and individual skill levels. Because of the need to manually perform numerous repetitive tasks, such as monitoring system status, updating software, and troubleshooting, O&M personnel may become fatigued due to long working hours, leading to distraction and decreased reaction speed. In addition, human factors can easily lead to errors, such as negligence during configuration changes, data entry, or script execution. These errors can cause system failures, data loss, or security vulnerabilities, thereby increasing O&M costs and the risk of business interruption. With technological advancements, the application of automated and intelligent O&M tools can effectively reduce these risks and improve the efficiency and accuracy of O&M.

[0004] P2P (Peer-to-Peer) technology is a decentralized network architecture that allows nodes in a network to communicate directly with each other and share resources without the need for a central server. This network architecture improves efficiency and scalability, and its applications are wide-ranging, including but not limited to distributed computing and content delivery networks (CDNs). Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] The technical problem to be solved by this invention is to propose a system and method for intelligent software upgrade deployment, which enables parallel upgrades of various nodes in a distributed system, ensuring both rapid and efficient upgrades and reducing the risk of errors from manual operation through automated operation.

[0007] (II) Technical Solution

[0008] To address the aforementioned technical problems, this invention provides a system for intelligent software upgrade deployment, comprising multiple servers and an upgrade terminal device;

[0009] Multiple servers simultaneously run distributed system node services, forming a distributed system;

[0010] Each server supports two operating modes: business mode and upgrade mode;

[0011] Business Model: In this model, the server enters the operating system that runs the distributed system business and executes the business;

[0012] Upgrade Mode: In this mode, the server enters a lightweight operating system for offline upgrades.

[0013] The business mode and upgrade mode run on two different operating systems, which are deployed on the same hard drive of the server. The upgrade mode uses a lightweight operating system, which performs software upgrades in the environment where distributed system node services are running in non-business mode. The business mode runs the software of the distributed system. When the server starts up, it can find the bootloader GRUB through UEFI and load different partitions to achieve the switching of operating systems.

[0014] In a normally functioning distributed system, each server operates in a business mode;

[0015] Upgrade terminal devices run software upgrade tools. When a software upgrade of a distributed system is required, the upgrade terminal device is used to perform the operation.

[0016] The present invention also provides a software upgrade method based on the system described above. When the distributed system requires software upgrades for each server, the system enters the management system of the distributed system and sets the IP acquisition method of the server's management network port to automatic acquisition.

[0017] The prepared software upgrade package is created as a torrent file on the upgraded terminal device. The software upgrade package contains upgrade files, upgrade scripts, and upgrade configuration files. The upgrade configuration files contain the type of upgrade, the version to be upgraded, and descriptions of the relevant upgrade files. The upgrade type includes online upgrade and offline upgrade.

[0018] Before creating a torrent seed, upgrade your terminal device to configure a BitTorrent tracker to maintain a user information table; the user information table contains the IP and port information of all active users associated with the torrent seed;

[0019] After the BitTorrent tracker starts, it creates a torrent seed, which involves creating a file list, configuring seed properties, and generating a seed file.

[0020] A software upgrade agent runs on the server to communicate with the upgrade terminal device. The upgrade terminal device distributes torrent seeds to various servers via the SFTP protocol. After verifying the torrent seeds, the software upgrade agent sends the distribution results back to the upgrade terminal device.

[0021] Once the distribution is successful, the server will open the torrent file and download the software upgrade package.

[0022] (III) Beneficial Effects

[0023] The software upgrade solution provided by this invention adopts a P2P network download mode, which can quickly distribute software upgrade packages. The more nodes simultaneously upgrading in the distributed system, the faster the software upgrade package distribution speed. Compared to multicast mode, which can also distribute data, P2P does not require network devices (such as routers) to support special functions, while multicast requires network device support; otherwise, multicast communication cannot be achieved. Furthermore, this invention supports automated online and offline upgrade operations, which is convenient, fast, and reduces the probability of erroneous operations. Attached Figure Description

[0024] Figure 1 This is an architecture diagram of the software upgrade and deployment system of the present invention;

[0025] Figure 2 This is a schematic diagram illustrating the distribution of the software upgrade package for this invention;

[0026] Figure 3 This is a schematic diagram of the local area network peer-to-peer transmission of the software upgrade package of this invention;

[0027] Figure 4 This is a flowchart illustrating the software upgrade package upgrade process of this invention.

[0028] in:

[0029] 1. Server 2. Upgrade terminal equipment

[0030] 3 Management port 4 Software upgrade package

[0031] 5 torrent seeds 6-bit torrent tracker

[0032] 7. User Information Form; 8. Software Upgrade Agent. Detailed Implementation

[0033] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.

[0034] This invention provides a software upgrade and deployment system, the overall scheme of which is as follows:

[0035] The system is implemented through a software upgrade server and upgrade terminal devices. In this method, the upgrade terminal devices, which are equipped with the software upgrade server, are connected to the management network ports of each node in the distributed system via Ethernet.

[0036] In a distributed system, each node contains two operating systems, corresponding to the business model and the upgrade model respectively:

[0037] 1) Business model, i.e., entering the business system and running the distributed system;

[0038] 2) Upgrade Mode: After entering this mode, you can perform offline upgrade operations.

[0039] Software upgrades for distributed systems can be categorized into two types: online upgrades and offline upgrades.

[0040] 1) Online upgrade: In the business model, software upgrade packages can directly modify and upgrade the business system through file overwriting and script execution;

[0041] 2) Offline upgrade: In upgrade mode, after the nodes in the distributed system download the software upgrade package, the upgrade terminal device sends the upgrade command. After the command is issued, the distributed system modifies the system startup item to change the system startup item to enter upgrade mode after system startup, and then performs the distributed system upgrade operation.

[0042] Maintenance personnel upgrade terminal device configuration tasks, distribute software upgrade packages, and perform software upgrades. The entire process of distributing software upgrade packages and performing software upgrades is divided into two stages:

[0043] 1) The steps for distributing the software upgrade package are as follows:

[0044] a) Configure the management network port of the node to be upgraded in the distributed system to obtain IP addresses automatically, and enable the DHCP server on the upgrade terminal device to assign IP addresses to the node to be upgraded;

[0045] b) Create a torrent file from the software update package;

[0046] c) Distribute the torrent seed to the nodes to be upgraded in the distributed system via the local area network using the SFTP protocol;

[0047] d) The node to be upgraded opens the torrent seed and downloads the software upgrade package.

[0048] 2) Software upgrade:

[0049] The subsequent upgrade operation is performed based on the upgrade type information in the software upgrade package. The upgrade operation is divided into online upgrades that do not require restarting the node and offline upgrades that require restarting the node.

[0050] Specifically, the hardware platform required for this system consists of multiple servers 1 and one upgrade terminal device 2, such as... Figure 1 As shown:

[0051] Multiple servers (1) simultaneously run distributed system node services, forming a distributed system, such as a distributed computing system or a distributed storage system. To ensure the reliability and stability of the distributed system, the operating systems and software versions running on most of the nodes (i.e., each server 1) should be identical. Therefore, the system consists of a distributed system requiring software upgrades and upgrade terminal devices. The distributed system and upgrade terminal devices are on the same local area network (LAN). The upgrade terminal devices run a DHCP server, and the management network port of the distributed system can automatically obtain an IP address assigned to the upgrade terminal devices via DHCP.

[0052] The server 1 of this invention supports two operating modes: business mode and upgrade mode.

[0053] Business Model: In this model, server 1 enters the operating system that runs the distributed system business and executes the business;

[0054] Upgrade Mode: In this mode, server 1 enters a lightweight operating system for offline upgrades.

[0055] The business mode and upgrade mode run on two different operating systems, both deployed on the same hard drive of the server. The upgrade mode uses a lightweight operating system, whose main function is to perform software upgrades in the environment where distributed system node services are running outside of business mode. The business mode, on the other hand, uses a general-purpose operating system to run the distributed system software. Server 1 can find the bootloader GRUB via UEFI during system startup and load different partitions to switch operating systems (modes).

[0056] In a normally functioning distributed system, each server 1 operates in business mode.

[0057] Upgrade terminal device 2 can be a desktop computer or server that runs the software upgrade tool. When a software upgrade of a distributed system is required, upgrade terminal device 2 is used.

[0058] When the distributed system requires software upgrades for each server 1, the operations and maintenance personnel need to enter the distributed system's management system and set the IP acquisition method of the server's management network port 3 to automatic acquisition.

[0059] The upgrade terminal device 2 is connected to the management network port 3 of the distributed system in the same local area network, and the DHCP server is started to assign IP addresses to the management network ports 3 of each server 1 that needs to be upgraded in the local area network.

[0060] The maintenance personnel will create a torrent seed 5 from the prepared software upgrade package 4 on the upgrade terminal device 2. The software upgrade package 4 contains upgrade files, upgrade scripts, and upgrade configuration files. The upgrade configuration file contains the type of upgrade (online upgrade / offline upgrade), the upgrade version, and a description of the relevant upgrade files.

[0061] An example of an upgrade configuration file is shown below:

[0062] #Upgrade Package Metadata

[0063] metadata:

[0064] name: "software-upgrade"

[0065] version: 1.2.3

[0066] type:"online"

[0067] releaseDate: "2024-09-11"

[0068] description: "This is a software upgrade package that includes bugfixes and new features."

[0069] #Pre-installation checks

[0070] preInstall:

[0071] -"Checkcurrentsoftwareversion"

[0072] -"Ensure sufficient disk space"

[0073] #Installation Steps

[0074] install:

[0075] -"Stop distributed system service"

[0076] -"Copyold filesto / opt / system / backup"

[0077] -"Copy newfiles in software upgrade packagetospecified directory"

[0078] -"Setappropriatefile permissions"

[0079] -"Restart distributed system service"

[0080] #Configuration file

[0081] config:

[0082] -"file:config / settings.yml"

[0083] options:

[0084] timeout:30

[0085] logging: "verbose"

[0086] #Startup script

[0087] scripts:

[0088] postInstall:"scripts / post_install.sh"

[0089] preUninstall:"scripts / pre_uninstall.sh"

[0090] #Rollback Strategy

[0091] rollback:

[0092] -"Stop distributed system service"

[0093] -"Copyold files in / opt / system / backuptooriginal directory"

[0094] -"Setappropriatefile permissions"

[0095] -"Restart distributed system service"

[0096] #Upgrade package file list

[0097] files:

[0098] -"bin / serviced

[0099] -"config / settings.yml"

[0100] -"scripts / install.sh

[0101] -"scripts / rollback.sh

[0102] Before creating torrent seed 5, the upgraded terminal device 2 needs to configure a BitTorrent tracker 6 to maintain a user information table 7. The user information table 7 contains the IP and port information of all active users (server 1) related to torrent seed 5, ensuring that BitTorrent clients on server 1 can discover each other and exchange file blocks for data transmission. In this invention, the BitTorrent tracker 6 is a centralized tracker, hosted by the upgraded terminal device 2.

[0103] After BitTorrent Tracker 6 starts up, create torrent seed 5, which involves creating a file list, configuring seed properties, and generating seed files.

[0104] like Figure 3 As shown, a software upgrade agent 8 runs on server 1 to communicate with upgrade terminal device 2; upgrade terminal device 2 distributes torrent seed 5 to each server 1 via SFTP protocol, and software upgrade agent 8 verifies the torrent seed 5 and then feeds back the distribution result to upgrade terminal device 2.

[0105] Server 1, which has successfully distributed the software, will open the torrent seed 5 and download the software upgrade package 4.

[0106] like Figure 3 As shown, during the download of software update package 4 on server 1, BitTorrent tracker 6 updates all servers 1 connected to it and records their IP addresses, port numbers, and other relevant information. When a new server 1 connects to BitTorrent tracker 6, BitTorrent tracker 6 provides a list of other downloaders and uploaders of the current software update package 4. In this way, the servers 1 can exchange data related to the software update package 4 with each other.

[0107] After server 1 downloads software upgrade package 4, it will perform the upgrade according to the contents of the upgrade configuration file. For online upgrades, simply deploy the upgrade file directly in business mode and restart the distributed system service. For offline upgrades, the server needs to automatically enter upgrade mode, deploy the software upgrade package, and then restart in business mode to complete the entire upgrade. Figure 4 As shown.

[0108] The following will explain the upgrade steps for both online and offline upgrades:

[0109] 1) Online Upgrade: This type of upgrade mainly involves updating configuration files and service files (service files refer to the executable files of specific business logic) in distributed systems. These files are replaced during the operation of the distributed system, and the business service is restarted to complete the upgrade. Therefore, this type of upgrade requires the following steps:

[0110] a) Back up the files to be overwritten (upgrade configuration files and service files);

[0111] b) Cease related business services;

[0112] c) Place the new file in the specified path;

[0113] d) Initiate relevant business services;

[0114] e) Delete backup files.

[0115] 2) Offline Upgrade: This type of upgrade mainly involves version updates of the distributed system and kernel upgrades of the operating system on server 1. It requires server 1 to process files on its file system even when the operating system is not running in business mode. Therefore, this type of upgrade requires the following steps:

[0116] a) After all relevant servers 1 have received the software upgrade package 4, stop running the distributed system services;

[0117] b) Modify the business mode operating system startup item of server 1 to switch the business mode to upgrade mode;

[0118] c) Restart server 1 and enter upgrade mode;

[0119] d) In upgrade mode, mount the disk partition where the business mode operating system is located, and back up the files to be overwritten according to the requirements of software upgrade package 4, and place the new files in the specified path;

[0120] e) After the operation is completed, modify the operating system startup item of the upgrade mode of server 1 to switch the upgrade mode to business mode;

[0121] f) Restart server 1;

[0122] g) Delete backup files.

[0123] During the software upgrade package distribution process, the software upgrade package is downloaded and stored in the business operating system. Therefore, after the software upgrade is completed, the operations and maintenance personnel can configure whether server 1 continues to provide the software upgrade package upload service. If it continues to provide the service, the user information table 7 in BitTorrent tracker 6 will continue to retain the information of server 1; if it no longer provides the service, the relevant information of server 1 in the user information table 7 of BitTorrent tracker 6 will be deleted, and the configuration for automatic acquisition of the management network interface IP will be disabled.

[0124] If a software upgrade fails, a rollback operation can be performed to revert the software to its previous state. The rollback operations for online and offline upgrades are explained below:

[0125] 1) Rollback operation for online upgrades:

[0126] a) Cease related business services;

[0127] b) Place the backup file in the specified path;

[0128] c) Restart the relevant business services;

[0129] d) Delete backup files.

[0130] 2) Rollback operation for offline upgrades:

[0131] a) Modify the business mode operating system startup item of server 1 and switch it to upgrade mode;

[0132] b) Restart server 1 and enter upgrade mode;

[0133] c) In upgrade mode, mount the disk partition where the business mode operating system is located, and copy the backed-up files to the specified path according to the modifications in software upgrade package 4.

[0134] d) After the operation is completed, modify the operating system startup item of server 1's upgrade mode to switch to business mode;

[0135] e) Restart server 1;

[0136] f) After the server 1 business mode is successfully started, delete the backup file.

[0137] As can be seen, this invention provides a system and method for intelligent software upgrade deployment, which is based on multiple devices to be upgraded in a local area network and is particularly suitable for distributed systems. This invention distributes upgrade packages to all devices to be upgraded in a P2P manner; devices can perform online and offline upgrades; online upgrades automatically update the software while the device's business system is running normally; offline upgrades require entering upgrade mode, in which the upgrade package is used to upgrade the device's business system.

[0138] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A system for intelligent software upgrade and deployment, characterized in that, This includes multiple servers and one upgraded terminal device; Multiple servers simultaneously run distributed system node services, forming a distributed system; Each server supports two operating modes: business mode and upgrade mode; Business Model: In this business model, the server enters the operating system that runs the distributed system business and executes the business; Upgrade Mode: In this upgrade mode, the server enters a lightweight operating system for offline upgrades. The business mode and upgrade mode run on two different operating systems, which are deployed on the same hard drive of the server. The upgrade mode uses a lightweight operating system, which performs software upgrades in the environment where distributed system node services are running in non-business mode. The business mode runs the software of the distributed system. When the server starts up, it finds the bootloader GRUB through UEFI and loads different partitions to achieve the switching of operating systems. In a normally functioning distributed system, each server operates in a business mode; Upgrade terminal devices run software upgrade tools. When a software upgrade of a distributed system is required, the upgrade terminal device is used to perform the operation. The upgrade terminal device is connected to the management port of the distributed system in the same local area network, and the DHCP server is started to assign IP addresses to the management ports of each server in the local area network that needs to be upgraded.

2. The system as described in claim 1, characterized in that, The distributed system is either a distributed computing system or a distributed storage system.

3. The system as described in claim 1, characterized in that, The upgraded terminal device is a desktop computer or a server.

4. A software upgrade method based on the system described in any one of claims 1 to 3, characterized in that, When a distributed system requires software upgrades for each server, enter the distributed system's management system and set the server's management network port IP address acquisition method to automatic acquisition. The prepared software upgrade package is created as a torrent file on the upgraded terminal device. The software upgrade package contains upgrade files, upgrade scripts, and upgrade configuration files. The upgrade configuration files contain the type of upgrade, the version to be upgraded, and descriptions of the relevant upgrade files. The upgrade type includes online upgrade and offline upgrade. Before creating a torrent seed, upgrade your terminal device to configure a BitTorrent tracker to maintain a user information table; the user information table contains the IP and port information of all active users associated with the torrent seed; After the BitTorrent tracker starts, it creates a torrent seed, which involves creating a file list, configuring seed properties, and generating a seed file. A software upgrade agent runs on the server to communicate with the upgrade terminal devices; The upgraded terminal device distributes torrent seeds to various servers via the SFTP protocol. After verifying the torrent seeds, the software upgrade agent sends the distribution results back to the upgraded terminal device. Once the distribution is successful, the server will open the torrent file and download the software upgrade package.

5. The method as described in claim 4, characterized in that, The BitTorrent tracker is a centralized tracker hosted by an upgraded terminal device.

6. The method as described in claim 4, characterized in that, During the download of the software update package on the server, the BitTorrent tracker updates all servers connected to it and records their IP addresses and port numbers. When a new server connects to the BitTorrent tracker, the BitTorrent tracker provides a list of other downloaders and uploaders of the current software update package, and the servers exchange software update package data with each other.

7. The method as described in claim 6, characterized in that, After the server downloads the software upgrade package, it will perform the upgrade according to the contents of the upgrade configuration file. For online upgrades, you only need to deploy the upgrade file directly in business mode and restart the distributed system service. For offline upgrades, the server needs to automatically enter upgrade mode, deploy the software upgrade package, and then restart to enter business mode to complete the entire upgrade.

8. The method as described in claim 7, characterized in that, The steps for online and offline upgrades are as follows: 1) Online Upgrade: Online upgrade involves updating and upgrading configuration files and service files in a distributed system. This process replaces the configuration files and service files during system operation and restarts the business services. Service files refer to the executable files of specific business functions. Online upgrades include the following steps: a) Back up the files to be overwritten; b) Suspend related business services; c) Place the new file in the specified path; d) Initiate relevant business services; e) Delete backup files; 2) Offline Upgrade: Offline upgrades involve version updates of the distributed system and upgrades of the server's operating system kernel. This requires processing files on the file system while the server is in business mode and the operating system is not running. Offline upgrades execute the following steps: a) Stop running the distributed system services after all relevant servers have received the software upgrade package; b) Modify the server's business mode operating system startup item to switch the business mode to upgrade mode; c) Restart the server and enter upgrade mode; d) In upgrade mode, mount the disk partition where the business mode operating system is located, back up the files to be overwritten according to the requirements of the software upgrade package, and place the new files in the specified path; e) After the operation is completed, modify the server's upgrade mode operating system startup item to switch the upgrade mode to business mode; f) Restart the server; g) Delete backup files.

9. The method as described in claim 8, characterized in that, If a software upgrade fails, a rollback operation can be performed to revert the software to its previous state. The rollback operations for online and offline upgrades are as follows: 1) Rollback operation for online upgrades: a) Cease related business services; b) Place the backup file in the specified path; c) Restart the relevant business services; d) Delete backup files; 2) Rollback operation for offline upgrades: a) Modify the server's business mode operating system startup settings to switch to upgrade mode; b) Restart the server and enter upgrade mode; c) In upgrade mode, mount the disk partition where the business mode operating system is located, and copy the backed-up files to the specified path according to the modifications in the software upgrade package. d) After the operation is completed, modify the server's upgrade mode operating system startup item to switch to business mode; e) Restart the server; f) After the server business mode is successfully started, delete the backup files.

Citation Information

Patent Citations

  • On-line updating method and system for client side software on basis of P2SP (Peer to Server and to Peer)

    CN102065110A

  • Automatic upgrading and releasing system and method for application software in distributed network environment

    CN105740019A