Method and device for deploying application cluster
Automating the processing of target application clusters by generating and executing task flows, solving the problem of inefficient deployment of large-scale clusters manually, improving cluster deployment efficiency and reducing maintenance complexity.
Patent Information
- Application Number
- CN202411569545.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-14
AI Technical Summary
Manual deployment of large-scale clusters in the prior art is inefficient, which can easily lead to deployment errors, resource waste and maintenance complexity.
By obtaining the request initiated by the target account, a task flow is generated based on the carried target configuration information, and multiple tasks in the task flow are executed sequentially to process the target application cluster automatically and batchwise.
It realizes automated processing of application clusters, improves cluster deployment efficiency, reduces human errors and resource waste, and reduces maintenance complexity.
Smart Images

Figure CN119440732A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the computer field, and in particular, to a method and device for deploying an application cluster. Background Art
[0002] As public cloud technology matures and is promoted and applied, more and more companies are deploying their business systems or management systems on the cloud. For example, they can expand and manage their businesses by using the Infrastructure as a Service (IAAS) and Platform as a Service (PAAS) products provided by the public cloud, thereby achieving more efficient resource utilization, more convenient management, and more flexible expansion. At the same time, the elastic expansion and flexible billing model of the public cloud also enable companies to increase or decrease resources at any time according to business needs, reducing operation and maintenance costs and risks.
[0003] Currently, cloud product instance creation and service deployment are mainly completed manually through the cloud service provider's console or command line tools, which is inefficient, especially when deploying large-scale clusters. In addition, manual deployment may also lead to deployment errors or inconsistent standards. The quality of deployment is greatly affected by human factors, resulting in resource waste, deployment failures, and other problems, while also increasing the complexity of maintenance and debugging.
[0004] There is currently no effective solution to the above problems. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for deploying an application cluster, so as to at least solve the problem of low efficiency of manually deploying a large-scale cluster in the related art.
[0006] According to one embodiment of the present invention, a method for deploying an application cluster is provided, comprising: obtaining a target request initiated by a target account for requesting target processing of a target application cluster in a target cloud server, wherein the target request carries target configuration information for configuring the target application cluster; responding to the target request, generating a task flow for executing the target processing according to the target configuration information, wherein the task flow includes multiple tasks; and sequentially executing the multiple tasks included in the task flow to perform the target processing on the target application cluster.
[0007] In an exemplary embodiment, in response to the target request, a task flow for executing the target processing is generated according to the target configuration information, including: when the target request is to create the target application cluster or to expand the target application cluster, determining the target cloud resource quota occupied by the nodes of the application cluster to be added according to the target configuration information; verifying the target cloud resource quota; and when the target cloud resource quota verification passes, generating a task flow for executing the target processing according to the target configuration information.
[0008] In an exemplary embodiment, after verifying the target cloud resource quota, the method further includes at least one of the following: if the target cloud resource quota verification fails, determining a first number of nodes based on the remaining cloud resource quota of the cloud platform, and sending a first message to the target account, wherein the first number of nodes is the number of nodes of the application cluster that can be deployed with the remaining cloud resource quota, and the first message is used to indicate the first number of nodes; if the target cloud resource quota verification fails, sending a second message to the target account, wherein the second message is used to indicate that the remaining cloud resource quota of the cloud platform cannot meet the resources required by the nodes of the application cluster to be added.
[0009] In an exemplary embodiment, in response to the target request, a task flow for executing the target processing is generated according to the target configuration information, including: when the target request is to shrink the target application cluster, determining the number of second nodes included in the target application cluster whose CPU utilization is less than a preset utilization threshold; when the number of second nodes is greater than the number of target nodes included in the target configuration information, updating the number of target nodes to the number of second nodes to obtain updated target configuration information; and generating a task flow for executing the target processing according to the updated target configuration information.
[0010] In an exemplary embodiment, before responding to the target request and generating a task flow for executing the target processing according to the target configuration information, the method also includes: verifying the target account; if the target account verification passes, obtaining the deployment area of the target application cluster and storing the deployment area in a database; if the target account verification fails, sending a third message to the target account, wherein the third message is used to indicate that the target request verification fails.
[0011] In an exemplary embodiment, in response to a monitoring request sent by a monitoring platform, the monitoring tool of the target application cluster is accessed to obtain target monitoring information, wherein the target monitoring information includes resource usage of the target application cluster; and the target monitoring information is sent to the monitoring platform.
[0012] According to another embodiment of the present invention, there is provided an apparatus for deploying an application cluster, comprising: an acquisition module, for acquiring a target request initiated by a target account for requesting target processing of a target application cluster in a target cloud server, wherein the target request carries target configuration information for configuring the target application cluster; a response module, for responding to the target request, and generating a task flow for executing the target processing according to the target configuration information, wherein the task flow includes a plurality of tasks; and an execution module, for sequentially executing the plurality of tasks included in the task flow to perform the target processing on the target application cluster.
[0013] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0014] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0015] According to yet another embodiment of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0016] Through the present invention, according to the configuration information of the target application cluster carried in the target request, a task flow for processing one or more application clusters in the target application cluster is automatically generated, and the task flow is executed to process the target application cluster, thereby realizing the automatic and batch processing of the application cluster. Therefore, the problem of low efficiency of manually deploying large-scale clusters in the related art can be solved, and the effect of improving the efficiency of cluster deployment can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for deploying an application cluster according to an embodiment of the present invention;
[0018] Figure 2 is a flowchart of a method for deploying an application cluster according to an embodiment of the present invention;
[0019] Figure 3 is a specific flow chart according to an embodiment of the present invention;
[0020] Figure 4 It is a structural block diagram of an apparatus for deploying an application cluster according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0023] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal of a method for deploying an application cluster according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0024] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for deploying an application cluster in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0025] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0026] In this embodiment, a method running on the above mobile terminal or network architecture is provided. Figure 2 is a flow chart of a method for deploying an application cluster according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0027] Step S202, obtaining a target request initiated by a target account for requesting target processing of a target application cluster in a target cloud server, wherein the target request carries target configuration information for configuring the target application cluster;
[0028] The target application cluster may be one or more application clusters; the target account may be an account for a user to operate the application cluster, and the account may be an account for a user to operate the front-end page; the target processing may be an operation to be performed on the application cluster, such as creating an application cluster, expanding the application cluster, shrinking the application cluster, etc.; the target request may be an instruction generated according to the needs of the user to perform related operations on the application cluster; the configuration information may be relevant information required to process the application cluster, such as the number of nodes, application version, host configuration, system image, etc. of the application cluster. After the user fills in the target processing required for the application cluster information and the information required to configure the application cluster through the target account on the front-end page, the front-end page generates a corresponding target request and submits it to the back-end main service ums-platfrom (target platform), and the target platform obtains the target request initiated by the target account.
[0029] Step S204, responding to the target request, generating a task flow for executing the target processing according to the target configuration information, wherein the task flow includes a plurality of tasks;
[0030] Optionally, when the target request is to create the target application cluster or to expand the target application cluster, the target cloud resource quota occupied by the nodes of the application cluster to be added is determined according to the target configuration information; the target cloud resource quota is verified; and when the target cloud resource quota verification passes, a task flow for executing the target processing is generated according to the target configuration information.
[0031] The nodes of the application cluster to be added may be the number of nodes that need to be created to create the target application cluster, or the number of nodes that need to be added to expand the target application cluster; the target cloud resource quota may be the cloud resource quota that the nodes of the application cluster to be added need to occupy; the task flow may be a collection of specific tasks to be performed to create or expand the target application cluster, and the task flow includes one or more tasks, and the tasks are used to perform related operations, such as creating instances, creating security groups, installing product software, etc. In the case of requesting to create or expand the target application cluster, the number of nodes that need to be added to create or expand the target application cluster is determined based on the configuration information carried in the target request, and the target cloud resource quota required to create or expand the target application cluster is determined based on the number of nodes, and the target cloud resource quota is verified. If the verification passes, the corresponding task flow is generated based on the configuration information carried in the target request.
[0032] Optionally, when the target request is to shrink the target application cluster, determine the number of second nodes in the target application cluster whose CPU utilization is less than a preset utilization threshold; when the number of second nodes is greater than the number of target nodes included in the target configuration information, update the number of target nodes to the number of second nodes to obtain updated target configuration information; and generate a task flow for executing the target processing based on the updated target configuration information.
[0033] The above-mentioned preset utilization threshold can be set according to actual conditions, such as 50%, 30%, 20%, etc.; the above-mentioned task flow can be a collection of specific tasks for shrinking the target application cluster, and the task flow includes one or more tasks, and the tasks are used to perform related operations, such as uninstalling managed product components, deleting hosts, updating cluster information, etc. In the case of requesting to shrink the target application cluster, the CPU usage of each node in the target application cluster is determined, and a task flow is generated based on the CPU usage of each node. It should be noted that this application only uses CPU usage as a specific embodiment for explanation, and the specific node judgment basis can be set according to actual conditions, and no specific limitation is made here.
[0034] For example, the nodes in the target application cluster can be sorted from small to large according to their CPU usage, and according to the number of target nodes N in the target configuration information, the first N nodes in the target application cluster can be selected as target nodes, and a task flow can be generated according to the target nodes and the target configuration information, so that the resources in the system can be more concentrated and used more effectively, the utilization rate of resources can be improved, energy consumption and resource waste can be reduced, thereby reducing the cost of system operation, and at the same time helping the system to better achieve load balancing and improve the stability and reliability of the system.
[0035] Alternatively, the number of second nodes in the target application cluster whose CPU utilization is less than a preset utilization threshold is determined. When the number of second nodes is greater than the number of target nodes included in the target configuration information, the number of target nodes is updated to the number of second nodes to obtain updated target configuration information, and a task flow is generated according to the updated target configuration information. The target application cluster is deleted according to the actual resource usage in the target application cluster, so that the extra resources can be allocated to other nodes, thereby improving the performance of these nodes and making the overall system run more smoothly. At the same time, deleting nodes with low CPU utilization can reduce resource waste, thereby saving costs and improving resource utilization. In addition, the extra resources can be used for data analysis and mining, which can help enterprises better understand user behavior and market trends and provide support for business decisions. When the number of second nodes is less than the number of target nodes included in the target configuration information, a fourth message is sent to the target account to inform the user that the number of target nodes is greater than the number of second nodes. The user can choose to continue to shrink the target application cluster according to the target node number according to the actual situation, or use the second node number to update the target node number in the target configuration information, thereby ensuring the stable operation of the target application cluster.
[0036] Alternatively, the target nodes that need to be deleted are directly included in the target configuration information, and the task flow is directly generated according to the target configuration information, so that the nodes in the target application cluster are deleted according to actual needs. This can ensure that more resources are released on the basis of maintaining existing business products, reduce the possibility of being attacked, and reduce security risks.
[0037] Step S206: executing the multiple tasks included in the task flow in sequence to perform the target processing on the target application cluster.
[0038] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.
[0039] Through the above steps, the target platform can generate a task flow for target processing of the target application cluster according to the configuration information in the target request, and execute the tasks in the task flow in sequence, thereby realizing the creation or expansion and reduction of one or more application clusters in the target application cluster, solving the problem of low efficiency of manual deployment of large-scale clusters in related technologies and improving the efficiency of cluster deployment.
[0040] As an optional implementation, after verifying the target cloud resource quota, the method further includes at least one of the following: if the target cloud resource quota verification fails, determining the first number of nodes based on the remaining cloud resource quota of the cloud platform, and sending a first message to the target account, wherein the first number of nodes is the number of nodes of the application cluster that can be deployed with the remaining cloud resource quota, and the first message is used to indicate the first number of nodes; if the target cloud resource quota verification fails, sending a second message to the target account, wherein the second message is used to indicate that the remaining cloud resource quota of the cloud platform cannot meet the resources required by the nodes of the application cluster to be added.
[0041] If the target cloud resource quota check fails, it means that the remaining cloud resource quota of the cloud platform is insufficient to support the creation of the nodes of the application cluster to be added. At this time, the first number of application cluster nodes that the remaining cloud resource quota can support is determined, and the first message and / or the second message is sent to the target account to inform the target node that the remaining cloud resource quota of the cloud platform cannot meet the resources required by the nodes of the application cluster to be added, and the number of nodes of the deployed application cluster supported by the remaining cloud resource quota.
[0042] As an optional implementation, the method further includes: storing the target configuration information and the task flow in a database.
[0043] The above database can be a mysql database or a redis database, wherein the target configuration information is stored in the mysql database, and the task flow is stored in the redis database; by storing the target configuration information of the target application cluster in the database, the configuration information can be easily managed and viewed, avoiding the tedious process of manually managing the configuration information, and it is also convenient to view the history of the application cluster configuration information, to troubleshoot problems and analyze the reasons for configuration changes, and at the same time, it can ensure that the configuration information between different nodes is consistent, avoiding problems caused by inconsistent configuration information. In addition, the database can provide permission management and access control, which can protect the security of configuration information and prevent unauthorized users from modifying configuration information. The configuration information stored in the database is integrated with automation tools, which helps to realize automated configuration management and deployment, improve efficiency and reduce the risk of errors in manual operations.
[0044] As an optional implementation, the method further includes: storing the task flow in redis.
[0045] As an optional implementation, before responding to the target request and generating a task flow for executing the target processing according to the target configuration information, the method also includes: verifying the target account; if the target account verification passes, obtaining the deployment area of the target application cluster and storing the deployment area in a database; if the target account verification fails, sending a third message to the target account, wherein the third message is used to indicate that the target request verification fails.
[0046] The above deployment area can be the region of the cloud platform to be deployed, the department, etc. Before generating the task flow, the target account is verified. If the verification passes, the deployment area of the target application cluster is obtained and the deployment area is stored in the database; if the verification fails, a third message is sent to the target account to inform the target account that the verification fails. By verifying the target account, it can help ensure the accuracy and validity of the target account, avoid errors caused by input errors or other factors, and ensure the accuracy and completeness of the information. At the same time, it also helps prevent fraud and illegal activities and protect the personal information security of users.
[0047] As an optional implementation, the method also includes: in response to a monitoring request sent by a monitoring platform, accessing the monitoring tool of the target application cluster to obtain target monitoring information, wherein the target monitoring information includes resource usage of the target application cluster; and sending the target monitoring information to the monitoring platform.
[0048] As an optional implementation, Figure 3 is a specific flow chart according to an embodiment of the present invention, such as Figure 3 As shown, the specific process includes:
[0049] Step S1: The user fills in the target configuration information of the target application cluster information on the front-end page, such as the number of nodes, application version, host configuration, system image, etc., and submits it to the back-end main service ums-platfrom.
[0050] Step S2: The main service performs operation authentication and cloud resource quota verification on the operation system, and obtains relevant cloud parameters, such as deployment region, department, etc.
[0051] Step S3: The main service stores the application cluster information in the MySQL database; generates a new cluster creation / expansion / reduction task flow, and stores the task flow information in redis, where:
[0052] The task flow of creating a new cluster includes:
[0053] 1) According to the metainfo.yml file configuration of the managed product, the corresponding node group and other cluster information are stored in the database;
[0054] 2) Create security groups and CLBs;
[0055] 3) Create a CVM instance and assign an IP address;
[0056] 4) Create a disk;
[0057] 5) Connect the disk and CVM in parallel;
[0058] 6) Install CVM agent (agent program) on each node of the application cluster to be added, download the managed product plug-in package, and build the installation steps according to the managed product configuration;
[0059] 7) Execute the deployment script of the hosted product;
[0060] 8) Install the conference hybrid-exporter.
[0061] The task flow for expanding the cluster includes:
[0062] 1) Obtain configuration information of the node group in the target application cluster where the node of the application cluster to be added is located;
[0063] 2) Create a CVM instance and assign an IP address;
[0064] 3) Bind LB;
[0065] 4) Create a disk;
[0066] 5) Connect the disk and CVM in parallel;
[0067] 6) Install CVM agent (agent program) on each node of the application cluster to be added, download the managed product plug-in package, and build the installation steps according to the managed product configuration;
[0068] 7) Execute the deployment script of the hosted product;
[0069] 8) Install the conference hybrid-exporter.
[0070] The task flow of scaling down a cluster includes:
[0071] 1) Uninstall the managed product components;
[0072] 2) Delete the host;
[0073] 3) Update the target application cluster information.
[0074] Step S4: The main service ums-platfrom obtains the task flow from redis and executes it in sequence.
[0075] Step S5: Prometheus (monitoring tool) calls the main service ums-platfrom interface to obtain monitoring indicator information. The main service ums-platfrom accesses the monitoring tool and application program interface on the hosting cluster CVM to obtain monitoring information and return it to Prometheus.
[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0077] In this embodiment, a device for deploying an application cluster is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0078] Figure 4 is a structural block diagram of an apparatus for deploying an application cluster according to an embodiment of the present invention, such as Figure 4 As shown, the device includes: an acquisition module 402, which is used to acquire a target request initiated by a target account to request target processing of a target application cluster in a target cloud server, wherein the target request carries target configuration information for configuring the target application cluster; a response module 404, which is used to respond to the target request and generate a task flow for executing the target processing according to the target configuration information, wherein the task flow includes multiple tasks; and an execution module 406, which is used to execute the multiple tasks included in the task flow in sequence to perform the target processing on the target application cluster.
[0079] In an exemplary embodiment, the response module includes a first determination unit, which is used to determine the target cloud resource quota occupied by the nodes of the application cluster to be added according to the target configuration information when the target request is to create the target application cluster or to expand the target application cluster; a first verification unit, which verifies the target cloud resource quota; and a first generation unit, which is used to generate a task flow for executing the target processing according to the target configuration information when the target cloud resource quota verification passes.
[0080] In an exemplary embodiment, the response module also includes a first sending unit, which is used to determine the first number of nodes based on the remaining cloud resource quota of the cloud platform when the target cloud resource quota verification fails, and send a first message to the target account, wherein the first number of nodes is the number of nodes of the application cluster that can be deployed with the remaining cloud resource quota, and the first message is used to indicate the first number of nodes; and / or, when the target cloud resource quota verification fails, send a second message to the target account, wherein the second message is used to indicate that the remaining cloud resource quota of the cloud platform cannot meet the resources required by the nodes of the application cluster to be added.
[0081] In an exemplary embodiment, the response module also includes a second determination unit for determining the number of second nodes included in the target application cluster whose CPU utilization is less than a preset utilization threshold when the target request is to shrink the target application cluster; an update unit for updating the number of target nodes to the number of second nodes when the number of second nodes is greater than the number of target nodes included in the target configuration information to obtain an updated target configuration information; and a second generation unit for generating a task flow for executing the target processing based on the updated target configuration information.
[0082] In an exemplary embodiment, the device also includes a verification module for verifying the target account; a storage module for obtaining the deployment area of the target application cluster and storing the deployment area in a database if the target account verification passes; and a sending module for sending a third message to the target account if the target account verification fails, wherein the third message is used to indicate that the target request verification fails.
[0083] In an exemplary embodiment, the device also includes an access module for accessing the monitoring tool of the target application cluster in response to a monitoring request sent by a monitoring platform to obtain target monitoring information, wherein the target monitoring information includes the resource usage of the target application cluster; and a sending module for sending the target monitoring information to the monitoring platform.
[0084] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0085] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0086] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0087] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0088] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0089] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.
[0090] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0091] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0092] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for deploying an application cluster, characterized in that: Applied to the target platform, including: Obtaining a target request initiated by a target account for requesting to perform target processing on a target application cluster in a target cloud server, wherein the target request carries target configuration information for configuring the target application cluster; In response to the target request, generating a task flow for executing the target processing according to the target configuration information, wherein the task flow includes a plurality of tasks; The multiple tasks included in the task flow are executed in sequence to perform the target processing on the target application cluster.
2. The method according to claim 1, characterized in that In response to the target request, generating a task flow for executing the target processing according to the target configuration information, including: In a case where the target request is to create the target application cluster or to expand the target application cluster, determining the target cloud resource quota occupied by the nodes of the application cluster to be added according to the target configuration information; Verifying the target cloud resource quota; When the target cloud resource quota verification passes, a task flow for executing the target processing is generated according to the target configuration information.
3. The method according to claim 2, characterized in that After verifying the target cloud resource quota, the method further includes at least one of the following: In the case that the target cloud resource quota verification fails, determining the first number of nodes according to the remaining cloud resource quota of the cloud platform, and sending a first message to the target account, wherein the first number of nodes is the number of nodes of the application cluster that can be deployed with the remaining cloud resource quota, and the first message is used to indicate the first number of nodes; When the target cloud resource quota verification fails, a second message is sent to the target account, wherein the second message is used to indicate that the remaining cloud resource quota of the cloud platform cannot meet the resources required by the nodes of the application cluster to be added.
4. The method according to claim 1, characterized in that: In response to the target request, generating a task flow for executing the target processing according to the target configuration information, including: In a case where the target request is to reduce the capacity of the target application cluster, determining the number of second nodes in the target application cluster whose CPU utilization is less than a preset utilization threshold; When the number of the second nodes is greater than the number of target nodes included in the target configuration information, updating the number of target nodes to the number of the second nodes to obtain updated target configuration information; A task flow for executing the target processing is generated according to the updated target configuration information.
5. The method according to claim 1, characterized in that Before responding to the target request and generating a task flow for executing the target processing according to the target configuration information, the method further includes: Verifying the target account; When the target account is verified, the deployment area of the target application cluster is obtained, and the deployment area is stored in a database; In the case that the target account fails verification, a third message is sent to the target account, wherein the third message is used to indicate that the target request fails verification.
6. The method according to claim 1, characterized in that The method further comprises: In response to a monitoring request sent by the monitoring platform, access a monitoring tool of the target application cluster to obtain target monitoring information, wherein the target monitoring information includes resource usage of the target application cluster; The target monitoring information is sent to the monitoring platform.
7. A device for deploying an application cluster, characterized in that: include: An acquisition module, used to acquire a target request initiated by a target account for requesting target processing of a target application cluster in a target cloud server, wherein the target request carries target configuration information for configuring the target application cluster; A response module, used to respond to the target request and generate a task flow for executing the target processing according to the target configuration information, wherein the task flow includes a plurality of tasks; An execution module is used to execute the multiple tasks included in the task flow in sequence to perform the target processing on the target application cluster.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.