Cluster release batch generation method and device, medium, equipment and program product
Through the automatic sorting method based on cluster type and number of nodes, publish batches are generated, which solves the problem of low efficiency in cluster resource release in edge scenarios and realizes efficient automated processing.
Patent Information
- Application Number
- CN202411899582.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-01
AI Technical Summary
When publishing cluster resources in edge scenarios, it is necessary to manually sort and divide publish batches, which are complex and inefficient.
By determining the target cluster to be published, grouping and sorting based on the cluster type and publishing priority, determining the publishing order based on the number of nodes, and generating a publishing batch.
Automatic sorting and batch division of massive clusters is realized, manual operations are reduced, and batch generation efficiency and resource release efficiency are improved.
Smart Images

Figure CN119739524A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, apparatus, medium, device and program product for generating a release batch of a cluster. Background Art
[0002] The development of cluster technology has greatly promoted the application of edge computing in data centers and cloud computing platforms. When publishing cluster resources in edge scenarios, due to the large number of edge clusters, each release usually requires manual sorting of massive clusters to determine the release order of each cluster and divide the release batches, which is complex and inefficient. Summary of the invention
[0003] This section is provided to introduce the concepts in a brief form, which will be described in detail in the detailed implementation section below. This section is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to be used to limit the scope of the technical solution claimed for protection.
[0004] In a first aspect, the present disclosure provides a method for generating a release batch of a cluster, the method comprising: Determine multiple target clusters to be released; Based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, the multiple target clusters are grouped and sorted to obtain at least one cluster group and a publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority; For each cluster group, based on the number of nodes of each target cluster in the cluster group, determine the release order of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes; Based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, the release order of each target cluster in the multiple target clusters is determined, and at least one release batch is generated based on the release order of each target cluster in the multiple target clusters, each release batch includes at least one target cluster.
[0005] In a second aspect, the present disclosure provides a device for generating a release batch of a cluster, the device comprising: A first determination module, used to determine multiple target clusters to be released; A grouping module, configured to group and sort the multiple target clusters based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, to obtain at least one cluster group and a publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority; A second determination module is used to determine, for each cluster group, a release order of each target cluster in the cluster group based on the number of nodes of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes; A generation module is used to determine the release order of each target cluster in the multiple target clusters based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, and generate at least one release batch based on the release order of each target cluster in the multiple target clusters, each release batch including at least one target cluster.
[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the program is executed by a processing device.
[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.
[0008] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0009] Through the above technical solution, based on the cluster type of each target cluster and the corresponding release priority of each cluster type, group sorting can be performed to obtain at least one cluster group and the release order of each cluster group, and then based on the number of nodes of each target cluster in the cluster group, the release order of each target cluster in the cluster group is determined, so that the release order of each target cluster in multiple target clusters can be determined, and then at least one release batch can be generated based on the release order of each target cluster in multiple target clusters. Using this method, massive clusters can be automatically sorted based on the release priority of the cluster type and the number of nodes in the cluster, and the release batches can be automatically divided, reducing manual operations, especially for edge scenarios with a large number of clusters, which can effectively improve the batch generation efficiency, thereby improving the resource release efficiency of the cluster.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 It is a flowchart of a method for generating a release batch of a cluster according to an exemplary embodiment of the present disclosure; Figure 2 is a schematic diagram of a resource publishing page according to an exemplary embodiment of the present disclosure; Figure 3 is a schematic diagram of a cluster grouping process according to an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of a cluster sorting process according to an exemplary embodiment of the present disclosure; Figure 5 It is a structural block diagram of a release batch generation device for a cluster according to an exemplary embodiment of the present disclosure; Figure 6 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0012] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0013] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0014] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0015] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0016] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0017] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0018] All actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0022] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0023] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0024] Taking the K8s cluster (Kubernetes, a distributed cluster based on container technology) in the edge scenario as an example, there are several K8s clusters running in a data center. Each K8s cluster is composed of several nodes. The nodes can be physical machines or virtual machines. Several virtual machines can be deployed on one physical machine.
[0025] When publishing cluster resources in edge scenarios, it is usually necessary to manually select clusters and publish resources. A large number of clusters may be involved. How to select the clusters to be published, how to sort the selected clusters, and how to divide the selected clusters into different publishing batches have become urgent issues to be solved.
[0026] In view of this, the present disclosure provides a method, apparatus, medium, device and program product for generating a release batch of a cluster to solve the above technical problems.
[0027] The embodiments of the present disclosure are further explained below with reference to the accompanying drawings.
[0028] Figure 1 is a flow chart of a method for generating a release batch of a cluster according to an exemplary embodiment of the present disclosure, referring to Figure 1 , the method comprising: S101: Determine multiple target clusters to be released.
[0029] For example, the cluster in the embodiments of the present disclosure may be a K8s cluster, or other clusters applied to edge scenarios or other business scenarios, and the present disclosure is not limited to this.
[0030] In a possible manner, multiple target clusters are determined in the following manner: in response to a trigger operation on a resource publishing page, the resource publishing page is displayed, the resource publishing page is used to publish resources to the cluster, and the resource publishing page displays cluster filtering items, the cluster filtering items include at least one filtering item for resource name, user ID, cluster type, cluster deployment location and cluster operator; in response to a configuration operation on the cluster filtering item, the filtering condition corresponding to the configuration operation is determined, and multiple candidate clusters that meet the filtering condition are displayed on the resource publishing page; in response to a confirmation operation on the multiple candidate clusters, multiple target clusters corresponding to the confirmation operation are determined among the multiple candidate clusters.
[0031] For example, Figure 2 As shown, the resource publishing page can display at least one filter item for resource name, user ID, cluster type, cluster deployment location, and cluster operator. Specifically, different cluster filter items can be set for different application scenarios and requirements, and the present disclosure does not limit this. By providing cluster filter items, clusters to be published can be quickly filtered out, improving cluster selection efficiency.
[0032] It should be noted that the above-mentioned users are users of organizations such as enterprises or institutions. The user ID is a unique identifier used to distinguish different users. It does not involve user privacy data. It can be a serial number in digital form. ID 1 represents user 1, ID 2 represents user 2, or it can be directly represented by the user's registered account name. The present disclosure does not limit this. Since different users use different cluster services, for example, user A uses service X, and user B does not use service X, it is necessary to publish the resources of service X to user A, but it is necessary to avoid user B from publishing the resources of service X. Therefore, by providing a user ID filter item, resources can be published for a specific user's cluster or avoid a specific user's cluster.
[0033] In addition, taking the K8s cluster in the edge scenario as an example, cluster release is often an upgrade of certain functional components. Therefore, providing a filter item for the resource name can quickly filter out the cluster where the specific resource is or is not located for resource release. Cluster types can be divided into userless cluster types, internal cluster types, and external cluster types, etc. The tolerance for failures decreases one by one, while the importance increases one by one. Taking the cluster service provided by company A as an example, the cluster used by company A itself can be called an internal cluster, the cluster used by other companies can be called an external cluster, and the cluster used by no users is called a userless cluster, such as a test cluster. Providing a filter item for the cluster type facilitates the release of resources according to clusters of different cluster types.
[0034] The cluster deployment location is also called the computer room location, that is, the geographical location of the computers included in the cluster, which can be selected according to multiple levels of regional ranges, such as provinces, cities, and districts, etc., and the present disclosure does not limit this. In addition, providing a filter item for the cluster operator can release resources for the cluster of a specific operator or avoid the cluster of a specific operator. For example, if cluster operator A fails, the cluster of cluster operator A needs to be excluded.
[0035] For example, continue to refer to Figure 2 Each cluster filter item provides a multiple selection function, for example, you can select multiple resource names, you can select by drop-down or pop-up window, etc., and the present disclosure does not limit this. It can also provide two filtering methods: including and excluding. For example, you can select the cluster that includes user 1 or the cluster that does not include user 1. The specific settings can be based on the needs, and the present disclosure does not limit this.
[0036] S102: based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, multiple target clusters are grouped and sorted to obtain at least one cluster group and a publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority.
[0037] For example, cluster types can be divided into userless cluster types, internal cluster types, and external cluster types. The tolerance for failures decreases one by one, while the importance increases one by one. Therefore, the release priority decreases one by one, that is, the release can be carried out in the order of userless cluster, internal cluster, and external cluster, so that the loss can be stopped in time when a failure occurs.
[0038] S103: For each cluster group, based on the number of nodes of each target cluster in the cluster group, determine the release order of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes.
[0039] For example, the more nodes there are in a cluster, the greater the impact when a failure occurs. Therefore, you can release clusters with fewer nodes first, and then release clusters with more nodes, so that you can stop the loss in time when a failure occurs.
[0040] S104: Determine a release order of each target cluster in a plurality of target clusters based on a release order of each cluster group and a release order of each target cluster in each cluster group, and generate at least one release batch based on the release order of each target cluster in the plurality of target clusters, each release batch including at least one target cluster.
[0041] By adopting the above method, massive clusters can be automatically sorted based on the release priority of the cluster type and the number of nodes in the cluster, and the release batches can be automatically divided to reduce manual operations. Especially for edge scenarios with a large number of clusters, it can effectively improve the batch generation efficiency and thus improve the resource release efficiency of the cluster.
[0042] In a possible manner, the number of nodes includes the number of virtual machines, and the release order of each target cluster in the cluster group is determined based on the number of nodes in each target cluster in the cluster group, including: grouping and sorting each target cluster in the cluster group based on the number of virtual machines in each target cluster in the cluster group, and obtaining at least one first sub-group and a release order of each first sub-group, wherein the number of virtual machines in each target cluster in a first sub-group with an earlier release order is less than the number of virtual machines in each target cluster in a first sub-group with a later release order.
[0043] For example, if there are more virtual machines in the cluster, the impact will be greater when a failure occurs, so the higher the importance, the later the release order. Figure 3As shown, after multiple cluster groups are grouped according to cluster types, for each cluster group, the groups can be sorted according to the number of virtual machines in each target cluster in the cluster group. For example, an intermediate value X can be set to divide the target cluster with a number of virtual machines less than or equal to X into sub-group 1, and the target cluster with a number of virtual machines greater than X into sub-group 2. Two intermediate values X1 and X2 can also be set, where X2 is greater than X1, and the target cluster with a number of virtual machines less than or equal to X1 is divided into sub-group 1, the target cluster with a number of virtual machines greater than X1 and less than or equal to X2 is divided into sub-group 2, the target cluster with a number of virtual machines greater than X2 is divided into sub-group 3, and so on. The present disclosure does not impose any restrictions on this.
[0044] For example, when performing first sub-grouping division on cluster groups under different cluster types, different or same intermediate values may be set, and the present disclosure does not limit this.
[0045] In a possible manner, the number of nodes also includes the number of physical machines, and the release order of each target cluster in the cluster group is determined based on the number of nodes in each target cluster in the cluster group. It also includes: for each first sub-group, based on the number of physical machines of each target cluster in the first sub-group, the target clusters in the first sub-group are grouped and sorted to obtain at least one second sub-group and the release order of each second sub-group, wherein the number of physical machines of each target cluster in the second sub-group with an earlier release order is less than the number of physical machines of each target cluster in the second sub-group with a later release order.
[0046] For example, if there are more physical machines in the cluster, the impact will be greater when a failure occurs, so the higher the importance, the later the release order. Figure 3 As shown, for each first sub-group, the target clusters can be grouped and sorted according to the number of physical machines in each target cluster. For example, an intermediate value Y can be set to divide the target cluster with a number of physical machines less than or equal to Y into sub-group 1, and the target cluster with a number of physical machines greater than Y into sub-group 2. Two intermediate values Y1 and Y2 can also be set, where Y2 is greater than Y1, and the target cluster with a number of physical machines less than or equal to Y1 is divided into sub-group 1, the target cluster with a number of physical machines greater than Y1 and less than or equal to Y2 is divided into sub-group 2, the target cluster with a number of physical machines greater than Y2 is divided into sub-group 3, and so on. The present disclosure does not impose any restrictions on this.
[0047] For example, when different first subgroups are divided into second subgroups, different or same intermediate values may be set, and the present disclosure does not limit this.
[0048] It should be noted that, since one physical machine can deploy one or more virtual machines, a cluster with more physical machines does not necessarily have more virtual machines. Therefore, clusters are sorted by the number of virtual machines first, and then by the number of physical machines. Of course, in other possible implementations, clusters can also be sorted by the number of physical machines alone or by the number of virtual machines alone, and this disclosure does not limit this.
[0049] In a possible manner, the release order of each target cluster in each second sub-group is positively correlated with the cluster priority; the cluster priority of the target cluster is determined in the following manner: obtaining cluster information of the target cluster, the cluster information including parameter values and preset weight values of cluster parameters, the cluster parameters including at least one of the number of virtual machines, virtual machine traffic and the number of working nodes of the target cluster; determining the cluster priority of the target cluster based on the cluster information of the target cluster, wherein the cluster priority of the target cluster is negatively correlated with both the parameter values and the preset weight values of the cluster parameters.
[0050] For example, the cluster priority is negatively correlated with the importance of the cluster, that is, the more important the cluster is, the later its release order is. Generally speaking, the more virtual machines a cluster has, the greater the virtual machine traffic, and the more working nodes it has, the more important the cluster is. Therefore, at least one cluster parameter among the number of virtual machines, virtual machine traffic, and number of working nodes in the cluster can be obtained to determine the cluster priority. Moreover, in different application scenarios, the importance of different cluster parameters will also be different, so the weight value corresponding to each cluster parameter can also be configured. The weight value of each cluster parameter can be the same or different, but cannot be 0 at the same time. Among them, the working node refers to the workload bearing point, and some nodes responsible for gateway services or control planes are not included.
[0051] For example, the importance of each cluster can be scored based on the parameter value and weight value of the cluster parameter. The higher the score, the higher the importance. Correspondingly, the lower the priority of the cluster, and the later the release order. For example, the score of each cluster can be determined by the following calculation formula:
[0052] Among them, Score represents the score of the cluster, x represents the number of virtual machines in the cluster, y represents the virtual machine traffic of the cluster, z represents the number of working nodes in the cluster, n is the total number of multiple target clusters to be released, W represents the weight of the cluster parameter corresponding to the subscript, and O represents the sorting order of the parameter value of the cluster parameter corresponding to the subscript from small to large. The above calculation formula can be adjusted according to needs, such as increasing or decreasing cluster parameters, and the present disclosure does not limit this.
[0053] It should be noted that if Figure 4As shown, the multiple target clusters to be released can be sorted according to cluster priority first, and then divided into groups corresponding to userless clusters, groups corresponding to internal clusters, and groups corresponding to external clusters according to cluster types. The clusters in each group retain the order of cluster priority sorting. Taking the group corresponding to the internal cluster as an example, the grouping is continued according to the number of virtual machines in each cluster, and the sub-groups with the number of virtual machines less than or equal to the middle value X are placed in the front, and the sub-groups with the number of virtual machines greater than the middle value X are placed in the back. The clusters in each sub-group retain the order of cluster priority sorting. Then, each sub-group is divided according to the number of physical machines in each cluster, and the sub-groups with the number of physical machines less than or equal to the middle value Y are placed in the front, and the sub-groups with the number of physical machines greater than the middle value Y are placed in the back. Similarly, the clusters in each sub-group retain the order of cluster priority sorting.
[0054] Of course, in any of the above grouping processes, the clusters in the group may also be sorted according to the cluster priority. For example, after determining the second sub-group, the clusters in each second sub-group may be sorted according to the cluster priority. This disclosure does not limit this.
[0055] Since different cluster parameters can be selected and weight values of different cluster parameters can be set according to needs, a customized sorting strategy can be implemented according to needs to further optimize the release order of the cluster.
[0056] In actual use, you can Figure 2 On the resource publishing page shown, select whether to automatically generate publishing batches. If so, configure the weight values of different cluster parameters, and then perform the subsequent cluster sorting and batch automatic generation process.
[0057] It should be noted that after all the clusters to be released are determined, they need to be allocated to different release batches. Usually, the release batches should follow the principle of from unimportant to important, and from small to large. Figure 4 As shown, based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, the release order of each target cluster basically follows the above principles. Therefore, the release batches can be directly divided, where the importance of clusters in each release batch increases one by one, effectively converging potential risks.
[0058] In a possible manner, at least one release batch is generated based on the release order of each target cluster in a plurality of target clusters, including: generating a release batch based on a preceding target number of target clusters according to the release order of each target cluster in the plurality of target clusters; taking the other target clusters except the preceding target number of target clusters in the plurality of target clusters as new plurality of target clusters, and repeatedly executing the step of generating a release batch based on the preceding target number of target clusters according to the release order of each target cluster in the plurality of target clusters, until release batches are generated for all target clusters.
[0059] For example, Figure 4 As shown, the first N target clusters can be taken to generate the first batch according to the release order of each target cluster in the multiple target clusters, and then the first N clusters in the remaining target clusters can be taken to generate the second batch, and so on, until all target clusters are generated into release batches. Wherein, N is a positive integer, which can be set according to the requirements, and the present disclosure does not limit this. It should be understood that when the number of target clusters remaining at the end is less than N, a release batch can also be generated.
[0060] In a possible manner, the method also includes: before repeatedly executing the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in multiple target clusters, when the target number is less than a preset upper limit, determining the total number of the target number and the preset increment; when the total number is less than the preset upper limit, using the total number as the new target number, and when the total number is greater than or equal to the preset upper limit, using the preset upper limit as the new target number.
[0061] It should be understood that since multiple release batches are released in sequence, when a previous release batch fails, the release of subsequent release batches can be terminated in time, thereby preventing the impact of the failure from further expanding. When the previous release batch does not fail, it means that the probability of failure in subsequent release batches is low, so the number of target clusters in each release batch can be increased in sequence to improve the resource release efficiency of multiple clusters.
[0062] For example, before repeatedly executing the step of generating a release batch based on the first N target clusters according to the release order of each target cluster in multiple target clusters, if N is less than a preset upper limit, an increment is added to N to obtain a total number; if the total number is less than the preset upper limit, the next release batch will take the first total number of target clusters; if the total number is greater than or equal to the preset upper limit, the next release batch will take the first preset upper limit of target clusters.
[0063] For example, assuming that the number of clusters in the first release batch is N, and each subsequent release batch increases by M clusters until the preset upper limit X is reached and no longer increases, the number of clusters in the i-th release batch can be expressed as min[N+M×(i-1),X], where N, M and X are positive integers.
[0064] In other possible implementations, the number of clusters in each release batch may be increased in equal amounts, or may be increased exponentially, or may be increased in other ways. The specific settings may be based on demand, and the present disclosure does not impose any restrictions on this.
[0065] In a possible manner, the method further includes: in response to the completion of the release of the first release batch in at least one release batch, a second release batch is released after a preset time, and the second release batch is a release batch after the first release batch in at least one release batch. This makes it easier to observe whether a failure occurs after releasing a release batch, so as to find problems and stop losses in time.
[0066] In addition, the release batches determined above can be regarded as official release batches. Before releasing the official batches, grayscale test batches can be released first, thereby reducing the risk of exposing defects on a large scale.
[0067] In a possible manner, the method also includes: generating a grayscale test batch based on a preset cluster, the preset cluster includes a test cluster and / or an internal cluster, the release order of the grayscale test batch is before the release order of at least one batch, the grayscale test batch includes a first test batch corresponding to the test cluster and / or a second test batch corresponding to the internal cluster, and the release order of the first test batch is before the release order of the second test batch.
[0068] For example, the preset cluster released by the grayscale test batch can be a pre-selected cluster, so there is no need to perform a cluster selection operation. Of course, in other possible implementation methods, the cluster for grayscale release can also be manually selected in accordance with the above-mentioned method of determining multiple target clusters, and the present disclosure does not limit this.
[0069] For example, a first test batch corresponding to the test cluster or a second test batch corresponding to the internal cluster can be generated for grayscale release, or a first test batch and a second test batch can be generated for two-level grayscale release, which is not limited by the present disclosure. Among them, the test cluster is used for regression verification and long-term stability testing, and the risks of internal users can be converged. The internal cluster runs the real online environment of internal users, and the risks of external users can be converged. A small number of test clusters can be selected from all test clusters, and a small number of internal clusters can be selected from all internal clusters for grayscale release.
[0070] For example, a gray test batch can be generated and released before releasing the official release batch, or before determining multiple target clusters, and the present disclosure does not limit this. After the gray test batch is released, the official release batch can be released after confirming that there is no abnormality. The release of the gray test batch before the official batch can effectively reduce the risk of large-scale failures.
[0071] Based on the same concept, the embodiment of the present disclosure provides a release batch generation device for a cluster, such as Figure 5 As shown, the cluster release batch generation device 500 includes: A first determination module 501 is used to determine multiple target clusters to be published; A grouping module 502 is used to group and sort the multiple target clusters based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, to obtain at least one cluster group and the publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority; A second determination module 503 is used to determine, for each cluster group, a release order of each target cluster in the cluster group based on the number of nodes of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes; The generation module 504 is used to determine the release order of each target cluster in the multiple target clusters based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, and generate at least one release batch based on the release order of each target cluster in the multiple target clusters, each release batch including at least one target cluster.
[0072] Optionally, the number of nodes includes the number of virtual machines, and the second determining module 503 is used to: Based on the number of virtual machines in each target cluster in the cluster grouping, each target cluster in the cluster grouping is grouped and sorted to obtain at least one first sub-grouping and a publishing order of each first sub-grouping, wherein the number of virtual machines in each target cluster in a first sub-group with an earlier publishing order is less than the number of virtual machines in each target cluster in a first sub-group with a later publishing order.
[0073] Optionally, the number of nodes also includes the number of physical machines, and the second determining module 503 is further used to: For each first sub-group, based on the number of physical machines in each target cluster in the first sub-group, the target clusters in the first sub-group are grouped and sorted to obtain at least one second sub-group and a release order of each second sub-group, wherein the number of physical machines in each target cluster in a second sub-group with an earlier release order is less than the number of physical machines in each target cluster in a second sub-group with a later release order.
[0074] Optionally, the release order of each target cluster in each second subgroup is positively correlated with the cluster priority; the cluster priority of the target cluster is determined in the following manner: Acquire cluster information of the target cluster, the cluster information including parameter values and preset weight values of cluster parameters, the cluster parameters including at least one of the number of virtual machines, virtual machine traffic, and the number of working nodes of the target cluster; The cluster priority of the target cluster is determined based on the cluster information of the target cluster, wherein the cluster priority of the target cluster is negatively correlated with both a parameter value and a preset weight value of the cluster parameter.
[0075] Optionally, the generating module 504 is used to: According to the release order of each target cluster in the multiple target clusters, generating a release batch based on the first target number of target clusters; The target clusters other than the first target number of target clusters in the multiple target clusters are taken as new multiple target clusters, and the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters is repeatedly performed until all target clusters are generated into release batches.
[0076] Optionally, the release batch generating device 500 of the cluster further includes an increment module, and the increment module is used to: Before repeatedly performing the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters, when the target number is less than a preset upper limit, determining a total number of the target number and a preset increment; When the total quantity is less than the preset upper limit quantity, the total quantity is used as the new target quantity; when the total quantity is greater than or equal to the preset upper limit quantity, the preset upper limit quantity is used as the new target quantity.
[0077] Optionally, the release batch generating device 500 of the cluster further includes a grayscale module, and the grayscale module is used to: A grayscale test batch is generated based on a preset cluster, the preset cluster includes a test cluster and / or an internal cluster, the release order of the grayscale test batch is before the release order of at least one batch, the grayscale test batch includes a first test batch corresponding to the test cluster and / or a second test batch corresponding to the internal cluster, and the release order of the first test batch is before the release order of the second test batch.
[0078] Optionally, the multiple target clusters are determined in the following manner: In response to a trigger operation on a resource publishing page, the resource publishing page is displayed, the resource publishing page is used to publish resources for a cluster, the resource publishing page displays cluster filtering items, the cluster filtering items include at least one filtering item for a resource name, a user identifier, a cluster type, a cluster deployment location, and a cluster operator; In response to a configuration operation on the cluster filter item, determining a filter condition corresponding to the configuration operation, and displaying a plurality of candidate clusters satisfying the filter condition on the resource publishing page; In response to a confirmation operation on the plurality of candidate clusters, a plurality of target clusters corresponding to the confirmation operation are determined from the plurality of candidate clusters.
[0079] Optionally, the cluster publishing batch generating device 500 further includes a waiting module, and the waiting module is used to: In response to the completion of publishing of a first publishing batch in the at least one publishing batch, a second publishing batch is published after waiting for a preset period of time, and the second publishing batch is a publishing batch after the first publishing batch in the at least one publishing batch.
[0080] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processing device, the steps of the above-mentioned method for generating a release batch of a cluster are implemented.
[0081] Based on the same concept, the present disclosure also provides an electronic device, which may include: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned cluster release batch generation method.
[0082] Based on the same concept, an embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the steps of the above-mentioned cluster release batch generation method when executed by a processor.
[0083] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0084] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0085] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0086] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0087] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0088] In some embodiments, any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used for communication, and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0089] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0090] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines multiple target clusters to be released; based on the cluster type of each target cluster and the release priority corresponding to each cluster type, groups and sorts the multiple target clusters to obtain at least one cluster grouping and the release order of each cluster grouping, wherein the release order of the cluster grouping is positively correlated with the release priority; for each cluster grouping, based on the number of nodes of each target cluster in the cluster grouping, determines the release order of each target cluster in the cluster grouping, wherein the release order of the target cluster is negatively correlated with the number of nodes; based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, determines the release order of each target cluster in the multiple target clusters, and generates at least one release batch based on the release order of each target cluster in the multiple target clusters, each release batch including at least one target cluster.
[0091] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0092] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0093] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.
[0094] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0095] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0096] According to one or more embodiments of the present disclosure, Example 1 provides a method for generating a release batch of a cluster, the method comprising: Determine multiple target clusters to be released; Based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, the multiple target clusters are grouped and sorted to obtain at least one cluster group and a publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority; For each cluster group, based on the number of nodes of each target cluster in the cluster group, determine the release order of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes; Based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, the release order of each target cluster in the multiple target clusters is determined, and at least one release batch is generated based on the release order of each target cluster in the multiple target clusters, each release batch includes at least one target cluster.
[0097] According to one or more embodiments of the present disclosure, Example 2 provides a method for generating a release batch of a cluster of Example 1, wherein the number of nodes includes the number of virtual machines, and determining the release order of each target cluster in the cluster group based on the number of nodes of each target cluster in the cluster group includes: Based on the number of virtual machines in each target cluster in the cluster grouping, each target cluster in the cluster grouping is grouped and sorted to obtain at least one first sub-grouping and a publishing order of each first sub-grouping, wherein the number of virtual machines in each target cluster in a first sub-group with an earlier publishing order is less than the number of virtual machines in each target cluster in a first sub-group with a later publishing order.
[0098] According to one or more embodiments of the present disclosure, Example 3 provides a method for generating a release batch of a cluster of Example 2, wherein the number of nodes also includes the number of physical machines, and the release order of each target cluster in the cluster group is determined based on the number of nodes of each target cluster in the cluster group, and further includes: For each first sub-group, based on the number of physical machines in each target cluster in the first sub-group, the target clusters in the first sub-group are grouped and sorted to obtain at least one second sub-group and a release order of each second sub-group, wherein the number of physical machines in each target cluster in a second sub-group with an earlier release order is less than the number of physical machines in each target cluster in a second sub-group with a later release order.
[0099] According to one or more embodiments of the present disclosure, Example 4 provides a method for generating a release batch of a cluster of Example 3, wherein the release order of each target cluster in each second subgroup is positively correlated with the cluster priority; the cluster priority of the target cluster is determined in the following manner: Acquire cluster information of the target cluster, the cluster information including parameter values and preset weight values of cluster parameters, the cluster parameters including at least one of the number of virtual machines, virtual machine traffic, and the number of working nodes of the target cluster; The cluster priority of the target cluster is determined based on the cluster information of the target cluster, wherein the cluster priority of the target cluster is negatively correlated with both a parameter value and a preset weight value of the cluster parameter.
[0100] According to one or more embodiments of the present disclosure, Example 5 provides a method for generating a release batch of a cluster in any one of Examples 1-4, wherein generating at least one release batch based on the release order of each target cluster in the multiple target clusters includes: According to the release order of each target cluster in the multiple target clusters, generating a release batch based on the first target number of target clusters; The target clusters other than the first target number of target clusters in the multiple target clusters are taken as new multiple target clusters, and the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters is repeatedly performed until all target clusters are generated into release batches.
[0101] According to one or more embodiments of the present disclosure, Example 6 provides a method for generating a release batch of a cluster of Example 5, the method further comprising: Before repeatedly performing the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters, when the target number is less than a preset upper limit, determining a total number of the target number and a preset increment; When the total quantity is less than the preset upper limit quantity, the total quantity is used as the new target quantity; when the total quantity is greater than or equal to the preset upper limit quantity, the preset upper limit quantity is used as the new target quantity.
[0102] According to one or more embodiments of the present disclosure, Example 7 provides a method for generating a release batch of a cluster in any one of Examples 1-4, the method further comprising: Before releasing the at least one batch, a grayscale test batch is generated based on a preset cluster, the preset cluster includes a test cluster and / or an internal cluster, the grayscale test batch includes a first test batch corresponding to the test cluster and / or a second test batch corresponding to the internal cluster, and the release order of the first test batch is before the release order of the second test batch.
[0103] According to one or more embodiments of the present disclosure, Example 8 provides a method for generating a release batch of clusters in any one of Examples 1-4, wherein the multiple target clusters are determined in the following manner: In response to a trigger operation on a resource publishing page, the resource publishing page is displayed, the resource publishing page is used to publish resources for a cluster, the resource publishing page displays cluster filtering items, the cluster filtering items include at least one filtering item for a resource name, a user identifier, a cluster type, a cluster deployment location, and a cluster operator; In response to a configuration operation on the cluster filter item, determining a filter condition corresponding to the configuration operation, and displaying a plurality of candidate clusters satisfying the filter condition on the resource publishing page; In response to a confirmation operation on the plurality of candidate clusters, a plurality of target clusters corresponding to the confirmation operation are determined from the plurality of candidate clusters.
[0104] According to one or more embodiments of the present disclosure, Example 9 provides a method for generating a release batch of a cluster in any one of Examples 1-4, the method further comprising: In response to the completion of publishing of a first publishing batch in the at least one publishing batch, a second publishing batch is published after waiting for a preset period of time, and the second publishing batch is a publishing batch after the first publishing batch in the at least one publishing batch.
[0105] According to one or more embodiments of the present disclosure, Example 10 provides a device for generating a release batch of a cluster, the device comprising: A first determination module, used to determine multiple target clusters to be released; A grouping module, configured to group and sort the multiple target clusters based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, to obtain at least one cluster group and a publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority; A second determination module is used to determine, for each cluster group, a release order of each target cluster in the cluster group based on the number of nodes of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes; A generation module is used to determine the release order of each target cluster in the multiple target clusters based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, and generate at least one release batch based on the release order of each target cluster in the multiple target clusters, each release batch including at least one target cluster.
[0106] According to one or more embodiments of the present disclosure, Example 11 provides a release batch generation device for a cluster of Example 10, wherein the number of nodes includes the number of virtual machines, and the second determination module is used to: Based on the number of virtual machines in each target cluster in the cluster grouping, each target cluster in the cluster grouping is grouped and sorted to obtain at least one first sub-grouping and a publishing order of each first sub-grouping, wherein the number of virtual machines in each target cluster in a first sub-group with an earlier publishing order is less than the number of virtual machines in each target cluster in a first sub-group with a later publishing order.
[0107] According to one or more embodiments of the present disclosure, Example 12 provides a release batch generation device for a cluster of Example 11, wherein the number of nodes also includes the number of physical machines, and the second determination module is further configured to: For each first sub-group, based on the number of physical machines in each target cluster in the first sub-group, the target clusters in the first sub-group are grouped and sorted to obtain at least one second sub-group and a release order of each second sub-group, wherein the number of physical machines in each target cluster in a second sub-group with an earlier release order is less than the number of physical machines in each target cluster in a second sub-group with a later release order.
[0108] According to one or more embodiments of the present disclosure, Example 13 provides a release batch generation device for clusters of Example 12, wherein the release order of each target cluster in each second subgroup is positively correlated with the cluster priority; the cluster priority of the target cluster is determined in the following manner: Acquire cluster information of the target cluster, the cluster information including parameter values and preset weight values of cluster parameters, the cluster parameters including at least one of the number of virtual machines, virtual machine traffic, and the number of working nodes of the target cluster; The cluster priority of the target cluster is determined based on the cluster information of the target cluster, wherein the cluster priority of the target cluster is negatively correlated with both a parameter value and a preset weight value of the cluster parameter.
[0109] According to one or more embodiments of the present disclosure, Example 14 provides a release batch generation device for a cluster of any one of Examples 10-13, wherein the generation module is used to: According to the release order of each target cluster in the multiple target clusters, generating a release batch based on the first target number of target clusters; The target clusters other than the first target number of target clusters in the multiple target clusters are taken as new multiple target clusters, and the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters is repeatedly performed until all target clusters are generated into release batches.
[0110] According to one or more embodiments of the present disclosure, Example 15 provides a release batch generation device for a cluster of Example 14, wherein the device further includes an increment module, and the increment module is used to: Before repeatedly performing the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters, when the target number is less than a preset upper limit, determining a total number of the target number and a preset increment; When the total quantity is less than the preset upper limit quantity, the total quantity is used as the new target quantity; when the total quantity is greater than or equal to the preset upper limit quantity, the preset upper limit quantity is used as the new target quantity.
[0111] According to one or more embodiments of the present disclosure, Example 16 provides a release batch generation device for a cluster of any one of Examples 10-13, wherein the device further includes a grayscale module, and the grayscale module is used to: Before releasing the at least one batch, a grayscale test batch is generated based on a preset cluster, the preset cluster includes a test cluster and / or an internal cluster, the grayscale test batch includes a first test batch corresponding to the test cluster and / or a second test batch corresponding to the internal cluster, and the release order of the first test batch is before the release order of the second test batch.
[0112] According to one or more embodiments of the present disclosure, Example 17 provides a release batch generation device for clusters in any one of Examples 10-13, wherein the multiple target clusters are determined in the following manner: In response to a trigger operation on a resource publishing page, the resource publishing page is displayed, the resource publishing page is used to publish resources for a cluster, the resource publishing page displays cluster filtering items, the cluster filtering items include at least one filtering item for a resource name, a user identifier, a cluster type, a cluster deployment location, and a cluster operator; In response to a configuration operation on the cluster filter item, determining a filter condition corresponding to the configuration operation, and displaying a plurality of candidate clusters satisfying the filter condition on the resource publishing page; In response to a confirmation operation on the plurality of candidate clusters, a plurality of target clusters corresponding to the confirmation operation are determined from the plurality of candidate clusters.
[0113] According to one or more embodiments of the present disclosure, Example 18 provides a release batch generation device for a cluster of any one of Examples 10-13, wherein the device further includes a waiting module, and the waiting module is used to: In response to the completion of publishing of a first publishing batch in the at least one publishing batch, a second publishing batch is published after waiting for a preset period of time, and the second publishing batch is a publishing batch after the first publishing batch in the at least one publishing batch.
[0114] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0115] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0116] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A method for generating a release batch of a cluster, characterized in that: The method comprises: Determine multiple target clusters to be released; Based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, the multiple target clusters are grouped and sorted to obtain at least one cluster group and a publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority; For each cluster group, based on the number of nodes of each target cluster in the cluster group, determine the release order of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes; Based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, the release order of each target cluster in the multiple target clusters is determined, and at least one release batch is generated based on the release order of each target cluster in the multiple target clusters, each release batch includes at least one target cluster.
2. The method for generating a release batch of a cluster according to claim 1, characterized in that: The number of nodes includes the number of virtual machines, and determining the release order of each target cluster in the cluster group based on the number of nodes of each target cluster in the cluster group includes: Based on the number of virtual machines in each target cluster in the cluster grouping, each target cluster in the cluster grouping is grouped and sorted to obtain at least one first sub-grouping and a publishing order of each first sub-grouping, wherein the number of virtual machines in each target cluster in a first sub-group with an earlier publishing order is less than the number of virtual machines in each target cluster in a first sub-group with a later publishing order.
3. The method for generating a release batch of a cluster according to claim 2, characterized in that: The number of nodes also includes the number of physical machines, and determining the release order of each target cluster in the cluster group based on the number of nodes of each target cluster in the cluster group further includes: For each first sub-group, based on the number of physical machines in each target cluster in the first sub-group, the target clusters in the first sub-group are grouped and sorted to obtain at least one second sub-group and a release order of each second sub-group, wherein the number of physical machines in each target cluster in a second sub-group with an earlier release order is less than the number of physical machines in each target cluster in a second sub-group with a later release order.
4. The method for generating a release batch of a cluster according to claim 3, characterized in that: The release order of each target cluster in each second subgroup is positively correlated with the cluster priority; the cluster priority of the target cluster is determined in the following manner: Acquire cluster information of the target cluster, the cluster information including parameter values and preset weight values of cluster parameters, the cluster parameters including at least one of the number of virtual machines, virtual machine traffic, and the number of working nodes of the target cluster; The cluster priority of the target cluster is determined based on the cluster information of the target cluster, wherein the cluster priority of the target cluster is negatively correlated with both a parameter value and a preset weight value of the cluster parameter.
5. The method for generating a release batch of a cluster according to any one of claims 1 to 4, characterized in that: The generating at least one publishing batch based on the publishing order of each target cluster in the multiple target clusters includes: According to the release order of each target cluster in the multiple target clusters, generating a release batch based on the first target number of target clusters; The target clusters other than the first target number of target clusters in the multiple target clusters are taken as new multiple target clusters, and the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters is repeatedly performed until all target clusters are generated into release batches.
6. The method for generating a release batch of a cluster according to claim 5, characterized in that: The method further comprises: Before repeatedly performing the step of generating a release batch based on the first target number of target clusters according to the release order of each target cluster in the multiple target clusters, when the target number is less than a preset upper limit, determining a total number of the target number and a preset increment; When the total quantity is less than the preset upper limit quantity, the total quantity is used as the new target quantity; when the total quantity is greater than or equal to the preset upper limit quantity, the preset upper limit quantity is used as the new target quantity.
7. The method for generating a release batch of a cluster according to any one of claims 1 to 4, characterized in that: The method further comprises: A grayscale test batch is generated based on a preset cluster, the preset cluster includes a test cluster and / or an internal cluster, the release order of the grayscale test batch is before the release order of at least one batch, the grayscale test batch includes a first test batch corresponding to the test cluster and / or a second test batch corresponding to the internal cluster, and the release order of the first test batch is before the release order of the second test batch.
8. The method for generating a release batch of a cluster according to any one of claims 1 to 4, characterized in that: The multiple target clusters are determined in the following manner: In response to a trigger operation on a resource publishing page, the resource publishing page is displayed, the resource publishing page is used to publish resources for a cluster, the resource publishing page displays cluster filtering items, the cluster filtering items include at least one filtering item for a resource name, a user identifier, a cluster type, a cluster deployment location, and a cluster operator; In response to a configuration operation on the cluster filter item, determining a filter condition corresponding to the configuration operation, and displaying a plurality of candidate clusters satisfying the filter condition on the resource publishing page; In response to a confirmation operation on the plurality of candidate clusters, a plurality of target clusters corresponding to the confirmation operation are determined from the plurality of candidate clusters.
9. The method for generating a release batch of a cluster according to any one of claims 1 to 4, characterized in that: The method further comprises: In response to the completion of publishing of a first publishing batch in the at least one publishing batch, a second publishing batch is published after waiting for a preset period of time, and the second publishing batch is a publishing batch after the first publishing batch in the at least one publishing batch.
10. A release batch generation device for a cluster, characterized in that: The device comprises: A first determination module, used to determine multiple target clusters to be released; A grouping module, configured to group and sort the multiple target clusters based on the cluster type of each target cluster and the publishing priority corresponding to each cluster type, to obtain at least one cluster group and a publishing order of each cluster group, wherein the publishing order of the cluster group is positively correlated with the publishing priority; A second determination module is used to determine, for each cluster group, a release order of each target cluster in the cluster group based on the number of nodes of each target cluster in the cluster group, wherein the release order of the target cluster is negatively correlated with the number of nodes; A generation module is used to determine the release order of each target cluster in the multiple target clusters based on the release order of each cluster grouping and the release order of each target cluster in each cluster grouping, and generate at least one release batch based on the release order of each target cluster in the multiple target clusters, each release batch including at least one target cluster.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 9 are implemented.
12. An electronic device, characterized in that: include: a storage device having at least one computer program stored thereon; At least one processing device, configured to execute the at least one computer program in the storage device to implement the steps of the method according to any one of claims 1 to 9.
13. 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 according to any one of claims 1 to 9 are implemented.