Application orchestration method, cloud platform and first edge cluster
By creating and configuring application templates on the cloud platform and sending them to the edge cluster using a publish-subscribe mechanism, the problem of complex personalized configuration of traditional edge nodes is solved, and efficient application orchestration and edge cluster management across clouds and environments are achieved.
Patent Information
- Application Number
- CN202310484629.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-04-28
AI Technical Summary
In edge computing scenarios, traditional application deployment methods require personalized configuration for each edge node, which makes the operation complex and cumbersome when there are a large number of edge nodes, making it difficult to achieve efficient application orchestration across clouds and environments.
By obtaining the identification information and deployment strategy of the edge cluster on the cloud platform, creating application templates, configuring environment variables, and sending the templates to the edge cluster using a publish-subscribe mechanism, the application orchestration process is simplified.
It enables the configuration of environment variables for edge clusters on the cloud platform, simplifies the application orchestration process, improves operational efficiency and reliability, and supports batch management and computing task distribution for multiple edge clusters.
Smart Images

Figure CN116668294B_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer technology, and more particularly to an application orchestration method, a cloud platform, and a first edge cluster. Background Technology
[0002] In edge computing scenarios, the development trend of cloud-edge collaborative application orchestration is moving towards achieving highly consistent, cross-cloud, and cross-environment application deployments. However, modeling the delivery process of cloud-edge applications is a highly fragmented and challenging task. Application deployment scenarios often require different edge nodes to meet personalized configurations. The traditional approach is to perform personalized configurations for each individual edge cluster before submitting the task to the cloud platform. This method is complex and cumbersome when dealing with a large number of edge nodes, requiring users to configure each edge cluster node individually. Summary of the Invention
[0003] This application provides an application orchestration method, apparatus, cloud platform, first edge cluster, and computer-readable storage medium, which enables the configuration of environment variables for the edge cluster on the cloud platform during application orchestration, thereby simplifying the application orchestration process.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides an application orchestration method applied to a cloud platform, including:
[0006] Obtain orchestration information for the first application, the orchestration information including the identification information of the first edge cluster and the strategy for deploying the first application;
[0007] Based on the orchestration information, create the corresponding application template;
[0008] Obtain the environment variables set for the first edge cluster, which are used to determine the operating environment of the first edge cluster's operating system;
[0009] The environment variables are configured into the application template to obtain the configured application template;
[0010] The configured application template is sent to the first edge cluster via publish / subscribe.
[0011] In the above scheme, obtaining the orchestration information for the first application includes:
[0012] Determine the resources required to deploy the first application;
[0013] Obtain resource information for at least one edge cluster;
[0014] The orchestration information is determined based on the resources required to deploy the first application and the resource information of at least one edge cluster.
[0015] In the above scheme, after obtaining the environmental variables for the first edge cluster, the method further includes:
[0016] Validate the environment variables;
[0017] The step of configuring the environment variables into the application template includes:
[0018] Based on the verification results, the environment variables are configured into the application template.
[0019] The method in the above scheme further includes:
[0020] Receive update operations for environment variables set for the first edge cluster;
[0021] Obtain the update information carried by the update operation, wherein the update operation includes one of the following: adding environment variables, changing environment variables, and deleting environment variables;
[0022] The update information is sent to the first edge cluster via publish-subscribe.
[0023] In the above scheme, the number of the first edge clusters is at least two. After sending the configured application template to the first edge cluster, the method further includes:
[0024] Batch management is performed on at least two first edge clusters to support the operation of the first application.
[0025] In the above scheme, the batch management of at least two first edge clusters includes:
[0026] Receive the computing task from the first application;
[0027] Determine the computing resources required to perform the computing task;
[0028] Obtain resource usage information for each of at least two first edge clusters;
[0029] Based on the computing resources required to execute the computing task and the resource usage information of each first edge cluster, the computing task is split and distributed to at least two first edge clusters.
[0030] In the above scheme, the orchestration information also includes the dependency relationship between the first application and at least one second application. After obtaining the orchestration information for the first application, the scheme further includes:
[0031] Obtain partition information for at least two edge clusters;
[0032] Based on the partition information, at least one second edge cluster that is in the same partition as the first edge cluster is determined from the at least two edge clusters;
[0033] The at least one second edge cluster is identified as an edge cluster capable of being used to deploy the at least one second application.
[0034] This application provides an application orchestration method for a first edge cluster, including:
[0035] The application template of the first application sent by the cloud platform is obtained through a publish-subscribe method. The application template includes the identification information of the first edge cluster, the strategy for deploying the first application, and the environment variables of the first edge cluster.
[0036] Deploy the first application according to the application template.
[0037] This application provides an application orchestration apparatus for use on a cloud platform, including:
[0038] The first acquisition module is used to acquire orchestration information for the first application, the orchestration information including the identification information of the first edge cluster and the strategy for deploying the first application;
[0039] A creation module is used to create corresponding application templates based on the orchestration information;
[0040] The second acquisition module is used to acquire environment variables set for the first edge cluster, the environment variables being used to determine the operating environment of the first edge cluster's operating system;
[0041] The configuration module is used to configure the environment variables into the application template to obtain the configured application template;
[0042] The sending module is used to send the configured application template to the first edge cluster via publish / subscribe.
[0043] This application provides an application orchestration apparatus for a first edge cluster, comprising:
[0044] The acquisition module is used to obtain the application template of the first application sent by the cloud platform through a publish-subscribe method. The application template includes the identification information of the first edge cluster, the strategy for deploying the first application, and the environment variables of the first edge cluster.
[0045] The deployment module is used to deploy the first application according to the application template.
[0046] This application provides a cloud platform, including:
[0047] Memory, used to store executable instructions;
[0048] The processor, when executing executable instructions stored in the memory, implements the application orchestration method provided in the embodiments of this application.
[0049] This application provides a first edge cluster, including:
[0050] Memory, used to store executable instructions;
[0051] The processor, when executing executable instructions stored in the memory, implements the application orchestration method provided in the embodiments of this application.
[0052] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute and implement the application orchestration method provided in this application.
[0053] This application embodiment obtains orchestration information for a first application, including the identification information of a first edge cluster and the strategy for deploying the first application. Then, it creates an application template based on the orchestration information, obtains environment variables set for the first edge cluster, configures the environment variables into the application template, and then sends the configured application template to the first edge cluster through a publish-subscribe method. This enables the configuration of edge cluster environment variables on the cloud platform during application orchestration, thereby simplifying the application orchestration process. Attached Figure Description
[0054] Figure 1 This is an optional structural diagram of the application orchestration system provided in the embodiments of this application;
[0055] Figure 2 This is an optional structural schematic diagram of the electronic device provided in an embodiment of this application;
[0056] Figure 3 This is an optional flowchart illustrating the application orchestration method provided in the embodiments of this application;
[0057] Figure 4 This is an optional flowchart illustrating the application orchestration method provided in the embodiments of this application;
[0058] Figure 5 This is an optional flowchart illustrating the application orchestration method provided in the embodiments of this application;
[0059] Figure 6 This is an optional flowchart illustrating the application orchestration method provided in the embodiments of this application;
[0060] Figure 7 This is an optional structural diagram of the application orchestration system provided in the embodiments of this application;
[0061] Figure 8 This is an optional flowchart illustrating the application orchestration method provided in the embodiments of this application;
[0062] Figure 9 This is an optional flowchart illustrating the application orchestration method provided in the embodiments of this application. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0064] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0065] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0067] This application provides an application orchestration method, apparatus, electronic device, and computer-readable storage medium that enables the configuration of edge cluster environment variables on a cloud platform during application orchestration, thereby simplifying the application orchestration process.
[0068] First, the application orchestration system provided in the embodiments of this application will be described, see [link to relevant documentation]. Figure 1 , Figure 1This is an optional structural diagram of the application orchestration system 100 provided in this application embodiment. The first edge cluster 103 is connected to the cloud platform 101 via network 102. In some embodiments, the first edge cluster 103 may include at least one edge device, which may be a device that provides an entry point to the core network of an enterprise or service provider, such as a router, routing switch, integrated access device (IAD), multiplexer, and various metropolitan area network (MAN) and wide area network (WAN) access devices, etc. The type of edge device required for application deployment can be determined according to the actual needs of the edge computing scenario. Therefore, the first edge cluster 103 may include, but is not limited to, k8s clusters, k3s clusters, KubeEdge clusters, etc. The cloud platform 101 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) services, and big data and artificial intelligence platforms. The network 102 can be a wide area network (WAN), a local area network (LAN), or a combination of both. The first edge cluster 103 and the cloud platform 101 can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0069] The cloud platform provided in this application embodiment for implementing the above application orchestration method will be described next. See [link to relevant documentation]. Figure 2 , Figure 2 This is an optional structural diagram of the cloud platform 200 provided in this application embodiment. Figure 2 The cloud platform 200 shown includes at least one processor 201, a memory 205, at least one network interface 202, and a user interface 203. The various components in the cloud platform 200 are coupled together via a bus system 204. It can be understood that the bus system 204 is used to implement communication between these components. In addition to a data bus, the bus system 204 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 204.
[0070] Processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0071] User interface 203 includes one or more output devices 2031 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 203 also includes one or more input devices 2032, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0072] The memory 205 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 205 may optionally include one or more storage devices physically located away from the processor 201.
[0073] The memory 205 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 205 described in this application embodiment is intended to include any suitable type of memory.
[0074] In some embodiments, the memory 205 can store data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof. In this embodiment, the memory 205 stores an operating system 2051, a network communication module 2052, a presentation module 2053, an input processing module 2054, and an application orchestration device 2055. Specifically...
[0075] Operating system 2051 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.
[0076] The network communication module 2052 is used to reach other computing devices via one or more (wired or wireless) network interfaces 202, such as Bluetooth, WiFi, and Universal Serial Bus (USB).
[0077] The presentation module 2053 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 2031 (e.g., a display screen, a speaker, etc.) associated with the user interface 203;
[0078] The input processing module 2054 is used to detect and translate one or more user inputs or interactions from one or more input devices 2032.
[0079] In some embodiments, the application orchestration apparatus provided in this application can be implemented in software. Figure 2 An application orchestration device 2055 stored in memory 205 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a first acquisition module 20551, a creation module 20552, a second acquisition module 20553, a configuration module 20554, and a sending module 20555. These modules are logically linked and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.
[0080] In other embodiments, the application orchestration apparatus provided in this application can be implemented in hardware. As an example, the application orchestration apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the application orchestration method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0081] The application orchestration method provided in this application will be described in conjunction with exemplary applications and implementations of the terminals provided in the embodiments of this application.
[0082] See Figure 3 , Figure 3 This is an optional flowchart illustrating the application orchestration method provided in this application embodiment, which will be combined with... Figure 3 The steps shown are explained.
[0083] Step 301: Obtain orchestration information for the first application, the orchestration information including the identification information of the first edge cluster and the strategy for deploying the first application;
[0084] Step 302: Create a corresponding application template based on the arrangement information;
[0085] Step 303: Obtain the environment variables set for the first edge cluster, the environment variables being used to determine the operating environment of the first edge cluster's operating system;
[0086] Step 304: Configure the environment variables into the application template to obtain the configured application template;
[0087] Step 305: Send the configured application template to the first edge cluster via publish / subscribe.
[0088] In practice, the orchestration information is set by the user. Specifically, the cloud platform presents an application orchestration interface through which users can input orchestration information. Here, the cloud platform can present various information for the user to choose from, including at least candidate orchestration objects and candidate strategies. The user determines the first edge cluster by selecting a candidate orchestration object and determines the strategy for deploying the first application by selecting a candidate strategy, thereby determining the orchestration information. Orchestration information can also be customized by the user. It should be understood that the orchestration information includes identification information for the first edge cluster, indicating that the deployment object of the first application is the first edge cluster. Furthermore, the strategy for deploying the first application included in the orchestration information is used by the first edge cluster to orchestrate the first application according to this strategy.
[0089] In practice, after obtaining orchestration information, the cloud platform creates an application template based on that information. Next, the cloud platform obtains the environment variables set for the first edge cluster. Here, the environment variables determine the operating system environment of the first edge cluster. For example, the environment variables may include, but are not limited to, basic information about the first edge cluster, information corresponding to application characteristics, and information corresponding to application policies. The basic information about the first edge cluster may, for example, include the name of the first edge cluster. For example, the environment variable corresponding to the name of the edge cluster can be represented by the field "K3S_EDGE_HOST_NAME".
[0090] In this embodiment, the environment variables configured for the application template are set by the user. Specifically, the user selects the control interface for configuring environment variables of the first edge cluster, selects the field in the values.yaml file that needs to be replaced with an environment variable, and simultaneously selects an environment variable from the environment variable list to assign to the previously selected field, adding a special prefix "$" during assignment. For example, taking the field defined as "nameOverride" as the KEY, the user selects the "nameOverride" field in the values.yaml file as the field to be replaced with an environment variable, and selects the environment variable "K3S_EDGE_HOST_NAME" from the environment variable list to assign to "nameOverride", adding a special prefix "$" during assignment, i.e., "nameOverride":"$K3S_EDGE_HOST_NAME". In this way, the fields in the values.yaml file that need to be replaced with environment variables are assigned values one by one, thus obtaining the values.yaml file after the environment variables have been replaced.
[0091] In some embodiments, after step 203, the method further includes: validating the environment variables. Correspondingly, configuring the environment variables into the application template includes: configuring the environment variables into the application template based on the validation result.
[0092] In actual implementation, the cloud platform also verifies the validity of the obtained environment variables. It should be understood that the embodiments of this application provide one or more environment variables, and the cloud platform will perform corresponding validity verification for each environment variable. For a given environment variable, if the verification passes, the environment variable is configured into the application template; if the verification fails, a verification failure message is issued to prompt the user to re-set the environment variable. Verifying the environment variables ensures the reliability of the environment variables configured into the application template, preventing invalid environment variables from being configured into the application template, which would prevent the first edge cluster from recognizing them and thus failing to complete the deployment of the first application, thereby improving the reliability of application orchestration.
[0093] In practice, the values.yaml file can be included in the orchestration information obtained in step 301. Through the above-described environment variable replacement process, the environment variables of the first edge cluster are configured for the application template. In some embodiments, the values.yaml file can also be a file outside the application template. After configuring the environment variables in this file, the environment variables are configured into the application template using this file to obtain the application template with configured environment variables.
[0094] Next, after obtaining the application template with configured environment variables, the cloud platform sends the configured application template to the first edge cluster via a publish-subscribe mechanism. Specifically, the publish-subscribe mechanism involves the cloud platform publishing the application template to the cloud-edge messaging component. The first edge cluster subscribes to the messages from the cloud-edge messaging component, thereby obtaining the application template published by the cloud platform. Here, the cloud-edge messaging component can use the NATS message middleware, which is an open-source, lightweight, and high-performance distributed message middleware. Using a publish-subscribe approach to send messages facilitates message interaction between the cloud platform and multiple edge clusters.
[0095] In practice, after obtaining the application template, the first edge cluster assigns values to the environment variables within the application template. For example, for the environment variable field "K3S_EDGE_HOST_NAME" carrying the edge cluster name in the application template, the first edge cluster can query the environment variable table to obtain the corresponding value and assign it to this environment variable. For instance, if the value of "K3S_EDGE_HOST_NAME" for the first edge cluster is "edge-A", then this value is assigned to the environment variable, i.e., "K3S_EDGE_HOST_NAME":"edge-A". It should be understood that the values for the same environment variable may differ between edge clusters. If there are multiple first edge clusters, each first edge cluster assigns the corresponding value locally based on its own environment variable value. For example, if one first edge cluster has a value of "edge-A" for the environment variable corresponding to its edge cluster name, while another first edge cluster has a value of "edge-B", then these two first edge clusters will each assign a value to the same environment variable based on their own values.
[0096] In this embodiment, the values of environment variables stored in the first edge cluster can be pre-sent to the first edge cluster by the cloud platform. For example, a user can add environment variables for the first edge cluster on the cloud platform. Specifically, the user selects to enter the control plane for setting environment variables for the edge cluster, and then selects at least one edge cluster to add environment variables, with the first edge cluster being one of the at least one edge cluster. Specifically, the key and values of the environment variables are set, and the values support srcstr, envstr, and script types. Among them, the srcstr type is a static parameter retrieval type, specifying a fixed string, while the envstr and script types are dynamic parameter retrieval types, dynamically retrieving values each time the edge cluster is deployed through system variables, shell, or Python scripts. After adding the environment variables, the message configuring the environment variables is published to the cloud-edge message component. The system environment component (sys-env) of the first edge cluster will subscribe to the environment variable messages from the cloud platform through the cloud-edge message channel. The system environment component (sys-env) of the first edge cluster processes the message, parses out the key and values, and then saves the key and values to the system environment variable configmap file of the first edge cluster. A configmap is an API object used to store non-confidential data in key-value pairs. It can be used as environment variables, command-line arguments, or configuration files for storage volumes.
[0097] For example, taking the environment variable key of the edge system as the K3S_EDGE_HOST_NAME field, when the values are of type srcstr, setting the name of the first edge cluster to "edge-A" is done as follows: "K3S_EDGE_HOST_NAME":"edge-A". When the values are of type envstr, the name of the first edge cluster is set through the environment variable "$HOSTNAME", and is done as follows: "K3S_EDGE_HOST_NAME":"$HOSTNAME". When the values are of type script, the name of the first edge cluster is set through a script executed on the edge node, such as shell "echo $HOSTNAME", and is done as: "K3S_EDGE_HOST_NAME":"echo $HOSTNAME".
[0098] In practice, the cloud platform can also modify and delete environment variables of the first edge cluster. After the cloud platform modifies or deletes the first edge cluster, it can send the corresponding change or deletion message to the first edge cluster via publish / subscribe. The first edge cluster can then modify or delete its environment variables according to the message. The specific process is detailed in the section on adding environment variables described above, and will not be repeated here.
[0099] In practice, after assigning values to the environment variables within the application template, the first edge cluster deploys the first application based on the assigned application template. The deployment process follows the deployment strategy for the first application contained in the application template.
[0100] In this embodiment, by obtaining orchestration information for a first application, including the identification information of a first edge cluster and the strategy for deploying the first application, an application template is created based on the orchestration information. Environment variables set for the first edge cluster are obtained, and the environment variables are configured into the application template to obtain the configured application template. Then, the configured application template is sent to the first edge cluster through a publish-subscribe method. This enables the configuration of environment variables for the edge cluster on the cloud platform during application orchestration, thereby simplifying the application orchestration process.
[0101] In some embodiments, see Figure 4 , Figure 4 This is an optional flowchart illustrating the application orchestration method provided in this application embodiment. Step 301 can be implemented in the following manner:
[0102] Step 3011: Determine the resources required to deploy the first application;
[0103] Step 3012: Obtain resource information for at least one edge cluster;
[0104] Step 3013: Determine the orchestration information based on the resources required to deploy the first application and the resource information of at least one edge cluster.
[0105] In practice, after receiving an orchestration task for the first application, the cloud platform determines the resources required to run the first application. Then, it obtains resource information for at least one edge cluster. It should be understood that each of these edge clusters is connected to the cloud platform. Based on the resources required to deploy the first application and the resource information of the at least one edge cluster, the cloud platform determines the first edge cluster and the deployment strategy for the first application, thereby determining and obtaining orchestration information. Specifically, the cloud platform can determine at least one target edge cluster from the at least one edge cluster that can support the deployment of the first application, based on the resource information. If there are multiple target edge clusters, one or more first edge clusters can be selected by the user. By determining the resources required to deploy the first application and the resource information of the at least one edge cluster in advance to determine the orchestration information, the determined orchestration information can be accurately used for the orchestration of the first application, avoiding situations where unreasonable orchestration information prevents the deployment of the first application.
[0106] In some embodiments, see Figure 5 , Figure 5 This is an optional flowchart illustrating an application orchestration method provided in an embodiment of this application. The method further includes:
[0107] Step 501: Receive update operation for environment variables set for the first edge cluster;
[0108] Step 502: Obtain the update information carried by the update operation, wherein the update operation includes one of the following: adding environment variables, changing environment variables, and deleting environment variables;
[0109] Step 503: Send the update information to the first edge cluster via publish / subscribe.
[0110] In this embodiment, the update operation can be initiated by a user. If the cloud platform receives an update operation for the first edge cluster, it obtains the update information carried by the update operation. Here, the update information can be user input or instruction information corresponding to the update operation. Specifically, if the update operation is to add an environment variable, the update information includes the new environment variable input by the user; if the update operation is to change an environment variable, the update information includes the environment variable to be changed and its new value; if the update operation is to delete an environment variable, the update information includes the environment variable to be deleted. Next, the cloud platform publishes the update information to the message middleware. After the first edge cluster obtains the update information from the message middleware through a subscription, it updates its local environment variables according to the update information.
[0111] In actual implementation, steps 501-503 can be executed before or after step 305. If step 501 occurs before step 303, the environment variables obtained in step 303 are the updated environment variables. If steps 501-503 are executed after step 305, the first edge cluster detects whether the first application running within the first edge cluster is abnormal. If abnormal, the application template is updated according to the updated environment variables, and the first application is redeployed based on the updated application template. This embodiment of the application can meet the system change requirements of the edge cluster by updating environment variables.
[0112] In some embodiments, the number of the first edge clusters is at least two, see [link to previous document]. Figure 6 , Figure 6 This is an optional flowchart illustrating the application orchestration method provided in this application embodiment. After step 305, the method further includes: step 601, performing batch management on at least two first edge clusters to support the operation of the first application.
[0113] In actual implementation, see Figure 7 , Figure 7 This is an optional structural diagram of the application orchestration system provided in this application embodiment. The application orchestration system includes a cloud platform 701, a message middleware 702, and at least two first edge clusters (…). Figure 7 Only the first edge clusters 703 and 704 are shown. The cloud platform 701 includes a general agent module 7011 and a message manager 7012. The general agent module 7011 includes an interface service 70111, a management controller 70112, a resource collection module 70113, and an information management module 70114. The general agent module 7011 runs on the control plane of the cloud platform, and a single process can act as a proxy for multiple edge clusters. The general agent module 7011 internally includes a management controller for the edge proxies, which can manage the lifecycle of the proxy coroutines of the edge proxies by automatically detecting the status of each edge cluster. The general agent module 7011 also includes a resource collection module for collecting and statistically analyzing the resources of multiple edge clusters. Figure 7 The application orchestration system shown has been upgraded from a multi-process agent approach to a single-process multi-coroutine agent approach, significantly improving resource utilization. A management controller for the edge agents has been added, enabling lifecycle management of agent coroutines based on the actual operating status of the edge cluster. When the edge cluster enters maintenance or experiences unforeseen damage such as power outages or network interruptions, the system automatically detects and takes the agent coroutines offline, automatically bringing them back online when the edge cluster recovers. A resource collector has also been added, capable of calculating, statistically analyzing, and combining resource information from multiple edge clusters, providing effective resource statistics for cluster resource groups and providing fundamental data support for multi-tenant cross-cluster resource isolation.
[0114] In actual implementation, the cloud platform's control plane deploys the main program of the general agent module 7011, which includes the following services: Interface service 70111, used to provide access interface services for edge clusters; Management controller 70112, which provides a concurrency framework for coroutines and is responsible for the lifecycle management of edge cluster agent coroutines; Resource collection module 70113, used to control the collection and statistics of resources from multiple edge clusters; and Information management module 70114, responsible for publishing and subscribing to access messages and status messages from edge clusters. The edge cluster access process is as follows: the edge cluster access program is called to start the edge cluster access process. When the edge cluster access program completes the access, it notifies the general agent module 7011. There are two notification methods: one is the message publishing and subscription method, which publishes the access message to the message channel of the message middleware; the other is the REST API call method, which actively calls the API interface of the general agent module 7011 to notify the general agent module 7011 of the access message. The cloud platform control plane general agent module 7011 triggers the creation process of edge Kubernetes resource nodes and virtual-kubelet proxy coroutines by subscribing to edge messages or receiving edge REST API requests. Specifically, the cloud platform first assembles the edge cluster's status and resource information onto the node resources, and then creates an edge proxy through the Kubernetes interface. Taking a node resource defined as a Kubernetes Node as an example, the assembled node resources include the edge ID, edge name, edge scheduler address, edge scheduler port, edge cluster latency information, and edge resource information. The general agent module 7011 creates a proxy coroutine for the edge cluster, which is responsible for updating node resources and node status in real time. The cloud platform periodically calls the cluster status interface through the proxy coroutine to obtain the edge cluster's status information and update the node resource list. If the status information indicates that the edge cluster is unavailable, the cloud platform's general agent module 7011 automatically takes the proxy coroutine for that edge cluster offline, preventing unavailable edge clusters from consuming cloud resources.
[0115] In some embodiments, see Figure 8 , Figure 8 This is an optional flowchart illustrating the application orchestration method provided in this application embodiment. Characteristic 601 can also be implemented in the following ways:
[0116] Step 6011: Receive the computing task from the first application;
[0117] Step 6012: Determine the computing resources required to perform the computing task;
[0118] Step 6013: Obtain resource usage information for each of the at least two first edge clusters;
[0119] Step 6014: Based on the computing resources required to execute the computing task and the resource usage information of each first edge cluster, the computing task is split and distributed to at least two first edge clusters.
[0120] In practice, if a user issues an operation command to the first application, the first edge cluster generates a computing task for that application and sends it to the cloud platform via publish / subscribe. After receiving the computing task, the cloud platform determines the computing resources required to execute it. Then, it obtains resource usage information from at least two first edge clusters, which indicates the remaining computing resources of each cluster. Next, based on the resource usage information of the first edge clusters and the computing resources required to execute the task, the cloud platform splits the computing task and distributes it to multiple first edge clusters for execution. By allocating computing tasks by statistically analyzing the resources of multiple first edge clusters, efficient task execution can be achieved, thereby accelerating the operation of the first application.
[0121] In some embodiments, the orchestration information further includes the dependency relationship between the first application and at least one second application. After obtaining the orchestration information for the first application, the process further includes: obtaining partition information of at least two edge clusters; determining, based on the partition information, at least one second edge cluster that is in the same partition as the first edge cluster from the at least two edge clusters; and determining the at least one second edge cluster as an edge cluster that can be used to deploy the at least one second application.
[0122] In practical implementation, multiple edge clusters can also have different partitions, with one partition comprising one or more edge clusters. In this embodiment, multiple applications with interdependent relationships are deployed within the same partition of the edge cluster. Specifically, the cloud platform identifies at least one second application that is dependent on the first application, and based on the partition information of at least two edge clusters, identifies at least one second edge cluster located in the same partition as the first edge cluster. Then, it selects the edge cluster from the identified at least one second edge cluster to deploy the at least one second application. In this embodiment, the information of multiple edge clusters is calculated, statistically analyzed, and combined to provide effective resource statistics for edge cluster grouping, enabling multi-tenant cross-cluster resource isolation.
[0123] See Figure 9 , Figure 9 This is an optional flowchart illustrating an application orchestration method provided in an embodiment of this application. This embodiment provides an application orchestration method applied to a first edge cluster, including:
[0124] Step 901: Obtain the application template of the first application sent by the cloud platform through a publish-subscribe method. The application template includes the identification information of the first edge cluster, the strategy for deploying the first application, and the environment variables of the first edge cluster.
[0125] Step 902: Deploy the first application according to the application template.
[0126] The implementation process of this application embodiment is described in the relevant description in the above embodiments of this application, and will not be repeated here. In this application embodiment, the application template received by the first edge cluster from the cloud platform includes the identification information of the first edge cluster, the strategy for deploying the first application, and the environment variables of the first edge cluster. The first edge cluster can directly deploy the first application according to the application template without the need for corresponding personalized settings in the first edge cluster, such as the setting of environment variables. During application orchestration, the environment variable configuration of the edge cluster can be realized on the cloud platform, thereby simplifying the application orchestration process.
[0127] The following description continues to illustrate the exemplary structure of the application orchestration device 2055 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the application orchestration device 2055 of the memory 205 may include:
[0128] The first acquisition module 20551 acquires orchestration information for the first application, the orchestration information including the identification information of the first edge cluster and the strategy for deploying the first application;
[0129] Create module 20552 to create a corresponding application template based on the orchestration information;
[0130] The second obtaining module 20553 obtains the environment variables set for the first edge cluster, the environment variables being used to determine the operating environment of the first edge cluster's operating system;
[0131] Configuration module 20554 configures the environment variables into the application template to obtain the configured application template;
[0132] The sending module 20555 sends the configured application template to the first edge cluster via publish-subscribe.
[0133] In some embodiments, the first obtaining module 20551 is further configured to determine the resources required to deploy the first application; obtain resource information of at least one edge cluster; and determine the orchestration information based on the resources required to deploy the first application and the resource information of at least one edge cluster.
[0134] In some embodiments, the apparatus further includes: a verification module for verifying the environment variables; and a configuration module 20554 for configuring the environment variables into the application template based on the verification result.
[0135] In some embodiments, the apparatus further includes: an update module, configured to receive an update operation for environment variables set for the first edge cluster; obtain update information carried by the update operation, wherein the update operation includes one of the following: adding environment variables, changing environment variables, and deleting environment variables; and send the update information to the first edge cluster via a publish-subscribe mechanism.
[0136] In some embodiments, the number of the first edge clusters is at least two, and the apparatus further includes a batch management module for batch management of at least two first edge clusters to support the operation of the first application.
[0137] In some embodiments, the batch management module is further configured to receive computing tasks from the first application; determine the computing resources required to execute the computing tasks; obtain resource usage information of each of the at least two first edge clusters; and, based on the computing resources required to execute the computing tasks and the resource usage information of each first edge cluster, split the computing tasks and distribute them to at least two first edge clusters.
[0138] In some embodiments, the orchestration information further includes a dependency relationship between the first application and at least one second application, and the apparatus further includes: a determining module, configured to obtain partition information of at least two edge clusters; determine, based on the partition information, at least one second edge cluster from the at least two edge clusters that is in the same partition as the first edge cluster; and determine the at least one second edge cluster as an edge cluster that can be used to deploy the at least one second application.
[0139] This application also provides an application orchestration apparatus for a first edge cluster, comprising:
[0140] The acquisition module is used to obtain the application template of the first application sent by the cloud platform through a publish-subscribe method. The application template includes the identification information of the first edge cluster, the strategy for deploying the first application, and the environment variables of the first edge cluster.
[0141] The deployment module is used to deploy the first application according to the application template.
[0142] It should be noted that the description of the apparatus in this application embodiment is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, so it will not be repeated.
[0143] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the application orchestration method described in this application embodiment.
[0144] This application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored and, when executed by a processor, will cause the processor to execute the application orchestration method provided in this application.
[0145] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0146] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0147] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0148] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0149] In summary, the embodiments of this application enable the configuration of environment variables for edge clusters on the cloud platform during application orchestration, thereby simplifying the application orchestration process.
[0150] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. An application arrangement method, characterized in that, include: Obtain orchestration information for the first application, the orchestration information including the identification information of the first edge cluster and the strategy for deploying the first application; Based on the orchestration information, create the corresponding application template; Obtain the environment variables set for the first edge cluster, and verify the environment variables, which are used to determine the operating environment of the first edge cluster's operating system. The verified environment variables are configured into the application template to obtain the configured application template; The configured application template is sent to the first edge cluster via publish / subscribe. Wherein, the number of the first edge clusters is at least two, and the method further includes: Receive the computing task from the first application; Determine the computing resources required to perform the computing task; Obtain resource usage information for each of at least two first edge clusters; Based on the computing resources required to execute the computing task and the resource usage information of each first edge cluster, the computing task is split and distributed to at least two first edge clusters to support the operation of the first application.
2. The method according to claim 1, wherein obtaining orchestration information for the first application includes: Determine the resources required to deploy the first application; Obtain resource information for at least one edge cluster; The orchestration information is determined based on the resources required to deploy the first application and the resource information of at least one edge cluster.
3. The method according to claim 1, wherein configuring the verified environment variables into the application template includes: Based on the verification results, the verified environment variables are configured into the application template.
4. The method according to claim 1, further comprising: Receive update operations for environment variables set for the first edge cluster; Obtain the update information carried by the update operation, wherein the update operation includes one of the following: adding environment variables, changing environment variables, and deleting environment variables; The update information is sent to the first edge cluster via publish-subscribe.
5. The method according to claim 1, wherein the orchestration information further includes the dependency relationship between the first application and at least one second application, and after obtaining the orchestration information for the first application, it further includes: Obtain partition information for at least two edge clusters; Based on the partition information, at least one second edge cluster that is in the same partition as the first edge cluster is determined from the at least two edge clusters; The at least one second edge cluster is identified as an edge cluster capable of being used to deploy the at least one second application.
6. An application orchestration method applied to a first edge cluster, wherein the first edge cluster is one of at least two first edge clusters; the method includes: The application template of the first application sent by the cloud platform is obtained through a publish-subscribe method. The application template includes the identification information of the first edge cluster, the strategy for deploying the first application, and the verified environment variables of the first edge cluster. Deploy the first application according to the application template; Receive a portion of the computing tasks sent by the cloud platform; The aforementioned computing task is obtained by the cloud platform determining the computing resources required to execute the computing task based on the computing task of the first application, obtaining resource usage information of each of the at least two first edge clusters, and then splitting the computing task according to the computing resources required to execute the computing task and the resource usage information of each first edge cluster. Each of the first edge clusters is assigned a corresponding portion of the computing tasks to jointly support the operation of the first application.
7. A cloud platform, comprising: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the application orchestration method according to any one of claims 1 to 5.
8. A first edge cluster, comprising: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the application orchestration method of claim 6.
Citation Information
Patent Citations
Application arrangement method and storage medium
CN115509761A
Application deployment method and device
CN115993977A
