CN111176697A - Service instance deployment method, data processing method and cluster federation - Google Patents
Service instance deployment method, data processing method and cluster federation Download PDFInfo
- Publication number
- CN111176697A CN111176697A CN202010000491.5A CN202010000491A CN111176697A CN 111176697 A CN111176697 A CN 111176697A CN 202010000491 A CN202010000491 A CN 202010000491A CN 111176697 A CN111176697 A CN 111176697A
- Authority
- CN
- China
- Prior art keywords
- cluster
- data
- deployment
- resource information
- service instance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5041—Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
- H04L41/5054—Automatic deployment of services triggered by the service manager, e.g. service implementation by automatic configuration of network components
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a service instance deployment method, a data processing method and a cluster federation, and relates to the technical field of clusters, wherein when a management cluster in the cluster federation obtains a deployment request of a service instance, a target cluster with residual resources meeting the deployment policy is determined in a plurality of data clusters according to a deployment policy included in the deployment request and residual resource information of each data cluster included in maintained cluster resource information, so that the service instance is deployed in the target cluster.
Description
Technical Field
The application relates to the technical field of clusters, in particular to a service instance deployment method, a data processing method and a cluster federation.
Background
The clustering technology is a solution capable of achieving high performance, high reliability and high flexibility with low cost. For example, a container management platform can be widely constructed by using a kubernets cluster technology, and in consideration of problems such as high availability of clusters, disaster tolerance at different places, load balancing and the like, a cluster federation (fed) formed by a plurality of kubernets clusters can be deployed, and different service instances can be selectively operated in different kubernets clusters.
However, in a cluster federation application scenario such as that described above, current service instance deployment policies are not flexible enough, possibly resulting in service instances that cannot be successfully run within a kubernets cluster.
Disclosure of Invention
The application aims to provide a service instance deployment method, a data processing method and a cluster federation, and can improve the flexibility of service instance deployment.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a service instance deployment method, which is applied to a management cluster in a cluster federation, where the cluster federation further includes a plurality of data clusters; the method comprises the following steps:
obtaining a deployment request of a service instance; wherein the deployment request comprises a deployment strategy;
determining a target cluster in the plurality of data clusters according to the cluster resource information; the cluster resource information comprises the residual resource information of each data cluster, and the target cluster is a data cluster of which the residual resources meet the deployment strategy in the plurality of data clusters;
deploying the service instance in the target cluster.
In a second aspect, an embodiment of the present application provides a data processing method, which is applied to a Node that runs a resource scheduling service in a management cluster, where the management cluster belongs to a cluster federation, and the cluster federation further includes a plurality of data clusters; the method comprises the following steps:
receiving a deployment request sent by an api (Application Programming Interface) service in the management cluster; wherein, the deployment request comprises a deployment strategy used for indicating to deploy a service instance;
obtaining current remaining resource information of each data cluster in the plurality of data clusters;
determining a data cluster of which the residual resources meet the deployment strategy in the plurality of data clusters as a target cluster;
updating the deployment request, wherein the updated deployment request comprises identification information corresponding to the target cluster;
sending the updated deployment request to a federated control service in the management cluster, so that the federated control service deploys the service instance in the target cluster.
In a third aspect, an embodiment of the present application provides a cluster federation, including a management cluster and a plurality of data clusters;
the cluster federation is used for obtaining a deployment request of a service instance; wherein the deployment request comprises a deployment strategy;
the cluster federation is further used for determining a target cluster in the plurality of data clusters according to the cluster resource information; the cluster resource information comprises the residual resource information of each data cluster, and the target cluster is a data cluster of which the residual resources meet the deployment strategy in the plurality of data clusters;
the cluster federation is further to deploy the service instance to the target cluster.
Compared with the prior art, the service instance can be deployed in the plurality of data clusters according to the deployment strategy, the data clusters for deploying the service instance can be configured without a user, and the service instance can be deployed in the target cluster having idle resources for operating the service instance in the plurality of data clusters only according to the deployment strategy, so that the flexibility of deploying the service instance is improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and it will be apparent to those skilled in the art that other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 illustrates an exemplary application scenario diagram of a cluster federation;
FIG. 2 illustrates another exemplary application scenario diagram of a cluster federation;
FIG. 3 is a schematic flow chart diagram illustrating a method for deploying a service instance provided by an embodiment of the present application;
FIG. 4 shows a schematic flow diagram of the substeps of step 104 in FIG. 3;
FIG. 5 is a schematic flow chart diagram illustrating a service instance deployment method provided by an embodiment of the present application;
FIG. 6 is a schematic flow chart diagram illustrating a service instance deployment method according to an embodiment of the present application;
FIG. 7 shows a schematic flow chart of the substeps of step 107 in FIG. 3;
fig. 8 shows a schematic flowchart of a data processing method provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 shows an exemplary application scenario diagram of a cluster federation. The cluster federation shown in fig. 1 may be constructed based on a plurality of kubernets clusters, and in the plurality of kubernets clusters included in the cluster federation, a kubefied component may be configured for one of the kubernets clusters, so that the kubefied cluster configured with the kubefied component serves as a management cluster of the whole cluster federation, and an api service of the management cluster serves as a uniform management and control entry, thereby performing uniform management on the whole cluster federation; and the rest kubernets cluster which is not configured with the kubefied component can be used as a data cluster and is responsible for running each service instance deployed in the data cluster.
In a cluster federation such as that shown in fig. 1, a current service instance deployment policy generally deploys service instances based on a specified deployment manner in a user instruction.
For example, when a user creates a federated deployment (federatedDeployment) in the application scenario shown in fig. 1, it may be set in the placement field of the federatedDeployment that the service instance needs to be deployed in those clusters; then, after monitoring that the feededDeployment is created, the management cluster deploys the service instance in the corresponding data cluster according to the value of the placement field in the feededDeployment; for example, assuming that the value of the placement field is "South-west-1", a federal control service (kubeffed control plan) in the management cluster may call a Deployment service Deployment of the data cluster "South-west-1" to create a container (pod) at "South-west-1" so that the service instance is deployed into the container.
This deployment approach requires the user to decide the data cluster to be deployed by the service instance, for example, in the above example, the user is required to fill the identification information of the corresponding data cluster in the placement field of the feededdelivery, that is, the user is required to specify the data cluster to be deployed by the service instance.
However, it is generally difficult for a user to perceive the remaining resource information of the data cluster, so that when the above scheme is executed, the container may not be successfully created due to insufficient remaining resources of the data cluster specified by the user, and thus the service instance may not be successfully run in the specified data cluster, and it is necessary to wait for the data cluster specified by the user to have free resources before creating the container to run the service instance.
Therefore, based on the above defects, a possible implementation manner provided by the embodiment of the present application is as follows: when a management cluster in the cluster federation obtains a deployment request of a service instance, a target cluster with the residual resources meeting the deployment policy is determined in a plurality of data clusters according to a deployment policy included in the deployment request and the residual resource information of each data cluster included in the maintained cluster resource information, so that the service instance is automatically deployed in the target cluster with idle resources without a user specifying the data cluster for deploying the service instance, and the flexibility of service instance deployment is improved.
Referring to fig. 2, fig. 2 shows another exemplary application scenario diagram of a cluster federation, where the cluster federation includes a management cluster and a plurality of data clusters, and the management cluster is capable of obtaining remaining resource information of each data cluster.
It should be noted that the management cluster and each data cluster in the application scenario shown in fig. 2 may be constructed based on a kubernets cluster.
The service instance deployment method provided by the embodiment of the present application is exemplarily described below with the management cluster in the application scenario shown in fig. 2 as a schematic execution subject.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a service instance deployment method provided by the embodiment of the present application, which may include the following steps:
104, determining a target cluster in a plurality of data clusters according to the cluster resource information;
In this embodiment of the present application, the deployment request of the service instance obtained by the management cluster may not include the identification information of the corresponding data cluster, but include the deployment policy.
The deployment policy may be recorded, such as in the example above, using the metadata.
In addition, the management cluster also maintains cluster resource information, wherein the cluster resource information comprises the residual resource information of each data cluster; after the management cluster obtains the deployment request, the data clusters with the rest resources meeting the deployment strategy are determined as target clusters in the plurality of data clusters according to the cluster resource information, so that the service instances are deployed in the target clusters, the service instances can be deployed in the data clusters with the idle resources according to the deployment strategy, and the data clusters with the service instances are not required to be manually and specifically deployed by users.
It should be noted that the target cluster may be one data cluster or a sum of multiple data clusters, which depends on a specific deployment policy.
It can be seen that, based on the above design, in the service instance deployment method provided in this embodiment of the present application, when a management cluster in the cluster federation obtains a deployment request for a service instance, according to a deployment policy included in the deployment request and remaining resource information of each data cluster included in maintained cluster resource information, a target cluster in which remaining resources satisfy the deployment policy is determined among a plurality of data clusters, so as to deploy the service instance in the target cluster.
When step 104 is executed, the management cluster may arbitrarily select, from all the data clusters rich in the remaining resources, a data cluster that satisfies the deployment policy as a target cluster, or determine, according to the order of numbers, a data cluster that satisfies the deployment policy as a target cluster.
Referring to fig. 4 as one possible implementation, fig. 4 shows a schematic flow diagram of the substeps of step 104 in fig. 3, and step 104 may include the substeps of:
104-1, obtaining a residual resource score corresponding to each data cluster according to the cluster resource information;
and step 104-2, determining the data cluster which is full of deployment strategies and has the highest corresponding residual resource score among the plurality of data clusters as a target cluster.
In the embodiment of the application, the management cluster can calculate and obtain the residual resource score corresponding to each data cluster according to the cluster resource information, and the residual resource score represents the surplus degree of the residual resources of the corresponding data cluster; the higher the remaining resource score is, the more the remaining resources of the data cluster corresponding to the characterization are, and the lower the remaining resource score is, the less the remaining resources of the data cluster corresponding to the characterization are.
Therefore, the management cluster can determine the data cluster which is full of deployment strategies and has the highest corresponding residual resource score in the plurality of data clusters as the target cluster according to the residual resource score corresponding to each data cluster, so that the service instance is deployed in the data cluster which has the highest residual resource score and meets the deployment strategies.
Therefore, based on the above design, in the service instance deployment method provided in the embodiment of the present application, the management clusters obtain the remaining resource score corresponding to each data cluster according to the cluster resource information, and further determine, as a target cluster, a data cluster that satisfies the deployment policy and corresponds to the data cluster with the highest remaining resource score, so that the service instance is deployed in the data cluster with the highest remaining resources that satisfies the deployment policy, and the remaining resources of each data cluster in the cluster federation can be relatively balanced.
It should be noted that, when step 104-1 is executed, the remaining resource score corresponding to each data cluster may be obtained in various ways; for example, the value of the remaining resources corresponding to each data cluster may be used as the score of the remaining resources corresponding to each data cluster; or sequencing the residual resources corresponding to all the data clusters, and numbering the residual resources in sequence from less to more, so that the number corresponding to each data cluster is used as the score of the residual resources corresponding to each data cluster.
In addition, as a possible implementation manner, when step 104-1 is executed, the total remaining resources of all the data clusters in the multiple data clusters may be obtained as total remaining resources by calculation, and then the remaining resource score corresponding to each data cluster is obtained according to the proportion of the remaining resources corresponding to each data cluster to the total remaining resources corresponding to the multiple data clusters.
For example, the proportion of the remaining resources to the total remaining resources corresponding to each data cluster may be multiplied by a certain scaling factor, for example, by 10, so that the value of the proportion of the remaining resources to the total remaining resources corresponding to each data cluster is converted into a range from 0 to 10, and the remaining resource score corresponding to each data cluster is obtained.
In addition, the remaining resources of each data cluster are often changed, for example, when a certain service instance is completed, the data cluster may release the computer resources occupied by the service instance, and at this time, the remaining resources corresponding to the data cluster may increase.
To this end, referring to fig. 5 on the basis of fig. 3, fig. 5 shows another schematic flowchart of a service instance deployment method provided in the embodiment of the present application, before executing step 104, the service instance deployment method may further include the following steps:
and 103, updating cluster resource information according to the obtained current residual resource information of each data cluster.
In this embodiment of the present application, before the service instance determines the target cluster in step 104, the current remaining resource information of each data cluster may be obtained, so as to update the cluster resource information according to the current remaining resource information of each data cluster, so that the current remaining resource information of each data cluster is recorded in the cluster resource information.
For example, the current remaining resource information fed back by each data cluster may be received by sending a resource acquisition instruction to each data cluster; or, a reporting mechanism may be set, and each data cluster sends the current remaining resource information to the management cluster according to a set period.
Thus, when the management cluster executes step 104, the target cluster is determined among the plurality of data clusters according to the updated cluster resource information.
Therefore, based on the above design, according to the service instance deployment method provided in the embodiment of the present application, the management cluster updates the cluster resource information according to the obtained current remaining resource information of each data cluster, so that the management cluster determines a target cluster in the plurality of data clusters according to the updated cluster resource information, so as to ensure that the management cluster determines the target cluster according to the real-time remaining resources of each data cluster, and improve the accuracy of determining the target cluster.
It should be noted that, in a cluster federation constructed using, for example, a kubernets cluster, a management cluster often does not have a function of actively obtaining information about the current remaining resources of a data cluster. Therefore, to implement the above scheme for updating cluster resource information, a modification needs to be performed on the original kubernets cluster, and such a modification is not only complicated, but also may destroy some other functions of the kubernets cluster.
However, a kubernets cluster is provided with an extension mechanism, namely mutatingpwebhook, which allows the kubernets cluster to call some external service instances to implement functions that some native kubernets cluster cannot perform.
To this end, referring to fig. 6 on the basis of fig. 3, fig. 6 shows a further schematic flowchart of a service instance deployment method provided in the embodiment of the present application, before step 104 is executed, the service instance deployment method may further include the following steps:
In the embodiment of the present application, a resource scheduling service may be configured in advance, for example, a service instance named a federatedbcheduler may be configured as the resource scheduling service, and the resource scheduling service is configured to obtain the remaining resource information corresponding to each data cluster.
In the application scenario of building the cluster federation with kubernets clusters, for example, before the management cluster executes step 104, the fetaratedscheduler may be called by triggering the mutatingpthok, so that the fetaratedscheduler obtains current remaining resource information corresponding to each data cluster, thereby obtaining cluster resource information; and feeding back the cluster resource information to the management cluster, so that the management cluster can execute step 104 according to the cluster resource information fed back by the feededscheduler.
Therefore, based on the above design, the service instance deployment method provided in the embodiment of the present application configures the resource scheduling service for obtaining the remaining resource information corresponding to each data cluster, so that the management cluster can obtain the cluster resource information by calling the resource scheduling service without affecting the function of the management cluster itself.
It should be noted that, in a cluster federation deployed based on, for example, a kubernets cluster, a process for a management cluster to create a container in a specified data cluster is as follows: the method comprises the steps that a federated control service in a management cluster monitors Federateddeployment created by a user, and according to identification information filled in a placement field in the Federateddeployment, a container is created in a data cluster corresponding to the identification information, and a service instance is deployed in the created container.
Thus, in this embodiment of the present application, the place field of the user-created feededdelivery may be null, that is: the data cluster for deploying the service instance is not specified, so that when the management cluster obtains the deployment request of the service instance, the federal control service does not execute the action of creating the container.
In this application scenario, referring to fig. 7 for implementing step 107, fig. 7 shows a schematic flowchart of sub-steps of step 107 in fig. 3, and as a possible implementation, step 107 may include the following sub-steps:
step 107-1, updating the deployment request so that the updated deployment request contains identification information corresponding to the target cluster;
and step 107-2, deploying the service instance according to the updated deployment request so that the service instance is deployed in the target cluster.
In this embodiment of the application, taking the cluster federation deployed based on the kubernets cluster as an example, after the management cluster determines the target cluster, the management cluster may update the identification information corresponding to the target cluster in the deployment request, so that the updated deployment request includes the identification information corresponding to the target cluster; and then analyzing the updated deployment request, and deploying the service instance according to the updated deployment request so as to deploy the service instance in the target cluster.
For example, in the foregoing example, the management cluster may fill the identification information corresponding to the target cluster into the place field of the feededdelivery; after monitoring that the placement field of the federatedDelployment is not empty, the federated control service deploys the service instance in the target cluster according to the identification information filled in the placement field, so that the service instance is operated in the target cluster.
In step 107-2, the management cluster may invoke the deployment service of the target cluster to create a container according to the updated deployment request, so that the service instance is deployed in the container.
For example, in the above example, the federate control service may call Deployment of the target cluster, thereby creating a container in the target cluster such that the service instance runs within the container.
The service instance deployment method provided by the embodiment of the present application is exemplarily described below by taking the application scenario shown in fig. 2 as an example.
First, assume that: the region can be represented by "region," az "representing the data center; assume that a feededdeployment is taken as a deployment request, and the management cluster obtains the deployment request as follows:
the deployment policy in the deployment request may be: the service instances are deployed in 2 zones, 3 data clusters, and the deployed data clusters are not specifically designated.
Then, the management cluster calls a resource scheduling service named as a FederatedSchedule by triggering the mutatingWebhook to acquire the respective residual resource information of each data cluster.
And then, the feededscheduler obtains the corresponding residual resource score of each data cluster according to the respective residual resource information of each data cluster. Suppose that: the remaining resource scores corresponding to each data cluster in the application scenario shown in fig. 2 are as follows:
South-west-1:9.0
Nouth-east-1:5.4
Nouth-east-2:3.2
Nouth-east-3:8.7
thus, the feededscheduler may determine, according to the remaining resource score corresponding to each data cluster of the foregoing example, in combination with deployment strategies of 2 regions and 3 data clusters, three data clusters corresponding to identification information, i.e., South-west-1, Nouth-east-1, and Nouth-east-3, as target clusters, and fill South-west-1, Nouth-east-1, and Nouth-east-3 in a placement field in feededdeployment, where the filled feededdeployment may be represented as follows:
then, the federated control service in the management cluster monitors that the placement field in the federatedDeployment is not empty, analyzes the federatedDeployment, calls the Deployment in three data clusters with corresponding identification information of South-west-1, Nouth-east-1 and Nouth-east-3 respectively, thereby creating containers in the three data clusters, deploys the service instances in the containers created in the three data clusters, and completes the Deployment of the service instances.
It should be noted that, the implementation manner provided in the embodiment of the present application is described by taking a management cluster in the cluster federation shown in fig. 2 as an example of an exemplary execution subject; in a management cluster constructed by using, for example, a kubernets cluster, a plurality of Node nodes are generally included, each Node may run at least one pod, and the api service, the resource scheduling service, and the federal control service shown in fig. 2 may be respectively deployed in different pods, so that respective functions are implemented by executing corresponding program instructions.
However, in some possible implementation scenarios, the api service, the resource scheduling service, and the federal control service may each be deployed in a pod located in a different Node, i.e., the functions of implementing the api service, the resource scheduling service, and the federal control service may not be the same Node.
Therefore, the following takes the Node that runs the resource scheduling service in the management cluster shown in fig. 2 as an exemplary execution subject to exemplify the data processing method provided in the embodiment of the present application.
Referring to fig. 8, fig. 8 shows a schematic flowchart of a data processing method according to an embodiment of the present application, which may include the following steps:
and step 209, sending the updated deployment request to the federal control service in the management cluster so that the federal control service deploys the service instance in the target cluster.
Assume that a resource scheduling service named a FederatedSchedule is configured in the management cluster shown in FIG. 2; in connection with the above example, when the feededscheduler receives a deployment request feededdelivery sent by an api service in a management cluster, a deployment field in the feededdelivery may be null, and a metadata. The deployment request indicates a deployment policy for a service instance of a service instance without specifying a data cluster that specifically deploys the service instance.
The feedateschedulers may then send resource acquisition instructions to each data cluster in the cluster federation to obtain respective current remaining resource information for each data cluster.
Therefore, the feedatescheduler can take the total of the calculated residual resources of all the data clusters as the total residual resource according to the respective current residual resource information of each data cluster, and multiply the proportion of the residual resources corresponding to each data cluster to the total residual resource by the set scaling factor 10, so as to obtain the residual resource score of each data cluster with the respective numerical range of 0-10.
Next, the feededscheduler may determine, according to the remaining resource score corresponding to each data cluster, a data cluster whose corresponding remaining resource score satisfies the deployment policy recorded in the metadata.
Finally, the feededscheduler can send the updated feededDeployment to the federal control service, so that the federal control service can deploy the service instance in the target cluster according to the identification information recorded in the placement field in the updated feededDeployment.
Based on the same inventive concept as the service instance deployment method, the embodiment of the present application further provides a cluster federation as shown in fig. 2, including a management cluster and a plurality of data clusters;
the cluster federation is used for obtaining a deployment request of the service instance; wherein, the deployment request comprises a deployment strategy;
the cluster federation is also used for determining a target cluster in the plurality of data clusters according to the cluster resource information; the cluster resource information comprises residual resource information of each data cluster, and the target cluster is a data cluster of which the residual resources in the data clusters meet the deployment strategy;
the cluster federation is also used to deploy service instances to target clusters.
Optionally, as a possible implementation manner, when the management cluster determines the target cluster from the multiple data clusters according to the cluster resource information, the management cluster is specifically configured to:
obtaining a residual resource score corresponding to each data cluster according to the cluster resource information; the residual resource score represents the surplus degree of the corresponding data cluster residual resources;
and determining the data cluster which is full of deployment strategies and has the highest corresponding residual resource score among the plurality of data clusters as a target cluster.
Optionally, as a possible implementation manner, when the management cluster obtains the remaining resource score corresponding to each data cluster according to the cluster resource information, the management cluster is specifically configured to:
obtaining a residual resource score corresponding to each data cluster according to the proportion of the residual resource corresponding to each data cluster to the total residual resource corresponding to the plurality of data clusters; and the total residual resource is the sum of the residual resources of all the data clusters in the plurality of data clusters.
Optionally, as a possible implementation manner, before the management cluster determines the target cluster from the multiple data clusters according to the cluster resource information, the management cluster is further configured to:
updating cluster resource information according to the obtained current residual resource information of each data cluster;
when the management cluster determines a target cluster from the multiple data clusters according to the cluster resource information, the management cluster is specifically configured to:
and determining a target cluster in the plurality of data clusters according to the updated cluster resource information.
Optionally, as a possible implementation manner, before the management cluster determines the target cluster from the multiple data clusters according to the cluster resource information, the management cluster is further configured to:
and calling a resource scheduling service to obtain cluster resource information, wherein the resource scheduling service is configured to obtain the residual resource information corresponding to each data cluster.
Optionally, as a possible implementation manner, when the management cluster deploys the service instance in the target cluster, the management cluster is specifically configured to:
updating the deployment request so that the updated deployment request comprises identification information corresponding to the target cluster;
and deploying the service instance according to the updated deployment request so that the service instance is deployed in the target cluster.
Optionally, as a possible implementation manner, the management cluster deploys the service instance according to the updated deployment request, so that when the service instance is deployed in the target cluster, the management cluster is specifically configured to:
and according to the updated deployment request, calling the deployment service of the target cluster to create a container so that the service instance is deployed in the container.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s).
It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: u disk, removable hard disk, read only memory, random access memory, magnetic or optical disk, etc. for storing program codes.
To sum up, according to the service instance deployment method, the data processing method, and the cluster federation provided in the embodiments of the present application, when a management cluster in the cluster federation obtains a deployment request for a service instance, according to a deployment policy included in the deployment request and remaining resource information of each data cluster included in maintained cluster resource information, a target cluster in which remaining resources satisfy the deployment policy is determined among a plurality of data clusters, so as to deploy the service instance in the target cluster.
And the management cluster also obtains the residual resource score corresponding to each data cluster according to the cluster resource information, and further determines the data cluster which is full of deployment strategies and has the highest corresponding residual resource score among the plurality of data clusters as a target cluster, so that the service instance is deployed in the data cluster which has the most residual resources and meets the deployment strategies, and the residual resources of each data cluster in the cluster federation can be relatively balanced.
And the management cluster also updates the cluster resource information according to the obtained current residual resource information of each data cluster, so that the management cluster determines a target cluster in the plurality of data clusters according to the updated cluster resource information, the management cluster is ensured to determine the target cluster according to the real-time residual resources of each data cluster, and the accuracy of determining the target cluster is improved.
And moreover, by configuring the resource scheduling service for acquiring the residual resource information corresponding to each data cluster, the management cluster can acquire the cluster resource information by calling the resource scheduling service without influencing the functions of the management cluster.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Claims (9)
1. A service instance deployment method is applied to a management cluster in a cluster federation, wherein the cluster federation further comprises a plurality of data clusters; the method comprises the following steps:
obtaining a deployment request of a service instance; wherein the deployment request comprises a deployment strategy;
determining a target cluster in the plurality of data clusters according to the cluster resource information; the cluster resource information comprises the residual resource information of each data cluster, and the target cluster is a data cluster of which the residual resources meet the deployment strategy in the plurality of data clusters;
deploying the service instance in the target cluster.
2. The method of claim 1, wherein the step of determining a target cluster among the plurality of data clusters based on cluster resource information comprises:
obtaining a residual resource score corresponding to each data cluster according to the cluster resource information; the residual resource score represents the surplus degree of the corresponding data cluster residual resources;
and determining the data cluster which meets the deployment strategy and corresponds to the highest residual resource score in the plurality of data clusters as the target cluster.
3. The method of claim 2, wherein obtaining a remaining resource score for each data cluster based on the cluster resource information comprises:
obtaining a residual resource score corresponding to each data cluster according to the proportion of the residual resource corresponding to each data cluster to the total residual resource corresponding to the plurality of data clusters; wherein the total remaining resources is a sum of remaining resources of all data clusters of the plurality of data clusters.
4. The method of claim 1, wherein prior to the step of determining a target cluster among the plurality of data clusters based on cluster resource information, the method further comprises:
updating the cluster resource information according to the obtained current residual resource information of each data cluster;
determining a target cluster from the plurality of data clusters according to the cluster resource information, wherein the step comprises the following steps:
and determining a target cluster in the plurality of data clusters according to the updated cluster resource information.
5. The method of claim 1 or 4, wherein prior to the step of determining a target cluster among the plurality of data clusters based on cluster resource information, the method further comprises:
and calling a resource scheduling service to obtain the cluster resource information, wherein the resource scheduling service is configured to obtain the residual resource information corresponding to each data cluster.
6. The method of claim 1, wherein the step of deploying the service instance at the target cluster comprises:
updating the deployment request so that the updated deployment request contains identification information corresponding to the target cluster;
and deploying the service instance according to the updated deployment request so that the service instance is deployed in the target cluster.
7. The method of claim 6, wherein the step of deploying the service instance in accordance with the updated deployment request such that the service instance is deployed at the target cluster comprises:
and calling a deployment service creation container of the target cluster according to the updated deployment request so as to enable the service instance to be deployed in the container.
8. A data processing method is characterized in that the method is applied to Node nodes running resource scheduling service in a management cluster, wherein the management cluster belongs to a cluster federation, and the cluster federation also comprises a plurality of data clusters; the method comprises the following steps:
receiving a deployment request sent by an application programming interface (api) service in the management cluster; wherein, the deployment request comprises a deployment strategy used for indicating to deploy a service instance;
obtaining current remaining resource information of each data cluster in the plurality of data clusters;
determining a data cluster of which the residual resources meet the deployment strategy in the plurality of data clusters as a target cluster;
updating the deployment request, wherein the updated deployment request comprises identification information corresponding to the target cluster;
sending the updated deployment request to a federated control service in the management cluster, so that the federated control service deploys the service instance in the target cluster.
9. A cluster federation comprising a management cluster and a plurality of data clusters;
the cluster federation is used for obtaining a deployment request of a service instance; wherein the deployment request comprises a deployment strategy;
the cluster federation is further used for determining a target cluster in the plurality of data clusters according to the cluster resource information; the cluster resource information comprises the residual resource information of each data cluster, and the target cluster is a data cluster of which the residual resources meet the deployment strategy in the plurality of data clusters;
the cluster federation is further to deploy the service instance to the target cluster.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010000491.5A CN111176697B (en) | 2020-01-02 | 2020-01-02 | Service instance deployment method, data processing method and cluster federation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010000491.5A CN111176697B (en) | 2020-01-02 | 2020-01-02 | Service instance deployment method, data processing method and cluster federation |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111176697A true CN111176697A (en) | 2020-05-19 |
| CN111176697B CN111176697B (en) | 2024-02-13 |
Family
ID=70649124
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010000491.5A Active CN111176697B (en) | 2020-01-02 | 2020-01-02 | Service instance deployment method, data processing method and cluster federation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111176697B (en) |
Cited By (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111930415A (en) * | 2020-06-22 | 2020-11-13 | 山东浪潮通软信息科技有限公司 | Construction deployment method and device for large-scale software product |
| CN112039963A (en) * | 2020-08-21 | 2020-12-04 | 广州虎牙科技有限公司 | Processor binding method and device, computer equipment and storage medium |
| CN112181607A (en) * | 2020-11-06 | 2021-01-05 | 北京凌云雀科技有限公司 | Component processing method, device, equipment and storage medium |
| CN112272201A (en) * | 2020-09-15 | 2021-01-26 | 网宿科技股份有限公司 | Equipment management method, system and management cluster |
| CN112445575A (en) * | 2020-11-27 | 2021-03-05 | 中国工商银行股份有限公司 | Multi-cluster resource scheduling method, device and system |
| CN112615856A (en) * | 2020-12-16 | 2021-04-06 | 上海道客网络科技有限公司 | Multi-cluster network security policy management and control method and system |
| CN113596152A (en) * | 2021-07-28 | 2021-11-02 | 杭州萤石软件有限公司 | Load balancing implementation method, system and device |
| CN113674843A (en) * | 2021-07-08 | 2021-11-19 | 浙江一山智慧医疗研究有限公司 | Method, device, system, electronic device and storage medium for medical expense prediction |
| CN113742033A (en) * | 2021-09-08 | 2021-12-03 | 广西东信数建信息科技有限公司 | Kubernetes cluster federal system and implementation method thereof |
| CN113918329A (en) * | 2021-10-09 | 2022-01-11 | 京东科技信息技术有限公司 | Information display method and device |
| CN114064289A (en) * | 2021-11-24 | 2022-02-18 | 云知声智能科技股份有限公司 | Cluster management system |
| WO2022105659A1 (en) * | 2020-11-17 | 2022-05-27 | 深圳前海微众银行股份有限公司 | Application container management method and apparatus, and device. |
| CN114697322A (en) * | 2022-02-17 | 2022-07-01 | 许强 | A data screening method based on cloud business processing |
| CN114996337A (en) * | 2022-05-25 | 2022-09-02 | 京东科技信息技术有限公司 | Multi-cluster database management system and method |
| CN115174364A (en) * | 2022-06-30 | 2022-10-11 | 济南浪潮数据技术有限公司 | Data recovery method, device and medium in disaster tolerance scene |
| CN115242598A (en) * | 2022-07-15 | 2022-10-25 | 天翼云科技有限公司 | A cloud operating system deployment method and device |
| CN115633084A (en) * | 2022-12-01 | 2023-01-20 | 苏州浪潮智能科技有限公司 | A k8s cluster access method, device and computer-readable storage medium |
| CN117155992A (en) * | 2023-10-31 | 2023-12-01 | 天津市天河计算机技术有限公司 | Service processing method and processing system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103164253A (en) * | 2011-12-16 | 2013-06-19 | 鸿富锦精密工业(深圳)有限公司 | Virtual machine deployment system and virtual machine deployment method |
| CN105871580A (en) * | 2015-11-02 | 2016-08-17 | 乐视致新电子科技(天津)有限公司 | Cross-cluster automation dispatching operation system and method |
| CN105959395A (en) * | 2016-06-15 | 2016-09-21 | 徐州医科大学 | Cluster self-feedback type load balancing scheduling system and method |
| CN107818013A (en) * | 2016-09-13 | 2018-03-20 | 华为技术有限公司 | A kind of application scheduling method thereof and device |
| CN108737270A (en) * | 2018-05-07 | 2018-11-02 | 北京京东尚科信息技术有限公司 | A kind of method for managing resource and device of server cluster |
-
2020
- 2020-01-02 CN CN202010000491.5A patent/CN111176697B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103164253A (en) * | 2011-12-16 | 2013-06-19 | 鸿富锦精密工业(深圳)有限公司 | Virtual machine deployment system and virtual machine deployment method |
| CN105871580A (en) * | 2015-11-02 | 2016-08-17 | 乐视致新电子科技(天津)有限公司 | Cross-cluster automation dispatching operation system and method |
| CN105959395A (en) * | 2016-06-15 | 2016-09-21 | 徐州医科大学 | Cluster self-feedback type load balancing scheduling system and method |
| CN107818013A (en) * | 2016-09-13 | 2018-03-20 | 华为技术有限公司 | A kind of application scheduling method thereof and device |
| CN108737270A (en) * | 2018-05-07 | 2018-11-02 | 北京京东尚科信息技术有限公司 | A kind of method for managing resource and device of server cluster |
Cited By (25)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111930415A (en) * | 2020-06-22 | 2020-11-13 | 山东浪潮通软信息科技有限公司 | Construction deployment method and device for large-scale software product |
| CN112039963A (en) * | 2020-08-21 | 2020-12-04 | 广州虎牙科技有限公司 | Processor binding method and device, computer equipment and storage medium |
| CN112039963B (en) * | 2020-08-21 | 2023-04-07 | 广州虎牙科技有限公司 | Processor binding method and device, computer equipment and storage medium |
| CN112272201A (en) * | 2020-09-15 | 2021-01-26 | 网宿科技股份有限公司 | Equipment management method, system and management cluster |
| CN112272201B (en) * | 2020-09-15 | 2022-05-27 | 网宿科技股份有限公司 | Device management method, system and management cluster |
| CN112181607A (en) * | 2020-11-06 | 2021-01-05 | 北京凌云雀科技有限公司 | Component processing method, device, equipment and storage medium |
| WO2022105659A1 (en) * | 2020-11-17 | 2022-05-27 | 深圳前海微众银行股份有限公司 | Application container management method and apparatus, and device. |
| CN112445575A (en) * | 2020-11-27 | 2021-03-05 | 中国工商银行股份有限公司 | Multi-cluster resource scheduling method, device and system |
| CN112445575B (en) * | 2020-11-27 | 2024-01-26 | 中国工商银行股份有限公司 | Multi-cluster resource scheduling method, device and system |
| CN112615856B (en) * | 2020-12-16 | 2021-09-28 | 上海道客网络科技有限公司 | Multi-cluster network security policy management and control method and system |
| CN112615856A (en) * | 2020-12-16 | 2021-04-06 | 上海道客网络科技有限公司 | Multi-cluster network security policy management and control method and system |
| CN113674843A (en) * | 2021-07-08 | 2021-11-19 | 浙江一山智慧医疗研究有限公司 | Method, device, system, electronic device and storage medium for medical expense prediction |
| CN113596152A (en) * | 2021-07-28 | 2021-11-02 | 杭州萤石软件有限公司 | Load balancing implementation method, system and device |
| CN113596152B (en) * | 2021-07-28 | 2024-03-26 | 杭州萤石软件有限公司 | Load balancing realization method, system and device |
| CN113742033A (en) * | 2021-09-08 | 2021-12-03 | 广西东信数建信息科技有限公司 | Kubernetes cluster federal system and implementation method thereof |
| CN113918329A (en) * | 2021-10-09 | 2022-01-11 | 京东科技信息技术有限公司 | Information display method and device |
| CN114064289A (en) * | 2021-11-24 | 2022-02-18 | 云知声智能科技股份有限公司 | Cluster management system |
| CN114697322A (en) * | 2022-02-17 | 2022-07-01 | 许强 | A data screening method based on cloud business processing |
| CN114697322B (en) * | 2022-02-17 | 2024-03-22 | 上海生慧樘科技有限公司 | A data screening method based on cloud business processing |
| CN114996337A (en) * | 2022-05-25 | 2022-09-02 | 京东科技信息技术有限公司 | Multi-cluster database management system and method |
| CN115174364A (en) * | 2022-06-30 | 2022-10-11 | 济南浪潮数据技术有限公司 | Data recovery method, device and medium in disaster tolerance scene |
| CN115242598A (en) * | 2022-07-15 | 2022-10-25 | 天翼云科技有限公司 | A cloud operating system deployment method and device |
| CN115633084A (en) * | 2022-12-01 | 2023-01-20 | 苏州浪潮智能科技有限公司 | A k8s cluster access method, device and computer-readable storage medium |
| CN117155992A (en) * | 2023-10-31 | 2023-12-01 | 天津市天河计算机技术有限公司 | Service processing method and processing system |
| CN117155992B (en) * | 2023-10-31 | 2024-01-09 | 天津市天河计算机技术有限公司 | Service processing method and processing system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111176697B (en) | 2024-02-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111176697A (en) | Service instance deployment method, data processing method and cluster federation | |
| US8006130B2 (en) | Methods and systems for generating availability management framework (AMF) configurations | |
| US10447814B2 (en) | Joint servicing of software packages | |
| CN106919445B (en) | A method and apparatus for scheduling containers in parallel in a cluster | |
| US20100293538A1 (en) | Dynamic program updating in a continuation based runtime | |
| CN108170820B (en) | Container processing method, control server and distributed cluster | |
| CN111988429A (en) | Algorithm scheduling method and system | |
| CN109213493B (en) | Container deployment method, special resource management terminal and readable storage medium | |
| CN110888736A (en) | Application management method and system based on container cloud platform and related components | |
| CN116523457B (en) | Workflow processing method, device, equipment and storage medium based on business process | |
| CN110597490A (en) | Software development demand distribution method and device | |
| CN116541142A (en) | Task scheduling method, device, equipment, storage medium and computer program product | |
| CN114489720B (en) | A method, device, storage medium and equipment based on cluster deployment service | |
| CN112068812A (en) | Micro-service generation method and device, computer equipment and storage medium | |
| CN107633080B (en) | User task processing method and device | |
| CN111985765B (en) | Method, device, equipment and storage medium for determining resource provider | |
| CN112363819A (en) | Big data task dynamic scheduling method and device and computing equipment | |
| CN115309558B (en) | Resource scheduling management system, method, computer equipment and storage medium | |
| CN113672347B (en) | A container group scheduling method and device | |
| CN116886736A (en) | Middleware clouding processing method and device based on clouding architecture | |
| CN112395081B (en) | Online automatic resource recycling method, system, server and storage medium | |
| CN112667491B (en) | Function test method and device for virtual machine | |
| CN114594926A (en) | Radio box control generating method, device, system, equipment and medium | |
| CN115168057B (en) | Resource scheduling method and device based on k8s cluster | |
| CN115460077B (en) | Configuration information updating method, device, storage medium and electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |