WO2021253914A1 - 应用部署方法、应用蓝图生成方法、平台、终端和介质 - Google Patents

应用部署方法、应用蓝图生成方法、平台、终端和介质 Download PDF

Info

Publication number
WO2021253914A1
WO2021253914A1 PCT/CN2021/083872 CN2021083872W WO2021253914A1 WO 2021253914 A1 WO2021253914 A1 WO 2021253914A1 CN 2021083872 W CN2021083872 W CN 2021083872W WO 2021253914 A1 WO2021253914 A1 WO 2021253914A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
blueprint
deployed
sub
capability
Prior art date
Application number
PCT/CN2021/083872
Other languages
English (en)
French (fr)
Inventor
许占伟
李广旭
钟小武
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to JP2022577782A priority Critical patent/JP7432774B2/ja
Priority to US18/009,374 priority patent/US20230221934A1/en
Priority to EP21826418.2A priority patent/EP4148565A4/en
Publication of WO2021253914A1 publication Critical patent/WO2021253914A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the present disclosure relates to, but is not limited to, the field of communication technology.
  • microservices and container technology users split the application into multiple microservices when developing large-scale applications, and the corresponding deployment platform arranges, schedules and manages the microservices, and arranges, schedules, and manages the microservices.
  • a configuration file is used to manage the application.
  • most of the devices on the edge are heterogeneous, and the computing and storage capabilities of different devices may vary greatly, and the central processing unit (CPU) structure is also different, which leads to the same application in different hardware types
  • CPU central processing unit
  • an embodiment of the present disclosure provides an application deployment method, including: receiving an application blueprint, the application blueprint includes: at least two different sub-blueprints, the sub-blueprint records the corresponding hardware type, in the hardware The external capabilities provided by an application instance deployed on a type of hardware device and the total external capabilities of the application; the application instance is deployed on the hardware devices in the cluster according to the sub-blueprint, 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 embodiments of the present disclosure also provide a method for generating an application blueprint, including: obtaining the hardware type supported by the application, deploying an application instance on the hardware device of the hardware type to provide external capabilities and the total external capabilities of the application, And generate a sub-blueprint corresponding to the hardware type one-to-one; integrate all the sub-blueprints and generate an application blueprint; send the application blueprint to the micro-service platform for the micro-service platform to use the sub-blueprint Deploy application instances on hardware devices in the cluster.
  • the embodiments of the present disclosure also provide a microservice platform, including: one or more processors; a storage device for storing one or more programs; when the one or more programs are used by the one Or multiple processors execute, so that the one or more processors implement any application deployment method described herein.
  • the embodiments of the present disclosure also provide a computer-readable medium on which a computer program is stored, wherein the program is executed by a processor to implement the steps in any application deployment method described herein.
  • the embodiments of the present disclosure also provide a communication terminal, including: one or more processors; a storage device, configured to store one or more programs; when the one or more programs are used by the one or more A plurality of processors execute, so that the one or more processors implement the application blueprint generation method described herein.
  • the embodiments of the present disclosure also provide a computer readable medium on which a computer program is stored, wherein the program is executed by a processor to implement the steps in the application blueprint generation method described herein.
  • FIG. 1 is a flowchart of an application deployment method provided by an embodiment of the disclosure
  • FIG. 2 is a flowchart of an exemplary implementation method of step S2 in an embodiment of the disclosure
  • FIG. 3 is a flowchart of an exemplary implementation method of step S2a in an embodiment of the disclosure
  • FIG. 4 is a flowchart of another exemplary implementation method of step S2a in an embodiment of the disclosure.
  • FIG. 5 is a flowchart of another application deployment method provided by an embodiment of the disclosure.
  • FIG. 6 is a flowchart of an exemplary implementation method of step S4 in an embodiment of the disclosure.
  • FIG. 7 is a flowchart of an application blueprint generation method provided by an embodiment of the disclosure.
  • FIG. 8A is a flowchart of yet another application deployment method provided by an embodiment of the disclosure.
  • FIG. 8B is a flowchart of yet another application deployment method provided by an embodiment of the present disclosure.
  • FIG. 8C is a flowchart of yet another application deployment method provided by an embodiment of the present disclosure.
  • FIG. 8D is a flowchart of yet another application deployment method provided by an embodiment of the present disclosure.
  • FIG. 9A is a flowchart of yet another application deployment method provided by an embodiment of the present disclosure.
  • FIG. 9B is a flowchart of yet another application deployment method provided by an embodiment of the disclosure.
  • 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 element. Therefore, without departing from the teachings of the present disclosure, the first element, the first component, or the first module discussed below may be referred to as the second element, the second component, or the second module.
  • microservices and container technology users split the application into multiple microservices when developing large-scale applications, and the corresponding deployment platform arranges, schedules and manages the microservices, and arranges, schedules, and manages the microservices.
  • a configuration file is used to manage the application.
  • most of the devices on the edge are heterogeneous, and the computing and storage capabilities of different devices may vary greatly, and the central processing unit (CPU) structure is also different, which leads to the same application in different hardware types
  • CPU central processing unit
  • home gateway boxes or optical modems are sensitive to power consumption and usually use ARM (Advanced RISC Machine) structured hardware; industrial gateways and industrial robot equipment require strong computing or storage capabilities, and usually use x86 structured hardware.
  • ARM Advanced RISC Machine
  • the application requires different configuration parameters when running on these two different types of CPU architectures.
  • the management of edge-side device applications is all deployed on the cloud side, and the existing configuration files cannot specify the deployment of applications on multiple types of hardware.
  • the external capabilities that applications can provide are also related to the type of hardware.
  • the external capabilities provided by applications deployed on different hardware types are different, but the cluster cannot adaptively select a certain type of hardware based on the required external capabilities. Deploying applications cannot adapt to scenarios where multiple types of hardware are mixed in a cluster for application deployment.
  • the application deployment method, application blueprint generation method, microservice platform, communication terminal, and computer-readable medium provided in the present disclosure can be used to adaptively select the application instance to be deployed on the hardware device of the corresponding hardware type according to the required external capabilities, At the same time, it is suitable for scenarios where hardware devices of multiple hardware types are mixed in a cluster for application deployment.
  • This application deployment method is suitable for application deployment on a microservice platform, which is a platform as a service (Platform as a Services, PaaS) platform, such as the Cloudify platform and the Kubernetes platform (K8S platform), etc.; the application blueprint generation method It is suitable for application blueprint generation for communication terminals.
  • Communication terminals include mobile terminals, personal computers (PCs), tablet devices and other devices that can be used as clients.
  • FIG. 1 is a flowchart of an application deployment method provided by an embodiment of the disclosure. As shown in Fig. 1, the method may include steps S1 and S2.
  • step S1 an application blueprint is received.
  • the application blueprint includes at least two different sub-blueprints, and the sub-blueprints record the corresponding hardware type, the external capabilities provided by deploying an application instance on the hardware device of the hardware type, and the total external capabilities of the application.
  • the external capability is the capability of an application or application instance to provide external services, which may include computing capability, storage capability, network capability, etc., corresponding to the resources provided by the hardware device, that is, the hardware device provides deployment resources for the application or application instance ,
  • the application or application instance provides external services (users or users), such as computing services, storage services, network services, etc.
  • the external capabilities can be obtained through abstract evaluation of the comprehensive capabilities of the application or application instance to provide the above services; in some embodiments ,
  • the total external capability of the application can correspond to the field "total_capability", and the external capability provided by the deployment of an application instance can correspond to the field "inst_capability";
  • hardware types can include ARM architecture, x86 architecture, RISC-V architecture, Snow Ridge architecture, and Denverton architecture Etc., a single sub-blueprint corresponds to a single hardware type; in some embodiments, the hardware type, also referred to as the sub-blueprint type, may correspond to the field "version_type".
  • the application blueprint may include blueprints and configuration files (manifest) and other file forms used to arrange, schedule, or manage applications or application instances, and the configuration files may include deployment (Deployment), copy settings ( Replica Set, RS for short) and Replication Controller (RC for short), etc.
  • the total external capabilities of the application can be recorded in the application blueprint.
  • the application blueprint further includes a blueprint identifier, which is used to indicate that the application blueprint is a multi-version blueprint, and can correspond to the field "Multiblueprint".
  • the multi-version blueprint includes a blueprint with at least two sub-blueprints.
  • step S2 the application instances are deployed on the hardware devices in the cluster according to the external capabilities provided by the application blueprint and all deployed application instances.
  • step S2 the application instances are deployed 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 must be greater than or equal to the external capabilities of the application.
  • Total capacity that is, deploy application instances on hardware devices of the corresponding hardware type in the cluster according to the sub-blueprint, and ensure that the deployed application meets the requirements of the total external capacity of the application.
  • the microservice platform side that is, the cloud, can deploy application instances according to the sub-blueprint, according to preset deployment rules or according to the specific deployment requirements of the application.
  • the deployment priority is also recorded in the sub-blueprint; step S2, 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 may include: according to the deployment priority The level determines the sub-blueprint to be deployed, and deploys application instances on the hardware devices in the cluster based on the determined sub-blueprint to be deployed.
  • the embodiments of the present disclosure provide an application deployment method, which can be used to adapt the hardware of the corresponding hardware type according to the total external capabilities of the application, as well as the sub-blueprint that records the hardware type and the external capabilities provided by deploying an application instance. Deploy application instances on the device.
  • Fig. 2 is a flowchart of an exemplary implementation method of step S2 in an embodiment of the disclosure.
  • the deployment priority is also recorded in the sub-blueprint; as shown in Figure 2, step S2, 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 may include : 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.
  • Fig. 3 is a flowchart of an exemplary implementation method of step S2a in an embodiment of the disclosure.
  • step S2a determining the sub-blueprint to be deployed according to the deployment priority, and deploying an application instance of the hardware device in the cluster according to the determined sub-blueprint to be deployed, may include steps S201 to S205.
  • step S201 the sub-blueprint with the highest deployment priority in the application blueprint is determined as the sub-blueprint to be deployed.
  • the deployment priority may be obtained according to user selection or cloud selection, and the deployment priority may correspond to the field "priority”.
  • step S202 determine the maximum number of application instances that can be deployed in the remaining resources of the hardware device 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 to be supplemented ability.
  • the first capability to be supplemented is equal to the difference between the total external capability of the application and the sum of the external capabilities of the deployed application instance.
  • the first capability to be supplemented is equal to the total external capability of the application. .
  • 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 capability to be supplemented, then step S203 is executed; if it is determined that the sum of the external capabilities of the maximum deployed number of application instances is less than the first To be supplemented, step S204 and step S205 are executed.
  • step S203 the application instance is deployed on the hardware device of the corresponding hardware type according to the sub-blueprint to be deployed, and the sum of the external capabilities of the deployed application instance is greater than or equal to the first capability to be supplemented.
  • the deployment is completed at this time, and the deployed application meets the requirements of the total external capabilities of the application, which can be embodied in two forms: just-satisfaction and surplus-satisfaction .
  • the number of deployed application instances is N, and N satisfies: N*p ⁇ Q, and (N-1)*p ⁇ Q; where p indicates that according to the sub-blueprint to be deployed
  • Q represents the first capability to be supplemented; when the above conditions are met, it is a form that is just met at a certain level.
  • step S204 the maximum number of application instances are deployed on the hardware device of the corresponding hardware type according to the sub-blueprint to be deployed.
  • step S204 after the maximum number of application instances are deployed, the total external capability requirements of the application are still not met.
  • step S205 a sub-blueprint one level lower than the deployment priority of the sub-blueprint to be deployed is selected as the new sub-blueprint to be deployed.
  • step S205 a sub-blueprint that is one level lower than the deployment priority of the current sub-blueprint to be deployed is selected as the new sub-blueprint to be deployed, and for the new sub-blueprint to be deployed, step S202 is executed to determine that the sub-blueprint to be deployed corresponds to The maximum number of application instances that can be deployed by the remaining resources in the hardware device of the hardware type is cyclically deployed.
  • the deployment performed in step S2 and related steps may not be a physical deployment, but may also be embodied in a pre-deployed form to perform deployment calculations.
  • 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 a deployment priority, and meet the corresponding overall external capability requirements of the application, while ensuring the rational use of deployment resources.
  • Fig. 4 is a flowchart of another exemplary implementation method of step S2a in an embodiment of the disclosure. This method is an exemplary alternative implementation based on the method shown in FIG. 3. Illustratively, in step S205, before selecting a sub-blueprint one level lower than the deployment priority of the sub-blueprint to be deployed as the new sub-blueprint to be deployed, the method further includes step S2051 and step S2052.
  • step S2051 it is determined whether the deployment priority of the sub-blueprint to be deployed is the lowest.
  • step S2051 if it is determined that the deployment priority of the sub-blueprint to be deployed is the lowest, then step S2052 is executed; if it is determined that the deployment priority of the sub-blueprint to be deployed is not the lowest, then step S205 is executed to select The sub-blueprint with a lower deployment priority of the sub-blueprint is used as the step of the new sub-blueprint to be deployed.
  • step S2052 the application deployment failure information is fed back.
  • FIG. 5 is a flowchart of another application deployment method provided by an embodiment of the disclosure. As shown in FIG. 5, this method is an exemplary alternative implementation based on the method shown in FIG. Exemplarily, the application deployment method further includes steps S3a, S3b, and S4.
  • step S3a in response to the offline of the hardware device where the application instance is deployed, the gap capability to be supplemented is determined.
  • the gap capability to be replenished is equal to the difference between the total external capability of the application and the sum of the external capabilities of the deployed and working application instances, or it can be called the first gap capability to be replenished.
  • the gap capability to be supplemented is determined, and the application instance is continuously deployed according to sub-blueprints other than the sub-blueprint corresponding to the hardware type.
  • the new sub-blueprint in response to the new sub-blueprint sent by the user terminal, the new sub-blueprint is added to the application blueprint according to the blueprint identifier, and then the application instance can be deployed according to the sub-blueprint. That is, when the application can be deployed on the hardware device corresponding to the new hardware type, it is only necessary to add a sub-blueprint to the application blueprint.
  • step S3b in response to the increase in the total external capability of the application, the gap capability to be supplemented is determined.
  • the gap capability to be replenished is equal to the increase in the total external capability of the application, or it can be called the second gap capability to be replenished.
  • the application blueprint can be updated through the update interface of the cluster.
  • the capabilities to be recovered are determined, and the application instances are recovered on the hardware devices in the cluster according to the sub-blueprint, and the sum of the external capabilities provided by all recovered application instances is less than or It is equal to the capacity to be recovered, where the capacity to be recovered is equal to the reduction in the total external capacity of the application.
  • step S4 continue to deploy application instances on the hardware devices in the cluster according to the application blueprint, and the sum of the external capabilities provided by all the application instances that continue to be deployed is greater than or equal to the gap capabilities to be supplemented.
  • step S2 different from the “deployment” in step S2 and related steps, “continue deployment” is aimed at situations where there are gaps in capabilities to be replenished, and there will also be gaps in capabilities to be replenished during "deployment”. "Continued deployment” can be carried out simultaneously with “Deployment”. The two are only different in terms of expression and process position. They are similar steps in actual application. The relevant implementation methods and criteria used in deployment can be applied to continue deployment.
  • the continued deployment performed in step S4 and related steps may not be a physical deployment, but may also be embodied as a deployment calculation in the form of pre-deployment.
  • Fig. 6 is a flowchart of an exemplary implementation method of step S4 in an embodiment of the disclosure.
  • the deployment priority is also recorded in the sub-blueprint; as shown in FIG. 5, in step S4, the application instances are continuously deployed on the hardware devices in the cluster according to the application blueprint, and all the application instances that continue to be deployed are provided
  • the step that the sum of external capabilities is greater than or equal to the gap capability to be supplemented may include steps S401 to S405.
  • step S401 the sub-blueprint with the highest deployment priority in the application blueprint is determined as the candidate sub-blueprint.
  • step S402 determine the maximum number of application instances that can be deployed with the remaining resources in the hardware device of the hardware type corresponding to the candidate sub-blueprint, and determine whether the sum of the external capabilities of the maximum number of application instances deployed is greater than or equal to the second to be supplemented ability.
  • the second capability to be replenished is the difference between the gap capability to be replenished and the sum of the external capabilities of the application instances that have been continuously deployed.
  • step S402 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 second capability to be supplemented, step S403 is executed; if it is determined that the sum of the external capabilities of the maximum deployed application instances is less than the second To be supplemented, step S404 and step S405 are executed.
  • step S403 the candidate sub-blueprint is used as the sub-blueprint to be deployed, and the application instance is deployed on the hardware device of the corresponding hardware type according to the sub-blueprint to be deployed, and the sum of the external capabilities of the deployed application instance is greater than or equal to the second capability to be supplemented .
  • step S404 the candidate sub-blueprint is used as the sub-blueprint to be deployed, and the maximum number of application instances are deployed on the hardware device of the corresponding hardware type according to the sub-blueprint to be deployed.
  • step S405 a sub-blueprint one level lower than the deployment priority of the candidate sub-blueprint is selected as the new candidate sub-blueprint.
  • step S405 a sub-blueprint one level lower than the deployment priority of the candidate sub-blueprint is selected as the new candidate sub-blueprint, and for the new candidate sub-blueprint, step S402 is executed to determine the candidate sub-blueprint corresponding to The maximum number of application instances that can be deployed by the remaining resources in the hardware device of the hardware type is cyclically deployed.
  • step S401 to step S405 can be referred to step S201 to step S2052.
  • the embodiments of the present disclosure provide an application deployment method, which can be used to adjust the deployed or currently deployed application instances for the offline of some hardware devices or the update of the total external capabilities of the application to meet the deployment status.
  • FIG. 7 is a flowchart of a method for generating an application blueprint provided by an embodiment of the disclosure. As shown in Fig. 7, the method may include steps S5 to S7.
  • step S5 the hardware type supported by the application, the external capabilities provided by the deployment of an application instance on the hardware device of the hardware type, and the total external capabilities of the application are obtained, and a sub-blueprint corresponding to the hardware type is generated.
  • the sub-blueprint records the corresponding hardware type and the external capabilities provided by deploying an application instance on the hardware device of the hardware type.
  • step S6 all the sub-blueprints are integrated, and an application blueprint is generated.
  • the application blueprint includes the total external capabilities of the application and at least two different sub-blueprints; in some embodiments, the corresponding fields of the total external capabilities of the application may also be included in the sub-blueprints, and each sub-blueprint records the same total external capabilities of the application. .
  • the application blueprint further includes a blueprint identifier, and the blueprint identifier is used to indicate that the application blueprint is a multi-version blueprint, and the multi-version blueprint is a blueprint that includes at least two sub-blueprints.
  • step S7 the application blueprint is sent to the microservice platform.
  • step S7 the application blueprint is sent to the microservice platform for the microservice platform to deploy application instances on the hardware devices in the cluster according to the application blueprint.
  • the 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 type of hardware supported by the application, the external capabilities provided by the deployment of an application instance, and the total external capabilities of the application.
  • Application capability requirements choose hardware devices of corresponding hardware types for deployment of application examples.
  • FIG. 8A is a flowchart of yet another application deployment method provided by an embodiment of the disclosure.
  • the application deployment method is applied to a microservice platform (PaaS).
  • PaaS microservice platform
  • the data packet structure of the application blueprint uses the replica controller (RC) as a template, and corresponds to the field "ReplicationController”.
  • RC replica controller
  • the application blueprint includes the total external capabilities of the application and different Two sub-blueprints (sub-blueprint 1 and sub-blueprint 2) and the blueprint identifier, 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 capability and deployment priority provided by deploying an application instance on the hardware device of this hardware type, corresponding to the fields "version_type”, "inst_capability” and “priority", and deploy an application on the hardware device of this hardware type
  • the external capability provided by the instance is the instance capability; in the hardware device cluster corresponding to the microservice platform, there are two types of multiple hardware devices corresponding to the hardware types recorded in the two sub-blueprints. Among them, the first type of hardware device is the denverton architecture , The second type of hardware device is the Snowridge architecture.
  • the microservice platform After receiving the application blueprint, the microservice platform determines that the application blueprint is a multi-version blueprint according to the blueprint identification, and parses out two sub-blueprints; according to the deployment priority, the corresponding hardware type snowridge sub-blueprint is used as the sub-blueprint to be deployed and calculated The number of copies.
  • a copy of a sub-blueprint corresponds to an application instance.
  • the first capability to be supplemented is equal to the difference between the total external capabilities of the application and the sum of the external capabilities of the deployed application instances, which is 50.
  • Case 1 As shown in Figure 8A, where the maximum number of application instances that can be deployed on the remaining resources in a snowridge type hardware device is greater than or equal to 2, and two application instances are directly deployed. Meet the requirements of the total external capabilities of the application.
  • FIG. 8B is a flowchart of yet another application deployment method provided by an embodiment of the disclosure.
  • the maximum number of application instances that can be deployed with the remaining resources in a type of hardware device is greater than or equal to 1, then one application instance is directly deployed, and the requirements for the total external capabilities of the application are met at this time.
  • FIG. 8C is a flowchart of yet another application deployment method provided by an embodiment of the present disclosure.
  • Corresponding situation three as shown in Figure 8C, where the maximum number of application instances that can be deployed with the remaining resources in a snowridge type hardware device is 0, and the corresponding sub-blueprint of the hardware type of denverton is taken as the sub-blueprint to be deployed.
  • the sum of the external capabilities of the deployed application instances is greater than or equal to the first capability to be supplemented 50, and three application instances should be deployed.
  • the maximum number of application instances that can be deployed with the remaining resources is greater than or equal to 3, and then three application instances are directly deployed. At this time, the requirements for the total external capabilities of the application have been met.
  • FIG. 8D is a flowchart of yet another application deployment method provided by an embodiment of the present disclosure.
  • the two application instances deployed on the snowridge type hardware device are therefore offline, and it is determined to be Replenishment gap capability, where the gap capability to be replenished is equal to the difference between the total external capabilities of the application and the sum of the external capabilities of the deployed and working application instances, which is 50, and is based on sub-blueprints other than the sub-blueprint corresponding to the hardware type.
  • the blueprint that is, the sub-blueprint corresponding to the denverton type, continues to deploy the application instance.
  • the hardware device corresponding to the snowridge type is abnormal, and the application instance is migrated to the denverton type hardware device.
  • the sub-blueprints to be deployed are determined according to the deployment priority.
  • FIG. 9A is a flowchart of yet another application deployment method provided by an embodiment of the disclosure.
  • the hardware device cluster corresponding to the microservice platform, corresponding to the hardware types recorded in the three sub-blueprints (sub-blueprint 1, sub-blueprint 2 and sub-blueprint 3) in the application blueprint, there is a home gateway with an arm architecture and a CPU as The x86 architecture industrial robot and CPU are AR glasses with RISC-V architecture.
  • Case 1 As shown in Figure 9A, according to the total external capabilities of the application, the external capabilities provided by deploying an application instance on the hardware device of the corresponding hardware type, and the deployment priority set by the user side, pass
  • two application instances are deployed on the AR glasses to meet the requirements of the application's overall external capabilities.
  • FIG. 9B is a flowchart of yet another application deployment method provided by an embodiment of the disclosure.
  • the cloud side learns that the application has deployment requirements on the 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, the cloud On the premise that the sum of capabilities 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. Although the application instances deployed on the home gateway still meet the requirements of the total external capabilities of the application, The deployment of application instances is carried out by adapting hardware types according to application requirements, allowing for resource redundancy.
  • the embodiments of the present disclosure provide a microservice platform including: 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 are allowed to implement any application deployment method as in the foregoing embodiments.
  • the embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, where the program is executed by a processor to implement the steps in any application deployment method in the above-mentioned embodiments.
  • the embodiment of the present disclosure provides a communication terminal, which includes: 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 as in the foregoing embodiment.
  • the embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored, where the program is executed by a processor to implement the steps in the application blueprint generation method in the above-mentioned embodiment.
  • the present disclosure has the following beneficial effects:
  • the embodiments of the present disclosure provide an application deployment method, an application blueprint generation method, a microservice platform, a communication terminal, and a computer-readable medium.
  • the application deployment method can be applied to a microservice platform, by considering the application The total external capabilities, combined with the sub-blueprints in the application blueprint, realizes application deployment on hardware devices of the hardware type corresponding to the sub-blueprint.
  • the application blueprint generation method can be Applied to the communication terminal, by adding the total external capabilities of the application to the blueprint, integrating multiple sub-blueprints to realize the generation of the application blueprint.
  • Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium).
  • the term computer storage medium includes volatile and non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Sexual, removable and non-removable media.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other storage technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

一种应用部署方法,包括:接收应用蓝图(S1),该应用蓝图包括:不同的至少两个子蓝图;根据应用蓝图和部署的全部应用实例所提供的对外能力在集群内的硬件设备上部署应用实例(S2),部署的全部应用实例所提供的对外能力之和大于或等于应用对外总能力。还提供了一种应用蓝图生成方法、微服务平台、通信终端和计算机可读介质。

Description

应用部署方法、应用蓝图生成方法、平台、终端和介质 技术领域
本公开涉及但不限于通信技术领域。
背景技术
随着微服务和容器技术的发展,用户在开发大型应用时将应用拆分成多个微服务,由相应部署平台对微服务进行编排、调度和管理,在对微服务进行编排、调度和管理时,都会使用一种配置文件来管理应用。在边缘计算场景,边缘侧的设备大都是异构的,不同设备的计算、存储等能力可能差异非常大,中央处理单元(CPU)结构也不一样,这就导致同一个应用在不同的硬件类型上的配置参数不一样。
发明内容
第一方面,本公开实施例提供了一种应用部署方法,包括:接收应用蓝图,所述应用蓝图包括:不同的至少两个子蓝图,所述子蓝图中记载有对应的硬件类型、在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力以及应用对外总能力;根据所述子蓝图在集群内的硬件设备上部署应用实例,且部署的全部应用实例所提供的对外能力之和大于或等于所述应用对外总能力。
第二方面,本公开实施例还提供了一种应用蓝图生成方法,包括:获取应用支持的硬件类型、在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力以及应用对外总能力,并生成与所述硬件类型一一对应的子蓝图;整合全部所述子蓝图,并生成应用蓝图;将所述应用蓝图发送至微服务平台,以供所述微服务平台根据所述子蓝图在集群内的硬件设备上部署应用实例。
第三方面,本公开实施例还提供了一种微服务平台,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本文所述任一应用部署方法。
第四方面,本公开实施例还提供了一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现本文所述任一应用部署方法中的步骤。
第五方面,本公开实施例还提供了一种通信终端,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本文所述的应用蓝图生成方法。
第六方面,本公开实施例还提供了一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现本文所述应用蓝图生成方法中的步骤。
附图说明
图1为本公开实施例提供的一种应用部署方法的流程图;
图2为本公开实施例中步骤S2的一种示例性实施方法流程图;
图3为本公开实施例中步骤S2a的一种示例性实施方法流程图;
图4为本公开实施例中步骤S2a的另一种示例性实施方法流程图;
图5为本公开实施例提供的另一种应用部署方法的流程图;
图6为本公开实施例中步骤S4的一种示例性实施方法流程图;
图7为本公开实施例提供的一种应用蓝图生成方法的流程图;
图8A为本公开实施例提供的又一种应用部署方法的流程图;
图8B为本公开实施例提供的再一种应用部署方法的流程图;
图8C为本公开实施例提供的再一种应用部署方法的流程图;
图8D为本公开实施例提供的再一种应用部署方法的流程图;
图9A为本公开实施例提供的再一种应用部署方法的流程图;
图9B为本公开实施例提供的再一种应用部署方法的流程图。
具体实施方式
为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开提供的应用部署方法、应用蓝图生成方法、微服务平 台、通信终端和计算机可读介质进行详细描述。
在下文中将参考附图更充分地描述示例实施例,但是所述示例实施例可以以不同形式来体现且不应当被解释为限于本文阐述的实施例。反之,提供这些实施例的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。
本文所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加一个或多个其他特征、整体、步骤、操作、元件、组件和/或其群组。
将理解的是,虽然本文可以使用术语第一、第二等来描述各种元件,但这些元件不应当受限于这些术语。这些术语仅用于区分一个元件和另一元件。因此,在不背离本公开的指教的情况下,下文讨论的第一元件、第一组件或第一模块可称为第二元件、第二组件或第二模块。
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。
随着微服务和容器技术的发展,用户在开发大型应用时将应用拆分成多个微服务,由相应部署平台对微服务进行编排、调度和管理,在对微服务进行编排、调度和管理时,都会使用一种配置文件来管理应用。在边缘计算场景,边缘侧的设备大都是异构的,不同设备的计算、存储等能力可能差异非常大,中央处理单元(CPU)结构也不一样,这就导致同一个应用在不同的硬件类型上的配置参数不一样。例如,家庭网关盒子或者光猫,对于功耗敏感,通常使用ARM(Advanced RISC Machine)结构的硬件;工业网关和工业机器人设备,需要较强的计算或者存储能力,通常使用x86结构的硬件。应用在这两种不同 类型的CPU结构上运行时需要不同的配置参数。但是现阶段边缘侧设备应用的管理,都是由云侧统一进行部署,现有的配置文件无法指定将应用分别部署在多种类型硬件上。
另外,应用所能提供的对外能力与硬件类型也有关系,应用在不同硬件类型上进行部署所提供的对外能力不同,但集群不能自适应地根据所需的对外能力选择在某个类型的硬件上部署应用,更不能适应多类型硬件在集群中混用以进行应用部署的场景。
本公开所提供的应用部署方法、应用蓝图生成方法、微服务平台、通信终端和计算机可读介质,可用于自适应地根据所需的对外能力选择在对应硬件类型的硬件设备上部署应用实例,同时适应于多种硬件类型的硬件设备在集群中混用以进行应用部署的场景。
该应用部署方法适用于针对微服务平台的应用部署,微服务平台即平台即服务式(Platform as a Services,简称PaaS)平台,例如Cloudify平台和Kubernetes平台(K8S平台)等;该应用蓝图生成方法适用于通信终端进行应用蓝图生成,通信终端包括移动终端、个人电脑(PC)、平板设备及其他可作为客户端的设备等。
图1为本公开实施例提供的一种应用部署方法的流程图。如图1所示,该方法可包括步骤S1和S2。
在步骤S1,接收应用蓝图。
其中,该应用蓝图包括不同的至少两个子蓝图,子蓝图中记载有对应的硬件类型、在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力以及应用对外总能力。
示例性地,对外能力为应用或应用实例能够对外提供服务的能力,可包括计算能力、存储能力和网络能力等,与硬件设备提供的资源相对应,即硬件设备为应用或应用实例提供部署资源,应用或应用实例对外(使用者或用户)提供服务,例如计算服务、存储服务和网络服务等,对外能力可通过对应用或应用实例提供以上服务的综合能力进行抽象评估得到;在一些实施例中,应用对外总能力可对应字段“total_capability”,部署一个应用实例所提供的对外能力可对应字段“inst_capability”;硬件类型可包括ARM架构、x86架构、RISC-V 架构、Snow Ridge架构和Denverton架构等,单个子蓝图对应单个硬件类型;在一些实施例中,硬件类型,又可称子蓝图类型,可对应字段“version_type”。
在一些实施例中,应用蓝图可包括蓝图(blueprint)和配置文件(manifest)等用于对应用或应用实例进行编排、调度或管理的文件形式,配置文件可包括部署(Deployment)、副本设置(Replica Set,简称RS)和副本控制器(Replication Controller,简称RC)等。
在一些实施例中,应用对外总能力可记载在应用蓝图中。
在一些实施例中,应用蓝图还包括蓝图标识,该蓝图标识用于表征应用蓝图为多版本蓝图,可对应字段“Multiblueprint”,多版本蓝图即包括有至少两个子蓝图的蓝图。
在步骤S2,根据应用蓝图和部署的全部应用实例所提供的对外能力在集群内的硬件设备上部署应用实例。
在步骤S2中,根据应用蓝图和部署的全部应用实例所提供的对外能力在集群内的硬件设备上部署应用实例,且需满足部署的全部应用实例所提供的对外能力之和大于或等于应用对外总能力,即根据子蓝图在集群内对应硬件类型的硬件设备上部署应用实例,并保证部署完成的应用满足应用对外总能力要求。示例性地,微服务平台端,即云端,可根据子蓝图,依据预先设置的部署规则或依据应用的针对性部署需求自选部署规则进行应用实例的部署。
在一些实施例中,子蓝图中还记载有部署优先级;步骤S2,根据应用蓝图和部署的全部应用实例所提供的对外能力在集群内的硬件设备上部署应用实例,可包括:根据部署优先级确定待部署子蓝图,并根据所确定的待部署子蓝图在集群内的硬件设备部署应用实例。
本公开实施例提供了一种应用部署方法,该方法可用于根据应用对外总能力,以及记载有硬件类型和部署一个应用实例所提供的对外能力的子蓝图,自适应地在相应硬件类型的硬件设备上进行应用实例的部署。
图2为本公开实施例中步骤S2的一种示例性实施方法流程图。示例性地,子蓝图中还记载有部署优先级;如图2所示,步骤S2, 根据应用蓝图和部署的全部应用实例所提供的对外能力在集群内的硬件设备上部署应用实例,可包括:步骤S2a、根据部署优先级确定待部署子蓝图,并根据所确定的待部署子蓝图在集群内的硬件设备部署应用实例。
图3为本公开实施例中步骤S2a的一种示例性实施方法流程图。示例性地,步骤S2a、根据部署优先级确定待部署子蓝图,并根据所确定的待部署子蓝图在集群内的硬件设备部署应用实例,可包括步骤S201至S205。
在步骤S201,确定应用蓝图中部署优先级最高的子蓝图,作为待部署子蓝图。
在一些实施例中,部署优先级可根据用户选择或云端选择得到,部署优先级可对应字段“priority”。
在步骤S202,确定待部署子蓝图对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量,并判断部署最大数量的应用实例的对外能力之和是否大于或等于第一待补充能力。
其中,第一待补充能力等于应用对外总能力与已部署应用实例的对外能力之和的差,待部署子蓝图为部署优先级最高的子蓝图时,第一待补充能力即等于应用对外总能力。
在步骤S202中,若判断出部署最大数量的应用实例的对外能力之和大于或等于第一待补充能力,则执行步骤S203;若判断出部署最大数量的应用实例的对外能力之和小于第一待补充能力,则执行步骤S204和步骤S205。
在步骤S203,根据待部署子蓝图在对应硬件类型的硬件设备上部署应用实例且所部署的应用实例的对外能力之和大于或等于第一待补充能力。
其中,当所部署的应用实例的对外能力之和大于或等于第一待补充能力,则此时部署完成,且完成部署的应用满足应用对外总能力要求,可体现为恰好满足和富余满足两种形式。
在一些实施例中,在步骤S203中,所部署的应用实例数量为N,N满足:N*p≥Q,且(N-1)*p<Q;其中,p表示根据待部署子蓝图 在对应硬件类型的硬件设备上部署一个应用实例所提供的对外能力,Q表示第一待补充能力;当满足以上条件时,在一定层面上即为恰好满足的形式。
在步骤S204,根据待部署子蓝图在对应硬件类型的硬件设备上部署最大数量的应用实例。
在步骤S204中,部署最大数量的应用实例后,依旧不满足应用对外总能力要求。
在步骤S205,选取比待部署子蓝图的部署优先级低一级的子蓝图作为新的待部署子蓝图。
在步骤S205中,选取比当前待部署子蓝图的部署优先级低一级的子蓝图作为新的待部署子蓝图,并针对新的待部署子蓝图,执行步骤S202中,确定待部署子蓝图对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量的步骤,进行循环部署。
在一些实施例中,步骤S2及其相关步骤中所进行的部署可不为物理意义上的部署,也可体现为以预部署的形式进行部署计算。
本公开实施例提供了一种应用部署方法,该方法可用于根据部署优先级选择指定的硬件类型进行应用实例部署,并满足相应的应用对外总能力要求,同时保证部署资源的合理利用。
图4为本公开实施例中步骤S2a的另一种示例性实施方法流程图。该方法为基于图3所示方法的一种示例性可选实施方案。示例性地,在步骤S205,选取比待部署子蓝图的部署优先级低一级的子蓝图作为新的待部署子蓝图的步骤之前,所述方法还包括步骤S2051和步骤S2052。
在步骤S2051,判断待部署子蓝图的部署优先级是否为最低级。
在步骤S2051中,若判断出待部署子蓝图的部署优先级为最低级,则执行步骤S2052;若判断出待部署子蓝图的部署优先级不为最低级,则执行步骤S205,选取比待部署子蓝图的部署优先级低一级的子蓝图作为新的待部署子蓝图的步骤。
在步骤S2052,反馈应用部署失败信息。
图5为本公开实施例提供的另一种应用部署方法的流程图。如 图5所示,该方法为基于图1所示方法的一种示例性可选实施方案。示例性地,该应用部署方法还包括步骤S3a、S3b和S4。
在步骤S3a,响应于部署有应用实例的硬件设备下线,确定待补充缺口能力。
其中,该待补充缺口能力等于应用对外总能力与已部署且正常工作的应用实例的对外能力之和的差,或可称第一待补充缺口能力。
在一些实施例中,响应于部署有应用实例的硬件类型对应的硬件设备整体下线,确定待补充缺口能力,并根据除该硬件类型对应的子蓝图外的其他子蓝图继续部署应用实例。
在一些实施例中,响应于用户终端发送的新子蓝图,根据蓝图标识将该新子蓝图添加至应用蓝图中,后续可根据该子蓝图进行应用实例的部署。即当应用可部署在新的硬件类型对应的硬件设备上时,只需要在应用蓝图中新增一个子蓝图即可。
在步骤S3b,响应于应用对外总能力增大,确定待补充缺口能力。
其中,该待补充缺口能力等于应用对外总能力的增大量,或可称第二待补充缺口能力。示例性地,当应用对外总能力改变(增大或减小)时,可通过集群的更新接口更新应用蓝图。
在一些实施例中,响应于应用对外总能力减小,确定待回收能力,并根据子蓝图在集群内的硬件设备上回收应用实例,且回收的全部应用实例所提供的对外能力之和小于或等于待回收能力,其中,待回收能力等于应用对外总能力的减小量。
在步骤S4,根据应用蓝图在集群内的硬件设备上继续部署应用实例,且继续部署的全部应用实例所提供的对外能力之和大于或等于待补充缺口能力。
其中,区别于步骤S2及其相关步骤中的“部署”,“继续部署”针对于存在待补充缺口能力的情况,并且,在进行“部署”时亦会出现存在待补充缺口能力的情况,“继续部署”可与“部署”同步进行,两者仅是在表述和流程位置上存在不同,实际应用时为类似的步骤,部署时使用的相关实施手段和判别标准均可运用于继续部署。
在一些实施例中,步骤S4及其相关步骤中所进行的继续部署可 不为物理意义上的部署,也可体现为以预部署的形式进行部署计算。
图6为本公开实施例中步骤S4的一种示例性实施方法流程图。示例性地,子蓝图中还记载有部署优先级;如图5所示,在步骤S4中,根据应用蓝图在集群内的硬件设备上继续部署应用实例,且继续部署的全部应用实例所提供的对外能力之和大于或等于待补充缺口能力的步骤,可包括步骤S401至S405。
在步骤S401,确定应用蓝图中部署优先级最高的子蓝图,作为备选子蓝图。
在步骤S402,确定备选子蓝图所对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量,并判断部署最大数量应用实例的对外能力之和是否大于或等于第二待补充能力。
其中,第二待补充能力等于待补充缺口能力与已继续部署的应用实例的对外能力之和的差。
在步骤S402中,若判断出部署最大数量的应用实例的对外能力之和大于或等于第二待补充能力,则执行步骤S403;若判断出部署最大数量的应用实例的对外能力之和小于第二待补充能力,则执行步骤S404和步骤S405。
在步骤S403、将备选子蓝图作为待部署子蓝图,并根据待部署子蓝图在对应硬件类型的硬件设备上部署应用实例且所部署应用实例的对外能力之和大于或等于第二待补充能力。
在步骤S404,将备选子蓝图作为待部署子蓝图,并根据待部署子蓝图在对应硬件类型的硬件设备上部署最大数量的应用实例。
在步骤S405,选取比备选子蓝图的部署优先级低一级的子蓝图作为新的备选子蓝图。
在步骤S405中,选取比备选子蓝图的部署优先级低一级的子蓝图作为新的备选子蓝图,并针对新的备选子蓝图,执行步骤S402中,确定备选子蓝图所对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量的步骤,进行循环部署。
其中,步骤S401~步骤S405中的具体步骤流程可参见步骤S201~步骤S2052。
本公开实施例提供了一种应用部署方法,该方法可用于针对部分硬件设备下线或应用对外总能力更新,对已部署或正在部署的应用实例进行相应调整,以满足部署现状。
图7为本公开实施例提供的一种应用蓝图生成方法的流程图。如图7所示,该方法可包括步骤S5至S7。
在步骤S5,获取应用支持的硬件类型、在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力以及应用对外总能力,并生成与硬件类型一一对应的子蓝图。
其中,子蓝图中记载有对应的硬件类型和在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力。
在步骤S6,整合全部子蓝图,并生成应用蓝图。
其中,该应用蓝图包括应用对外总能力和不同的至少两个子蓝图;在一些实施例中,应用对外总能力的对应字段也可包括在子蓝图中,各子蓝图记载有相同的应用对外总能力。
在一些实施例中,应用蓝图还包括蓝图标识,该蓝图标识用于表征应用蓝图为多版本蓝图,多版本蓝图即包括有至少两个子蓝图的蓝图。
在步骤S7,将应用蓝图发送至微服务平台。
在步骤S7中,将应用蓝图发送至微服务平台,以供微服务平台根据应用蓝图在集群内的硬件设备上部署应用实例。
本公开实施例提供了一种应用蓝图生成方法,该方法可用于根据应用支持的硬件类型、部署一个应用实例所提供的对外能力和应用对外总能力,生成包括多个子蓝图的应用蓝图,以根据应用的能力需求选择相应硬件类型的硬件设备进行应用实例的部署。
下面对本公开提供的应用部署方法结合实际应用进行详细描述。
图8A为本公开实施例提供的又一种应用部署方法的流程图。示例性地,该应用部署方法应用于微服务平台(PaaS),应用蓝图的数据包结构以副本控制器(RC)为样板,对应字段“ReplicationController”,该应用蓝图包括应用对外总能力、不同的两个子蓝图(子蓝图1和子蓝图2)以及蓝图标识,蓝图标识对应字 段“MultiBluePrint”;其中,应用对外总能力记载于各子蓝图中,对应字段“total_capability”,子蓝图还记载有对应的硬件类型、在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力和部署优先级,分别对应字段“version_type”、“inst_capability”和“priority”,在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力即实例能力;在微服务平台对应的硬件设备集群中,对应两个子蓝图记载的硬件类型,存在两种类型的多个硬件设备,其中,第一类型硬件设备为denverton架构,第二类型硬件设备为snowridge架构。
微服务平台接收到应用蓝图后,根据蓝图标识确定应用蓝图为多版本蓝图,并解析出两个子蓝图;根据部署优先级,将对应的硬件类型为snowridge的子蓝图作为待部署子蓝图,并计算副本数,一个子蓝图的副本对应一个应用实例,根据应用对外总能力total_capability=50,单个snowridge类型的应用实例对应inst_capability=30,此时副本数应该为2,即为满足所部署的应用实例的对外能力之和大于或等于第一待补充能力,应部署两个应用实例,其中,第一待补充能力等于应用对外总能力与已部署应用实例的对外能力之和的差,为50。
此时存在三种情况:情况一,如图8A所示,其中,snowridge类型的硬件设备中剩余资源所能够部署的应用实例的最大数量大于或等于2,直接部署两个应用实例,此时已满足应用对外总能力的要求。
图8B为本公开实施例提供的再一种应用部署方法的流程图。对应情况二,如图8B所示,其中,snowridge类型的的硬件设备中剩余资源所能够部署的应用实例的最大数量为1,则相应部署一个应用实例,将对应的硬件类型为denverton的子蓝图作为待部署子蓝图,并根据单个denverton类型的应用实例对应inst_capability=20,确定为满足所部署的应用实例的对外能力之和大于或等于第一待补充能力20,应部署一个应用实例,而denverton类型的硬件设备中剩余资源所能够部署的应用实例的最大数量大于或等于1,则直接部署一个应用实例,此时已满足应用对外总能力的要求。
图8C为本公开实施例提供的再一种应用部署方法的流程图。对应情况三,如图8C所示,其中,snowridge类型的的硬件设备中剩余资源所能够部署的应用实例的最大数量为0,则将对应的硬件类型为denverton的子蓝图作为待部署子蓝图,并根据单个denverton类型的应用实例对应inst_capability=20,确定为满足所部署的应用实例的对外能力之和大于或等于第一待补充能力50,应部署三个应用实例,而denverton类型的硬件设备中剩余资源所能够部署的应用实例的最大数量大于或等于3,则直接部署三个应用实例,此时已满足应用对外总能力的要求。
图8D为本公开实施例提供的再一种应用部署方法的流程图。针对图8A所描述的情况一,如图8D所示,响应于部署有应用实例的snowridge类型对应的硬件设备整体下线,由此两个部署于snowridge类型硬件设备的应用实例下线,确定待补充缺口能力,其中,该待补充缺口能力等于应用对外总能力与已部署且正常工作的应用实例的对外能力之和的差,为50,并根据除该硬件类型对应的子蓝图外的其他子蓝图,即denverton类型对应的子蓝图继续部署应用实例,此时即对应snowridge类型的硬件设备异常,将应用实例迁移至denverton类型的硬件设备。在一些实施例中,当存在数量大于两个的子蓝图时,根据部署优先级确定待部署子蓝图。
将对应的硬件类型为denverton的子蓝图作为待部署子蓝图,并根据单个denverton类型的应用实例对应inst_capability=20,确定为满足所部署的应用实例的对外能力之和大于或等于第二待补充能力,其中,第二待补充能力等于待补充缺口能力与已继续部署的应用实例的对外能力之和的差,为50,则应部署三个应用实例,而denverton类型的硬件设备中剩余资源所能够部署的应用实例的最大数量大于或等于3,则直接部署三个应用实例,此时已满足应用对外总能力的要求。
图9A为本公开实施例提供的再一种应用部署方法的流程图。示例性地,在微服务平台对应的硬件设备集群中,对应应用蓝图中三个子蓝图(子蓝图1、子蓝图2和子蓝图3)记载的硬件类型,存在CPU 为arm架构的家里网关、CPU为x86架构的工业机器人和CPU为RISC-V架构架构的AR眼镜。
此时存在多种情况:情况一,如图9A所示,根据应用对外总能力、在对应硬件类型的硬件设备上部署一个应用实例所提供的对外能力和用户侧设定的部署优先级,通过与上述实施例类似的方法流程,在AR眼镜上部署两个应用实例,以满足应用对外总能力的要求。
图9B为本公开实施例提供的再一种应用部署方法的流程图。对应情况二,如图9B所示,云侧根据实际情况获悉应用在三种硬件设备上都有部署需求,即便此时AR眼镜的剩余资源足够满足应用对外总能力,但云端在所提供的对外能力之和大于或等于应用对外总能力的前提下,分别在家里网关、工业机器人和AR眼镜上部署一个实例,虽然回收在家里网关上部署的应用实例依旧满足应用对外总能力的要求,但其根据应用需求自适应硬件类型进行应用实例的部署,允许存在资源冗余。
本公开实施例提供了一种微服务平台,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当该一个或多个程序被该一个或多个处理器执行,使得该一个或多个处理器实现如上述实施例中的任一应用部署方法。
本公开实施例提供了一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如上述实施例中的任一应用部署方法中的步骤。
本公开实施例提供了一种通信终端,包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当该一个或多个程序被该一个或多个处理器执行,使得该一个或多个处理器实现如上述实施例中的应用蓝图生成方法。
本公开实施例还提供了一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如上述实施例中的应用蓝图生成方法中的步骤。
本公开具有以下有益效果:本公开实施例提供了一种应用部署方法、应用蓝图生成方法、微服务平台、通信终端和计算机可读介质, 该应用部署方法可应用于微服务平台,通过考虑应用对外总能力,并结合应用蓝图中的子蓝图,实现在子蓝图对应的硬件类型的硬件设备上进行应用部署,由于子蓝图与硬件类型一一对应,且记载了与应用的对外能力相关的信息,从而使得集群能够自适应地根据所需的对外能力选择在某个特定类型的硬件上部署应用,并根据应用部署情况通过多类型硬件在集群中混用以进行应用部署;该应用蓝图生成方法可应用于通信终端,通过在蓝图中添加应用对外总能力,整合多个子蓝图,实现应用蓝图的生成。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出, 否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其他实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。

Claims (14)

  1. 一种应用部署方法,包括:
    接收应用蓝图,所述应用蓝图包括:至少两个子蓝图,各所述子蓝图中记载有对应的硬件类型、在对应的硬件类型的硬件设备上部署一个应用实例所提供的对外能力以及应用对外总能力;
    根据所述应用蓝图和部署的全部应用实例所提供的对外能力在集群内的硬件设备上部署应用实例,部署的全部应用实例所提供的对外能力之和大于或等于所述应用对外总能力。
  2. 根据权利要求1所述的应用部署方法,其中,所述子蓝图中还记载有部署优先级;
    所述根据所述应用蓝图和部署的全部应用实例所提供的对外能力在集群内的硬件设备上部署应用实例的步骤,包括:
    根据所述部署优先级确定待部署子蓝图,并根据所确定的待部署子蓝图在集群内的硬件设备部署应用实例。
  3. 根据权利要求2所述的应用部署方法,其中,所述根据所述部署优先级确定待部署子蓝图,并根据所确定的待部署子蓝图部署应用实例的步骤,包括:
    确定所述应用蓝图中部署优先级最高的子蓝图,作为所述待部署子蓝图;
    确定所述待部署子蓝图对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量,并判断部署所述最大数量的应用实例的对外能力之和是否大于或等于第一待补充能力,所述第一待补充能力等于所述应用对外总能力减去已部署应用实例的对外能力之和;
    若判断出部署所述最大数量的应用实例的对外能力之和大于或等于所述第一待补充能力,根据所述待部署子蓝图在对应硬件类型的硬件设备上部署应用实例且所部署的应用实例的对外能力之和大于或等于所述第一待补充能力;
    若判断出部署所述最大数量的应用实例的对外能力之和小于所 述第一待补充能力,根据所述待部署子蓝图在对应硬件类型的硬件设备上部署最大数量的应用实例;选取比所述待部署子蓝图的部署优先级低一级的子蓝图作为新的所述待部署子蓝图,并继续执行所述确定所述待部署子蓝图对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量的步骤。
  4. 根据权利要求3所述的应用部署方法,其中,在所述根据所述待部署子蓝图在对应硬件类型的硬件设备上部署应用实例且所部署的应用实例的对外能力之和大于或等于所述第一待补充能力的步骤中,所部署的应用实例数量为N,N满足:N*p≥Q,且(N-1)*p<Q;
    其中,p表示根据所述待部署子蓝图在对应硬件类型的硬件设备上部署一个应用实例所提供的对外能力,Q表示所述第一待补充能力。
  5. 根据权利要求3所述的应用部署方法,其中,在选取比所述待部署子蓝图的部署优先级低一级的子蓝图作为新的所述待部署子蓝图的步骤之前,还包括:
    判断所述待部署子蓝图的部署优先级是否为最低级;
    若判断出所述待部署子蓝图的部署优先级为最低级,反馈应用部署失败信息;
    若判断出所述待部署子蓝图的部署优先级不为最低级,继续执行所述选取比所述待部署子蓝图的部署优先级低一级的子蓝图作为新的所述待部署子蓝图的步骤。
  6. 根据权利要求1所述的应用部署方法,还包括:
    响应于部署有所述应用实例的硬件设备下线,确定待补充缺口能力,所述待补充缺口能力等于所述应用对外总能力与已部署且正常工作的应用实例的对外能力之和的差;
    根据所述应用蓝图在集群内的硬件设备上继续部署应用实例,且继续部署的全部应用实例所提供的对外能力之和大于或等于所述待补充缺口能力。
  7. 根据权利要求1所述的应用部署方法,还包括:
    响应于所述应用对外总能力增大,确定待补充缺口能力,所述 待补充缺口能力等于所述应用对外总能力的增大量;
    根据所述应用蓝图在集群内的硬件设备上继续部署应用实例,且继续部署的全部应用实例所提供的对外能力之和大于或等于所述待补充缺口能力。
  8. 根据权利要求6或7所述的应用部署方法,其中,所述子蓝图中还记载有部署优先级;所述根据所述应用蓝图在集群内的硬件设备上继续部署应用实例,且继续部署的全部应用实例所提供的对外能力之和大于或等于所述待补充缺口能力的步骤,包括:
    确定所述应用蓝图中部署优先级最高的子蓝图,作为备选子蓝图;
    确定所述备选子蓝图所对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量,并判断部署所述最大数量应用实例的对外能力之和是否大于或等于第二待补充能力,所述第二待补充能力等于所述待补充缺口能力与已继续部署的应用实例的对外能力之和的差;
    若判断出部署所述最大数量的应用实例的对外能力之和大于或等于所述第二待补充能力,将所述备选子蓝图作为待部署子蓝图,并根据所述待部署子蓝图在对应硬件类型的硬件设备上部署应用实例且所部署应用实例的对外能力之和大于或等于所述第二待补充能力;
    若判断出部署所述最大数量的应用实例的对外能力之和小于所述第二待补充能力,将所述备选子蓝图作为所述待部署子蓝图,并根据所述待部署子蓝图在对应硬件类型的硬件设备上部署最大数量的应用实例;选取比所述备选子蓝图的部署优先级低一级的子蓝图作为新的所述备选子蓝图,并继续执行所述确定所述备选子蓝图所对应的硬件类型的硬件设备中剩余资源所能够部署的应用实例的最大数量的步骤。
  9. 根据权利要求1至7中任一所述的应用部署方法,其中,所述应用蓝图还包括:蓝图标识,所述蓝图标识用于表征所述应用蓝图包含多个所述子蓝图。
  10. 一种应用蓝图生成方法,包括:
    获取应用支持的硬件类型、在该硬件类型的硬件设备上部署一个应用实例所提供的对外能力以及应用对外总能力,并生成与所述硬件类型一一对应的子蓝图;
    整合全部所述子蓝图,并生成应用蓝图;
    将所述应用蓝图发送至微服务平台,以供所述微服务平台根据所述应用蓝图在集群内的硬件设备上部署应用实例。
  11. 一种微服务平台,包括:
    一个或多个处理器;
    存储装置,配置为存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-9中任一所述的应用部署方法。
  12. 一种通信终端,包括:
    一个或多个处理器;
    存储装置,配置为存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求10中所述的应用蓝图生成方法。
  13. 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-9中任一所述的应用部署方法中的步骤。
  14. 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求10中所述的应用蓝图生成方法中的步骤。
PCT/CN2021/083872 2020-06-19 2021-03-30 应用部署方法、应用蓝图生成方法、平台、终端和介质 WO2021253914A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2022577782A JP7432774B2 (ja) 2020-06-19 2021-03-30 アプリケーション展開方法、アプリケーション・ブループリント生成方法、プラットフォーム、端末及び媒体
US18/009,374 US20230221934A1 (en) 2020-06-19 2021-03-30 Application deployment method, application blueprint generation method, platform, terminal and medium
EP21826418.2A EP4148565A4 (en) 2020-06-19 2021-03-30 APPLICATION METHOD, METHOD FOR GENERATING AN APPLICATION BLUEPRINT, PLATFORM, TERMINAL AND MEDIUM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010567511.7A CN113821214A (zh) 2020-06-19 2020-06-19 应用部署方法、应用蓝图生成方法、平台、终端和介质
CN202010567511.7 2020-06-19

Publications (1)

Publication Number Publication Date
WO2021253914A1 true WO2021253914A1 (zh) 2021-12-23

Family

ID=78912067

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083872 WO2021253914A1 (zh) 2020-06-19 2021-03-30 应用部署方法、应用蓝图生成方法、平台、终端和介质

Country Status (5)

Country Link
US (1) US20230221934A1 (zh)
EP (1) EP4148565A4 (zh)
JP (1) JP7432774B2 (zh)
CN (1) CN113821214A (zh)
WO (1) WO2021253914A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821000A (zh) * 2012-09-14 2012-12-12 乐视网信息技术(北京)股份有限公司 提高PaaS平台可用性的方法
CN106897094A (zh) * 2017-02-24 2017-06-27 郑州云海信息技术有限公司 一种云环境下SaaS软件部署方法及装置
CN108234589A (zh) * 2016-12-22 2018-06-29 瞻博网络公司 微服务应用的自动缩放
US20190034460A1 (en) * 2017-07-27 2019-01-31 Sap Se Co-locating Microservice Persistence Containers within Tenant-Specific Database
WO2019056187A1 (zh) * 2017-09-19 2019-03-28 华为技术有限公司 应用部署方法、装置及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140201218A1 (en) * 2008-06-19 2014-07-17 Servicemesh, Inc. Systems and methods for providing ranked deployment options
US20150248507A1 (en) 2012-10-02 2015-09-03 Nec Corporation Information system construction support device, information system construction support method, and storage medium
US9825881B2 (en) 2014-09-30 2017-11-21 Sony Interactive Entertainment America Llc Methods and systems for portably deploying applications on one or more cloud systems
US10871995B2 (en) 2016-09-29 2020-12-22 Amazon Technologies, Inc. Managed container instances

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821000A (zh) * 2012-09-14 2012-12-12 乐视网信息技术(北京)股份有限公司 提高PaaS平台可用性的方法
CN108234589A (zh) * 2016-12-22 2018-06-29 瞻博网络公司 微服务应用的自动缩放
CN106897094A (zh) * 2017-02-24 2017-06-27 郑州云海信息技术有限公司 一种云环境下SaaS软件部署方法及装置
US20190034460A1 (en) * 2017-07-27 2019-01-31 Sap Se Co-locating Microservice Persistence Containers within Tenant-Specific Database
WO2019056187A1 (zh) * 2017-09-19 2019-03-28 华为技术有限公司 应用部署方法、装置及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4148565A4 *

Also Published As

Publication number Publication date
US20230221934A1 (en) 2023-07-13
JP2023530737A (ja) 2023-07-19
CN113821214A (zh) 2021-12-21
EP4148565A1 (en) 2023-03-15
EP4148565A4 (en) 2023-11-01
JP7432774B2 (ja) 2024-02-16

Similar Documents

Publication Publication Date Title
CN111176697B (zh) 服务实例部署方法、数据处理方法及集群联邦
US10360199B2 (en) Partitioning and rebalancing data storage
CN103118140B (zh) 将文件分享给关系圈外其他用户终端的方法、系统及装置
KR101871383B1 (ko) 계층적 데이터 구조의 노드 상에서 재귀적 이벤트 리스너를 사용하기 위한 방법 및 시스템
US11570043B2 (en) Method and apparatus for mapping network slices onto network infrastructures with SLA guarantee
US20170331762A1 (en) Virtual resource automatic selection system and method
CN112199193A (zh) 资源调度方法、装置、电子设备和存储介质
CN110933178B (zh) 调整集群系统内的节点配置的方法及服务器
CN113204353B (zh) 一种大数据平台组件部署方法及装置
CN113382077B (zh) 微服务调度方法、装置、计算机设备和存储介质
CN108268211A (zh) 一种数据处理方法及装置
CN113867957A (zh) 一种跨集群容器数量弹性伸缩实现方法及装置
US10715387B1 (en) System for dynamic provisioning of host devices
CN110633325A (zh) 一种基于Docker的数据库集群扩容方法及装置
CN111897550B (zh) 镜像预加载方法、设备及存储介质
CN112202829A (zh) 基于微服务的社交机器人调度系统和调度方法
CN113132176A (zh) 一种控制边缘节点的方法、节点及边缘计算系统
US9946640B2 (en) Method and apparatus for securing sufficient memory in a device
US10243864B1 (en) System for modifying data rates used by audio devices
WO2021253914A1 (zh) 应用部署方法、应用蓝图生成方法、平台、终端和介质
US10104571B1 (en) System for distributing data using a designated device
US10149056B1 (en) System for configuring audio devices to distribute audio data
CN115914404A (zh) 集群流量管理方法、装置、计算机设备和存储介质
CN114356549A (zh) 多容器集群中容器资源的调度方法、装置和系统
US10177929B1 (en) System for distributing data to multiple devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21826418

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022577782

Country of ref document: JP

Kind code of ref document: A

Ref document number: 2021826418

Country of ref document: EP

Effective date: 20221209

NENP Non-entry into the national phase

Ref country code: DE