A cloud platform service cluster expansion method, device, equipment and medium
By obtaining the expanded service specifications from the cloud platform service cluster, determining and verifying that the rules are met before expanding, the high cost and low flexibility issues caused by inconsistent expansion methods in existing technologies are solved, and one-click node expansion and service functions are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2026-03-27
AI Technical Summary
The different expansion methods for existing cloud platform service clusters result in high development costs and poor flexibility.
A method for expanding a cloud platform service cluster is provided. The method obtains the service specifications after expansion, determines whether they are existing specifications, and if they are not existing specifications, it iterates through the verification rule set. If the verification rules are met, the expansion is performed, and the node expansion is implemented through the script in the service installation package.
It enables one-click node expansion, reduces development costs, improves service high availability and monitoring flexibility, and supports the improvement and flexible configuration of service functions.
Smart Images

Figure CN116633945B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cloud computing, and in particular to a cloud platform service cluster expansion method, device, equipment and medium. BACKGROUND
[0002] With the development of cloud platforms, the service capabilities provided by cloud platforms are also increasing, and service high availability is very important to users. Therefore, when deploying services, a cluster mode is usually used for deployment. With the development of user business, the scale of the deployed cluster needs to be expanded to support, and the common expansion method is to increase cluster nodes. However, because different services have different node expansion methods, the development cost of functions is greatly increased, and the flexibility of the expansion script is also poor. SUMMARY
[0003] Therefore, the present application provides a cloud platform service cluster expansion method, device, equipment and medium, which can expand the existing service cluster of the cloud platform by increasing nodes, improve the service high availability, simplify the function development workload, and solve the problems of poor flexibility and high development cost of the traditional expansion method.
[0004] To achieve the above purpose, one aspect of the embodiment of the present application provides a cloud platform service cluster expansion method, which specifically includes the following steps:
[0005] Obtaining a service specification after expansion;
[0006] Judging whether the service specification after expansion is an existing specification;
[0007] If the service specification after expansion is not the existing specification, traversing a verification rule set to judge whether the service specification after expansion meets the verification rule set;
[0008] If the service specification after expansion meets the verification rule set, expanding the service cluster.
[0009] In some embodiments, the verification rule set includes any one or more of the following rules: a data rule, an odd-even rule, a ratio rule, and a comparison rule.
[0010] In some embodiments, the data rule is configured to verify whether the number of nodes of a specified service role exceeds a maximum value, the odd-even rule is configured to verify whether the number of nodes of the specified service role is odd or even, the ratio rule is configured to verify whether the number of nodes of the specified service role meets a fixed ratio, and the comparison rule is configured to verify whether the number of nodes of the specified service role meets a fixed order size relationship.
[0011] In some embodiments, the method further includes:
[0012] creating a cloud host according to the number of nodes corresponding to the service role to be scaled and the service specification;
[0013] downloading a service installation package to the created cloud host, and executing a service node scaling script in the service installation package on the cloud host, so as to add the cloud host as a service node to a service cluster.
[0014] In some embodiments, the cloud host comprises a network card and a serial communication tool;
[0015] The step of downloading the service installation package to the created cloud host comprises:
[0016] issuing a download request to a software package warehouse through the network card to download the service installation package to the cloud host;
[0017] The step of executing the service node scaling script in the service installation package on the cloud host comprises:
[0018] After the service installation package is downloaded, issuing an execution scaling script command to the cloud host through the serial communication tool to execute the service node scaling script on the cloud host.
[0019] In some embodiments, the service node scaling script is used to execute the following steps:
[0020] backing up information of each node of the service cluster before scaling, the information of the node comprising configuration and business data of the node;
[0021] After the backup is completed, scaling the service cluster;
[0022] If the scaling is successful, deleting the backed up information of each node;
[0023] If the scaling fails, restoring the service cluster based on the backed up information of each node.
[0024] In some embodiments, the method further comprises:
[0025] defining an operation operation command and a role node set, wherein the operation operation command comprises an operation operation and a node corresponding to the operation operation;
[0026] traversing the role node set, and executing the operation operation command based on the traversed node;
[0027] After the step of judging whether the scaled service specification is the existing specification, the method further comprises:
[0028] If the scaled service specification is the existing specification, scaling the service cluster;
[0029] After the step of traversing the check rule set to determine whether the expanded service specification meets the check rule set, the method further comprises:
[0030] If the expanded service specification does not meet the check rule set, a prompt of not meeting the rule is sent.
[0031] Another aspect of the embodiment of the application further provides a cloud platform service cluster expansion device, comprising:
[0032] An acquisition module configured to acquire an expanded service specification;
[0033] A judgment module configured to determine whether the expanded service specification is an existing specification;
[0034] A traversal module configured to, if the expanded service specification is not the existing specification, traverse a check rule set to determine whether the expanded service specification meets the check rule set;
[0035] An expansion module configured to, if the expanded service specification meets the check rule set, expand a service cluster.
[0036] Still another aspect of the embodiment of the application further provides an electronic device, comprising at least one processor and a memory storing a computer program capable of running on the processor, wherein the computer program is executed by the processor to implement the steps of the above method.
[0037] Still another aspect of the embodiment of the application further provides a storage medium storing a computer program capable of being executed by a processor to implement the steps of the above method.
[0038] The application has at least the following beneficial technical effects: the application can provide one-key node expansion for a cloud platform service cluster, the expansion scheme is realized based on a script, a developer only needs to focus on and implement an expansion script to support service cluster node expansion, service functions are improved while the development cost is greatly reduced, and various services can be flexibly configured based on the plug-in design of the service package and the decoupling of the cloud platform; the application realizes a service expansion specification check rule parser, the expanded specification can be automatically checked through the parser, the expansion function is limited under the specified rules of the service, the service access mode based on the service package is used to define and execute the expansion script to realize service node expansion, and the node set is uniformly executed based on the role when the service function operation is defined, so that the newly added nodes can be directly managed after expansion; the expansion is decoupled from the cloud platform, the flexibility of service monitoring is improved, and the development cost of monitoring is reduced. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0040] Figure 1 A flowchart illustrating an embodiment of the cloud platform service cluster expansion method provided by the present invention;
[0041] Figure 2 A flowchart of an embodiment of the service specification verification method provided by the present invention;
[0042] Figure 3 A flowchart illustrating an embodiment of the cloud platform service cluster expansion method provided by the present invention;
[0043] Figure 4 A schematic diagram of an embodiment of the cloud platform service cluster expansion system provided by the present invention;
[0044] Figure 5 A schematic diagram of the structure of an embodiment of the electronic device provided by the present invention;
[0045] Figure 6 A schematic diagram of the structure of an embodiment of the storage medium provided by the present invention. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.
[0047] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.
[0048] Based on the above objectives, a first aspect of the present invention proposes a method for expanding the capacity of a cloud platform service cluster. In such... Figure 1 In the illustrated embodiment, the method includes the following steps:
[0049] S10. Obtain the expanded service specifications;
[0050] S20. Determine whether the expanded service specification is an existing specification;
[0051] S30, if the expanded service specification is not the existing specification, traversing the verification rule set to determine whether the expanded service specification satisfies the verification rule set;
[0052] S40, if the expanded service specification satisfies the verification rule set, expanding the service cluster.
[0053] Specifically, before expanding the service cluster, the user-selected expansion specification is verified using certain algorithm rules, and the expansion number of each service role is obtained by comparing with the current specification. The service cluster expansion supports existing specification expansion and custom node expansion. The existing specification expansion refers to defining multiple cluster specifications such as 3 nodes and 5 nodes when defining the service specification, and the user directly selects to expand from the 3-node specification to the 5-node specification. The custom node expansion refers to customizing the specification of the service role after the user selects the role in the service, for example, expanding the standby node from 1 node to 3 nodes. Because different services have different requirements for service specification rules, the user-filled specification needs to be verified according to the specified rule set, that is, the verification rule set in the embodiment of the application. The verification rule set can be defined in the format of JSON in the service package, and after the definition is completed, the service package is uploaded to the cloud platform for registration. After the registration is completed, the cloud platform saves the verification rule set. When the service cluster is expanded, it is first determined whether the expanded service specification is an existing specification. If it is an existing specification, the current rule is directly expanded to the existing specification. If it is not an existing specification, the service specification to be expanded is verified through the verification rule set. If the verification is passed, the service cluster is expanded to the user-defined specification.
[0054] Through the above scheme, one-key node expansion can be provided for the cloud platform service cluster. The expansion scheme is realized based on a script. The developer only needs to focus on and implement the expansion script to support the cluster node expansion of the service, greatly reducing the development cost while improving the service function. Meanwhile, based on the plug-in design of the service package and the decoupling of the cloud platform, various services can be flexibly configured.
[0055] In some embodiments, the verification rule set includes any one or more of the following rules: a data rule, an odd-even rule, a ratio rule, and a comparison rule.
[0056] In some embodiments, the data rule is configured to verify whether the node number of a specified service role exceeds a maximum value, the odd-even rule is configured to verify whether the node number of a specified service role is odd or even, the ratio rule is configured to verify whether the node number of a specified service role satisfies a fixed ratio, and the comparison rule is configured to verify whether the node number of a specified service role satisfies a fixed order size relationship.
[0057] The roles of the service cluster need to meet different quantity requirements when deployed, for example, a certain size relationship, a certain proportion relationship to prevent split-brain, and the like. Therefore, a set of rules for expanding the number of nodes and a rule parser need to be defined.
[0058] The embodiments of the present application support upgrading of existing specifications and custom node expansion. The service specification verification process is described below in conjunction with specific embodiments. It should be understood that the embodiments described herein are used to illustrate and explain the present application, and are not used to limit the present application.
[0059] As shown in Figure 2 , the specific service specification verification process is as follows:
[0060] When the user selects an existing specification for expansion and upgrading, the number of nodes of the expanded role and the corresponding role is calculated;
[0061] The defined specification is traversed, and the number of nodes of the expanded role and the corresponding role is compared with the defined specification;
[0062] If the comparison result is consistent, the service cluster is expanded;
[0063] If the comparison result is inconsistent, each verification rule in the verification rule set is traversed to determine whether the number of nodes of the expanded role and the corresponding role meets each verification rule;
[0064] If it is met, the verification is passed, and the service cluster is expanded, otherwise a prompt that the rule is not met is issued.
[0065] The verification rule set is described below in conjunction with specific embodiments. It should be understood that the embodiments described herein are used to illustrate and explain the present application, and are not used to limit the present application.
[0066] The rule specification in the rule set is defined as follows:
[0067] ruleType: rule type
[0068] roles: associated role
[0069] value: rule value
[0070] Among them, the rule type includes the following types:
[0071] 1) Quantity rule.
[0072] Verify whether the number of nodes of the specified role exceeds the maximum value.
[0073] Specifically, when verifying, the service role is matched with the roles in the rule. If it is matched, it is compared whether the number of nodes after service expansion is greater than the maximum value in the value. If it is greater, a prompt that the rule is not met is issued. The rule is shown as follows:
[0074] {
[0075] "ruleType":"size",
[0076] "roles":["master"],
[0077] "value":2
[0078] }
[0079] 2) Odd or even rule.
[0080] Check whether the number of nodes of a specified role is odd or even.
[0081] Specifically, the service role is matched with roles in the rule during the check, and if the match is successful, it is determined whether the number of nodes after the service scaling is a specified odd or even number (0 is even and 1 is odd), and if the match is not successful, it is prompted that the rule is not satisfied. For example, the rule is as follows:
[0082] {
[0083] "ruleType":"odevity",
[0084] "roles":["master"],
[0085] "value":0
[0086] }
[0087] 3) Ratio rule.
[0088] Check whether the number of nodes of a specified role satisfies a fixed ratio.
[0089] Specifically, the number of nodes of a corresponding role after the service scaling is obtained according to the associated roles in roles in sequence during the check, and the ratio in the rule value is divided by the number of nodes in sequence, and if the values after the division are equal, the ratio relationship is satisfied, otherwise it is prompted that the rule is not satisfied. For example, the rule is as follows:
[0090] {
[0091] "ruleType":"ratio",
[0092] "roles":["master","slave"],
[0093] "value":"1:2"
[0094] }
[0095] 4) Comparison rule.
[0096] Check whether the number of nodes of the specified role meets the size relationship of the fixed order.
[0097] Specifically, check whether the order of the roles in the value is consistent with the size order of the associated role number. If not, prompt that the rule is not met. For example, the rule is as follows:
[0098] {
[0099] "ruleType":"order",
[0100] "roles":["master","slave"],
[0101] "value":"master,slave"
[0102] }
[0103] Through the above-mentioned rule set, various services can be flexibly configured.
[0104] In some embodiments, the method further comprises:
[0105] creating a cloud host according to the number of nodes and the service specification of the service role to be scaled out;
[0106] downloading a service installation package to the created cloud host, and executing a service node scaling script in the service installation package on the cloud host, so as to add the cloud host as a service node to the service cluster.
[0107] In some embodiments, the cloud host comprises a network card and a serial communication tool.
[0108] Specifically, a tool QGA (qemu-guest-agent, a virtual machine and host serial communication tool) for serial communication with the host needs to be installed in the service virtual machine. The virtual machine on which the service depends is created in the form of an image, and the tool is placed in the image of the service. In this way, the virtual machine on which the service runs supports communication with the host by default when it is created.
[0109] In some embodiments, the step of downloading a service installation package to the created cloud host comprises:
[0110] issuing a download request to a software package repository through the network card to download a service installation package to the cloud host;
[0111] The step of executing a service node scaling script in the service installation package on the cloud host comprises:
[0112] After the service installation package is downloaded, the expansion script command is issued to the cloud host through the serial port communication tool to execute the service node expansion script on the cloud host.
[0113] Specifically, when the cloud host is created, a business network card that can communicate with the software package warehouse is added to the cloud host, so that the cloud host node can normally download the software installation package from the software package warehouse.
[0114] In some embodiments, the service node expansion script is used to perform the following steps:
[0115] Backup the information of each node of the service cluster before expansion, including the configuration and business data of the node;
[0116] After the backup is completed, the service cluster is expanded;
[0117] If the expansion is successful, the backup information of each node is deleted;
[0118] If the expansion fails, the service cluster is restored based on the backup information of each node.
[0119] The following describes the service cluster expansion process in combination with specific embodiments. It should be understood that the embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.
[0120] After the service specification is verified, the role that needs to be expanded and the number of nodes corresponding to the role can be known. Then, the corresponding cloud host is created according to the number of nodes and the specification. The cloud host is created by the cloud platform. When the cloud host is created, a business network card that can communicate with the software package warehouse is added to the cloud host, so that the node can normally download the software installation package from the warehouse.
[0121] After the cloud host is created, the cloud platform issues a command to execute the service installation package download. The newly expanded node issues an Http request through the network card that communicates with the software package warehouse, and then downloads the service installation package in the software package warehouse.
[0122] After the service installation package is downloaded, the cloud platform issues an expansion script command to execute the service node expansion script that is developed in advance in the service installation package. The new node is added to the original service cluster by executing the script.
[0123] Before expansion in the expansion script, the configuration and business data of the original cluster node can be backed up through the script. After the expansion is successful, the backup is deleted. After the expansion fails, the original cluster is restored according to the backup service configuration and business data, so that the service is still available after the expansion fails.
[0124] When the cloud platform issues a command to the cloud host node to be expanded, the cloud management platform is in a management network and the cloud host node is in a business network in the cloud, and the two are not connected to each other. Therefore, the QGA tool built in the cloud host can be used to issue a command to execute a script through a serial port and obtain the return value of the executed script.
[0125] Through the above scheme, one-key node expansion can be provided for a cloud platform service cluster. The expansion scheme is implemented based on a script. A developer only needs to focus on and implement an expansion script to support cluster node expansion of a service, greatly reducing development costs while improving service functions. Meanwhile, based on the plug-in design of a service package and decoupling from a cloud platform, various services can be flexibly configured.
[0126] In some embodiments, the method further includes:
[0127] defining an operation operation command and a role node set, wherein the operation operation command includes an operation operation and a node corresponding to the operation operation;
[0128] traversing the role node set and executing the operation operation command based on the traversed node.
[0129] After service expansion, the original service functions, such as service backup, need to support the management and execution in the newly expanded nodes. After the service expansion is completed, in order to ensure that the service operation management function can normally manage the newly expanded nodes, based on the service package mode, the service is defined to perform the operation management related functions. By defining the operation operation and the node corresponding to the operation operation in the service package, the operation management is implemented. When defining the operation node, all nodes in the role node set are traversed and executed in turn. An operation definition example is as follows:
[0130] "op_expression":"master[POWERON_VM]and salve[POWERON_VM]then master[EXECSHELL]then slave[EXECSHELL]",
[0131] "op_type":"POWERON".
[0132] In some embodiments, after the step of judging whether the service specification after expansion is an existing specification, the method further includes:
[0133] if the service specification after expansion is the existing specification, expanding the service cluster;
[0134] After the step of traversing the verification rule set to judge whether the service specification after expansion meets the verification rule set, the method further includes:
[0135] If the expanded service specification does not meet the check rule set, a rule-unmet prompt is issued.
[0136] The service cluster expansion process of the present application is described below in combination with a specific embodiment, and it should be understood that the embodiment described herein is only used for illustrating and explaining the present application, and is not used for limiting the present application.
[0137] As shown in Figure 3 , the specific service cluster expansion process is as follows:
[0138] It is judged whether it is service expansion of an existing specification;
[0139] If it is service expansion of an existing specification, the defined specification is traversed, and the expanded role and the node number of the corresponding role are compared with the defined specification;
[0140] If it is not service expansion of an existing specification, each check rule in the check rule set is traversed, and it is judged whether the expanded role and the node number of the corresponding role meet each check rule;
[0141] If the comparison with the defined specification passes or the check of the check rule set passes, a cloud host node is created;
[0142] A service installation package is downloaded;
[0143] Service data is backed up;
[0144] A node expansion script in the service installation package is executed;
[0145] It is judged whether the expansion is successful;
[0146] If it is successful, the backed-up service data is deleted;
[0147] If it is not successful, the original service cluster is recovered through the backup data.
[0148] Through the present application scheme, one-key node expansion can be provided for a cloud platform service cluster. The expansion scheme is realized based on a script, and a developer only needs to focus on and realize the expansion script to support service cluster node expansion, which greatly reduces the development cost while perfecting the service function. Meanwhile, based on the plug-in design of the service package and the decoupling of the cloud platform, various services can be flexibly configured.
[0149] The application discloses a service expansion specification verification rule parser, which can automatically verify the expanded specification and limit the expansion function under the specified service rule.
[0150] Based on the same inventive concept, according to another aspect of the present application, as shown in Figure 4 The embodiment of the present application also provides a cloud platform service cluster expansion device, which comprises:
[0151] The acquisition module 110 is configured to acquire the expanded service specification.
[0152] The judgment module 120 is configured to judge whether the expanded service specification is an existing specification.
[0153] The traversal module 130 is configured to traverse a verification rule set to judge whether the expanded service specification meets the verification rule set if the expanded service specification is not the existing specification.
[0154] The expansion module 140 is configured to expand the service cluster if the expanded service specification meets the verification rule set.
[0155] Based on the same inventive concept, according to another aspect of the present application, as shown in Figure 5 The embodiment of the present application also provides an electronic device 30, which comprises a processor 310 and a memory 320, the memory 320 stores a computer program 321 capable of running on the processor, and the processor 310 executes the steps of the method as above when executing the program.
[0156] The memory is a non-volatile storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules corresponding to the cloud platform service cluster expansion method in the embodiment of the present application. The processor executes various function applications and data processing of the system by running the non-volatile software programs, instructions and modules stored in the memory, that is, the cloud platform service cluster expansion method of the above method embodiment is realized.
[0157] The memory can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function. The data storage area can store data created according to the use of the system, etc. In addition, the memory can include a high-speed random access memory and can also include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, or other nonvolatile solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely from the processor, which can be connected to the local module through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0158] Based on the same inventive concept, according to another aspect of the present application, as shown in the accompanying drawings, embodiments of the present application also provide a storage medium 40, which stores a computer program 410 that is executed by a processor to perform the above method. Figure 6
[0159] Finally, it should be noted that those of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing relevant hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above embodiments of the method. The storage medium of the program can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the above method embodiments.
[0160] Those of skill in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
[0161] The above are exemplary embodiments disclosed by the present application, but it should be noted that various changes and modifications can be made without departing from the scope of the embodiments disclosed by the present application defined by the claims. The functions, steps and / or actions of the method claims described herein need not be performed in any particular order. Unless explicitly stated, the ordinal use of terms such as "first", "second", etc. does not imply any particular order. The above described embodiments disclosed by the present application are merely exemplary, and the embodiments of the present application are not limited to the above examples. In addition, although the elements of the embodiments disclosed by the present application can be described or claimed in individual form, they can also be understood as plural unless explicitly limited to singular.
[0162] It should be understood that, as used herein, the singular form "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and / or "including", as used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0163] Those skilled in the art should understand that the above discussion of any embodiment is merely exemplary and is not intended to suggest that the scope of the embodiments disclosed by the present application (including the claims) is limited to these examples. In the spirit of the embodiments of the present application, the above embodiments or technical features in different embodiments can also be combined, and there are many other variations of the different aspects of the embodiments of the present application as described above. In order to be brief, they are not provided in detail. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principles of the embodiments of the present application shall be included in the scope of protection of the embodiments of the present application.
Claims
1. A method for expanding the capacity of a cloud platform service cluster, characterized in that, include: Obtain the expanded service specifications; Determine whether the expanded service specifications are existing specifications; If the expanded service specification is not the existing specification, then the verification rule set is traversed to determine whether the expanded service specification meets the verification rule set; wherein, the verification rule set includes any one or more of the following rules: data rules, parity rules, ratio rules, and comparison rules; wherein, the data rules are configured to verify whether the number of nodes of a specified service role exceeds the maximum value, the parity rules are configured to verify whether the number of nodes of a specified service role is odd or even, the ratio rules are configured to verify whether the number of nodes of a specified service role meets a fixed ratio, and the comparison rules are configured to verify whether the number of nodes of a specified service role meets a fixed order of size relationship; If the expanded service specifications meet the verification rule set, then a cloud host is created according to the number of nodes and service specifications corresponding to the service role to be expanded; the service installation package is downloaded to the created cloud host, and the service node expansion script in the service installation package is executed on the cloud host, thereby adding the cloud host as a service node to the service cluster to expand the service cluster.
2. The method according to claim 1, characterized in that, The cloud host includes a network card and a serial communication tool; The steps for downloading the service installation package to the created cloud server include: The network card sends a download request to the software package repository to download the service installation package to the cloud host. The step of executing the service node expansion script in the service installation package on the cloud host includes: After the service installation package is downloaded, the command to execute the expansion script is sent to the cloud host through the serial communication tool so that the service node expansion script can be executed on the cloud host.
3. The method according to claim 1, characterized in that, The service node scaling script is used to execute the following steps: Back up the information of each node in the service cluster before the expansion, including the node's configuration and business data; After the backup is complete, expand the service cluster. If the expansion is successful, delete the information of each backed-up node. If the expansion fails, the service cluster will be restored based on the information from the backup nodes.
4. The method according to claim 1, characterized in that, Also includes: Define operational operation commands and role node sets, wherein the operational operation commands include operational operations and the nodes corresponding to the operational operations; Traverse the set of role nodes and execute the operation command based on the node reached during the traversal; After the step of determining whether the expanded service specification is an existing specification, the method further includes: If the expanded service specifications are the same as the existing specifications, then the service cluster will be expanded. After the step of traversing the verification rule set to determine whether the expanded service specifications meet the verification rule set, the method further includes: If the expanded service specifications do not meet the verification rule set, a prompt indicating that the rules are not met will be issued.
5. A cloud platform service cluster expansion device, characterized in that, include: An acquisition module, configured to acquire the expanded service specifications; The judgment module is configured to determine whether the expanded service specification is an existing specification. A traversal module is configured to, if the expanded service specification is not the existing specification, traverse a set of verification rules to determine whether the expanded service specification meets the set of verification rules. The set of verification rules includes any one or more of the following rules: data rules, parity rules, ratio rules, and comparison rules. Specifically, the data rules are configured to verify whether the number of nodes for a specified service role exceeds a maximum value; the parity rules are configured to verify whether the number of nodes for a specified service role is odd or even; the ratio rules are configured to verify whether the number of nodes for a specified service role meets a fixed ratio; and the comparison rules are configured to verify whether the number of nodes for a specified service role meets a fixed order of size. The expansion module is configured to, if the expanded service specifications meet the verification rule set, create a cloud host according to the number of nodes and service specifications corresponding to the service role to be expanded; download the service installation package to the created cloud host, and execute the service node expansion script in the service installation package on the cloud host, thereby adding the cloud host as a service node to the service cluster to expand the service cluster.
6. An electronic device, comprising: At least one processor; as well as A memory storing a computer program executable on the processor, characterized in that the processor executes the program and performs the steps of the method as described in any one of claims 1 to 4.
7. A storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the steps of the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Cluster expansion exception handling method of AI platform
CN111478796A