Application Deployment Method, Application Blueprint Generation Method, Platform, Terminal and Medium

By generating sub-blueprints corresponding to hardware types and deploying application instances in the cluster, the problem of inconsistent application deployment on different hardware types is solved, and adaptive application deployment and resource optimization are achieved.

CN113821214BActive Publication Date: 2025-08-01ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010567511.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-19
Publication Date
2025-08-01
Estimated Expiration
2040-06-19

AI Technical Summary

Technical Problem

The prior art cannot adaptively deploy applications on edge devices of different hardware types, and cannot mix multiple types of hardware in the cluster for application deployment, resulting in inconsistent configuration parameters and differences in external capabilities.

Method used

By receiving the application blueprint, generating a sub-blueprint corresponding to the hardware type, and deploying application instances within the cluster, so that the sum of the external capabilities of all deployed application instances is greater than or equal to the total external capabilities of the application, and combining deployment priority and resource utilization, adaptive deployment is achieved.

Benefits of technology

It realizes adaptive application deployment on edge devices of different hardware types, meets the overall external capability requirements of the application, and optimizes resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821214B_ABST
    Figure CN113821214B_ABST
Patent Text Reader

Abstract

The present disclosure provides an application deployment method, including: receiving an application blueprint, where the application blueprint includes at least two different sub-blueprints; deploying application instances on hardware devices within a cluster according to the application blueprint and the external capabilities provided by all deployed application instances, and the sum of the external capabilities provided by all deployed application instances is greater than or equal to the total external capabilities of the application. The present disclosure also provides an application blueprint generation method, a microservices platform, a communication terminal, and a computer-readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technologies, and in particular to an application deployment method, an application blueprint generation method, a microservice platform, a communication terminal, and a computer-readable medium. Background Art

[0002] With the development of microservices and container technologies, users are developing large applications by splitting them into multiple microservices. These microservices are orchestrated, scheduled, and managed by the corresponding deployment platforms. During this orchestration, scheduling, and management, configuration files are used to manage the applications. In edge computing scenarios, edge devices are often heterogeneous, with significant variations in computing and storage capabilities, as well as CPU architectures. This results in different configuration parameters for the same application on different hardware types. For example, home gateway boxes or optical modems, which are power-sensitive, typically use ARM-based hardware. Industrial gateways and industrial robotics, which require strong computing or storage capabilities, typically use x86-based hardware. Applications running on these two different CPU architectures require different configuration parameters. However, currently, edge device application management is centralized and deployed by the cloud, and existing configuration files cannot specify application deployment on multiple hardware types.

[0003] In addition, the external capabilities that an application can provide are also related to the hardware type. The external capabilities provided by an application when deployed on different hardware types are different. However, the cluster cannot adaptively choose to deploy an application on a certain type of hardware based on the required external capabilities, and it cannot adapt to scenarios where multiple types of hardware are mixed in the cluster for application deployment. Summary of the Invention

[0004] The present disclosure aims to solve at least one of the technical problems existing in the prior art, and proposes an application deployment method, an application blueprint generation method, a microservice platform, a communication terminal and a computer-readable medium.

[0005] To achieve the above objectives, in a first aspect, an embodiment of the present disclosure provides an application deployment method, comprising:

[0006] Receive an application blueprint, the application blueprint comprising: at least two different sub-blueprints, the sub-blueprints recording a corresponding hardware type, external capabilities provided by deploying an application instance on a hardware device of the hardware type, and the total external capabilities of the application;

[0007] Application instances are deployed on hardware devices within the cluster according to the sub-blueprint, and the sum of external capabilities provided by all deployed application instances is greater than or equal to the total external capabilities of the application.

[0008] Second aspect, embodiments of the present disclosure further provide an application blueprint generation method, including:

[0009] Obtain the hardware types supported by the application, the external capabilities provided by deploying an application instance on a hardware device of the hardware type, and the total external capabilities of the application, and generate sub-blueprints corresponding one-to-one to the hardware types;

[0010] Integrate all the sub-blueprints and generate an application blueprint;

[0011] Send the application blueprint to the microservice platform for the microservice platform to deploy application instances on the hardware devices in the cluster according to the sub-blueprints.

[0012] Third aspect, embodiments of the present disclosure further provide a microservice platform, including:

[0013] One or more processors;

[0014] A storage device for storing one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the application deployment method as described in any one of the above embodiments.

[0016] Fourth aspect, embodiments of the present disclosure further provide a computer-readable medium, on which a computer program is stored, wherein when the program is executed by a processor, the steps in the application deployment method as described in any one of the above embodiments are implemented.

[0017] Fifth aspect, embodiments of the present disclosure further provide a communication terminal, including:

[0018] One or more processors;

[0019] A storage device for storing one or more programs;

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the application blueprint generation method as described in the above embodiments.

[0021] Sixth aspect, embodiments of the present disclosure further provide a computer-readable medium, on which a computer program is stored, wherein when the program is executed by a processor, the steps in the application blueprint generation method as described in the above embodiments are implemented.

[0022] The present disclosure has the following beneficial effects:

[0023] The embodiments of the present disclosure provide an application deployment method, an application blueprint generation method, a microservices platform, a communication terminal, and a computer-readable medium. The application deployment method can be applied to the microservices platform. By considering the total external capabilities of the application and combining the sub-blueprints in the application blueprint, the application is deployed on the hardware devices of the hardware type corresponding to the sub-blueprint. Since the sub-blueprint corresponds to the hardware type one by one and records the information related to the external capabilities of the application, the cluster can adaptively select to deploy the application on a certain type of hardware according to the required external capabilities, and deploy the application by mixing multiple types of hardware in the cluster according to the application deployment situation. The application blueprint generation method can be applied to the communication terminal. By adding the total external capabilities of the application to the blueprint and integrating multiple sub-blueprints, the generation of the application blueprint is realized. Description of the Drawings

[0024] Figure 1 It is a flowchart of an application deployment method provided by the embodiments of the present disclosure;

[0025] Figure 2 It is a flowchart of a specific implementation method of step S2 in the embodiments of the present disclosure;

[0026] Figure 3 It is a flowchart of a specific implementation method of step S2a in the embodiments of the present disclosure;

[0027] [[ID=1,7]] Figure 4 It is a flowchart of another specific implementation method of step S2a in the embodiments of the present disclosure;

[0028] Figure 5 It is a flowchart of another application deployment method provided by the embodiments of the present disclosure;

[0029] Figure 6 It is a flowchart of a specific implementation method of step S4 in the embodiments of the present disclosure;

[0030] Figure 7 It is a flowchart of an application blueprint generation method provided by the embodiments of the present disclosure;

[0031] Figure 8a It is a flowchart of yet another application deployment method provided by the embodiments of the present disclosure;

[0032] Figure 8b It is a flowchart of still another application deployment method provided by the embodiments of the present disclosure;

[0033] Figure 8c It is a flowchart of still another application deployment method provided by the embodiments of the present disclosure;

[0034] Figure 8d It is a flowchart of still another application deployment method provided by the embodiments of the present disclosure;

[0035] Figure 9a A flowchart of yet another application deployment method provided by an embodiment of the present disclosure;

[0036] Figure 9b A flowchart of yet another application deployment method provided by an embodiment of the present disclosure. Detailed implementation manners

[0037] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the application deployment method, application blueprint generation method, microservice platform, communication terminal, and computer-readable medium provided by the present disclosure will be described in detail below with reference to the accompanying drawings.

[0038] Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0039] The terms used herein are for the purpose of describing particular embodiments only and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprises" and / or "consists of" are used in this specification, the presence of the stated features, integers, steps, operations, elements, and / or components is specified, but one or more other features, integers, steps, operations, elements, components, and / or groups thereof are not excluded.

[0040] It will be understood that although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. Thus, without departing from the teachings of the present disclosure, the first element, first component, or first module discussed below may be referred to as the second element, second component, or second module.

[0041] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in a commonly used dictionary should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0042] The application deployment method, application blueprint generation method, microservices platform, communication terminal, and computer-readable medium provided in this disclosure can be used to adaptively select hardware devices of corresponding hardware types to deploy application instances according to the required external capabilities, and at the same time, it is suitable for the scenario of deploying applications by mixing multiple types of hardware devices in a cluster.

[0043] This application deployment method is applicable to the application deployment for a microservices platform. The microservices platform is a Platform as a Services (PaaS) platform, such as the Cloudify platform and the Kubernetes platform (K8S platform), etc.; this application blueprint generation method is applicable to a communication terminal for generating an application blueprint. The communication terminal includes a mobile terminal, a personal computer (PC), a tablet device, and other devices that can be used as clients, etc.

[0044] Figure 1 It is a flowchart of an application deployment method provided in an embodiment of this disclosure. As Figure 1 shown, this method includes:

[0045] Step S1: Receive an application blueprint.

[0046] Among them, the application blueprint includes at least two different sub-blueprints. The sub-blueprint records the corresponding hardware type, the external capabilities provided by deploying one application instance on the hardware device of this hardware type, and the total external capabilities of the application.

[0047] Specifically, the external capability is the ability of an application or an application instance to provide services externally, which can include computing power, storage power, and network power, etc., corresponding to the resources provided by the hardware device. That is, the hardware device provides deployment resources for the application or the application instance, and the application or the application instance provides services externally (to users or customers), such as computing services, storage services, and network services, etc. The external capability can be obtained by abstractly evaluating the comprehensive ability of the application or the application instance to provide the above services; in some embodiments, the total external capabilities of the application can correspond to the field "total_capability", and the external capabilities provided by deploying one application instance can correspond to the field "inst_capability"; the hardware type can include the ARM architecture, the x86 architecture, the RiSC-V architecture, the Snow Ridge architecture, and the Denverton architecture, etc. A single sub-blueprint corresponds to a single hardware type; in some embodiments, the hardware type, also known as the sub-blueprint type, can correspond to the field "version_type".

[0048] In some embodiments, the application blueprint may specifically include files such as a blueprint and a manifest for orchestrating, scheduling, or managing an application or an application instance. The manifest may include a Deployment, a Replica Set (RS for short), a Replication Controller (RC for short), etc.

[0049] In some embodiments, the total external capabilities of the application may be recorded in the application blueprint.

[0050] In some embodiments, the application blueprint further includes a blueprint identifier, which is used to represent that the application blueprint is a multi-version blueprint. It may correspond to the field "Multiblueprint". A multi-version blueprint is a blueprint that includes at least two sub-blueprints.

[0051] Step S2: Deploy application instances on the hardware devices in the cluster according to the external capabilities provided by the application blueprint and all the deployed application instances.

[0052] In step S2, when deploying application instances on the hardware devices in the cluster according to the external capabilities provided by the application blueprint and all the deployed application instances, it is necessary to ensure that the sum of the external capabilities provided by all the deployed application instances is greater than or equal to the total external capabilities of the application. That is, deploy application instances on the hardware devices of the corresponding hardware type in the cluster according to the sub-blueprint, and ensure that the deployed applications meet the requirements of the total external capabilities of the application. Specifically, on the microservice platform side, i.e., the cloud side, application instances can be deployed according to the sub-blueprint, either based on the pre-set deployment rules or according to the targeted deployment requirements of the application to select the deployment rules.

[0053] In some embodiments, the deployment priority is also recorded in the sub-blueprint; step S2, the step of deploying application instances on the hardware devices in the cluster according to the external capabilities provided by the application blueprint and all the deployed application instances, specifically includes:

[0054] Determine the sub-blueprint to be deployed according to the deployment priority, and deploy application instances on the hardware devices in the cluster according to the determined sub-blueprint to be deployed.

[0055] The embodiments of the present disclosure provide an application deployment method, which can be used to adaptively deploy application instances on the hardware devices of the corresponding hardware type according to the total external capabilities of the application and the sub-blueprint recording the hardware type and the external capabilities provided by deploying one application instance.

[0056] Figure 2 This is a flowchart of a specific implementation method for step S2 in the embodiments of the present disclosure. Specifically, the deployment priority is also recorded in the sub-blueprint; as Figure 2As shown in the figure, step S2, the step of deploying application instances on the hardware devices in the cluster according to the external capabilities provided by the application blueprint and all deployed application instances, specifically includes:

[0057] Step S2a: Determine the sub-blueprint to be deployed according to the deployment priority, and deploy application instances on the hardware devices in the cluster according to the determined sub-blueprint to be deployed.

[0058] Figure 3 It is a flowchart of a specific implementation method of step S2a in an embodiment of the present disclosure. Specifically, step S2a: The step of determining the sub-blueprint to be deployed according to the deployment priority and deploying application instances on the hardware devices in the cluster according to the determined sub-blueprint to be deployed specifically includes:

[0059] Step S201: Determine the sub-blueprint with the highest deployment priority in the application blueprint as the sub-blueprint to be deployed.

[0060] In some embodiments, the deployment priority can be obtained according to user selection or cloud selection, and the deployment priority can correspond to the field "priority".

[0061] Step S202: Determine the maximum number of application instances that can be deployed by the remaining resources in the hardware devices of the hardware type corresponding to the sub-blueprint to be deployed, and determine whether the sum of the external capabilities of the deployed maximum number of application instances is greater than or equal to the first supplementary capability.

[0062] Wherein, the first supplementary capability is equal to the difference between the total external capability of the application and the sum of the external capabilities of the already deployed application instances. When the sub-blueprint to be deployed is the sub-blueprint with the highest deployment priority, the first supplementary capability is equal to the total external capability of the application.

[0063] In step S202, if it is determined that the sum of the external capabilities of the deployed maximum number of application instances is greater than or equal to the first supplementary capability, then execute step S203; if it is determined that the sum of the external capabilities of the deployed maximum number of application instances is less than the first supplementary capability, then execute steps S204 and S205.

[0064] Step S203: Deploy application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed, and the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability.

[0065] Wherein, when the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability, the deployment is completed at this time, and the deployed application meets the requirements of the total external capability of the application, which can be reflected in two forms: just meeting and having a surplus.

[0066] In some embodiments, in step S203, the number of deployed application instances is N, and N satisfies: N*p≥Q and (N - 1)*p<Q; where p represents the external capabilities provided by deploying one application instance on a hardware device of the corresponding hardware type according to the sub-blueprint to be deployed, and Q represents the first capability to be supplemented; when the above conditions are met, it is, to a certain extent, in the form of just being satisfied.

[0067] Step S204: Deploy the maximum number of application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed.

[0068] In step S204, after deploying the maximum number of application instances, the total external capabilities requirements of the application are still not met.

[0069] Step S205: Select a sub-blueprint with a deployment priority one level lower than that of the sub-blueprint to be deployed as the new sub-blueprint to be deployed.

[0070] In step S205, select a sub-blueprint with a deployment priority one level lower than that of the current sub-blueprint to be deployed as the new sub-blueprint to be deployed, and for the new sub-blueprint to be deployed, execute the step in step S202 of determining the maximum number of application instances that can be deployed on the remaining resources in the hardware devices of the corresponding hardware type of the sub-blueprint to be deployed, and perform cyclic deployment.

[0071] In some embodiments, the deployment performed in step S2 and its related steps may not be a physical deployment, but may also be reflected as performing deployment calculations in the form of pre-deployment.

[0072] The embodiments of the present disclosure provide an application deployment method, which can be used to select a specified hardware type for application instance deployment according to the deployment priority, meet the corresponding total external capabilities requirements of the application, and ensure the reasonable utilization of deployment resources.

[0073] Figure 4 This is another specific implementation method flowchart of step S2a in the embodiments of the present disclosure. This method is a specific optional implementation scheme based on Figure 3 The method shown. Specifically, before the step of selecting a sub-blueprint with a deployment priority one level lower than that of the sub-blueprint to be deployed as the new sub-blueprint to be deployed in step S205, it further includes:

[0074] Step S2051: Determine whether the deployment priority of the sub-blueprint to be deployed is the lowest level.

[0075] In step S2051, if it is determined that the deployment priority of the to-be-deployed sub-blueprint is the lowest level, then step S2052 is executed; if it is determined that the deployment priority of the to-be-deployed sub-blueprint is not the lowest level, then step S205 is executed, which is the step of selecting a sub-blueprint with a deployment priority one level lower than that of the to-be-deployed sub-blueprint as the new to-be-deployed sub-blueprint.

[0076] Step S2052, feedback the application deployment failure information.

[0077] Figure 5 It is a flowchart of another application deployment method provided by an embodiment of the present disclosure. As Figure 5 shown, this method is a specific and optional implementation scheme based on Figure 1 the method shown. Specifically, this application deployment method further includes:

[0078] Step S3a, in response to the hardware device deployed with the application instance going offline, determine the to-be-supplemented gap capacity.

[0079] Wherein, the to-be-supplemented gap capacity is equal to the difference between the total external capacity of the application and the sum of the external capacities of the deployed and normally working application instances, or can be called the first to-be-supplemented gap capacity.

[0080] In some embodiments, in response to the overall offline of the hardware device corresponding to the hardware type deployed with the application instance, determine the to-be-supplemented gap capacity, and continue to deploy the application instance according to other sub-blueprints except the sub-blueprint corresponding to this hardware type.

[0081] In some embodiments, in response to a new sub-blueprint sent by the user terminal, add the new sub-blueprint to the application blueprint according to the blueprint identifier, and subsequent application instance deployment can be performed according to this sub-blueprint. That is, when the application can be deployed on the hardware device corresponding to the new hardware type, only a new sub-blueprint needs to be added to the application blueprint.

[0082] Step S3b, in response to an increase in the total external capacity of the application, determine the to-be-supplemented gap capacity.

[0083] Wherein, the to-be-supplemented gap capacity is equal to the increased amount of the total external capacity of the application, or can be called the second to-be-supplemented gap capacity. Specifically, when the total external capacity of the application changes (increases or decreases), the application blueprint can be updated through the update interface of the cluster.

[0084] In some embodiments, in response to a decrease in the total external capacity of the application, determine the to-be-recovered capacity, and recycle the application instances on the hardware devices in the cluster according to the sub-blueprint, and the sum of the external capacities provided by all the recycled application instances is less than or equal to the to-be-recovered capacity, wherein the to-be-recovered capacity is equal to the decreased amount of the total external capacity of the application.

[0085] Step S4: Continue to deploy application instances on the hardware devices within the cluster according to the application blueprint, and the sum of the external capabilities provided by all the continuously deployed application instances is greater than or equal to the gap capacity to be supplemented.

[0086] Among them, different from the "deployment" in Step S2 and its related steps, "continue to deploy" is for the situation where there is a gap capacity to be supplemented. Moreover, there may also be a situation where there is a gap capacity to be supplemented during the "deployment". "Continue to deploy" can be carried out synchronously with "deployment". The two are only different in terms of expression and process position. In actual application, they are similar steps. The relevant implementation means and judgment criteria used during deployment can all be applied to continuous deployment.

[0087] In some embodiments, the continuous deployment carried out in Step S4 and its related steps may not be a physical deployment, and may also be reflected as performing deployment calculations in the form of pre-deployment.

[0088] Figure 6 It is a flowchart of a specific implementation method for Step S4 in the embodiments of the present disclosure. Specifically, the deployment priority is also recorded in the sub-blueprint; as Figure 5 shown, in Step S4, the step of continuing to deploy application instances on the hardware devices within the cluster according to the application blueprint, and the sum of the external capabilities provided by all the continuously deployed application instances is greater than or equal to the gap capacity to be supplemented, specifically includes:

[0089] Step S401: Determine the sub-blueprint with the highest deployment priority in the application blueprint as the alternative sub-blueprint.

[0090] Step S402: Determine the maximum number of application instances that can be deployed by the remaining resources in the hardware devices of the hardware type corresponding to the alternative sub-blueprint, and judge whether the sum of the external capabilities of deploying the maximum number of application instances is greater than or equal to the second gap capacity to be supplemented.

[0091] Among them, the second gap capacity to be supplemented is equal to the difference between the gap capacity to be supplemented and the sum of the external capabilities of the continuously deployed application instances.

[0092] In Step S402, if it is judged that the sum of the external capabilities of deploying the maximum number of application instances is greater than or equal to the second gap capacity to be supplemented, then execute Step S403; if it is judged that the sum of the external capabilities of deploying the maximum number of application instances is less than the second gap capacity to be supplemented, then execute Step S404 and Step S405.

[0093] Step S403: Take the alternative sub-blueprint as the sub-blueprint to be deployed, and deploy application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed, and the sum of the external capabilities of the deployed application instances is greater than or equal to the second gap capacity to be supplemented.

[0094] Step S404: Use the alternative sub-blueprint as the to-be-deployed sub-blueprint, and deploy the maximum number of application instances on the hardware devices of the corresponding hardware type according to the to-be-deployed sub-blueprint.

[0095] Step S405: Select a sub-blueprint with a deployment priority one level lower than that of the alternative sub-blueprint as the new alternative sub-blueprint.

[0096] In step S405, select a sub-blueprint with a deployment priority one level lower than that of the alternative sub-blueprint as the new alternative sub-blueprint, and for the new alternative sub-blueprint, execute the step of determining the maximum number of application instances that can be deployed with the remaining resources in the hardware devices of the corresponding hardware type of the alternative sub-blueprint in step S402 for cyclic deployment.

[0097] Among them, the specific step processes in steps S401 to S405 can refer to steps S201 to S2052.

[0098] The embodiment of the present disclosure provides an application deployment method, which can be used to make corresponding adjustments to the deployed or being-deployed application instances for partial hardware device offline or application external total capacity update to meet the deployment status.

[0099] Figure 7 It is a flowchart of an application blueprint generation method provided by the embodiment of the present disclosure. As Figure 7 shown, the method includes:

[0100] Step S5: Obtain the hardware types supported by the application, the external capabilities provided by deploying one application instance on the hardware devices of this hardware type, and the application external total capacity, and generate sub-blueprints corresponding one-to-one to the hardware types.

[0101] Among them, the sub-blueprint records the corresponding hardware type and the external capabilities provided by deploying one application instance on the hardware devices of this hardware type.

[0102] Step S6: Integrate all sub-blueprints and generate an application blueprint.

[0103] Among them, the application blueprint includes the application external total capacity and at least two different sub-blueprints; in some embodiments, the corresponding field of the application external total capacity may also be included in the sub-blueprint, and each sub-blueprint records the same application external total capacity.

[0104] In some embodiments, the application blueprint further includes a blueprint identifier, which is used to indicate that the application blueprint is a multi-version blueprint, and a multi-version blueprint is a blueprint that includes at least two sub-blueprints.

[0105] Step S7: Send the application blueprint to the microservice platform.

[0106] In step S7, the application blueprint is sent to the microservices platform for the microservices platform to deploy application instances on the hardware devices in the cluster according to the application blueprint.

[0107] Embodiments of the present disclosure provide an application blueprint generation method, which can be used to generate an application blueprint including multiple sub-blueprints according to the hardware types supported by the application, the external capabilities provided by deploying one application instance, and the total external capabilities of the application, so as to select hardware devices of corresponding hardware types for deploying application instances according to the capability requirements of the application.

[0108] The application deployment method provided by the present disclosure will be described in detail below in combination with actual applications.

[0109] Figure 8a It is a flowchart of another application deployment method provided by embodiments of the present disclosure. Specifically, this application deployment method is applied to a microservices platform (PaaS), and the data packet structure of the application blueprint is modeled after a replication controller (RC), corresponding to the field "ReplicationController". The application blueprint includes the total external capabilities of the application, two different sub-blueprints (sub-blue Figure 1 and sub-blue Figure 2 ) and a blueprint identifier, and the blueprint identifier corresponds to the field "MultiBluePrint"; among them, the total external capabilities of the application are recorded in each sub-blueprint, corresponding to the field "total_capability", and the sub-blueprint also records the corresponding hardware type, the external capabilities provided by deploying one application instance on the hardware device of this hardware type, and the deployment priority, corresponding to the fields "version_type", "inst_capability", and "priority" respectively. The external capabilities provided by deploying one application instance on the hardware device of this hardware type are the instance capabilities; in the hardware device cluster corresponding to the microservices platform, for the hardware types recorded in the two sub-blueprints, there are multiple hardware devices of two types. Among them, the first type of hardware device is of the denverton architecture, and the second type of hardware device is of the snowridge architecture.

[0110] After the microservice platform receives the application blueprint, it determines that the application blueprint is a multi-version blueprint based on the blueprint identifier and parses out two sub-blueprints. According to the deployment priority, the sub-blueprint with the corresponding hardware type of snowridge is used as the sub-blueprint to be deployed, and the number of replicas is calculated. One replica of a sub-blueprint corresponds to one application instance. Given that the total external capability of the application total_capability = 50 and a single snowridge-type application instance corresponds to inst_capability = 30, the number of replicas should be 2 at this time. That is, to meet the requirement that the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability, two application instances should be deployed. Among them, the first supplementary capability is equal to the difference between the total external capability of the application and the sum of the external capabilities of the already deployed application instances, which is 50.

[0111] At this time, there are three situations: Situation 1, as Figure 8a shown, where the maximum number of application instances that can be deployed with the remaining resources in the snowridge-type hardware device is greater than or equal to 2, and two application instances are directly deployed. At this time, the requirement for the total external capability of the application is already met.

[0112] Figure 8b This is a flowchart of another application deployment method provided by an embodiment of the present disclosure. Corresponding to Situation 2, as Figure 8b shown, where the maximum number of application instances that can be deployed with the remaining resources in the snowridge-type hardware device is 1, then one application instance is correspondingly deployed. The sub-blueprint with the corresponding hardware type of denverton is used as the sub-blueprint to be deployed. According to the fact that a single denverton-type application instance corresponds to inst_capability = 20, it is determined that to meet the requirement that the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability of 20, one application instance should be deployed. And the maximum number of application instances that can be deployed with the remaining resources in the denverton-type hardware device is greater than or equal to 1, so one application instance is directly deployed. At this time, the requirement for the total external capability of the application is already met.

[0113] Figure 8c This is a flowchart of another application deployment method provided by an embodiment of the present disclosure. Corresponding to Situation 3, as Figure 8cAs shown, in the snowridge - type hardware device, the maximum number of application instances that can be deployed with the remaining resources is 0. Then, the sub - blueprint with the hardware type of denverton is used as the sub - blueprint to be deployed. According to the fact that the inst_capability of a single denverton - type application instance is 20, it is determined that to meet the requirement that the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability of 50, three application instances should be deployed. Since the maximum number of application instances that can be deployed with the remaining resources in the denverton - type hardware device is greater than or equal to 3, three application instances are directly deployed, and at this time, the requirement for the total external capability of the application is met.

[0114] Figure 8d This is a flowchart of another application deployment method provided by an embodiment of the present disclosure. For Figure 8a the described situation 1, as Figure 8d shown, in response to the overall offline of the snowridge - type hardware device on which application instances are deployed, two application instances deployed on the snowridge - type hardware device go offline, and the gap capacity to be supplemented is determined. The gap capacity to be supplemented is equal to the difference between the total external capacity of the application and the sum of the external capacities of the deployed and normally operating application instances, which is 50. Then, according to other sub - blueprints except the sub - blueprint corresponding to this hardware type, that is, the sub - blueprint corresponding to the denverton type, application instances are continuously deployed. At this time, it corresponds to the abnormal situation of the snowridge - type hardware device, and the application instances are migrated to the denverton - type hardware device. In some embodiments, when there are more than two sub - blueprints, the sub - blueprint to be deployed is determined according to the deployment priority.

[0115] The sub - blueprint with the hardware type of denverton is used as the sub - blueprint to be deployed. According to the fact that the inst_capability of a single denverton - type application instance is 20, it is determined that to meet the requirement that the sum of the external capabilities of the deployed application instances is greater than or equal to the second supplementary capability. The second supplementary capability is equal to the difference between the gap capacity to be supplemented and the sum of the external capabilities of the continuously deployed application instances, which is 50. Then, three application instances should be deployed. Since the maximum number of application instances that can be deployed with the remaining resources in the denverton - type hardware device is greater than or equal to 3, three application instances are directly deployed, and at this time, the requirement for the total external capacity of the application is met.

[0116] Figure 9a This is a flowchart of another application deployment method provided by an embodiment of the present disclosure. Specifically, in the hardware device cluster corresponding to the microservice platform, there are three sub - blueprints (sub - blue Figure 1 、sub - blue Figure 2 [[ID=L19]]and sub - blue Figure 3For the hardware types described, there are home gateways with CPUs of the arm architecture, industrial robots with CPUs of the x86 architecture, and AR glasses with CPUs of the RiSC-V architecture.

[0117] At this time, there are multiple situations: Situation 1, as Figure 9a shown, according to the total external capabilities of the application, the external capabilities provided by deploying one application instance on the hardware devices of the corresponding hardware types, and the deployment priorities set by the user side, through a method flow similar to the above embodiments, two application instances are deployed on the AR glasses to meet the requirements of the total external capabilities of the application.

[0118] Figure 9b This is a flowchart of another application deployment method provided by the embodiments of the present disclosure. Corresponding to Situation 2, as Figure 9b shown, the cloud side learns that the application has deployment requirements on all three hardware devices according to the actual situation. Even if the remaining resources of the AR glasses are sufficient to meet the total external capabilities of the application at this time, on the premise that the sum of the external capabilities provided by the cloud is greater than or equal to the total external capabilities of the application, one instance is deployed on the home gateway, industrial robot, and AR glasses respectively. Although recycling the application instance deployed on the home gateway still meets the requirements of the total external capabilities of the application, its deployment of application instances adapts to the hardware type according to the application requirements, allowing resource redundancy.

[0119] The embodiments of the present disclosure provide a microservice platform, including:

[0120] One or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement any of the application deployment methods in the above embodiments.

[0121] The embodiments of the present disclosure provide a computer-readable medium, on which a computer program is stored, wherein when the program is executed by a processor, the steps in any of the application deployment methods in the above embodiments are implemented.

[0122] The embodiments of the present disclosure provide a communication terminal, including:

[0123] One or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the application blueprint generation method in the above embodiments.

[0124] The embodiments of the present disclosure also provide a computer-readable medium, on which a computer program is stored, wherein when the program is executed by a processor, the steps in the application blueprint generation method in the above embodiments are implemented.

[0125] Those of ordinary skill in the art will understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the devices, can be implemented as software, firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be executed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0126] Example embodiments have been disclosed herein, and although specific terms have been used, they are used for and should be construed only as general illustrative meanings and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, the features, characteristics, and / or elements described in connection with a particular embodiment may be used alone or in combination with the features, characteristics, and / or elements described in connection with other embodiments. Accordingly, those skilled in the art will understand that various forms and details may be changed without departing from the scope of the present disclosure as set forth by the appended claims.

Claims

1. An application deployment method, wherein, Including: Receiving an application blueprint, where the application blueprint includes: at least two sub-blueprints, and each sub-blueprint records a corresponding hardware type, the external capabilities provided by deploying one application instance on a hardware device of the corresponding hardware type, and the total external capabilities of the application; Deploying application instances on the hardware devices in the cluster according to the application blueprint and the external capabilities provided by all the deployed application instances, and the sum of the external capabilities provided by all the deployed application instances is greater than or equal to the total external capabilities of the application; The deployment priority is also recorded in the sub-blueprint; The step of deploying application instances on the hardware devices in the cluster according to the application blueprint and the external capabilities provided by all the deployed application instances specifically includes: Determining the sub-blueprint to be deployed according to the deployment priority, and deploying application instances on the hardware devices in the cluster according to the determined sub-blueprint to be deployed; The step of determining the sub-blueprint to be deployed according to the deployment priority and deploying application instances according to the determined sub-blueprint to be deployed specifically includes: Determining the sub-blueprint with the highest deployment priority in the application blueprint as the sub-blueprint to be deployed; Determining the maximum number of application instances that can be deployed with the remaining resources in the hardware devices of the hardware type corresponding to the sub-blueprint to be deployed, and determining whether the sum of the external capabilities of deploying the maximum number of application instances is greater than or equal to the first supplementary capability, where the first supplementary capability is equal to the total external capabilities of the application minus the sum of the external capabilities of the already deployed application instances; If it is determined that the sum of the external capabilities of deploying the maximum number of application instances is greater than or equal to the first supplementary capability, deploying application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed, and the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability; If it is determined that the sum of the external capabilities of deploying the maximum number of application instances is less than the first supplementary capability, deploying the maximum number of application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed; selecting a sub-blueprint with a deployment priority one level lower than that of the sub-blueprint to be deployed as the new sub-blueprint to be deployed, and continuing to execute the step of determining the maximum number of application instances that can be deployed with the remaining resources in the hardware devices of the hardware type corresponding to the sub-blueprint to be deployed.

2. The application deployment method according to claim 1, wherein, In the step of deploying application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed, and the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability, the number of deployed application instances is N, and N satisfies: N*p≥Q, and (N - 1)*p<Q; Wherein, p represents the external capabilities provided by deploying one application instance on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed, and Q represents the first supplementary capability.

3. The application deployment method according to claim 1, wherein, Before the step of selecting a sub-blueprint with a deployment priority one level lower than that of the sub-blueprint to be deployed as the new sub-blueprint to be deployed, it further includes: Determining whether the deployment priority of the sub-blueprint to be deployed is the lowest level; If it is determined that the deployment priority of the sub-blueprint to be deployed is the lowest level, feedbacking application deployment failure information; If it is determined that the deployment priority of the to-be-deployed sub-blueprint is not the lowest level, continue to execute the step of selecting a sub-blueprint with a deployment priority one level lower than that of the to-be-deployed sub-blueprint as the new to-be-deployed sub-blueprint.

4. The application deployment method according to claim 1, wherein, It further includes: In response to the hardware device on which the application instance is deployed going offline, determine the to-be-supplemented gap capacity, where the to-be-supplemented gap capacity is equal to the difference between the total external capacity of the application and the sum of the external capacities of the deployed and normally operating application instances; Continue to deploy application instances on the hardware devices in the cluster according to the application blueprint, and the sum of the external capacities provided by all the continuously deployed application instances is greater than or equal to the to-be-supplemented gap capacity.

5. The application deployment method according to claim 1, wherein, It further includes: In response to an increase in the total external capacity of the application, determine the to-be-supplemented gap capacity, where the to-be-supplemented gap capacity is equal to the increased amount of the total external capacity of the application; Continue to deploy application instances on the hardware devices in the cluster according to the application blueprint, and the sum of the external capacities provided by all the continuously deployed application instances is greater than or equal to the to-be-supplemented gap capacity.

6. The application deployment method according to claim 4 or 5, wherein, The deployment priority is also recorded in the sub-blueprint; the step of continuing to deploy application instances on the hardware devices in the cluster according to the application blueprint, and the sum of the external capacities provided by all the continuously deployed application instances is greater than or equal to the to-be-supplemented gap capacity specifically includes: Determine the sub-blueprint with the highest deployment priority in the application blueprint as the alternative sub-blueprint; Determine the maximum number of application instances that can be deployed with the remaining resources in the hardware devices of the hardware type corresponding to the alternative sub-blueprint, and determine whether the sum of the external capacities of deploying the maximum number of application instances is greater than or equal to the second to-be-supplemented capacity, where the second to-be-supplemented capacity is equal to the difference between the to-be-supplemented gap capacity and the sum of the external capacities of the already continuously deployed application instances; If it is determined that the sum of the external capacities of deploying the maximum number of application instances is greater than or equal to the second to-be-supplemented capacity, use the alternative sub-blueprint as the to-be-deployed sub-blueprint, and deploy application instances on the hardware devices of the corresponding hardware type according to the to-be-deployed sub-blueprint and the sum of the external capacities of the deployed application instances is greater than or equal to the second to-be-supplemented capacity; If it is determined that the sum of the external capacities of deploying the maximum number of application instances is less than the second to-be-supplemented capacity, use the alternative sub-blueprint as the to-be-deployed sub-blueprint, and deploy the maximum number of application instances on the hardware devices of the corresponding hardware type according to the to-be-deployed sub-blueprint; select a sub-blueprint with a deployment priority one level lower than that of the alternative sub-blueprint as the new alternative sub-blueprint, and continue to execute the step of determining the maximum number of application instances that can be deployed with the remaining resources in the hardware devices of the hardware type corresponding to the alternative sub-blueprint.

7. The application deployment method according to any one of claims 1 to 5, wherein The application blueprint further includes: a blueprint identifier, which is used to represent that the application blueprint contains multiple sub-blueprints.

8. A method for generating an application blueprint, wherein, It includes: Obtain the hardware types supported by the application, the external capacity provided by deploying one application instance on the hardware devices of this hardware type, and the total external capacity of the application, and generate sub-blueprints corresponding one-to-one to the hardware types; the deployment priority is also recorded in the sub-blueprint, Integrate all the sub-blueprints and generate an application blueprint; Send the application blueprint to the microservice platform, so that the microservice platform deploys application instances on the hardware devices in the cluster according to the application blueprint and the external capabilities provided by all the deployed application instances, and the sum of the external capabilities provided by all the deployed application instances is greater than or equal to the total external capability of the application; The step of deploying application instances on the hardware devices in the cluster according to the application blueprint and the external capabilities provided by all the deployed application instances specifically includes: Determine the sub-blueprint to be deployed according to the deployment priority, and deploy application instances on the hardware devices in the cluster according to the determined sub-blueprint to be deployed; The step of determining the sub-blueprint to be deployed according to the deployment priority and deploying application instances according to the determined sub-blueprint to be deployed specifically includes: Determine the sub-blueprint with the highest deployment priority in the application blueprint as the sub-blueprint to be deployed; Determine the maximum number of application instances that can be deployed by the remaining resources in the hardware devices of the hardware type corresponding to the sub-blueprint to be deployed, and determine whether the sum of the external capabilities of deploying the maximum number of application instances is greater than or equal to the first supplementary capability, where the first supplementary capability is equal to the total external capability of the application minus the sum of the external capabilities of the already deployed application instances; If it is determined that the sum of the external capabilities of deploying the maximum number of application instances is greater than or equal to the first supplementary capability, deploy application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed and the sum of the external capabilities of the deployed application instances is greater than or equal to the first supplementary capability; If it is determined that the sum of the external capabilities of deploying the maximum number of application instances is less than the first supplementary capability, deploy the maximum number of application instances on the hardware devices of the corresponding hardware type according to the sub-blueprint to be deployed; select the sub-blueprint with a deployment priority one level lower than that of the sub-blueprint to be deployed as the new sub-blueprint to be deployed, and continue to execute the step of determining the maximum number of application instances that can be deployed by the remaining resources in the hardware devices of the hardware type corresponding to the sub-blueprint to be deployed.

9. A microservice platform, comprising: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the application deployment method according to any one of claims 1-7.

10. A communication terminal, comprising: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the application blueprint generation method according to claim 8.

11. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the steps in the application deployment method according to any one of claims 1-7, and / or, when the program is executed by the processor, it implements the steps in the application blueprint generation method according to claim 8.

Citation Information

Patent Citations

  • Application deployment method, device and system

    CN110895464A