Cluster processing method and device, computer equipment, storage medium and product
By generating deployment configuration pages and visual simulations, the problem of high complexity in traditional Kubernetes cluster deployment is solved, achieving efficient and accurate cluster deployment and improving user experience and consistency.
Patent Information
- Application Number
- CN202411703745.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Traditional Kubernetes cluster deployment methods are time-consuming, labor-intensive, and prone to errors, especially in large-scale or multi-environment deployments. They are complex to understand and operate for non-professionals, resulting in high deployment complexity, low efficiency, and poor consistency.
A cluster processing method is provided, which generates a deployment configuration page, including configuration controls and parameter configuration areas, generates a cluster configuration file, and performs a visual simulation of the deployment architecture. After user confirmation, the cluster deployment component is invoked to perform deployment, supporting operations such as node selection, monitoring and alarms, fault monitoring, and node migration.
It reduces the complexity of cluster deployment, improves deployment efficiency and consistency, reduces errors caused by incorrect configuration file entries, and enhances user intuitiveness and accuracy.
Smart Images

Figure CN119603135B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of cloud native technology, and in particular, to a cluster processing method and device, computer equipment, storage medium and computer program product. BACKGROUND
[0002] The development of cloud computing has promoted the wide application of container technology and micro-service architecture. Kubernetes, K8s for short, is an open-source container orchestration platform that provides a series of functions to solve the complex problems of container orchestration and has become a de facto standard container orchestration platform.
[0003] The traditional deployment method of K8s cluster is usually to use manual or semi-automatic method to deploy the cluster. However, this manual or semi-automatic deployment method is time-consuming and laborious, and is prone to errors, especially in large-scale or multi-environment deployment. For non-professional deployment personnel, it is a difficult task to understand and operate complex K8s configuration files. Therefore, there is an urgent need for a cluster deployment solution that can reduce the complexity of K8s cluster deployment and improve the efficiency and consistency of cluster deployment. SUMMARY
[0004] Therefore, it is necessary to provide a cluster processing method, device, computer equipment, computer readable storage medium and computer program product that can reduce the complexity of cluster deployment and improve the efficiency and consistency of cluster deployment.
[0005] In a first aspect, the present application provides a cluster processing method, which comprises:
[0006] In response to a cluster deployment start operation for a deployment host, a deployment configuration page is generated and displayed according to a preset cluster deployment template, and the deployment configuration page includes configuration controls of various cluster deployment parameters;
[0007] For each configuration control, in response to a control trigger operation for the configuration control, a parameter configuration area of the configuration control is displayed on the deployment configuration page according to preset parameter configuration information of the configuration control;
[0008] For each parameter configuration area, in response to a parameter configuration operation for the parameter configuration area, a cluster configuration file of the cluster is generated;
[0009] The deployment process of the cluster based on the cluster configuration file is visualized and simulated, and the simulated deployment architecture of the cluster is displayed on the deployment configuration page;
[0010] In response to a confirmation deployment operation triggered for the simulation deployment architecture, a cluster deployment component is invoked to deploy the cluster on the deployment host according to the cluster configuration file.
[0011] In one of the embodiments, the method further comprises:
[0012] In response to a node deletion operation for the cluster, a node selection page is generated and displayed according to a deployment architecture of the cluster, the node selection page being used to show each worker node deployed in the cluster and a connection relationship between each of the worker nodes;
[0013] In response to a node selection operation triggered for the node selection page, a to-be-deleted node and a label color of the to-be-deleted node are determined;
[0014] The node selection page is updated based on the label color of the to-be-deleted node, the to-be-deleted node is labeled, and the updated node selection page is displayed;
[0015] In response to a confirmation deletion operation triggered for the updated node selection page, a preset node deletion script is executed to delete the to-be-deleted node from the cluster.
[0016] In one of the embodiments, the method further comprises:
[0017] In a case where the cluster is configured with a monitoring alarm plug-in, a key indicator in the cluster is monitored based on the monitoring alarm plug-in;
[0018] If the key indicator is monitored to exceed a preset indicator threshold, an alarm notification page is generated and displayed based on the key indicator and each candidate alarm coping strategy of the key indicator;
[0019] In response to a selection operation triggered for each of the candidate alarm coping strategies, a target alarm coping strategy is determined;
[0020] The alarm notification page is updated based on a preset label color of the target alarm coping strategy, the target alarm coping strategy is labeled, and the updated alarm notification page is displayed;
[0021] In response to a confirmation selection operation triggered for the updated alarm notification page, the cluster is managed according to the target alarm coping strategy.
[0022] In one of the embodiments, the method further comprises:
[0023] In response to a strategy matching analysis operation triggered for each of the candidate alarm coping strategies, a strategy matching score of each of the candidate alarm coping strategies under a current cluster operation condition is calculated.
[0024] determining respective score display areas corresponding to the candidate alarm response strategies in the alarm notification page;
[0025] filling the strategy matching scores of the candidate alarm response strategies into the corresponding score display areas respectively, updating and displaying the alarm notification page.
[0026] In one of the embodiments, the method further comprises:
[0027] performing node fault monitoring on the cluster in the running state;
[0028] in a case where it is determined that there is a faulty node in the cluster, determining at least one migratable node from the working nodes of the cluster;
[0029] scheduling the workload of the faulty node to the migratable node, and recording migration information generated by node migration;
[0030] in response to a fault query operation on the cluster, generating and displaying a node migration simulation animation based on the migration information; the node migration simulation animation is used to show the migration of the workload of the faulty node in the cluster.
[0031] In one of the embodiments, the cluster deployment component comprises a resource control component, an initialization control component, and a plug-in control component; the configuration file comprises sub-configuration files of the resource management objects and a plug-in configuration file;
[0032] the calling of the cluster deployment component to deploy the cluster on the deployment host according to the cluster configuration file comprises:
[0033] calling the resource control component to perform object configuration operations according to the sub-configuration files of the resource management objects, and creating the resource management objects for the cluster;
[0034] calling the initialization control component to execute control plane deployment scripts based on the sub-configuration files, and deploying the control plane in the deployment host;
[0035] executing working node joining scripts, creating working nodes in the deployment host, and connecting the working nodes to the control plane;
[0036] obtaining plug-in installation files of selected configuration plug-ins from a preset plug-in library according to the plug-in configuration file;
[0037] calling the plug-in control component to execute plug-in configuration operations using the plug-in installation files, and installing the selected configuration plug-ins on the deployment host.
[0038] In a second aspect, the present application provides a cluster processing apparatus, comprising:
[0039] a configuration page generating module, configured to generate and display a deployment configuration page according to a preset cluster deployment template in response to a cluster deployment starting operation on a deployment host, the deployment configuration page comprising configuration controls of cluster deployment parameters;
[0040] a configuration area displaying module, configured to display a parameter configuration area of each configuration control on the deployment configuration page according to preset parameter configuration information of the configuration control in response to a control triggering operation on the configuration control;
[0041] a configuration file generating module, configured to generate a cluster configuration file of the cluster in response to a parameter configuration operation on each parameter configuration area;
[0042] a visual simulation deployment module, configured to visually simulate a deployment process of the cluster based on the cluster configuration file and display a simulated deployment architecture of the cluster on the deployment configuration page;
[0043] a cluster deployment module, configured to invoke a cluster deployment component to deploy the cluster on the deployment host according to the cluster configuration file in response to a confirmation deployment operation triggered on the simulated deployment architecture.
[0044] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0045] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0046] In a fifth aspect, the present application provides a computer program product, comprising a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0047] The cluster processing method, device, computer device, storage medium and computer program product, in response to a cluster deployment start operation for the deployment host, generate and display a deployment configuration page according to a preset cluster deployment template, the deployment configuration page includes configuration controls of various cluster deployment parameters, for each configuration control, in response to a control trigger operation for the configuration control, according to preset parameter configuration information of the configuration control, display a parameter configuration area of the configuration control on the deployment configuration page, for each parameter configuration area, in response to a parameter configuration operation for the parameter configuration area, generate a cluster configuration file of the cluster, by generating a graphical deployment configuration page for the user, the complexity of cluster deployment can be effectively reduced, even for users who are not familiar with cluster deployment, the cluster can also be built based on the deployment configuration page. The deployment process of the cluster based on the cluster configuration file is visualized, the simulated deployment architecture of the cluster is displayed on the deployment configuration page, and after the user triggers a confirmation deployment operation on the simulated deployment architecture, the cluster deployment component is called to deploy the cluster on the deployment host according to the cluster configuration file, the intuitiveness of cluster deployment can be improved, the user can confirm the to-be-deployed cluster before deployment, the possibility of cluster deployment failure caused by filling errors of the configuration file is reduced, and the cluster deployment efficiency and consistency are effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 An application environment diagram of the cluster processing method in one embodiment;
[0049] Figure 2 A flowchart of the cluster processing method in one embodiment;
[0050] Figure 3 A flowchart of the cluster processing method in another embodiment;
[0051] Figure 4 A flowchart of the cluster processing method in another embodiment;
[0052] Figure 5 A flowchart of the cluster processing method in another embodiment;
[0053] Figure 6 A flowchart of the cluster processing method in another embodiment;
[0054] Figure 7 A flowchart of the cluster processing method in one embodiment;
[0055] Figure 8 A flowchart of the cluster processing method in another embodiment;
[0056] Figure 9This is a structural block diagram of a cluster processing device in one embodiment;
[0057] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] The cluster processing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the cluster processing system 102 communicates with the user terminal 104 and the deployment host 106 via a network. The data storage system can store the data that the cluster processing system 102 needs to process. The data storage system can be integrated into the cluster processing system 102, or it can be located in the cloud or on other network servers. A user can trigger a cluster deployment startup operation on deployment host 106 based on user terminal 104. In response to the cluster deployment startup operation on deployment host 106, cluster processing system 102 generates a deployment configuration page according to a preset cluster deployment template and displays it on user terminal 104. The deployment configuration page includes configuration controls for each cluster deployment parameter. For each configuration control, the user can perform a control trigger operation. In response to the control trigger operation on the configuration control, cluster processing system 102 displays the parameter configuration area of the configuration control on the deployment configuration page according to the preset parameter configuration information of the configuration control. For each parameter configuration area, the user can perform a parameter configuration operation. In response to the parameter configuration operation on the operation configuration area, cluster processing system 102 generates a cluster configuration file for the cluster. Based on the cluster configuration file, the cluster deployment process is visually simulated, and the simulated deployment architecture of the cluster is displayed on the deployment configuration page. The user can trigger a confirmation deployment operation on the simulated deployment architecture displayed on the deployment configuration page. In response to the confirmation deployment operation triggered on the simulated deployment architecture, cluster processing system 102 calls the cluster deployment component to deploy the cluster on deployment host 106 according to the cluster configuration file.
[0060] The cluster processing system 102 can be integrated into a terminal or a server, such as a user terminal 104, which can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. When the cluster processing system 102 is integrated into a server, the server can be a standalone server or a server cluster composed of multiple servers.
[0061] The deployment host 106 is a physical server or a virtual machine configured and run in the cluster, and the number of deployment hosts 106 can be determined according to actual cluster deployment requirements. Through the cooperation between the deployment hosts 106, the normal operation and management of the containerized application of the cluster can be supported.
[0062] In one embodiment, as shown in Figure 2 , a cluster processing method is provided, which is applied to the cluster processing system 102 in Figure 1 for example, and includes the following steps:
[0063] S202, in response to a cluster deployment start operation for the deployment host, generating and displaying a deployment configuration page according to a preset cluster deployment template, the deployment configuration page including configuration controls of each cluster deployment parameter.
[0064] The cluster deployment start operation is an operation behavior for instructing the cluster processing system to deploy a cluster on the deployment host. The cluster deployment start operation can be triggered by a user through a user terminal. For example, the user can log in to the cluster processing system through the user terminal, click a cluster deployment start control, and trigger the cluster deployment start operation for the deployment host.
[0065] The preset cluster deployment template is a preset template file for generating the deployment configuration page. In the preset cluster deployment template, the configuration controls to be included in the deployment configuration page, the page positions of the configuration controls in the deployment configuration page, the trigger actions of the configuration controls, and the preset parameter configuration information of each configuration control can be specified.
[0066] The cluster deployment parameter refers to a necessary parameter required for deploying a cluster, such as a to-be-deployed host information parameter, a node information parameter, and a plug-in information parameter. In the preset cluster deployment template, each configuration control is corresponding to each cluster deployment parameter. Therefore, the deployment configuration page generated according to the preset cluster deployment template includes configuration controls corresponding to each cluster deployment parameter.
[0067] Specifically, in response to the cluster deployment start operation triggered by the user for the deployment host, the cluster processing system determines page generation information of the deployment configuration page according to the preset cluster deployment template, performs page rendering based on the page generation information, generates the deployment configuration page, and displays the deployment configuration page on the user terminal. The deployment configuration page includes configuration controls of each cluster deployment parameter.
[0068] S204, for each configuration control, in response to a control trigger operation for the configuration control, displaying a parameter configuration area of the configuration control in the deployment configuration page according to preset parameter configuration information of the configuration control.
[0069] The control trigger operation of the configuration control is a behavior in which a user interacts with the configuration control through a user terminal to activate the control to perform a specific function or event. It can be understood that different configuration controls can correspond to different control trigger operations, for example, the control trigger operation of the configuration control can include but is not limited to clicking, staying, dragging, inputting, and the like.
[0070] The preset parameter configuration information of the configuration control is preset information for specifying a configuration manner and / or configurable content used by a user to configure a cluster deployment parameter corresponding to the configuration control. It can be understood that different preset parameter configuration information corresponds to different parameter configuration regions of the configuration control. For example, if the preset parameter configuration information of the configuration control is parameter filling, the parameter configuration region corresponding to the configuration control is a parameter filling region. If the preset parameter configuration information of the configuration control is parameter selection, the parameter configuration region corresponding to the configuration control is a selection region including multiple selection items.
[0071] Specifically, when a user needs to configure a cluster deployment parameter, the user can interact with each configuration control in sequence through a user terminal to perform a control trigger operation. For each configuration control, the cluster processing system will respond to the control trigger operation of the configuration control to display a parameter configuration region of the configuration control on the deployment configuration page according to the preset parameter configuration information of the configuration control.
[0072] S206, for each parameter configuration region, in response to a parameter configuration operation of the parameter configuration region, a cluster configuration file of the cluster is generated.
[0073] The parameter configuration operation refers to an operation behavior of a user to perform parameter configuration on a cluster deployment parameter corresponding to the configuration control. The parameter configuration operation on each cluster deployment parameter can obtain a parameter content of a cluster configuration parameter corresponding to the parameter configuration region. After obtaining the parameter content of each cluster configuration parameter, the cluster processing system can generate a cluster configuration file according to the parameter content of each cluster configuration parameter.
[0074] Specifically, a user can perform a parameter configuration operation on the parameter configuration region of the configuration control through a user terminal, for example, filling in parameter information or selecting parameter information. For each parameter configuration region, the cluster processing system can respond to the parameter configuration operation of the parameter configuration region to obtain a parameter content of a cluster configuration parameter corresponding to the parameter configuration region. After obtaining the parameter content of each cluster configuration parameter, the cluster processing system can generate a cluster configuration file according to the parameter content of each cluster configuration parameter.
[0075] S208, based on the cluster configuration file, a deployment process of the cluster is visually simulated, and a simulated deployment architecture of the cluster is displayed on the deployment configuration page.
[0076] The visual simulation refers to a simulation operation of simulating the deployment process of the cluster by animation. By visualizing the deployment process of the cluster, the user can be shown the process of deploying the corresponding cluster based on the cluster configuration file in animation on the user terminal.
[0077] The simulation deployment architecture is obtained based on the simulation deployment of the cluster configuration file configured by the user. After the visual simulation ends, the deployment configuration page will display the simulation deployment architecture obtained by the simulation.
[0078] Specifically, after obtaining the cluster configuration file of the cluster, the cluster processing system can call the visual simulation component to visually simulate the deployment process of the cluster based on the cluster configuration file, and display the simulation process on the deployment configuration page. After the visual simulation ends, the deployment configuration page will display the simulation deployment architecture of the cluster.
[0079] S210, in response to the confirmation deployment operation triggered for the simulation deployment architecture, calling the cluster deployment component to deploy the cluster on the deployment host according to the cluster configuration file.
[0080] The confirmation deployment operation is a confirmation operation triggered by the user for the simulation deployment architecture. When the user determines through the simulation deployment architecture that the cluster meeting the user's needs can be deployed based on the cluster configuration file, the user can trigger the confirmation deployment operation for the simulation deployment architecture through the user terminal.
[0081] The cluster deployment component is a system component for realizing real deployment of the cluster according to the configuration file. The cluster deployment component can be pre-configured in the cluster processing system by the deployment personnel.
[0082] Specifically, when the user determines that the cluster configuration file is correct based on the simulation deployment architecture of the cluster displayed on the deployment configuration page, the user can trigger the confirmation deployment operation for the simulation deployment architecture through the user terminal, for example, click the confirmation deployment button in the simulation deployment architecture display window. In response to the confirmation deployment operation triggered for the simulation deployment architecture, the cluster processing system calls the cluster deployment component to deploy the cluster on the deployment host according to the cluster configuration file.
[0083] In the cluster processing method, the cluster processing system generates and displays a deployment configuration page according to a preset cluster deployment template in response to a cluster deployment start operation for the deployment host, the deployment configuration page includes configuration controls of cluster deployment parameters, for each configuration control, in response to a control trigger operation for the configuration control, a parameter configuration area of the configuration control is displayed on the deployment configuration page according to preset parameter configuration information of the configuration control, for each parameter configuration area, in response to a parameter configuration operation for the parameter configuration area, a cluster configuration file of the cluster is generated, by generating a graphical deployment configuration page for the user, the complexity of cluster deployment can be effectively reduced, even for users who are not familiar with cluster deployment, the cluster can also be built based on the deployment configuration page. The deployment process of the cluster based on the cluster configuration file is visualized, the simulated deployment architecture of the cluster is displayed on the deployment configuration page, and the cluster deployment component is called to deploy the cluster on the deployment host according to the cluster configuration file after the user triggers a confirmation deployment operation on the simulated deployment architecture, which can improve the intuitiveness of cluster deployment, enable the user to confirm the to-be-deployed cluster before deployment, reduce the possibility of cluster deployment failure caused by configuration file filling errors, and effectively improve the cluster deployment efficiency and consistency.
[0084] In some embodiments, as shown in Figure 3 The cluster processing method further includes the following steps:
[0085] S302, in response to a node deletion operation for the cluster, a node selection page is generated and displayed according to the deployment architecture of the cluster.
[0086] The node deletion operation is an operation behavior for instructing the cluster processing system to delete a worker node in the cluster, and the node deletion operation can be triggered by the user through the user terminal. After the cluster deployment is completed, the cluster processing system can still process the specific architecture or operation of the cluster. If the user has the need to delete the node, the user terminal can still trigger the node deletion operation for the cluster in the cluster processing system.
[0087] The node selection page is used to display each worker node deployed in the cluster and the connection relationship between the worker nodes. The worker node (Node) of the cluster is a node that actually carries the running container load, mainly responsible for running the container of the application program, and communicates with the control node (Master) to receive and execute the scheduling instruction of the control node.
[0088] Specifically, the cluster processing system generates a node selection page according to the deployment architecture of the cluster in response to a node deletion operation of the user for the cluster, and displays the node selection page on the user terminal, where the node selection page is used to show each working node deployed in the cluster and the connection relationship between the working nodes. It can be understood that the connection relationship between the working nodes can represent the network communication direction, resource sharing and cooperation relationship, etc. between the working nodes,
[0089] S304, in response to a node selection operation triggered for the node selection page, determining a to-be-deleted node and a marking color of the to-be-deleted node.
[0090] Wherein, the node selection operation is an operation behavior for selecting the to-be-deleted node from the working nodes, and the node selection operation can be triggered by the user through the user terminal, for example, the user can trigger the node selection operation by performing a click operation on at least one to-be-deleted node on the node selection page through the user terminal.
[0091] Wherein, the marking color of the to-be-deleted node is a preset color used to mark the to-be-deleted node among the working nodes. It can be understood that the marking color is not the same as the color of the working nodes, for example, the node color of the working nodes is white and the marking color of the to-be-deleted node is red.
[0092] Specifically, the cluster processing system determines a to-be-deleted node and a marking color of the to-be-deleted node in response to a node selection operation triggered by the user for the node selection page.
[0093] S306, updating the node selection page based on the marking color of the to-be-deleted node, marking the to-be-deleted node, and displaying the updated node selection page.
[0094] Specifically, after determining the to-be-deleted node and the marking color of the to-be-deleted node, the cluster processing system can modify the node color of the to-be-deleted node in the node selection page to the marking color, for example, modify the node color of the to-be-deleted node from white to red, mark the to-be-deleted node, obtain the updated node selection page, and then display the updated node selection page on the user terminal. The user can intuitively determine the specific position of the to-be-deleted node in the cluster architecture and the connection relationship with other working nodes based on the user terminal.
[0095] S308, in response to a confirmation deletion operation triggered for the updated node selection page, executing a preset node deletion script to delete the to-be-deleted node from the cluster.
[0096] Wherein, the determination deletion operation is an operation behavior for instructing the cluster processing system to delete the to-be-deleted node, which can be triggered by the user through the user terminal.
[0097] The preset node deletion script is a code file for assisting the cluster processing system to automatically perform a node deletion operation, which internally encapsulates a series of commands or tasks. By pre-setting the preset node deletion script on the cluster processing system, the user can make the cluster processing system automatically complete the deletion operation of a certain worker node.
[0098] Specifically, the cluster processing system, in response to the confirmation deletion operation triggered for the updated node selection page, calls and executes the preset node deletion script to delete the to-be-deleted node from the cluster.
[0099] In some embodiments, after deleting the to-be-deleted node from the cluster, the cluster processing system can generate and display a cluster deployment architecture according to the connection relationship between the worker nodes after the node deletion.
[0100] In the above embodiments, when there is a node deletion requirement, the cluster processing system can visually display the position of the to-be-deleted node in the deployment architecture to the user, so as to quickly and accurately determine the to-be-deleted node. At the same time, the cluster processing system can automatically execute the node deletion task through the preset node deletion script, effectively improving the accuracy and efficiency of node deletion.
[0101] In some embodiments, as shown in Figure 4 The cluster processing method further includes the following steps:
[0102] S402, in the case where the cluster is configured with a monitoring alarm plug-in, running monitoring is performed on key indicators in the cluster based on the monitoring alarm plug-in.
[0103] The monitoring alarm plug-in is a plug-in for real-time monitoring and abnormality detection of key indicators in the cluster. The type of the monitoring alarm plug-in can be determined by the user according to the actual needs of the cluster, for example, the monitoring alarm plug-in can include Prometheus, Kube-state-metrics, Alertmanager, etc.
[0104] The key indicators in the cluster are indicator parameters that affect the running of the cluster, such as node status, container running status, application performance, etc.
[0105] Specifically, in the case where the cluster is configured with a monitoring alarm plug-in, the cluster processing system can perform running monitoring on key indicators in the cluster based on the cluster alarm plug-in.
[0106] S404, if it is monitored that the key indicator exceeds a preset indicator threshold, an alarm notification page is generated and displayed based on the key indicator and each candidate alarm coping strategy of the key indicator.
[0107] The preset index threshold is a preset threshold parameter for judging whether the key index has a running risk, which can be determined by the user according to the actual detection requirement.
[0108] The candidate alarm coping strategy is a risk coping strategy that can be used when the key index has a running risk. It can be understood that each key index can include at least one candidate alarm coping strategy. For example, the corresponding candidate alarm coping strategy will be different when the risk level monitored by each key index is different.
[0109] Specifically, the cluster processing system can generate and display an alarm notification page based on the key index and each candidate alarm coping strategy of the key index when it is monitored that the key index exceeds the corresponding preset index threshold.
[0110] S406, in response to the selection operation triggered for each candidate alarm coping strategy, determining the target alarm coping strategy.
[0111] The user can trigger a selection operation on each candidate alarm coping strategy based on the user terminal, that is, select the target alarm coping strategy from each candidate alarm coping strategy. For example, the user can perform a click operation on the target alarm coping strategy in the alarm notification page, that is, it is considered that the user triggers the selection operation.
[0112] Specifically, the cluster processing system determines the target alarm coping strategy in response to the selection operation triggered for each candidate alarm coping strategy. The target alarm coping strategy is a strategy scheme that meets the current coping demand of the user.
[0113] S408, updating the alarm notification page based on the preset annotation color of the target alarm coping strategy, performing strategy annotation on the target alarm coping strategy, and displaying the updated alarm notification page.
[0114] The preset annotation color is a preset color parameter for annotating the target alarm coping strategy, and the preset annotation color is different from the color of other candidate alarm coping strategies.
[0115] Specifically, the cluster processing system can modify the color of the target alarm coping strategy in the alarm notification page according to the preset annotation color of the target alarm coping strategy, modify the color of the target alarm coping strategy to the preset annotation color, and perform strategy annotation on the target alarm coping strategy to distinguish it from other candidate alarm coping strategies. After the modification is completed, the cluster processing system can display the updated alarm notification page on the user terminal.
[0116] S410, in response to the confirmation selection operation triggered for the updated alarm notification page, performing operation and maintenance management on the cluster according to the target alarm coping strategy.
[0117] The confirmation selection operation is triggered by the user for the updated alarm notification page. When the user determines that the target alarm coping strategy is not selected incorrectly based on the updated alarm notification page, the user can trigger the confirmation selection operation for the updated alarm notification page.
[0118] Specifically, the cluster processing system performs operation and maintenance management on the cluster according to the target alarm coping strategy in response to the confirmation selection operation triggered for the updated alarm notification page.
[0119] In the above embodiments, when the cluster processing system monitors that the cluster has an alarm condition, the cluster processing system can generate an alarm notification page according to the key indicators that appear to have a risk of operation and the corresponding candidate alarm coping strategies, and display the alarm notification page to the user, so that the user can accurately know the current operation condition of the cluster and the coping manner. When the user selects the target alarm coping strategy, the cluster processing system also updates the alarm notification page using a preset marking color, so that the user can verify the selection of the target alarm coping strategy, and the selection efficiency and selection accuracy of the target alarm coping strategy are effectively improved.
[0120] In some embodiments, as shown in Figure 5 The cluster processing method further includes the following steps:
[0121] S502, in response to a strategy matching analysis operation triggered for each candidate alarm coping strategy, calculating a strategy matching score of each candidate alarm coping strategy under the current cluster operation condition.
[0122] The strategy matching analysis operation is an analysis operation for determining the matching degree of each candidate alarm coping strategy and the current cluster operation condition. By performing strategy matching analysis on each candidate alarm coping strategy, the strategy matching score of each candidate alarm coping strategy under the current cluster operation condition can be determined. The strategy matching score can represent the matching degree of the candidate alarm coping strategy and the current cluster operation condition.
[0123] It can be understood that the strategy matching analysis operation can be triggered by the deployment personnel based on the user terminal.
[0124] Specifically, the cluster processing system can calculate the strategy matching score of each candidate alarm coping strategy under the current cluster operation condition in response to the strategy matching analysis operation triggered for each candidate alarm coping strategy.
[0125] In some embodiments, the cluster processing system is pre-configured with a strategy matching analysis model. In response to a strategy matching analysis operation triggered for each candidate alarm response strategy, the cluster processing system can input the index running data of the key index and each candidate alarm response strategy into the strategy matching analysis model, and calculate the strategy matching score of each candidate alarm response strategy through the strategy matching analysis model.
[0126] S504, determining the score display area corresponding to each candidate alarm response strategy on the alarm notification page.
[0127] The score display area is a page display area for displaying the strategy matching score of each candidate alarm response strategy. The score display area can be pre-designed by a designer according to the page display requirements of the cluster processing system. It can be understood that each candidate alarm response strategy corresponds to a respective score display area. For example, the designer can plan a preset area as the score display area of the candidate alarm response strategy behind the strategy display area of the candidate alarm response strategy.
[0128] Specifically, the cluster processing system can determine the score display area corresponding to each candidate alarm response strategy on the alarm notification page according to the page design information pre-configured by the cluster.
[0129] S506, filling the strategy matching score of each candidate alarm response strategy into the corresponding score display area, and updating and displaying the alarm notification page.
[0130] Specifically, after obtaining the strategy matching score of each candidate alarm response strategy and determining the score display area corresponding to each candidate alarm response strategy, the cluster processing system can fill the strategy matching score of each candidate alarm response strategy into the corresponding score display area, and update and display the alarm notification page. The user can intuitively determine the matching degree of each candidate alarm response strategy and the current cluster running condition through the user terminal, thereby providing data reference for the user to select a target alarm response strategy.
[0131] In some embodiments, as shown in Figure 6 The cluster processing method further includes:
[0132] S602, performing node fault monitoring on the cluster in the running state.
[0133] The node fault monitoring is a monitoring means for monitoring the running state of each working node in the cluster.
[0134] Specifically, the cluster processing system is pre-configured with a fault monitoring component, which can perform node fault monitoring on the cluster in the running state to determine whether the running state of each working node in the cluster is abnormal.
[0135] S604, in a case where it is determined that there is a faulty node in the cluster, determining at least one migratable node from the working nodes of the cluster.
[0136] The faulty node is a working node whose running state is abnormal. In a case where it is monitored that the running state of a working node is abnormal, the working node can be determined as the faulty node.
[0137] The migratable node is a working node whose running state is normal and has a load increase margin.
[0138] Specifically, in a case where it is determined that there is a faulty node in the cluster, the cluster processing system can determine at least one migratable node from the working nodes according to the running states of the working nodes in the cluster and the running information of the working nodes.
[0139] S606, scheduling the working load of the faulty node to the migratable node, and recording migration information generated by the node migration.
[0140] Specifically, after determining the migratable node, the cluster processing system can schedule the working load of the faulty node to the migratable node, and record migration information generated by the node migration, wherein the migration information can include working nodes involved in the migration of the working load, a migration direction of the working load, and a migration amount of the working load, etc.
[0141] In some embodiments, in a case where there are multiple migratable nodes, the cluster processing system can schedule the working load of the faulty node to the migratable nodes according to a preset migration manner, for example, determine a target migratable node for load migration according to the actual load situation of each migratable node.
[0142] S608, in response to a fault query operation for the cluster, generating and displaying a node migration simulation animation based on the migration information.
[0143] The fault query operation is an operation behavior triggered by the user when querying the fault of the cluster, for example, the user can trigger the fault query operation for the cluster by clicking the fault query function on the cluster processing system through the user terminal.
[0144] Specifically, in response to the fault query operation for the cluster, the cluster processing system calls the simulation animation component to generate a node migration simulation animation based on the migration information, and displays the node migration simulation animation on the user terminal. The node migration simulation animation is used to show the migration situation of the working load of the faulty node in the cluster.
[0145] In the above embodiments, the cluster processing system can automatically migrate the workloads after the node failure through the built-in fault-tolerant mechanism to ensure service continuity, and can make the user more intuitively understand the node load migration process through the generation of the node migration simulation animation.
[0146] In some embodiments, as shown in Figure 7 The cluster deployment component includes a resource control component, an initial control component, and a plug-in control component. The cluster deployment component deployed on the deployment host according to the cluster configuration file in S210 includes:
[0147] S702, calling the resource control component to execute object configuration operations according to the respective sub-configuration files of the resource management objects, and creating the resource management objects for the cluster.
[0148] The resource control component is a preset component for creating resource management objects. The resource management object is a resource object customized by the user through the deployment configuration page, and is used to manage the basic resources of the cluster, such as computing resources, network resources, and storage resources.
[0149] The sub-configuration file corresponding to the resource management object is the configuration file information used to configure the resource management object.
[0150] Specifically, after obtaining the configuration file of the cluster, the cluster processing system can parse the configuration file, determine the resource management objects customized by the user, and the respective sub-configuration files of the resource management objects, call the resource control component to execute object configuration operations according to the respective sub-configuration files of the resource management objects, and create the resource management objects for the cluster, which are used to manage the basic resources of the cluster, such as computing resources, network resources, and storage resources.
[0151] S704, calling the initialization control component to execute the control plane deployment script based on the respective sub-configuration files to deploy the control plane in the deployment host.
[0152] The initialization control component is a preset component for deploying the control plane and the worker node for the cluster. It can be understood that the initialization control component integrates tools such as kubespray and ansible, and can generate the configuration file required by kubespray by listening to the sub-configuration file of the resource management object, and then execute the control plane deployment script to deploy the control plane in the deployment host.
[0153] The control plane deployment script is a script file used to assist the initialization control component to automatically execute the control plane deployment.
[0154] Specifically, after creating the resource management objects, the cluster processing system can invoke the initialization control component to generate the configuration files required by kubespray by monitoring the sub-configuration files of the resource management objects, and then execute the control plane deployment script, such as the ansible-playbook script, based on the configuration files required by kubespray to deploy the control nodes, and after the deployment of all control nodes is completed, it is considered that the deployment of the control plane of the cluster is completed.
[0155] S706, execute the worker node joining script to create the worker nodes in the deployment host and connect the worker nodes to the control plane.
[0156] The worker node joining script is a script file used to assist the initialization control component to automatically perform the node joining operation, which can be pre-set in the cluster processing system by the designer.
[0157] Specifically, the initialization control component can use cloudinit to execute the worker node joining script when creating the worker nodes, create the worker nodes in the deployment host, and use the joining command, such as the kubeadm join command, to connect the worker nodes to the control plane to complete the worker node configuration of the cluster.
[0158] S708, obtain the plugin installation file of the selected configuration plugin from the preset plugin library according to the plugin configuration file.
[0159] The plugin configuration file is a plugin configuration file generated by the user based on the deployment configuration page, which is used to determine the selected configuration plugin that needs to be deployed in the cluster.
[0160] The preset plugin library is a file storage library used to store the installation files of various plugins.
[0161] Specifically, the cluster processing system can extract information from the plugin configuration file to determine the selected configuration plugin identifier, such as the plugin name and plugin type, that needs to be configured in the cluster, and then obtain the plugin installation file of the selected configuration plugin from the preset plugin library according to the selected configuration plugin identifier.
[0162] S710, invoke the plugin control component to execute the plugin configuration operation using the plugin installation file to install the selected configuration plugin on the deployment host.
[0163] The plugin control component is a preset component used to automatically install the selected configuration plugin for the cluster.
[0164] Specifically, after obtaining the plugin installation file of the selected configuration plugin, the cluster processing system can invoke the plugin control component to execute the plugin configuration operation using the plugin installation file to install the selected configuration plugin on the deployment host.
[0165] In the above embodiments, by pre-setting various types of cluster configuration components, the cluster deployment task can be completed through a scripting or automation tool, reducing the amount of manual intervention in the cluster configuration process and reducing the error probability of cluster deployment.
[0166] In some embodiments, as shown in Figure 8 A cluster processing method is provided, specifically including the following steps:
[0167] First, the cluster processing system responds to the cluster deployment start operation for the deployment host, and performs an infrastructure deployment operation for the deployment host to obtain a deployment host with basic conditions for deploying a cluster.
[0168] Specifically, the cluster processing system needs to ensure that the deployment host has the basic conditions for deploying a Kubernetes cluster, such as an operating system, network configuration, etc. The operating system is made by customizing an image, and the required applications for deploying a cluster, such as containerd, kubelet, kubeadm, and kubectl, are installed in advance.
[0169] After obtaining a deployment host with basic conditions for deploying a cluster, the cluster processing system can generate and display a deployment configuration page according to a pre-set cluster deployment template. It can be understood that the deployment configuration page is an image page, including configuration controls for various cluster deployment parameters.
[0170] The user can perform a control trigger operation on the configuration control based on the user terminal. The cluster processing system responds to the control trigger operation on the configuration control and displays a parameter configuration area of the configuration control according to the pre-set parameter configuration information of the configuration control on the deployment configuration page.
[0171] The user can perform a parameter configuration operation on the parameter configuration area based on the user terminal, such as filling in the required information for cluster deployment. The cluster processing system responds to the parameter configuration operation on the parameter configuration area and generates a cluster configuration file for the cluster.
[0172] Subsequently, the cluster processing system can parse the configuration file, determine the user-defined resource management objects, and the respective sub-configuration files of each resource management object, and call the resource control component to perform object configuration operations according to the respective sub-configuration files of each resource management object to create each resource management object for the cluster, which is used to manage the basic resources of the cluster, such as computing resources, network resources, and storage resources, etc.
[0173] The initialization control component is called to generate the configuration file required by kubespray by monitoring the sub-configuration file of the resource management object, execute the ansible-playbook script based on the configuration file required by kubespray, deploy the control node, and complete the deployment of the cluster control plane. It can be understood that the initialization control component integrates kubespray, ansible and other tools.
[0174] The initialization control component can use cloudinit to execute the work node joining script when creating the work node, create each work node in the deployment host, and use the joining command, such as the kubeadm join command, to connect each work node to the control plane, and complete the configuration of the work node of the cluster.
[0175] In addition, the cluster processing system can also call the plugin control component to obtain the plugin installation file of the selected configuration plugin from the preset plugin library according to the plugin configuration file, and use the plugin installation file to perform the plugin configuration operation to install the selected configuration plugin on the deployment host. It can be understood that the plugin control component integrates the helm tool, and the selected configuration plugin can include cni network plugin, nginx-ingress plugin, log plugin and monitoring and alarm plugin, etc.
[0176] The cluster processing system can also write Horizontal Pod Autoscaler (HPA) configuration to let Kubernetes automatically adjust the number of replicas according to the load and save resource cost according to actual demand.
[0177] In the above embodiments, the cluster is deployed through a unified deployment process and tool, which can effectively reduce the complexity of cluster deployment, improve deployment consistency and repeatability, preinstall necessary applications required by k8s cluster through custom image, greatly reduce the time of pulling files from file center, and speed up node initialization. Secondly, cloudinit technology is used to execute the node joining script in the machine creation process, which shortens the initialization time of the work node. A large number of tasks can be completed through scripting or automation tools, reducing manual intervention and reducing the probability of errors.
[0178] In some embodiments, the cluster processing system can also periodically audit and upgrade the cluster configuration to keep the cluster in best practices and security.
[0179] In some embodiments, the K8s cluster can be designed for horizontal expansion, which can easily handle more workloads and support large-scale distributed systems.
[0180] In some embodiments, the cluster processing system can facilitate management and upgrade of application versions through a package management system such as helm, and facilitate blue-green deployment or rolling update.
[0181] It should be understood that, although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.
[0182] Based on the same inventive concept, the embodiments of the present application also provide a cluster processing apparatus for implementing the above-mentioned cluster processing method. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more cluster processing apparatus embodiments provided below can refer to the limitations of the cluster processing method described above, which will not be described here again.
[0183] In one embodiment, as shown in Figure 9 A cluster processing apparatus 900 is provided, comprising a configuration page generation module 901, a configuration area display module 902, a configuration file generation module 903, a visual simulation deployment module 904 and a cluster deployment module 905, wherein:
[0184] The configuration page generation module 901 is configured to, in response to a cluster deployment start operation for a deployment host, generate and display a deployment configuration page according to a preset cluster deployment template, the deployment configuration page comprising configuration controls of various cluster deployment parameters.
[0185] The configuration area display module 902 is configured to, for each configuration control, in response to a control trigger operation for the configuration control, display a parameter configuration area of the configuration control according to preset parameter configuration information of the configuration control on the deployment configuration page.
[0186] The configuration file generation module 903 is configured to, for each parameter configuration area, in response to a parameter configuration operation for the parameter configuration area, generate a cluster configuration file of the cluster.
[0187] The visual simulation deployment module 904 is configured to visually simulate the deployment process of the cluster based on the cluster configuration file, and display a simulated deployment architecture of the cluster on the deployment configuration page.
[0188] The cluster deployment module 905 is configured to, in response to a confirmation deployment operation triggered for the simulation deployment architecture, invoke the cluster deployment component to deploy the cluster on the deployment host according to the cluster configuration file.
[0189] In some embodiments, the cluster processing apparatus further comprises:
[0190] The node deletion operation response module is configured to, in response to a node deletion operation for the cluster, generate and display a node selection page according to the deployment architecture of the cluster, the node selection page being used to show each working node deployed in the cluster and the connection relationship between the working nodes.
[0191] The node selection operation response module is configured to, in response to a node selection operation triggered for the node selection page, determine a node to be deleted and a label color of the node to be deleted.
[0192] The confirmation deletion operation response module is configured to, in response to a confirmation deletion operation triggered for the updated node selection page, execute a preset node deletion script to delete the node to be deleted from the cluster.
[0193] In some embodiments, the cluster processing apparatus further comprises:
[0194] The running monitoring module is configured to, in a case where the cluster is configured with a monitoring and alarming plug-in, perform running monitoring on a key indicator in the cluster based on the monitoring and alarming plug-in.
[0195] The alarm notification page generation module is configured to, if the key indicator is monitored to exceed a preset indicator threshold, generate and display an alarm notification page based on the key indicator and each candidate alarm coping strategy of the key indicator.
[0196] The selection operation response module is configured to, in response to a selection operation triggered for each candidate alarm coping strategy, determine a target alarm coping strategy.
[0197] The page updating module is configured to update the alarm notification page based on a preset label color of the target alarm coping strategy, perform strategy labeling on the target alarm coping strategy, and display the updated alarm notification page.
[0198] The confirmation selection operation response module is configured to, in response to a confirmation selection operation triggered for the updated alarm notification page, perform operation and maintenance management on the cluster according to the target alarm coping strategy.
[0199] In some embodiments, the cluster processing apparatus further comprises:
[0200] The strategy matching analysis module is configured to calculate a strategy matching score of each candidate alarm response strategy under the current cluster operating condition in response to a triggered strategy matching analysis operation for each candidate alarm response strategy.
[0201] The score display area determination module is configured to determine a respective score display area of each candidate alarm response strategy on the alarm notification page.
[0202] The score filling module is configured to fill the strategy matching score of each candidate alarm response strategy into the corresponding score display area, and update and display the alarm notification page.
[0203] In some embodiments, the cluster processing apparatus further comprises:
[0204] The fault monitoring module is configured to perform node fault monitoring on the cluster in the running state.
[0205] The migratable node determination module is configured to determine at least one migratable node from each worker node of the cluster in a case where it is determined that there is a faulty node in the cluster.
[0206] The load scheduling module is configured to schedule the work load of the faulty node to the migratable node, and record migration information generated by the node migration.
[0207] The fault query operation response module is configured to generate and display a node migration simulation animation based on the migration information in response to a fault query operation for the cluster; the node migration simulation animation is configured to show the migration of the work load of the faulty node in the cluster.
[0208] In some embodiments, the cluster deployment component comprises a resource control component, an initialization control component, and a plugin control component; and the configuration file comprises a sub-configuration file of each resource management object and a plugin configuration file. The cluster deployment module 905 is configured to: invoke the resource control component to perform an object configuration operation according to the sub-configuration file of each resource management object, and create each resource management object for the cluster; invoke the initialization control component to execute a control plane deployment script based on each sub-configuration file, and deploy a control plane in a deployment host; execute a worker node joining script to create each worker node in the deployment host and connect each worker node to the control plane; acquire a plugin installation file of a selected configuration plugin from a preset plugin library according to the plugin configuration file; and invoke the plugin control component to execute a plugin configuration operation using the plugin installation file, and install the selected configuration plugin on the deployment host.
[0209] Each module in the aforementioned cluster processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0210] In one embodiment, a computer device is provided, which may be a server integrating a cluster processing system, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores preset cluster deployment templates, preset parameter configuration information, cluster configuration files, simulated deployment architectures, and other data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a cluster processing method.
[0211] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0212] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the specific implementation steps of the above-described cluster processing method.
[0213] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the specific implementation steps of the above-described cluster processing method.
[0214] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the specific implementation steps of the above-described cluster processing method.
[0215] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties. And the acquisition, storage, processing, transmission, etc. of the data comply with the relevant provisions of laws and regulations.
[0216] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to a memory, database or other medium used in the embodiments provided by the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., but is not limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0217] The technical features of the above embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0218] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A cluster processing method, characterized in that, Applied to a cluster processing system, the method includes: In response to the cluster deployment startup operation for the deployment host, a deployment configuration page is generated and displayed according to the preset cluster deployment template. The deployment configuration page includes configuration controls for each cluster deployment parameter. For each of the configuration controls, in response to a control triggering operation for the configuration control, the parameter configuration area of the configuration control is displayed on the deployment configuration page according to the preset parameter configuration information of the configuration control; For each of the parameter configuration areas, in response to the parameter configuration operation for the parameter configuration area, a cluster configuration file for the cluster is generated; The deployment process of the cluster is visualized and simulated based on the cluster configuration file, and the simulated deployment architecture of the cluster is displayed on the deployment configuration page. In response to a confirmation deployment operation triggered for the simulated deployment architecture, the cluster deployment component is invoked to deploy the cluster on the deployment host according to the cluster configuration file; Node fault monitoring is performed on the cluster that is in operation; If a faulty node is determined to exist in the cluster, at least one migrateable node is identified from the working nodes of the cluster. The workload of the faulty node is scheduled to the migrateable node, and the migration information generated by the node migration is recorded; In response to a fault query operation for the cluster, a node migration simulation animation is generated and displayed based on the migration information; the node migration simulation animation is used to demonstrate the migration of the workload of the faulty node in the cluster. The cluster deployment components include a resource control component, an initialization control component, and a plugin control component; the configuration files include sub-configuration files for each resource management object and plugin configuration files. The invocation of the cluster deployment component to deploy the cluster on the deployment host according to the cluster configuration file includes: The resource control component is invoked to perform object configuration operations based on the respective sub-configuration files of each resource management object, thereby creating each of the resource management objects for the cluster. The initialization control component is invoked, and the control plane deployment script is executed based on each of the sub-configuration files to deploy the control plane on the deployment host. The script for adding worker nodes is executed to create each worker node in the deployment host and connect each worker node to the control plane; According to the plugin configuration file, the plugin installation file of the selected configuration plugin is obtained from the preset plugin library; The plugin control component is invoked to perform plugin configuration operations using the plugin installation file, and the selected configuration plugin is installed on the deployment host.
2. The method according to claim 1, characterized in that, The method further includes: In response to a node deletion operation for the cluster, a node selection page is generated and displayed according to the deployment architecture of the cluster. The node selection page is used to display each worker node deployed in the cluster and the connection relationship between each worker node. In response to a node selection operation triggered on the node selection page, determine the node to be deleted and the color of the node to be deleted. The node selection page is updated based on the annotation color of the node to be deleted, the node to be deleted is annotated, and the updated node selection page is displayed. In response to the confirmation deletion operation triggered by the updated node selection page, a preset node deletion script is executed to delete the node to be deleted from the cluster.
3. The method according to claim 1 or 2, characterized in that, The method further includes: When the cluster is configured with a monitoring and alarm plugin, the key indicators in the cluster are monitored based on the monitoring and alarm plugin. If the key indicator is detected to exceed the preset indicator threshold, an alarm notification page is generated and displayed based on the key indicator and each candidate alarm response strategy for the key indicator. In response to the selection operation triggered for each of the candidate alarm response strategies, the target alarm response strategy is determined; The alarm notification page is updated based on the preset color of the target alarm response strategy, the target alarm response strategy is marked, and the updated alarm notification page is displayed. In response to the confirmation selection operation triggered by the updated alarm notification page, the cluster is operated and managed in accordance with the target alarm response strategy.
4. The method according to claim 3, characterized in that, The method further includes: In response to the policy matching analysis operation triggered for each of the candidate alarm response policies, calculate the policy matching score of each of the candidate alarm response policies under the current cluster operation conditions; Determine the score display area corresponding to each of the candidate alarm response strategies on the alarm notification page; Fill the corresponding score display area with the strategy matching score of each candidate alarm response strategy, and update and display the alarm notification page.
5. A cluster processing device, characterized in that, The device includes: The configuration page generation module is used to respond to the cluster deployment startup operation for the deployment host, generate and display the deployment configuration page according to the preset cluster deployment template, and the deployment configuration page includes configuration controls for each cluster deployment parameter; The configuration area display module is used to, for each configuration control, in response to a control trigger operation for the configuration control, display the parameter configuration area of the configuration control on the deployment configuration page according to the preset parameter configuration information of the configuration control; The configuration file generation module is used to generate a cluster configuration file for the cluster in response to a parameter configuration operation for each of the parameter configuration areas. The visualization simulation deployment module is used to visualize and simulate the deployment process of the cluster based on the cluster configuration file, and to display the simulated deployment architecture of the cluster on the deployment configuration page. The cluster deployment module is used to respond to a confirmation deployment operation triggered for the simulated deployment architecture by invoking the cluster deployment component to deploy the cluster on the deployment host according to the cluster configuration file; The fault monitoring module is used to monitor node faults in the cluster that is in operation. A migrateable node determination module is used to determine at least one migrateable node from the working nodes of the cluster when it is determined that there is a faulty node in the cluster. The load scheduling module is used to schedule the workload of the faulty node to the migrateable node and record the migration information generated by the node migration. The fault query operation response module is used to respond to a fault query operation for the cluster, generate a node migration simulation animation based on the migration information, and display it; the node migration simulation animation is used to demonstrate the migration of the workload of the faulty node in the cluster. The cluster deployment component includes a resource control component, an initialization control component, and a plugin control component; the configuration file includes sub-configuration files for each resource management object and plugin configuration files; the cluster deployment module is used to: call the resource control component to perform object configuration operations based on the sub-configuration files of each resource management object, creating each of the resource management objects for the cluster; call the initialization control component to execute a control plane deployment script based on each of the sub-configuration files, deploying the control plane on the deployment host; execute a worker node addition script to create each worker node on the deployment host and connect each worker node to the control plane; obtain the plugin installation file of the selected configuration plugin from a preset plugin library according to the plugin configuration file; call the plugin control component to perform plugin configuration operations using the plugin installation file, installing the selected configuration plugin on the deployment host.
6. The apparatus according to claim 5, characterized in that, The device further includes: The node deletion operation response module is used to respond to the node deletion operation for the cluster, generate and display a node selection page according to the deployment architecture of the cluster, and the node selection page is used to display each worker node deployed in the cluster and the connection relationship between each worker node. The node selection operation response module is used to respond to the node selection operation triggered for the node selection page, and to determine the node to be deleted and the annotation color of the node to be deleted. The node annotation module is used to update the node selection page based on the annotation color of the node to be deleted, to annotate the node to be deleted, and to display the updated node selection page. The confirmation deletion operation response module is used to respond to the confirmation deletion operation triggered by the updated node selection page, execute a preset node deletion script, and delete the node to be deleted from the cluster.
7. The apparatus according to claim 5, characterized in that, The device further includes: The operation monitoring module is used to perform operation monitoring on key indicators in the cluster based on the monitoring and alarm plugin when the cluster is configured with a monitoring and alarm plugin. The alarm notification page generation module is used to generate and display an alarm notification page based on the key indicator and the candidate alarm response strategies for the key indicator if the key indicator is detected to exceed the preset indicator threshold. The selection operation response module is used to determine the target alarm response strategy in response to the selection operation triggered for each of the candidate alarm response strategies. The page update module is used to update the alarm notification page based on the preset annotation color of the target alarm response strategy, to annotate the target alarm response strategy, and to display the updated alarm notification page. The confirmation selection operation response module is used to respond to the confirmation selection operation triggered by the updated alarm notification page and to perform operation and maintenance management of the cluster according to the target alarm response strategy.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Multi-cluster system arrangement method and device, computer equipment and storage medium
CN112148164A
Rapid deployment platform for application container
CN114138406A