A Distributed Software Deployment Method and System for Large-Scale Clusters

By installing and deploying agents within the cluster's local area network, and utilizing unified processing logic and a configuration center for automated deployment, the problem of low efficiency in large-scale distributed cluster software deployment is solved, enabling efficient and intelligent software installation, uninstallation, updates, and upgrades.

CN119960768BActive Publication Date: 2025-11-14NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411940451.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-11-14
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

Existing technologies are inefficient for software deployment in large-scale distributed clusters, manual deployment is prone to errors, and existing containerized deployment methods do not support physical machines and virtual machines, making it difficult to meet the needs of rapid iteration and frequent updates.

Method used

The deployment agent is installed within the cluster's local area network. It performs the installation, uninstallation, update, and upgrade of distributed software through unified processing logic, and uses a configuration center for data verification and configuration synchronization to achieve automated task execution and resource reuse.

Benefits of technology

It improves the management and deployment efficiency of large-scale clusters, reduces the risk of human intervention and misoperation, increases the deployment success rate, and simplifies the complexity of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960768B_ABST
    Figure CN119960768B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for distributed software deployment in large-scale clusters. The method includes the following steps: Step 1: Install a deployment agent on any node in the cluster's local area network, establish communication connections between the deployment agent and the client and the distributed cluster, and start the deployment agent to scan the IP addresses of each host in the cluster and generate public keys; Step 2: The user logs in to the deployment agent through the client, checks whether the user has installation permissions, and if so, creates a deployment task and executes the deployment task on the distributed cluster; Step 3: The user logs in to the deployment agent through the client, checks whether the user has configuration permissions, and if so, enters the distributed software update configuration; Step 4: The user logs in to the deployment agent through the client, checks whether the user has upgrade permissions, and if so, enters the distributed software upgrade configuration. This invention can intelligently realize distributed software deployment in large-scale clusters, improving the deployment efficiency and success rate of large-scale clusters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed software systems, and more specifically to a method and system for deploying distributed software for large-scale clusters. Background Technology

[0002] A distributed software system is a software system that employs a distributed architecture. This architecture ensures high throughput and high availability. In practical deployments, distributed software systems are typically installed on multiple computers, which communicate with each other via a network, forming a distributed cluster. Depending on the business scenario, the size of a distributed cluster can range from a few to thousands of machines. For large-scale distributed clusters with a large number of nodes (e.g., more than 100 nodes), how to quickly deploy software on the distributed cluster has always been a challenging problem for software operations and maintenance personnel.

[0003] For software deployment in distributed clusters, current technologies typically employ manual deployment node by node. However, manual deployment is only suitable for small-scale clusters. For large-scale clusters, manual deployment is not only extremely labor-intensive and prone to human error, but also inefficient, failing to meet the demands of rapid iteration and frequent updates. To address these issues, one solution is to adopt container-based automated software deployment, such as using open-source container orchestration platforms like Kubernetes. These tools can automatically manage the lifecycle of containerized applications, including deployment, scaling, and service discovery, significantly improving the automation of the deployment process and reducing human intervention. However, container-based deployment relies on container orchestration platforms like Kubernetes and hardware virtualization capabilities, requiring pre-container adaptation and encapsulation of the software. Deployment takes the form of container images and does not support physical machines or virtual machine clusters. Summary of the Invention

[0004] The technical problem to be solved by this invention is to provide a distributed software deployment and upgrade method and system that is simple to implement, low in cost, highly intelligent and efficient in deployment, and capable of intelligently realizing distributed software deployment of large-scale clusters, thereby improving the deployment efficiency and success rate of large-scale clusters.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0006] A method for deploying distributed software for large-scale clusters includes the following steps:

[0007] Step 1: Installation and initialization of the deployment agent and distributed cluster: Install the deployment agent on any node in the local area network of the cluster to be deployed, establish communication connections between the deployment agent and the client and the distributed cluster respectively, start the deployment agent to automatically scan the IP addresses of each host in the cluster, and generate SSH public keys for each host in the cluster.

[0008] Step 2: Distributed Software Installation and Uninstallation: Users log in to the deployment agent through the client. The agent checks whether the user has installation permissions. If so, a deployment task is created, and the deployment task parameters and task type are obtained. The configuration center distributes basic configuration data containing node roles to each node in the cluster. The configuration center also verifies whether the configuration data of each node in the target distributed cluster is missing or incorrect. If the verification fails, the missing or required correct configuration data is obtained from the configuration center. The deployment task is executed on each node in the distributed cluster according to the obtained deployment task parameters, task type, and configuration data. The task types include installation and uninstallation.

[0009] Step 3: Distributed software update configuration: The user logs in to the deployment agent through the client. The agent checks whether the user has configuration permissions. If so, it enters the distributed software update configuration, obtains the configuration parameters and sends them to the target distributed cluster to control the target distributed cluster to update the parameters. The agent also verifies the local data of each node in the target distributed cluster with the configuration data sent by the configuration center. If there is conflicting data, the agent obtains synchronized data according to the status of each node.

[0010] Step 4: Distributed Software Upgrade: Users log in to the deployment agent via a client. The agent checks if the user has upgrade permissions. If so, the agent enters the distributed software upgrade configuration. It associates the current upgrade task with the historical installation task and selects the task template corresponding to the historical installation task as the task template for the current upgrade task to obtain the upgrade task parameters. After uploading the required software package, the agent performs the upgrade on the target distributed cluster. The agent obtains the status of each node in the target distributed cluster through the configuration center to calculate the upgrade order of each node. The agent then distributes the data containing the upgrade order to each node to update the cluster configuration.

[0011] Further, step 1 includes:

[0012] Step 101. Deploy a firewall between the client and the deployment agent, and enable a whitelist of client IP addresses on the firewall to control that only clients on the whitelist are allowed to pass through the firewall;

[0013] Step 102. After installing the deployment agent in the local area network of the cluster to be deployed, start the host scanning tool of the deployment agent service to automatically scan for the IPs of the cluster hosts;

[0014] Step 103. Group the cluster host IPs and add an SSH public key for each host. If a host does not have a public key, generate one using a command.

[0015] Step 104.6. Create the user and password required by the client on the deployment agent and set permissions, and generate a digital certificate for the client.

[0016] Further, step 2 includes:

[0017] Step 201: The user logs in to the deployment agent via the client using a pre-created username and password;

[0018] Step 202: Deploy the agent to check if the user has installation permissions. If so, proceed to step 203; otherwise, end the current process.

[0019] Step 203: Enter the deployment task management phase and create a deployment task;

[0020] Step 204: Choose whether to import from a template. If yes, select a deployment template; otherwise, create a task template directly.

[0021] Step 205: Obtain task parameters and task type according to the current task template. The task parameters include any combination of task number, task remarks, task executor, script path, script parameters, and execution order.

[0022] Step 206: Determine the current task type. If it is an installation task, upload the package to be installed through the client and load it into the deployment agent, then proceed to step 207. If it is an uninstallation task, proceed directly to step 207.

[0023] Step 207: The configuration center distributes basic configuration data, including node roles, to each node in the cluster;

[0024] Step 208. The configuration center verifies whether the configuration data of each node in the target distributed cluster is missing or incorrect. If the verification fails, the missing or required correct configuration data is obtained from the configuration center.

[0025] Step 209. Execute the task on each node of the distributed cluster according to the obtained task parameters and configuration data until the deployment task on all selected nodes is completed. If it is an installation task, install the software package on each node of the distributed cluster until the software package on all selected nodes is installed. If it is an uninstallation task, execute the uninstallation command on each node of the distributed cluster until the software on all selected nodes has been safely removed.

[0026] Step 210: Check whether the deployment tasks on each node in the distributed cluster have been executed successfully. If not, return to step 207 and try to execute the tasks again.

[0027] Further, step 3 includes:

[0028] Step 301: The user logs in to the deployment agent via the client using a pre-created username and password;

[0029] Step 302: Deploy the agent to check if the user has configuration permissions. If so, proceed to step 303; otherwise, end the current process.

[0030] Step 303: Determine whether the configuration parameter input method is batch import. If so, obtain a set of configuration parameters from the batch import configuration file; otherwise, register configuration parameters one by one and obtain a set of configuration parameters.

[0031] Step 304: Send the configuration parameters obtained in step 303 to the target cluster to control the target distributed cluster to update the parameters;

[0032] Step 305. Verify the local data of each node in the target distributed cluster with the configuration data issued by the configuration center. If there is conflicting data, update the conflicting node with the configuration data from the configuration center, obtain the status of the remaining nodes in the target distributed cluster, and calculate the latest synchronized data.

[0033] Step 306: Determine whether the cluster needs to be restarted. If so, restart the cluster nodes one by one in a rolling restart manner until all nodes have been restarted. Otherwise, exit the current process.

[0034] Step 307: Check if the current configuration update was successful. If not, return to step 304 to reissue the configuration parameters.

[0035] Furthermore, in step 304, the configuration parameters are distributed by writing the configuration parameters obtained in step 303 to a specified file of the target cluster or by directly writing the configuration parameters obtained in step 303 through the cluster's interface.

[0036] Furthermore, step 4 includes:

[0037] Step 401: The user logs in to the deployment agent via the client using a pre-created username and password;

[0038] Step 402: Deploy the agent to check if the user has upgrade permissions. If so, proceed to step 403; otherwise, end the current process.

[0039] Step 403: Select a historical installation task and associate it with the current upgrade task. Use the task template of the selected historical installation task as the task template of the current upgrade task to achieve template reuse.

[0040] Step 404: Obtain the upgrade task parameters according to the task template obtained in step 403. The upgrade task parameters include any one or more of the following: upgrade script, upgrade configuration file path, task responsible person, task description, and rollback script.

[0041] Step 405: Upload the full or incremental software package to the deployment agent to execute the upgrade task. The full software package is all the software package data, and the incremental software package is the software package data updated before and after the upgrade.

[0042] Step 406. The configuration center communicates with each node in the target distributed cluster to collect the status of each node in the cluster, and calculates the upgrade order of each node based on the status of each node.

[0043] Step 407. Distribute the data containing the upgrade order of each node to each node in the target distributed cluster to update the cluster configuration;

[0044] Step 408: Following the rolling upgrade mode, execute the upgrade script on each node of the target distributed cluster one by one until the upgrade of all cluster nodes is completed;

[0045] Step 409: Check whether each node in the cluster has been upgraded successfully. If any cluster node has failed to upgrade, return to step 406 to retry the upgrade, or perform a rollback operation to cancel the upgrade task.

[0046] A system for implementing the above-described distributed software deployment method for large-scale clusters includes:

[0047] The client is used to provide an interface with the deployment agent for data input and output;

[0048] Deployment agent, deployed on any node in the cluster LAN, is used to perform distributed cluster management and deployment task proxy;

[0049] A distributed cluster consists of multiple physical machines or virtual machines;

[0050] The client and the distributed cluster communicate with the deployment agent via HTTP connections.

[0051] Furthermore, the deployment agent includes:

[0052] The distributed cluster management unit is used to add hosts, import them in batches, group hosts, and manage cluster information in a distributed cluster.

[0053] The deployment task management unit is used to enable the distributed cluster to provide three types of deployment tasks: installation, upgrade, and update, and to implement any one or more of the following: task editing, task execution, task rollback, and task retry.

[0054] The configuration center unit is used to centrally manage the configuration parameter management function of the distributed cluster and provide corresponding configuration parameters to the distributed cluster during the execution of deployment tasks;

[0055] The software package management unit is used to manage software packages;

[0056] The role and permission management unit is used to implement user management, user permission management, and user role management to control different users to access and operate the system according to different permissions;

[0057] The system configuration unit is used to configure the system, and the configuration includes any one or more of the following: startup memory size, data storage path, and user blacklist / whitelist.

[0058] The template management unit is used to manage task templates.

[0059] Furthermore, it also includes a distributed cluster management module, which includes a node management unit, a storage management unit, and a network management unit for managing nodes, storage, and network of the distributed cluster, respectively. The node management unit adds and deletes nodes in the distributed cluster, the storage management unit expands and shrinks the storage capacity of the distributed cluster, and the network management unit manages the IP network segment, gateway address, etc. of the distributed cluster.

[0060] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above.

[0061] Compared with the prior art, the advantages of the present invention are as follows:

[0062] 1. This invention installs and deploys an agent within the cluster's local area network. This agent utilizes a unified processing logic to intelligently perform distributed software installation / uninstallation, updates, and upgrades, enabling resource reuse between processes and simplifying the user's system usage logic. This not only improves the management and deployment efficiency of large-scale clusters but also reduces user complexity and the probability of user errors. Furthermore, a centralized configuration center verifies installation and updates data during installation and performs cluster configuration updates during upgrades. This allows for efficient distribution of role-matched configuration data to nodes during installation, convenient handling of missing / incorrect configuration data during deployment, effective synchronization of configuration data to resolve configuration conflicts during updates, and resolution of cluster node state dependencies during upgrades.

[0063] 2. This invention, by installing and deploying an agent within the cluster's local area network, and by creating deployment tasks through the agent and automatically executing deployment tasks on each node of the distributed cluster, enables batch management of cluster hosts. Simultaneously, it automates the initialization and debugging of cluster hosts. The entire process is highly automated, eliminating the need for manual installation and debugging of each host individually, significantly reducing manual intervention. This not only improves the management and deployment efficiency of large-scale clusters but also reduces the risk of errors caused by human operation, while simultaneously increasing the success rate of distributed software deployment.

[0064] 3. This invention further automates and encapsulates the distributed software deployment process, abstracting it into reusable task templates. Configuration parameters are centrally managed and automatically distributed in the form of files through a configuration center. This eliminates the need for manual modification of deployment parameters, software debugging, or modification of the distributed software, thereby significantly improving the efficiency of distributed software deployment and upgrades. Attached Figure Description

[0065] Figure 1 This is the system architecture applicable in the embodiments of the present invention.

[0066] Figure 2 This is a schematic diagram illustrating the implementation process of distributed software installation and uninstallation in a specific application embodiment of the present invention.

[0067] Figure 3 This is a schematic diagram illustrating the implementation process of distributed software configuration update in an embodiment of the present invention.

[0068] Figure 4 This is a schematic diagram illustrating the distributed software upgrade implementation process in an embodiment of the present invention.

[0069] Figure 5 This is a schematic diagram of the system architecture principle in a specific application embodiment of the present invention. Detailed Implementation

[0070] 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 a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0071] Since installation / uninstallation, updates, and upgrades are different tasks, they are usually executed independently in traditional distributed software deployment. The processes for installation / uninstallation, updates, and upgrades are quite different, and resources cannot be reused in each process. For example, installation and uninstallation do not need to consider retaining historical data, while updates and upgrades must retain historical data. Furthermore, the task processes and scripts for installation / uninstallation, updates, and upgrades cannot be directly reused. Therefore, it is not only complex to implement, but also requires more resources and is costly.

[0072] For the deployment of large-scale distributed software, since distributed software is logically integrated but physically separate, maintaining configuration data is a difficult problem during installation, deployment, update, and upgrade. For example, during installation, it is difficult to distribute configuration data that matches the role of different nodes; during deployment, it is difficult to handle the problem of missing or incorrect configuration data; during update, it is difficult to synchronize configuration data, which can lead to configuration conflicts; and during upgrade, it is difficult to resolve the problem of cluster node state dependencies.

[0073] This invention comprehensively considers the above-mentioned problems. By installing and deploying an agent within the cluster's local area network, the agent uses a unified processing logic to intelligently perform distributed software installation / uninstallation, updates, and upgrades. This enables resource reuse between processes, simplifies the user's system usage logic, improves the management and deployment efficiency of large-scale clusters, reduces user complexity, and decreases the probability of user errors. Furthermore, a centralized configuration center verifies installation and updates data and updates cluster configurations during upgrades. This allows for efficient distribution of role-matched configuration data to nodes during installation, convenient handling of missing / incorrect configuration data during deployment, effective synchronization of configuration data to resolve configuration conflicts during updates, and resolution of cluster node state dependencies during upgrades.

[0074] Figure 1The system architecture applicable to this embodiment can include three parts: a client, a deployment agent, and a distributed cluster. The client provides an interface with the deployment agent for data input and output. The deployment agent, deployed on any node in the cluster's local area network, is used to perform distributed cluster management and deployment task delegation. The distributed cluster includes multiple physical machines or virtual machines. The client and the deployment agent communicate via HTTP connection. The deployment agent and the distributed cluster are deployed on different computers and connect via HTTP. During the initialization phase, the deployment agent automatically scans the IP addresses of each host in the cluster and generates SSH public keys for each host. When distributed software installation and uninstallation are required, the user logs in to the deployment agent through the client. If the user has installation permissions, a deployment task is created. After selecting a deployment template, the deployment task parameters and task type (installation or uninstallation) are obtained, and the deployment task is executed on each node of the distributed cluster according to the deployment task parameters. When distributed software update configuration is required, the user logs in to the deployment agent through the client. The deployment agent imports or registers configuration parameters in batches or individually and then distributes them to the target distributed cluster for distributed software update configuration.

[0075] In this embodiment, the communication link between the client and the deployed agent can be hardened using security hardening methods. Specifically, the following methods can be used for security hardening:

[0076] 1. Deploy a firewall between the client and the deployment agent, and enable a whitelist on the firewall so that only clients on the whitelist are allowed to pass through the firewall, while clients not on the whitelist will be blocked by the firewall.

[0077] 2. Clients must use correct credentials to log in to the deployment agent. Credentials can include passwords, digital signature certificates, hardware key cards, etc.

[0078] 3. Communication between the client and the deployment agent uses the TLS 1.3 / HTTPS security protocol.

[0079] The communication link between the deployment agent and the distributed cluster can also be hardened. For example, the same security hardening methods as those used for the communication link between the client and the deployment agent can be used, except that a firewall is not set up.

[0080] Based on the above system, the steps of the distributed software deployment method for large-scale clusters in this embodiment include:

[0081] Step 1: Deployment Agent and Distributed Cluster Installation and Initialization: Install the deployment agent on any node in the local area network of the cluster to be deployed, establish communication connections between the deployment agent and the client and the distributed cluster respectively, start the deployment agent to automatically scan the IP addresses of each host in the cluster, and generate SSH public keys for each host in the cluster.

[0082] The deployment agent can be deployed on any machine in the cluster LAN. The deployment agent and the distributed cluster can be deployed on different computers and communicate with the deployment agent through network devices. In cases of limited resources, the client and the deployment agent can also be deployed on the same computer.

[0083] As an alternative implementation method, such as Figure 2 As shown, the installation and initialization of the deployment agent and distributed cluster can be performed using the following steps:

[0084] Step 101. Deploy a firewall between the client and the deployment agent, and enable a whitelist of client IP addresses on the firewall to control that only clients on the whitelist are allowed to pass through the firewall;

[0085] Step 102. After installing the deployment agent in the local area network of the cluster to be deployed, start the host scanning tool of the deployment agent service to automatically scan for the IPs of the cluster hosts;

[0086] Step 103. Group the cluster host IPs and add an SSH public key for each host. If a host does not have a public key, generate one using a command.

[0087] Step 104.6. Create the user and password required by the client on the deployment agent and set permissions, and generate a digital certificate for the client.

[0088] Specifically, during system installation and initialization, the scale and environment of the distributed cluster are first determined, ensuring the cluster resides on the same local area network (LAN). The deployment agent is then installed on any machine within the LAN. Next, the host scanning tool in the distributed cluster management module of the deployment agent service is launched. The network segment of the distributed cluster is input, and the IP addresses of the cluster hosts are automatically scanned. For example, to scan all hosts in the 192.168.10.0 / 24 network segment: `nmap-sn 192.168.10.0 / 24`. The cluster host IP addresses are then grouped, and an SSH public key is added to each host. If a host does not have a public key, it is generated using a command, such as: `ssh-keygen -t rsa -b 4096`. This completes the installation and initialization of the deployment agent and the distributed cluster.

[0089] The installation and deployment of the agent also includes creating the user and password required by the client and setting permissions, and finally generating a digital certificate for the client. During the client installation and initialization process, the digital certificate needs to be installed on the client, and the client's IP address needs to be added to the whitelist on the firewall. This completes the installation and initialization of the agent, client, and distributed cluster.

[0090] Step 2: Distributed Software Installation and Uninstallation: Users log in to the deployment agent through the client. The agent checks whether the user has installation permissions. If so, a deployment task is created, and the deployment task parameters and task type are obtained. The configuration center distributes basic configuration data containing node roles to each node in the cluster. The configuration center also verifies whether the configuration data of each node in the target distributed cluster is missing or incorrect. If the verification fails, the missing or required correct configuration data is obtained from the configuration center. The deployment task is executed on each node in the distributed cluster according to the obtained deployment task parameters, task type, and configuration data. The task types include installation and uninstallation.

[0091] As an alternative implementation method, such as Figure 3 As shown, distributed software installation and uninstallation can be performed using the following steps:

[0092] Step 201: The user logs in to the deployment agent via the client using a pre-created username and password;

[0093] Specifically, on the client side, users log in to the deployment agent using a pre-created username and password, and if a hardware key card is configured, the key card needs to be inserted.

[0094] Step 202: The deployment agent checks whether the user has installation permissions (INSTALL_PRIL). If so, proceed to step 203; otherwise, if the user has not been granted installation permissions, the current process ends.

[0095] Step 203: Enter the deployment task management phase and create a deployment task;

[0096] Step 204: Choose whether to import from a template. If yes, select a deployment template; otherwise, create a task template directly to create a task flow as needed.

[0097] Step 205: Obtain the task parameters and task type according to the current task template. The task parameters include task number, task notes, task executor, script path, script parameters, execution order, etc. If it is an installation task, the script path is the installation script path and the execution order is the installation order. If it is an uninstallation task, the script path is the uninstallation script path and the execution order is the uninstallation order.

[0098] Step 206: Determine the current task type. If it is an installation task, upload the package to be installed through the client and load it into the deployment agent, then proceed to step 207. If it is an uninstallation task, proceed directly to step 207.

[0099] Step 207: The configuration center distributes basic configuration data, including node roles, to each node in the cluster;

[0100] Step 208. The configuration center verifies whether the configuration data of each node in the target distributed cluster is missing or incorrect. If the verification fails, the missing or required correct configuration data is obtained from the configuration center.

[0101] Step 209. Execute the task on each node of the distributed cluster according to the obtained task parameters and configuration data until the deployment task on all selected nodes is completed. If it is an installation task, install the software package on each node of the distributed cluster until the software package on all selected nodes is installed. If it is an uninstallation task, execute the uninstallation command on each node of the distributed cluster until the software on all selected nodes has been safely removed.

[0102] Step 210: Check whether the deployment tasks on each node in the distributed cluster have been executed successfully. If not, return to step 207 and try to execute the tasks again.

[0103] The aforementioned task template is specifically a structured data structure, including task number, task executor, task permissions, cluster configuration data, task flow, task script, task parameters, and other data. A task template is automatically generated after each task is successfully created and persistently stored in storage systems such as the file system and database. Based on task templates, the task creation process can be simplified, the task success rate improved, and task debugging and auditing can be facilitated.

[0104] Step 3: Distributed software update configuration: Users log in to the deployment agent through the client, check whether the user has configuration permissions, if so, enter the distributed software update configuration, obtain a set of configuration parameters by batch import or registering configuration parameters one by one, and send the obtained configuration parameters to the target distributed cluster to control the target distributed cluster to update parameters.

[0105] As an optional implementation method, such as Figure 4 As shown, distributed software configuration updates can be performed using the following steps:

[0106] Step 301: The user logs in to the deployment agent through the client using a pre-created username and password. If a hardware key card is configured, the key card needs to be inserted.

[0107] Step 302: The deployment agent checks whether the user has configuration permissions (CONFIG_PRIL). If so, proceed to step 303; otherwise, end the current process.

[0108] Step 303: Determine whether the configuration parameter input method is batch import. If so, obtain a set of configuration parameters from the batch import configuration file; otherwise, register configuration parameters one by one and obtain a set of configuration parameters.

[0109] Step 304: Send the configuration parameters obtained in step 303 to the target cluster to control the target distributed cluster to update the parameters;

[0110] Step 305. Verify the local data of each node in the target distributed cluster with the configuration data issued by the configuration center. If there is conflicting data, update the conflicting node with the configuration data from the configuration center, obtain the status of the remaining nodes in the target distributed cluster, and calculate the latest synchronized data.

[0111] Step 306: Determine whether the cluster needs to be restarted. If so, restart the cluster nodes one by one in a rolling restart manner until all nodes have been restarted. Otherwise, exit the current process.

[0112] Step 307: Check if the current configuration update was successful. If not, return to step 304 to reissue the configuration parameters.

[0113] For example, in step 305 above, a consensus algorithm can be used to calculate synchronization data based on the status of each node. That is, the local data of each node in the cluster is compared with the configuration data issued by the configuration center. If there is conflicting data, the data of the configuration center shall prevail. Then, the status of each node is obtained by communicating with other nodes, and the latest synchronization data is calculated by the consensus algorithm to confirm that the data status of the entire cluster is consistent.

[0114] In a specific application embodiment, a configuration file example is shown below:

[0115] cluster1.database.master=192.168.10.1

[0116] cluster1.database.slaves=192.168.10.2,192.168.10.3,192.168.10.4

[0117] cluster1.name=Cassandra_Cluster

[0118] nginx.vip = 192.168.10.100

[0119]

[0120] Optionally, configuration parameters can be distributed in two different ways: either by writing the registered configuration parameters obtained in step 303 to a specified file in the target cluster, or by directly writing the registered configuration parameters obtained in step 303 through the cluster's interface (such as the JMX interface) to distribute the configuration parameters.

[0121] This embodiment uses a rolling restart method during the distributed software configuration update process to ensure that the functions provided by the distributed cluster are not interrupted, thereby improving the stability and reliability of the system.

[0122] Step 4: Distributed Software Upgrade: Users log in to the deployment agent through the client, check if the user has upgrade permissions. If so, enter the distributed software upgrade configuration, associate the current upgrade task with the historical installation task, select the task template corresponding to the historical installation task as the task template of the current upgrade task to obtain the upgrade task parameters, upload the software package required for the upgrade, and then perform the upgrade on the target distributed cluster.

[0123] like Figure 4 As shown, the steps include:

[0124] Step 401: The user logs in to the deployment agent through the client using a pre-created username and password. If a hardware key card is configured, the key card needs to be inserted.

[0125] Step 402: Deploy the agent to check if the user has upgrade permissions (UPDATE_PRIL). If so, proceed to step 403; otherwise, end the current process.

[0126] Step 403: Select a historical installation task and associate it with the current upgrade task. Use the task template of the selected historical installation task as the task template of the current upgrade task to achieve template reuse, that is, directly reuse the historical task template.

[0127] Step 404: Obtain the upgrade task parameters according to the task template obtained in Step 403. The upgrade task parameters include the upgrade script, upgrade configuration file path, task responsible person, task description, rollback script, etc.

[0128] Step 405: Upload the full or incremental software package to the deployment agent. The full software package contains all software package data, while the incremental software package contains the updated software package data before and after the upgrade. Uploading the incremental software package can reduce the amount of data transfer.

[0129] Step 405: Upload the full or incremental software package to the deployment agent to execute the upgrade task. The full software package is all the software package data, and the incremental software package is the software package data updated before and after the upgrade.

[0130] Step 406. The configuration center communicates with each node in the target distributed cluster to collect the status of each node in the cluster, and calculates the upgrade order of each node based on the status of each node.

[0131] Step 407. Distribute the data containing the upgrade order of each node to each node in the target distributed cluster to update the cluster configuration;

[0132] Step 408: Following the rolling upgrade mode, execute the upgrade script on each node of the target distributed cluster one by one until the upgrade of all cluster nodes is completed;

[0133] Step 409: Check whether each node in the cluster has been upgraded successfully. If any cluster node has failed to upgrade, return to step 406 to retry the upgrade, or perform a rollback operation to cancel the upgrade task.

[0134] In step 403 above, the following two association methods can be used when associating historical installation tasks with the current upgrade task:

[0135] 1. Select Association: The system lists all historical installation tasks for the user to select. After receiving the user's selection, the system associates the selected historical installation task with the current upgrade task.

[0136] 2. Automatic association: The system selects the most recent installation task from historical tasks and associates it with the current upgrade task based on information such as user role and task name.

[0137] The two methods described above can be switched between each other, allowing users to choose the association mode.

[0138] Once the association is successful, the current upgrade task reuses data from the task template of the historical installation task, such as cluster configuration, task parameters, and task scripts, and can then quickly execute the current upgrade task by using the data from the historical installation task.

[0139] It is understood that this embodiment does not limit the order of the above steps. The execution order of the above installation / uninstallation, update and upgrade steps can be determined according to actual needs. For example, software update can be performed first and then software upgrade, or software upgrade can be performed first and then software update. Upgrade and update can be performed periodically or dynamically according to actual needs.

[0140] This embodiment ensures uninterrupted functionality of the distributed cluster during the distributed software upgrade process by executing upgrade tasks in a rolling upgrade mode, thereby improving system stability and reliability. By reusing historical task templates, the upgrade process can be simplified, further improving upgrade efficiency.

[0141] This embodiment automates the deployment process of distributed software and abstracts it into reusable task templates. Configuration parameters are centrally managed and automatically distributed in the form of files through a configuration center. This eliminates the need for manual modification of deployment parameters, software debugging, or modification of the distributed software, thereby significantly improving the deployment and upgrade efficiency of distributed software.

[0142] Furthermore, during the deployment process, all deployment tasks can be automatically recorded, including operators, operation time, software version, parameter files, log files, etc., to facilitate user auditing and review, which can further improve the success rate of distributed software deployment.

[0143] In a specific application embodiment, firstly, according to as follows: Figure 1 The system shown consists of installing and debugging the hardware and software systems. After preparing the software packages and configuration files and performing initialization configuration, the deployment tasks are executed according to the required installation / uninstallation, parameter update or upgrade tasks, following the above process. The system confirms whether the software has been successfully deployed in the distributed cluster. If it fails, the system operates according to the retry or rollback process.

[0144] In specific application embodiments, such as Figure 5 As shown, the client provides a graphical interface for human-computer interaction and provides data input / output functions, such as importing and exporting software packages, through I / O devices. It communicates with the deployment agent via network devices. In resource-constrained situations, the client and deployment agent can be deployed on the same computer. The distributed cluster consists of multiple physical machines or virtual machines and provides node management, storage management, and network management functions. The node management unit adds and deletes nodes in the distributed cluster, the storage management unit expands and shrinks the storage capacity of the distributed cluster, and the network management unit manages the IP network segment, gateway address, and other parameters of the distributed cluster.

[0145] In specific application embodiments, such as Figure 5 As shown, the deployment agent may include:

[0146] The distributed cluster management unit is used to add hosts, import them in batches, group hosts, and manage cluster information in a distributed cluster.

[0147] The deployment task management unit is used to enable the distributed cluster to provide three types of deployment tasks: installation, upgrade, and update, and to implement any one or more of the following: task editing, task execution, task rollback, and task retry.

[0148] The configuration center unit is used to centrally manage the configuration parameter management function of the distributed cluster and provide corresponding configuration parameters to the distributed cluster during the execution of deployment tasks;

[0149] The software package management unit is used to manage software packages;

[0150] The role and permission management unit is used to implement user management, user permission management, and user role management to control different users to access and operate the system according to different permissions;

[0151] The system configuration unit is used to configure the system, and the configuration includes any one or more of the following: startup memory size, data storage path, and user blacklist / whitelist.

[0152] The template management unit is used to manage task templates.

[0153] Based on the above structure, the distributed cluster management unit can provide functions such as manual addition of hosts, batch import, host grouping, and cluster information management for the distributed cluster; the deployment task management unit can provide three types of deployment tasks for the distributed cluster: installation, upgrade, and update, and provide functions such as task editing, task execution, task rollback, and task retry; the configuration center unit can provide a centralized configuration parameter management function for the distributed cluster, and the distributed cluster can obtain the corresponding configuration parameters from the configuration center when executing deployment tasks; the package management unit can provide functions such as importing and exporting packages, version management, and signature verification; the role and permission management unit can provide functions such as user management, user permission management, and user role management, so that different users can access and operate this system according to different permissions; the system configuration unit can provide configuration functions for this system, such as startup memory size, data storage path, user blacklists and whitelists; and the template management unit can provide functions such as saving, editing, importing, and exporting task templates, so as to facilitate the rapid reuse of deployment tasks.

[0154] Optionally, the deployment agent can also be configured with a remote terminal to provide users with the ability to remotely connect to the distributed cluster hosts, allowing users to directly operate the hosts through the remote terminal. The deployment agent can also be configured with an operation and maintenance help unit to provide user assistance, troubleshooting, and usage wizards, making it easier for users to use the system in a more user-friendly way.

[0155] This embodiment further provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above.

[0156] Those skilled in the art will understand that the above embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create an implementation for the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0157] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for deploying distributed software for large-scale clusters, characterized in that, Includes the following steps: Step 1: Installation and initialization of the deployment agent and distributed cluster: Install the deployment agent on any node in the local area network of the cluster to be deployed, establish communication connections between the deployment agent and the client and the distributed cluster respectively, start the deployment agent to automatically scan the IP addresses of each host in the cluster, and generate SSH public keys for each host in the cluster. Step 2: Distributed Software Installation and Uninstallation: Users log in to the deployment agent through the client. The agent checks whether the user has installation permissions. If so, a deployment task is created, and the deployment task parameters and task type are obtained. The configuration center distributes basic configuration data containing node roles to each node in the cluster. The configuration center also verifies whether the configuration data of each node in the target distributed cluster is missing or incorrect. If the verification fails, the missing or required correct configuration data is obtained from the configuration center. The deployment task is executed on each node in the distributed cluster according to the obtained deployment task parameters, task type, and configuration data. The task types include installation and uninstallation. Step 3: Distributed software update configuration: The user logs in to the deployment agent through the client. The agent checks whether the user has configuration permissions. If so, it enters the distributed software update configuration, obtains the configuration parameters and sends them to the target distributed cluster to control the target distributed cluster to update the parameters. The agent also verifies the local data of each node in the target distributed cluster with the configuration data sent by the configuration center. If there is conflicting data, the agent obtains synchronized data according to the status of each node. Step 4: Distributed Software Upgrade: Users log in to the deployment agent through the client, check if the user has upgrade permissions. If so, enter the distributed software upgrade configuration. By associating the current upgrade task with the historical installation task, and selecting the task template corresponding to the historical installation task as the task template for the current upgrade task, the upgrade task parameters are obtained. After uploading the software package required for the upgrade, the upgrade is performed on the target distributed cluster. The status of each node in the target distributed cluster is obtained through the configuration center to calculate the upgrade order of each node. The data containing the upgrade order is sent to each node to update the cluster configuration. Step 4 includes: Step 401: The user logs in to the deployment agent via the client using a pre-created username and password; Step 402: Deploy the agent to check if the user has upgrade permissions. If so, proceed to step 403; otherwise, end the current process. Step 403: Select a historical installation task and associate it with the current upgrade task. Use the task template of the selected historical installation task as the task template of the current upgrade task to achieve template reuse. Step 404: Obtain the upgrade task parameters according to the task template obtained in step 403. The upgrade task parameters include any one or more of the following: upgrade script, upgrade configuration file path, task responsible person, task description, and rollback script.

2. The distributed software deployment method for large-scale clusters according to claim 1, characterized in that, Step 1 includes: Step 101: Deploy a firewall between the client and the deployment agent, and enable a whitelist of client IP addresses on the firewall to control that only clients on the whitelist are allowed to pass through the firewall; Step 102: After installing the deployment agent in the local area network of the cluster to be deployed, start the host scanning tool of the deployment agent service to automatically scan for the IPs of the cluster hosts; Step 103: Group the cluster host IPs and add an SSH public key for each host. If a host does not have a public key, generate one using a command. Step 104: Create the user and password required by the client on the deployment agent and set permissions, and generate a digital certificate for the client.

3. The distributed software deployment method for large-scale clusters according to claim 1, characterized in that, Step 2 includes: Step 201: The user logs in to the deployment agent via the client using a pre-created username and password; Step 202: Deploy the agent to check if the user has installation permissions. If so, proceed to step 203; otherwise, end the current process. Step 203: Enter the deployment task management phase and create a deployment task; Step 204: Choose whether to import from a template. If yes, select a deployment template; otherwise, create a task template directly. Step 205: Obtain task parameters and task type according to the current task template. The task parameters include any combination of task number, task remarks, task executor, script path, script parameters, and execution order. Step 206: Determine the current task type. If it is an installation task, upload the package to be installed through the client and load it into the deployment agent, then proceed to step 207. If it is an uninstallation task, proceed directly to step 207. Step 207: The configuration center distributes basic configuration data, including node roles, to each node in the cluster; Step 208: The configuration center verifies whether the configuration data of each node in the target distributed cluster is missing or incorrect. If the verification fails, the missing or required correct configuration data is obtained from the configuration center. Step 209: Execute the task on each node of the distributed cluster according to the obtained task parameters and configuration data until the deployment task on all selected nodes is completed. If it is an installation task, install the software package on each node of the distributed cluster until the software package on all selected nodes is installed. If it is an uninstallation task, execute the uninstallation command on each node of the distributed cluster until the software on all selected nodes has been safely removed. Step 210: Check whether the deployment tasks on each node in the distributed cluster have been executed successfully. If not, return to step 207 and try to execute the tasks again.

4. The distributed software deployment method for large-scale clusters according to claim 1, characterized in that, Step 3 includes: Step 301: The user logs in to the deployment agent via the client using a pre-created username and password; Step 302: Deploy the agent to check if the user has configuration permissions. If so, proceed to step 303; otherwise, end the current process. Step 303: Determine whether the configuration parameter input method is batch import. If so, obtain a set of configuration parameters from the batch import configuration file; otherwise, register configuration parameters one by one and obtain a set of configuration parameters. Step 304: Send the configuration parameters obtained in step 303 to the target cluster to control the target distributed cluster to update the parameters; Step 305: Verify the local data of each node in the target distributed cluster with the configuration data issued by the configuration center. If there is conflicting data, update the conflicting nodes with the configuration data from the configuration center, obtain the status of the remaining nodes in the target distributed cluster, and calculate the latest synchronized data. Step 306: Determine whether the cluster needs to be restarted. If so, restart the cluster nodes one by one in a rolling restart manner until all nodes have been restarted. Otherwise, exit the current process. Step 307: Check if the current configuration update was successful. If not, return to step 304 to reissue the configuration parameters.

5. The distributed software deployment method for large-scale clusters according to claim 4, characterized in that, In step 304, the configuration parameters are distributed by writing the configuration parameters obtained in step 303 to a specified file in the target cluster or by directly writing the configuration parameters obtained in step 303 through the cluster's interface.

6. The distributed software deployment method for large-scale clusters according to any one of claims 1 to 5, characterized in that, Step 4 also includes: Step 405: Upload the full or incremental software package to the deployment agent to execute the upgrade task. The full software package is all the software package data, and the incremental software package is the software package data updated before and after the upgrade. Step 406: The configuration center communicates with each node in the target distributed cluster to collect the status of each node in the cluster, and calculates the upgrade order of each node based on the status of each node. Step 407: Distribute the data containing the upgrade order of each node to each node in the target distributed cluster to update the cluster configuration; Step 408: Following the rolling upgrade mode, execute the upgrade script on each node of the target distributed cluster one by one until the upgrade of all cluster nodes is completed; Step 409: Check whether each node in the cluster has been upgraded successfully. If any cluster node has failed to upgrade, return to step 406 to retry the upgrade, or perform a rollback operation to cancel the upgrade task.

7. A system for implementing the distributed software deployment method for large-scale clusters as described in any one of claims 1 to 6, characterized in that, include: The client is used to provide an interface with the deployment agent for data input and output; Deployment agent, deployed on any node in the cluster LAN, is used to perform distributed cluster management and deployment task proxy; A distributed cluster consists of multiple physical machines or virtual machines; The client and the distributed cluster communicate with the deployment agent via HTTP connections.

8. The system according to claim 7, characterized in that, The deployment agent includes: The distributed cluster management unit is used to add hosts, import them in batches, group hosts, and manage cluster information in a distributed cluster. The deployment task management unit is used to enable the distributed cluster to provide three types of deployment tasks: installation, upgrade, and update, and to implement any one or more of the following: task editing, task execution, task rollback, and task retry. The configuration center unit is used to centrally manage the configuration parameter management function of the distributed cluster and provide corresponding configuration parameters to the distributed cluster during the execution of deployment tasks; The software package management unit is used to manage software packages; The role and permission management unit is used to implement user management, user permission management, and user role management to control different users to access and operate the system according to different permissions; The system configuration unit is used to configure the system, and the configuration includes any one or more of the following: startup memory size, data storage path, and user blacklist / whitelist. The template management unit is used to manage task templates.

9. The system according to claim 7, characterized in that, It also includes a distributed cluster management module, which includes a node management unit, a storage management unit, and a network management unit for managing nodes, storage, and network of the distributed cluster, respectively. The node management unit adds and deletes nodes in the distributed cluster, the storage management unit expands and shrinks the storage capacity of the distributed cluster, and the network management unit manages the IP network segment and gateway address of the distributed cluster.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multi-super-computing-center software system deployment and incremental updating method in wide-area environment

    CN111131146A

  • Agent-based distributed application dynamic deployment and upgrade method

    CN117850812A