CN114625479A - Cloud edge collaborative application management method in edge computing and corresponding device - Google Patents

Cloud edge collaborative application management method in edge computing and corresponding device Download PDF

Info

Publication number
CN114625479A
CN114625479A CN202210179657.3A CN202210179657A CN114625479A CN 114625479 A CN114625479 A CN 114625479A CN 202210179657 A CN202210179657 A CN 202210179657A CN 114625479 A CN114625479 A CN 114625479A
Authority
CN
China
Prior art keywords
edge
virtual machine
target
application
cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210179657.3A
Other languages
Chinese (zh)
Inventor
张�杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Asiainfo Technologies China Inc
Original Assignee
Asiainfo Technologies China Inc
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 Asiainfo Technologies China Inc filed Critical Asiainfo Technologies China Inc
Priority to CN202210179657.3A priority Critical patent/CN114625479A/en
Publication of CN114625479A publication Critical patent/CN114625479A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • 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/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/502Proximity

Abstract

The embodiment of the application provides a cloud-edge collaborative application management method in edge computing and a corresponding device, wherein the method comprises the following steps: determining a target edge virtual machine list corresponding to application management, a target container cluster API Server component address and the number of application instances corresponding to each target edge virtual machine through a central cloud, and sending an application management instruction to an edge cloud; analyzing the application management instruction through the edge cloud to obtain a target edge virtual machine list, a target container cluster API Server component address and an application management instruction type; and if the type of the application management instruction is an application deployment instruction, creating a corresponding application instance based on the target container cluster API Server component address through the edge cloud, and creating a corresponding application instance based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine. The scheme unifies application management of different computing types, greatly improves operation and maintenance efficiency and reduces operation and maintenance cost.

Description

Cloud edge collaborative application management method in edge computing and corresponding device
Technical Field
The application relates to the technical field of computers, in particular to a cloud-edge collaborative application management method and a corresponding device in edge computing.
Background
Edge computing and cloud computing are respectively long, and cloud computing is good at global, non-real-time and long-period big data processing and analysis, and can play an advantage in the fields of long-period maintenance, business decision support and the like; the edge calculation is more suitable for processing and analyzing local, real-time and short-period data, and can better support real-time intelligent decision and execution of local services. Therefore, there is not an alternative relationship but a complementary synergistic relationship between edge computing and cloud computing. The edge computing and the cloud computing need to be matched with each other through close cooperation so as to better meet various demand scenes, and therefore the application value of the edge computing and the cloud computing is enlarged. The edge calculation is close to the execution unit, is a high-value data acquisition and primary processing unit required by the cloud, and can better support cloud application; on the contrary, the service rule or model output by cloud computing through big data analysis optimization can be issued to the edge side, and the edge computing is operated based on the new service rule or model.
Since the edge node is deployed at the edge side, there is usually only a virtualized resource pool formed by a plurality of servers, but various devices of the terminal access the edge platform through the edge side, and therefore, the pressure of resource shortage at the edge side is usually large. In many scenarios, such as medical, industrial, car networking, etc., many terminals, sensors are connected to the edge platform via a network. Higher requirements are put on the edge cloud. In the edge cloud, there are a large number of various edge servers and edge terminals, and it is necessary to perform unified management through the edge cloud and implement support for edge applications. The central cloud manages a plurality of edge cloud platforms, industrial PCs and a large number of gateways, and the edge cloud accesses various devices, sensors and the like through the edge gateways.
The cloud edge collaboration includes collaboration in aspects of computing resources, security policies, application management, service management and the like. The application management cooperation means that the edge node provides a network value-added application deployment and operation environment; and the cloud end realizes the life cycle management of the edge node value-added network application, including pushing, installing, uninstalling, updating and the like of the application. The central node can hatch and start the existing application images on different edge clouds to complete high-availability guarantee and hot migration of the applications. At present, in cloud-edge application management cooperation, edge computing resources are usually made into a container cluster in a cloud-native manner, and a cloud end is connected with an edge container cluster interface to perform installation deployment, life cycle management and the like of applications.
However, due to the diversity of edge computing resources, each edge cloud computing resource is different and may exist in a virtual machine or physical machine behavior, or exist in a container resource pool and a virtual machine resource in the same edge cloud, if a separate application management policy is executed for each edge cloud computing resource, the operation and maintenance efficiency will be greatly reduced, and the operation and maintenance cost will be improved, so it is urgently needed to provide a new cloud edge coordination management scheme.
Disclosure of Invention
The purpose of this application is to solve at least one of the above technical defects, and the technical solution provided by this application embodiment is as follows:
in a first aspect, an embodiment of the present application provides a cloud-edge collaborative application management method in edge computing, including:
determining a target edge virtual machine list corresponding to application management, a target container cluster API Server component address and the number of application instances corresponding to each target edge virtual machine through a central cloud, and sending an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address and the number of virtual machine instances corresponding to each target edge virtual machine to an edge cloud;
analyzing the application management instruction through the edge cloud to obtain a target edge virtual machine list, a target container cluster API Server component address and an application management instruction type;
if the type of the application management instruction is an application deployment instruction, a corresponding application instance is created through the edge cloud based on the target container cluster API Server component address, and a corresponding application instance is created based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine.
In an optional embodiment of the present application, determining, by the central cloud, a target edge virtual machine list, a target container cluster API Server component address, and an application instance number corresponding to each target edge virtual machine, where the target edge virtual machine list, the target container cluster API Server component address, and the application instance number correspond to each target edge virtual machine, includes:
when application deployment is carried out, acquiring application deployment configuration information and virtual machine resource conditions of each edge cloud through a center cloud;
determining the number of container instances, the number of virtual machine instances, and the number of CPUs (central processing units) and the number of memories required by each virtual machine instance based on the application configuration information; acquiring the corresponding number of available CPUs (central processing units), the number of available memories and the number of supported maximum virtual machine instances based on the resource condition of each edge virtual machine;
obtaining the corresponding available CPU quantity, the available memory quantity and the supported maximum virtual machine instance quantity based on the virtual machine instance quantity, the CPU quantity and the memory quantity required by each virtual machine instance and the resource condition of each edge virtual machine, determining a target edge virtual machine list and the application instance quantity corresponding to each target edge virtual machine, and determining to initiate a request instance copy parameter value to a target container cluster APIServer based on the container instance quantity.
In an optional embodiment of the present application, determining a target edge virtual machine list and an application instance number corresponding to each target edge virtual machine based on the virtual machine instance number, the CPU number and the memory number required by each virtual machine instance, and the maximum virtual machine instance number supported by the available CPU number, the available memory number, and the obtained virtual machine resource condition includes:
determining the edge virtual machines of which the number of available CPUs and the number of available memories in each edge virtual machine are not less than the number of CPUs and the number of memories required by each virtual machine instance as target edge virtual machines to be selected;
if the determined number of the target edge virtual machines to be selected is not less than the number of the virtual machine instances, randomly selecting the target edge virtual machines to be selected from the determined target edge virtual machines to be selected, wherein the number of the target edge virtual machines to be selected corresponds to the number of the virtual machine instances, determining the selected target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and the number of the application instances corresponding to each target edge virtual machine is 1;
and if the determined number of the target edge virtual machines to be selected is smaller than the number of the virtual machine instances, determining all the determined target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and distributing the corresponding number of the application instances based on the ratio of the maximum virtual machine instance number supported by each target edge virtual machine to be selected.
In an optional embodiment of the present application, creating, by an edge cloud, a corresponding application instance based on an API Server component address of a target container cluster, and creating a corresponding application instance based on a target virtual machine list and a virtual machine instance number corresponding to each target edge virtual machine includes:
calling an API (application program interface) Server component interface of the container cluster through the edge cloud, pulling a software image packet corresponding to the container instance from the edge software asset library through the API Server component interface of the container cluster, and installing the software image packet to a target container cluster corresponding to the API Server component address of the target container cluster;
and calling the edge agent of each target edge virtual machine through the edge cloud, pulling the software package corresponding to the virtual machine instance from the edge software asset library through the edge agent, and installing the software package to the corresponding target edge virtual machine.
In an optional embodiment of the present application, the method further comprises:
and if the software mirror image package corresponding to the container instance is not pulled from the edge software asset library through the container cluster interface and/or the software package corresponding to the virtual machine instance is not pulled from the edge software asset library through the edge proxy, acquiring the software mirror image package corresponding to the container instance and/or the software package corresponding to the virtual machine instance from the central cloud through the edge software asset library.
In an optional embodiment of the present application, the method further comprises:
if the type of the application management instruction is the application life cycle management instruction, calling a container cluster interface and edge agents of each target edge virtual machine through the edge cloud, executing the application life cycle management instruction on container instances in each target container through the container cluster interface, and executing the application life cycle management instruction on virtual machine instances in each target virtual machine through each edge agent.
In an optional embodiment of the present application, the method further comprises:
if the type of the application management instruction is an application service opening instruction, calling a container cluster interface and an edge proxy of each target edge virtual machine through an edge cloud, executing the application service opening instruction on container instances in each target container through the container cluster interface based on a reverse proxy Traefik proxy, and executing the application service opening instruction on virtual machine instances in each target virtual machine through each edge proxy based on the reverse proxy Traefik proxy.
In a second aspect, an embodiment of the present application provides an apparatus for managing cloud-edge collaborative application in edge computing, including:
the application management instruction issuing module is used for determining a target edge virtual machine list, a target container cluster API Server component address and the application instance number corresponding to each target edge virtual machine corresponding to application management through the central cloud, and sending an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address and the virtual machine instance number corresponding to each target edge virtual machine to the edge cloud;
the application management instruction type determining module is used for analyzing the application management instruction through the edge cloud to obtain a target edge virtual machine list, a target container cluster API Server component address and an application management instruction type;
and the application deployment module is used for creating a corresponding application instance based on the target container cluster API Server component address through the edge cloud and creating a corresponding application instance based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine if the type of the application management instruction is the application deployment instruction.
In an optional embodiment of the present application, the application management instruction issuing module is specifically configured to:
when application deployment is carried out, acquiring application deployment configuration information and virtual machine resource conditions of each edge cloud through a center cloud;
determining the number of container instances, the number of virtual machine instances, and the number of CPUs (central processing units) and the number of memories required by each virtual machine instance based on the application configuration information; acquiring the corresponding number of available CPUs (central processing units), the number of available memories and the number of supported maximum virtual machine instances based on the resource condition of each edge virtual machine;
and determining a target edge virtual machine list and the number of application instances corresponding to each target edge virtual machine based on the number of virtual machine instances, the number of CPUs (central processing units) and memories required by each virtual machine instance and the maximum number of virtual machine instances supported by each edge virtual machine resource condition, and determining the address of the API Server component of the target container cluster based on the number of container instances.
In an optional embodiment of the present application, the application management instruction issuing module is further configured to:
determining the edge virtual machines of which the number of available CPUs and the number of available memories in each edge virtual machine are not less than the number of CPUs and the number of memories required by each virtual machine instance as target edge virtual machines to be selected;
if the determined number of the target edge virtual machines to be selected is not less than the number of the virtual machine instances, randomly selecting the target edge virtual machines to be selected from the determined target edge virtual machines to be selected, wherein the number of the target edge virtual machines to be selected corresponds to the number of the virtual machine instances, determining the selected target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and the number of the application instances corresponding to each target edge virtual machine is 1;
and if the determined number of the target edge virtual machines to be selected is smaller than the number of the virtual machine instances, determining all the determined target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and distributing the corresponding number of the application instances based on the ratio of the maximum virtual machine instance number supported by each target edge virtual machine to be selected.
In an optional embodiment of the present application, the application deployment module is specifically configured to:
calling an API (application program interface) Server component interface of the container cluster through the edge cloud, pulling a software image packet corresponding to the container instance from the edge software asset library through the API Server component interface of the container cluster, and installing the software image packet to a target container cluster corresponding to the API Server component address of the target container cluster;
and calling the edge agent of each target edge virtual machine through the edge cloud, pulling the software package corresponding to the virtual machine instance from the edge software asset library through the edge agent, and installing the software package to the corresponding target edge virtual machine.
In an optional embodiment of the present application, the application deployment module is further configured to:
and if the software mirror image package corresponding to the container instance is not pulled from the edge software asset library through the container cluster interface and/or the software package corresponding to the virtual machine instance is not pulled from the edge software asset library through the edge agent, acquiring the software mirror image package corresponding to the container instance and/or the software package corresponding to the virtual machine instance from the central cloud through the edge software asset library.
In an optional embodiment of the present application, the apparatus further comprises an application lifecycle management module to:
if the type of the application management instruction is an application life cycle management instruction, calling a container cluster interface and an edge proxy of each target edge virtual machine through an edge cloud, executing the application life cycle management instruction on a container instance in each target container through the container cluster interface, and executing the application life cycle management instruction on a virtual machine instance in each target virtual machine through each edge proxy.
In an optional embodiment of the present application, the apparatus further includes an application service opening module, configured to:
if the type of the application management instruction is an application service opening instruction, calling the container cluster interface and the edge agents of the target edge virtual machines through the edge cloud, executing the application service opening instruction on the container instances in the target containers through the container cluster interface based on a reverse agent Traeik proxy, and executing the application service opening instruction on the virtual machine instances in the target virtual machines through the edge agents based on the reverse agent Traeik proxy.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor;
the memory has a computer program stored therein;
a processor configured to execute a computer program to implement the method provided in the embodiment of the first aspect or any optional embodiment of the first aspect.
In a fourth aspect, this application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method provided in the embodiments of the first aspect or any optional embodiment of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device when executing implements the method provided in the embodiment of the first aspect or any optional embodiment of the first aspect.
The beneficial effect that technical scheme that this application provided brought is:
determining a target container cluster API Server component address, a target edge virtual machine list and the number of virtual machine instances corresponding to each edge virtual machine corresponding to application management through a center cloud, sending the determined information to the edge cloud, analyzing the information through the edge cloud, performing corresponding application management according to application management types, creating a corresponding application instance based on the target container cluster API Server component address through the edge cloud when application deployment is needed, and creating a corresponding application instance based on the target virtual machine list and the number of virtual machine instances corresponding to each target edge virtual machine, namely completing the application deployment. According to the scheme, after the application management related information is determined in a unified mode through the cloud end, the edge end is used for executing in a unified mode, application management does not need to be carried out independently according to the computing resource types of the edge nodes, namely the application management of different computing types is unified, the operation and maintenance efficiency is greatly improved, and the operation and maintenance cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is an architecture diagram of a cloud-edge collaborative application management system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a cloud-edge collaborative application management method in edge computing according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a resource scheduler performing resource scheduling according to an example of an embodiment of the present application;
FIG. 4 is a flowchart illustrating application deployment in an example of an embodiment of the present application;
FIG. 5 is a flowchart illustrating application lifecycle management in an example according to an embodiment of the present application;
fig. 6 is a schematic flowchart illustrating opening of an application service in an example of an embodiment of the present application;
fig. 7 is a block diagram illustrating a structure of a cloud-edge collaborative application management apparatus in edge computing according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is an architecture diagram of a cloud-edge collaborative application management system according to an embodiment of the present application, where the system is a basis for implementing a cloud-edge collaborative application management method in edge computing provided by the present application, and the system is divided into a cloud end and an edge end.
Specifically, the cloud end is provided with a cloud control console (hereinafter, a central cloud), including: the system comprises a software asset management module, an edge host management module, an edge container cluster management interface module, an edge service open management module, an edge application life cycle management module and a resource scheduler module. Specifically, the functions and roles of the respective modules are as follows:
software asset library management module: two types of resources, namely mirror image resources and software packages, are unified, the main attributes of a software asset model comprise a software asset number, a software asset name, an introduction and an icon, the software assets under the same number can comprise software assets of different versions, for example, a business application A comprises versions 1.0 and 1.1, and a software mirror image package and a software package (a war package or a jar package of the business application and an operating environment required by JDK or C + + development required by a related operating environment such as a java application operating environment) are correspondingly arranged under each version. Through the basic information of the configurable business application of the software asset library and the uploading and downloading of business applications with different versions, the software asset library management module can release an interface to interface with a Development and Operations (which is a general term for processes, methods and systems) platform CI/CD (continuous integration/continuous deployment) pipeline.
The edge host management module: the method comprises information maintenance such as edge virtual machine or physical machine IP, edge host open port range, edge host account number and password, CPU, memory, available CPU, available memory and the like.
Edge container cluster management interface module: edge of a container
An edge service opening module: after the application on the edge host is started, the edge service open configuration file is updated in real time according to the open strategy configured by the cloud console, so that the purposes of load balancing, current limiting and the like of the edge application are achieved.
The edge application lifecycle management module: the method mainly comprises edge application template management and edge application life cycle management. The application template management unifies the configuration of the virtual machine application and the container application, and the template mainly comprises application basic information configuration, resource configuration information and runtime configuration. The application base information attribute contains an application code, an application name, and description information. The application resource configuration information includes template-associated software asset selection, software asset version selection, the number of CPUs required for running a single application, the number of memories, and network configuration (container port, protocol, whether to start load balancing, etc.). The application runtime configuration includes elastic expansion and contraction capacity configuration (initial copy, maximum copy, minimum copy, expansion and contraction capacity index, etc.), environment variable configuration, health detection configuration (detection period configuration, detection execution command, etc.), and script configuration (deployment script, start script, stop script, etc.). The edge application lifecycle management refers to operations such as deployment, start, stop, and uninstall of an application deployed at an edge, the deployment container application instance proportion and the virtual application instance proportion can be configured when the application is deployed, and a background scheduler performs resource scheduling according to the proportions.
The resource scheduler module: and calculating the number of the container instances and the number of the virtual machine instances according to the number of the copies of the application deployment configuration (namely the total number of the instances of the application) and the proportion of the container to the virtual machine application instances. The virtual machine instance calculates a virtual machine host list according to available CPU, memory and storage information in the virtual machine host pool, and the number of instances deployed on each host.
Specifically, an edge EdgeServer, an edge software asset library, an edge service gateway, an edge host, and an edge EdgeAgent are provided at the edge. Specifically, the functions and roles of the respective modules are as follows:
edge EdgeServer: the edge EdgeServer mainly receives an application management instruction issued by the cloud console, analyzes the type of the instruction to be executed, and schedules the instruction according to the number of virtual machine instances and the number of container instances calculated by the scheduler if the instruction is installed and deployed. When the virtual machine instance deploys or executes the startup and shutdown, the edge EdgeServer sends a command to the edge EdgeAgent according to a GRPC (Remote Procedure Call) protocol, and the edge EdgeAgent executes related operations after receiving the command. When the container instance is deployed or executed, a container cluster interface (for example, K3S (lightweight kubernets) API) is called to execute related operations, the container cluster interface or container cluster API Server component interface is called, each container cluster has a cluster API Server component interface address, and the interface address can be called to perform operations such as deployment and upgrade of an application. It should be noted that the container cluster may also be K8S or another container cluster, which may be selected according to actual needs, and is not limited in the embodiment of the present application.
Edge software asset library: the method is used as the cache of the cloud software warehouse, and avoids the blockage of the cloud edge cooperative channel caused by directly pulling all software assets from the cloud warehouse. When the application is installed and deployed, the edge software asset library is firstly removed to pull the software resources, if the software resources needing to be installed cannot be found in the edge software asset library, the edge software asset library initiates a request to synchronize the needed software resources from the software asset library management module at the cloud end to the edge asset library, and the installation is started after the synchronization is finished.
Edge service gateway: the proxy layer accessed by the edge application can realize the capacities of load balance, flow control, gray release and the like of the edge application service through service open configuration.
The edge host: the edge virtual machine resource or the edge physical machine is used by the scheduler resource in scheduling calculation.
Edge agent: each edge virtual machine sets a corresponding edge agent for operations such as called execution instance installation and application life cycle management.
It should be noted that the cloud and the edge are connected by a dedicated line, the edge is only an edge EdgeServer, the edge software asset library can be connected to the cloud by the dedicated line, and other operations all need to forward a request by the edge EdgeServer.
Because of the security requirement, the edge host cannot open an SSH (Secure Shell) protocol port, and in this embodiment, the edge proxy of the edge host opens a common port and receives an instruction sent by the edge EdgeServer based on a GRPC protocol.
It can be understood that, under the coordination of cloud edge, the system shields the deployment difference of the edge host (virtual machine/physical machine) and the container application, provides consistent application management operation experience, unifies the software asset model and the application template model, and realizes the unified scheduling of the edge and container resources by realizing the unified resource scheduler algorithm of the virtual machine and the container.
The edge computing cloud-edge collaborative application management method provided by the present application will be described in detail based on the above system, functions of each module in the system, and interactions among the modules.
Fig. 2 is a schematic flowchart of a method for managing cloud-edge collaborative application in edge computing according to an embodiment of the present application, and as shown in fig. 2, the method includes:
step S201, determining, by the central cloud, a target edge virtual machine list corresponding to application management, a target container cluster API Server component address, and an application instance number corresponding to each target edge virtual machine, and sending an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address, and the virtual machine instance number corresponding to each target edge virtual machine to the edge cloud.
The central cloud is the cloud console in the foregoing, and the operation and maintenance personnel can configure application management configuration information through an operation interface of the central cloud.
The edge cloud is more specifically the edge EdgeServer described above, and can communicate with the central cloud and call the edge proxy and the container cluster interface of each virtual machine.
Wherein, due to different computing resources, the application instance can have a virtual machine instance and a container instance.
Specifically, after the central cloud receives the application management configuration information uploaded by the operation and maintenance personnel, a target edge virtual machine list corresponding to the application management, a target container cluster API Server component address and the number of virtual machine examples corresponding to each target edge virtual machine are determined. And then, the central cloud carries the determined information in an application control instruction and sends the application control instruction to the edge cloud.
Step S202, analyzing the application management instruction through the edge cloud, and acquiring a target edge virtual machine list, a target container cluster API Server component address and an application management instruction type.
Specifically, there are various types of application management instructions, including application deployment, application lifecycle management, and application service opening. After receiving the application management to command, the edge cloud analyzes the application management to obtain the command type, the edge virtual machine list carried in the command type and the target container cluster API Server component address.
Step S203, if the type of the application management instruction is an application deployment instruction, a corresponding application instance is created through the edge cloud based on the target container cluster API Server component address, and a corresponding application instance is created based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine.
Specifically, if the type of the application management instruction is an application deployment instruction, and application deployment is required, a container instance is created in a corresponding target container according to a target container cluster API Server component address, and a virtual machine instance is created in a corresponding target virtual machine according to a target virtual machine list.
According to the scheme provided by the embodiment of the application, the target container cluster API Server component address, the target edge virtual machine list and the corresponding virtual machine instance number in each edge virtual machine corresponding to the application management are determined through the center cloud, the determined information is sent to the edge cloud, after the edge cloud is analyzed, corresponding application management is carried out according to the application management type, when application deployment is needed, the corresponding application instance is created through the edge cloud based on the target container cluster API Server component address, the corresponding application instance is created based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine, and therefore the application deployment is completed. According to the scheme, after the application management related information is determined in a unified mode through the cloud end, the edge end is used for executing in a unified mode, application management does not need to be carried out independently according to the computing resource types of the edge nodes, namely application management of different computing types is unified, operation and maintenance efficiency is greatly improved, and operation and maintenance cost is reduced.
In an optional embodiment of the present application, determining, by the central cloud, a target edge virtual machine list, a target container cluster API Server component address, and an application instance number corresponding to each target edge virtual machine, where the target edge virtual machine list, the target container cluster API Server component address, and the application instance number correspond to each target edge virtual machine, includes:
when application deployment is carried out, acquiring application deployment configuration information and virtual machine resource conditions of each edge cloud through a center cloud;
determining the number of container instances, the number of virtual machine instances, and the number of CPUs (central processing units) and the number of memories required by each virtual machine instance based on the application configuration information; acquiring the corresponding number of available CPUs (central processing units), the number of available memories and the number of supported maximum virtual machine instances based on the resource condition of each edge virtual machine;
obtaining the corresponding available CPU quantity, the available memory quantity and the supported maximum virtual machine instance quantity based on the virtual machine instance quantity, the CPU quantity and the memory quantity required by each virtual machine instance and the resource condition of each edge virtual machine, determining a target edge virtual machine list and the application instance quantity corresponding to each target edge virtual machine, and determining the target container cluster API Server component address based on the container instance quantity.
Specifically, the target container cluster API Server component address may be determined according to the number of container instances that need to be deployed when the application is deployed. And matching the target edge virtual machines with proper resource conditions according to the number of virtual machine instances required to be deployed during application deployment, the number of CPUs (central processing units) and the number of memories required by each virtual machine instance so as to determine a target edge virtual machine list.
Specifically, determining a target edge virtual machine list and the number of application instances corresponding to each target edge virtual machine based on the number of virtual machine instances, the number of CPUs and the number of memories required by each virtual machine instance, and the number of available CPUs, the number of available memories, and the maximum number of virtual machine instances supported by each edge virtual machine resource condition, specifically includes:
determining the edge virtual machines of which the number of available CPUs and the number of available memories in each edge virtual machine are not less than the number of CPUs and the number of memories required by each virtual machine instance as target edge virtual machines to be selected;
if the determined number of the target edge virtual machines to be selected is not less than the number of the virtual machine instances, randomly selecting the target edge virtual machines to be selected from the determined target edge virtual machines to be selected, wherein the number of the target edge virtual machines to be selected corresponds to the number of the virtual machine instances, determining the selected target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and the number of the application instances corresponding to each target edge virtual machine is 1;
and if the determined number of the target edge virtual machines to be selected is smaller than the number of the virtual machine instances, determining all the determined target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and distributing the corresponding number of the application instances based on the ratio of the maximum virtual machine instance number supported by each target edge virtual machine to be selected.
For example, as shown in fig. 3, when an application a needs to be deployed, the central cloud creates the application a, and configures that the number of CPUs used for running the application a is 2, the number of memories is 3, 10 initial deployment copies of the application (i.e., the total number of application instances is 10), the number of virtual machine instances accounts for 70%, and the number of container instances accounts for 30%. And calculating the number of virtual machine application instances 7 and the number of container application instances 3 according to the total copy number of the application A and the occupation ratio of the virtual machines to the container instances.
The virtual machine application firstly screens out the host which meets the requirement of the application A on deploying resources from the edge virtual machine list according to the number of available CPUs (192.168.1.101, 192.168.1.102, 192.168.1.104, 192.168.1.105) and the number of available memories of the virtual machine per day. And if the screened host number is greater than the virtual machine application example number 7, deploying one application A example by each host by adopting a random distribution method. In fact, only 4 machines satisfy the condition, the maximum number of instances of the application a that can be deployed on each machine is calculated (i.e., the maximum number of instances of the virtual machine that can be supported), and the number of instances deployed on each host is allocated according to the maximum deployable instances by a weighted average allocation algorithm, in this example, the instances are allocated as follows (192.168.1.101 deploys 1 instance, 192.168.1.102 deploys two instances, 192.168.1.104 deploys 1 instance, 192.168.1.105 deploys 3 instances). And generating a resource deployment list, namely the virtual host list, the number of the deployment instances of each container and the number of the deployment instances of the container, and sending the resource deployment list to the edge EdgeServer. And the deployment of the container instance calls a K3S container cluster interface to create the container instance, and the deployment of the virtual machine instance calls the edge proxy corresponding to each edge virtual machine in the target edge virtual machine list respectively to complete the creation of the application.
It should be noted that, in this example, there is no specific description on the central cloud prompting of the resource deficiency condition and the dynamic adjustment of the number of application instances, which aims to describe that the container and the virtual machine resource are uniformly scheduled by the resource scheduler, so as to shield the scheduling difference, and the related scheduling algorithm may have different implementation manners, and the embodiment of the present application is not limited.
In an optional embodiment of the present application, creating, by an edge cloud, a corresponding application instance based on an API Server component address of a target container cluster, and creating a corresponding application instance based on a target virtual machine list and a virtual machine instance number corresponding to each target edge virtual machine includes:
calling an API (application program interface) Server component interface of the container cluster through the edge cloud, pulling a software image packet corresponding to the container instance from the edge software asset library through the API Server component interface of the container cluster, and installing the software image packet to a target container cluster corresponding to the API Server component address of the target container cluster;
and calling the edge proxy of each target edge virtual machine through the edge cloud, pulling the software package corresponding to the virtual machine instance from the edge software asset library through the edge proxy, and installing the software package to the corresponding target edge virtual machine.
Specifically, when application deployment is performed, for the deployment of a container instance, the edge cloud needs to call a container cluster interface to complete, and for the deployment of a virtual machine instance, the edge cloud needs to call an edge agent of each target edge virtual machine to complete.
Further, if the software image package corresponding to the container instance is not pulled from the edge software asset library through the container cluster interface, and/or the software package corresponding to the virtual machine instance is not pulled from the edge software asset library through the edge agent, the software image package corresponding to the container instance and/or the software package corresponding to the virtual machine instance is obtained from the central cloud through the edge software asset library.
Specifically, as shown in fig. 4, an operation and maintenance person issues an application deployment instruction in a cloud console, and sends an instruction data packet to an edge EdgeServer in a GRPC protocol through a cloud edge cooperative channel.
The edge EdgeServer analyzes the received instruction packet, and analyzes an instruction type (application installation and deployment type), the virtual machine instance number, an edge virtual machine list and a container instance number.
And if the target is the virtual machine, sending deployment instruction information to all virtual machine Agent agents in a GRPC protocol. The edge virtual machine Agent receives the instruction sent by the edge gateway, analyzes the instruction type as application installation deployment, firstly judges whether an application operation dependent environment (c + +/java/python and the like) is installed, executes an application installation command if the application operation dependent environment is installed, and otherwise, executes the application operation dependent environment installation firstly and then executes the application installation. And pulling the software package required by the running environment from an edge software warehouse (namely an edge software asset library) according to the type of the running environment, and if the edge software warehouse has the corresponding software package, initiating software package installation.
If the target is a container, the container cluster management interface (i.e., the container K3S cluster management API interface) is invoked to execute the corresponding install command.
When the edge virtual machine Agent and the container execute the installation command, the edge software warehouse pulls software resources, and when the edge software warehouse does not have the needed software resources, the edge software warehouse initiates a request to a cloud software warehouse (namely a software asset management module of the cloud), synchronizes the needed software package to the edge software warehouse and caches the software package, and then initiates software resource installation.
After the application installation and deployment are completed, the edge server sends an application installation and deployment completion state to the cloud control console through the cloud edge cooperative channel, and the cloud control console updates the application installation and deployment task state.
In an optional embodiment of the present application, the method may further comprise:
if the type of the application management instruction is the application life cycle management instruction, calling a container cluster interface and edge agents of each target edge virtual machine through the edge cloud, executing the application life cycle management instruction on container instances in each target container through the container cluster interface, and executing the application life cycle management instruction on virtual machine instances in each target virtual machine through each edge agent.
Specifically, as shown in fig. 5, an operation and maintenance person issues an application lifecycle management instruction at a cloud console, and sends an instruction data packet to an edge EdgeServer through a cloud edge cooperative channel in a GRPC protocol.
The edge EdgeServer analyzes the received instruction packet to obtain an instruction type (application life cycle management type) and an execution target.
If the execution target is a virtual machine, the deployment instruction information is sent to all virtual machine Agent agents (namely edge agents) in the list by using a GRPC protocol, and the edge virtual machine Agent agents receive the instruction sent by the edge EdgeServer, analyze that the instruction type is an application life cycle management type, and a specific command (start/stop/restart/unload), and then execute the specific command on the edge virtual machine.
If the execution target is a container, calling the container management control API interface to execute a corresponding command (start/stop/restart/unload).
And after the application life cycle management operation is completed, the edge edgeServer sends an application life cycle completion state to the cloud control console through the cloud edge cooperative channel, and the cloud control console updates the application life cycle operation task state.
In an optional embodiment of the present application, the method may further comprise:
if the type of the application management instruction is an application service opening instruction, calling the container cluster interface and the edge agents of the target edge virtual machines through the edge cloud, executing the application service opening instruction on the container instances in the target containers through the container cluster interface based on a reverse agent Traeik proxy, and executing the application service opening instruction on the virtual machine instances in the target virtual machines through the edge agents based on the reverse agent Traeik proxy.
Specifically, as shown in fig. 6, the external exposure of the edge application (container application, virtual machine application) may be completed by using a Traefik Proxy, which supports separately configuring an open policy for two types of virtual machine application service and container application service, and implements dynamic validation of the policy by cooperatively generating a configuration file for the policy on the edge or creating a resource of ingresroute in K3S, and implementing service opening through a service gateway.
And the operation and maintenance personnel issue a service opening instruction at the cloud console, and send an instruction data packet to the edge EdgeServer through the cloud edge cooperative channel by using the GRPC protocol.
The edge gateway analyzes the received command packet to obtain a command type (service open type) and an execution target.
And if the target is the virtual machine, generating a service open configuration file through the template, and sending the file to the virtual machine agent EdgeAgent of all target virtual machine lists by using a GRPC protocol. The edge virtual machine agent EdgeAgent passes the File to the Traefik proxy under the auto discovery directory (i.e., Traefik Providers File).
If the target is a container, then the container management control API interface is invoked to create the resource of ingresroute directly in K3S, determine which traefik proxy to request load by specifying a different label for ingresroute, and grayscale publishing will also be based on traefik proxy.
Fig. 7 is a block diagram of a structure of an apparatus for managing cloud-edge collaborative application in edge computing according to an embodiment of the present application, and as shown in fig. 7, the apparatus 700 may include: an application management instruction issuing module 701, an application management instruction type determining module 702, and an application deployment module 703, wherein:
the application management instruction issuing module 701 is configured to determine, through the central cloud, a target edge virtual machine list corresponding to application management, a target container cluster API Server component address, and the number of application instances corresponding to each target edge virtual machine, and send an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address, and the number of virtual machine instances corresponding to each target edge virtual machine to the edge cloud;
the application management instruction type determining module 702 is configured to analyze an application management instruction through an edge cloud, and obtain a target edge virtual machine list, a target container cluster API Server component address, and an application management instruction type;
the application deployment module 703 is configured to create, if the type of the application management instruction is an application deployment instruction, a corresponding application instance based on the target container cluster API Server component address through the edge cloud, and create a corresponding application instance based on the target virtual machine list and the number of virtual machine instances corresponding to each target edge virtual machine.
According to the scheme provided by the embodiment of the application, the target container cluster API Server component address, the target edge virtual machine list and the corresponding virtual machine instance number in each edge virtual machine corresponding to the application management are determined through the center cloud, the determined information is sent to the edge cloud, after the edge cloud is analyzed, corresponding application management is carried out according to the application management type, when application deployment is needed, the corresponding application instance is created through the edge cloud based on the target container cluster API Server component address, the corresponding application instance is created based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine, and therefore the application deployment is completed. According to the scheme, after the application management related information is determined in a unified mode through the cloud end, the edge end is used for executing in a unified mode, application management does not need to be carried out independently according to the computing resource types of the edge nodes, namely the application management of different computing types is unified, the operation and maintenance efficiency is greatly improved, and the operation and maintenance cost is reduced.
In an optional embodiment of the present application, the application management instruction issuing module is specifically configured to:
when application deployment is carried out, acquiring application deployment configuration information and virtual machine resource conditions of each edge cloud through a center cloud;
determining the number of container instances, the number of virtual machine instances, and the number of CPUs (central processing units) and the number of memories required by each virtual machine instance based on the application configuration information; acquiring the corresponding number of available CPUs (central processing units), the number of available memories and the number of supported maximum virtual machine instances based on the resource condition of each edge virtual machine;
obtaining the corresponding available CPU quantity, the available memory quantity and the supported maximum virtual machine instance quantity based on the virtual machine instance quantity, the CPU quantity and the memory quantity required by each virtual machine instance and the resource condition of each edge virtual machine, determining a target edge virtual machine list and the application instance quantity corresponding to each target edge virtual machine, and determining the target container cluster API Server component address based on the container instance quantity.
In an optional embodiment of the present application, the application management instruction issuing module is further configured to:
determining the edge virtual machines of which the number of available CPUs and the number of available memories in each edge virtual machine are not less than the number of CPUs and the number of memories required by each virtual machine instance as target edge virtual machines to be selected;
if the determined number of the target edge virtual machines to be selected is not less than the number of the virtual machine instances, randomly selecting the target edge virtual machines to be selected from the determined target edge virtual machines to be selected, wherein the number of the target edge virtual machines to be selected corresponds to the number of the virtual machine instances, determining the selected target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and the number of the application instances corresponding to each target edge virtual machine is 1;
and if the determined number of the target edge virtual machines to be selected is smaller than the number of the virtual machine instances, determining all the determined target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and distributing the corresponding number of the application instances based on the ratio of the maximum virtual machine instance number supported by each target edge virtual machine to be selected.
In an optional embodiment of the present application, the application deployment module is specifically configured to:
calling an API (application program interface) Server component interface of the container cluster through the edge cloud, pulling a software image packet corresponding to the container instance from the edge software asset library through the API Server component interface of the container cluster, and installing the software image packet to a target container cluster corresponding to the API Server component address of the target container cluster;
and calling the edge agent of each target edge virtual machine through the edge cloud, pulling the software package corresponding to the virtual machine instance from the edge software asset library through the edge agent, and installing the software package to the corresponding target edge virtual machine.
In an optional embodiment of the present application, the application deployment module is further configured to:
and if the software mirror image package corresponding to the container instance is not pulled from the edge software asset library through the container cluster interface and/or the software package corresponding to the virtual machine instance is not pulled from the edge software asset library through the edge agent, acquiring the software mirror image package corresponding to the container instance and/or the software package corresponding to the virtual machine instance from the central cloud through the edge software asset library.
In an optional embodiment of the present application, the apparatus further comprises an application lifecycle management module to:
if the type of the application management instruction is the application life cycle management instruction, calling a container cluster interface and edge agents of each target edge virtual machine through the edge cloud, executing the application life cycle management instruction on container instances in each target container through the container cluster interface, and executing the application life cycle management instruction on virtual machine instances in each target virtual machine through each edge agent.
In an optional embodiment of the present application, the apparatus further includes an application service opening module, configured to:
if the type of the application management instruction is an application service opening instruction, calling the container cluster interface and the edge agents of the target edge virtual machines through the edge cloud, executing the application service opening instruction on the container instances in the target containers through the container cluster interface based on a reverse agent Traeik proxy, and executing the application service opening instruction on the virtual machine instances in the target virtual machines through the edge agents based on the reverse agent Traeik proxy.
Referring now to fig. 8, shown is a schematic diagram of an electronic device (e.g., a terminal device or a server performing the method shown in fig. 2) 800 suitable for implementing embodiments of the present application. The electronic device in the embodiments of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), a wearable device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
The electronic device includes: a memory for storing a program for executing the method of the above-mentioned method embodiments and a processor; the processor is configured to execute programs stored in the memory. The processor may be referred to as a processing device 801 described below, and the memory may include at least one of a Read Only Memory (ROM)802, a Random Access Memory (RAM)803, and a storage device 808, which are described below:
as shown in fig. 8, an electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. When executed by the processing apparatus 801, the computer program performs the above-described functions defined in the method of the embodiment of the present application.
It should be noted that the computer readable storage medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining a target edge virtual machine list corresponding to application management, a target container cluster API Server component address and the number of application instances corresponding to each target edge virtual machine through a central cloud, and sending an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address and the number of virtual machine instances corresponding to each target edge virtual machine to an edge cloud; analyzing the application management instruction through the edge cloud to obtain a target edge virtual machine list, a target container cluster API Server component address and an application management instruction type; and if the type of the application management instruction is an application deployment instruction, creating a corresponding application instance based on the target container cluster API Server component address through the edge cloud, and creating a corresponding application instance based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present application may be implemented by software or hardware. Where the name of a module or unit does not in some cases constitute a limitation of the unit itself, for example, the first program switching module may also be described as a "module for switching the first program".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific method implemented by the computer-readable medium described above when executed by the electronic device may refer to the corresponding process in the foregoing method embodiments, and will not be described herein again.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device realizes the following when executed:
determining a target edge virtual machine list corresponding to application management, a target container cluster API Server component address and the number of application instances corresponding to each target edge virtual machine through a central cloud, and sending an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address and the number of virtual machine instances corresponding to each target edge virtual machine to an edge cloud; analyzing the application management instruction through the edge cloud to obtain a target edge virtual machine list, a target container cluster API Server component address and an application management instruction type; and if the type of the application management instruction is an application deployment instruction, creating a corresponding application instance based on the target container cluster API Server component address through the edge cloud, and creating a corresponding application instance based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and embellishments can be made without departing from the principle of the present invention, and these should also be construed as the scope of the present invention.

Claims (10)

1. A cloud edge collaborative application management method in edge computing is characterized by comprising the following steps:
determining a target edge virtual machine list corresponding to application management, a target container cluster API Server component address and the number of application instances corresponding to each target edge virtual machine through a central cloud, and sending an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address and the number of virtual machine instances corresponding to each target edge virtual machine to an edge cloud;
analyzing the application management instruction through the edge cloud to obtain the target edge virtual machine list, the target container cluster API Server component address and the application management instruction type;
if the type of the application management instruction is an application deployment instruction, creating a corresponding application instance through the edge cloud based on the target container cluster API Server component address, and creating a corresponding application instance based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine.
2. The method of claim 1, wherein determining, by the central cloud, a list of target edge virtual machines to which the application management corresponds, a target container cluster API Server component address, and a number of application instances to which each target edge virtual machine corresponds comprises:
when application deployment is carried out, acquiring application deployment configuration information and virtual machine resource conditions of each edge cloud through the center cloud;
determining the number of container instances, the number of virtual machine instances, and the number of CPUs and memories required by each virtual machine instance based on the application configuration information; acquiring the corresponding number of available CPUs (central processing units), the number of available memories and the number of supported maximum virtual machine instances based on the resource condition of each edge virtual machine;
and acquiring the corresponding available CPU quantity, the available memory quantity and the supported maximum virtual machine instance quantity based on the virtual machine instance quantity, the CPU quantity and the memory quantity required by each virtual machine instance and the resource condition of each edge virtual machine, determining a target edge virtual machine list and the application instance quantity corresponding to each target edge virtual machine, and determining to initiate a request instance copy parameter value to a target container cluster APIServer based on the container instance quantity.
3. The method of claim 2, wherein determining the target edge vm list and the number of application instances corresponding to each target edge vm based on the number of vm instances, the number of CPUs and the number of memories required for each vm instance, and the number of available CPUs, the number of available memories, and the maximum number of vm instances supported for acquiring the corresponding number of edge vm resource conditions comprises:
determining the edge virtual machines of which the number of available CPUs and the number of available memories are not less than the number of CPUs and the number of memories required by each virtual machine instance as target edge virtual machines to be selected;
if the determined number of the target edge virtual machines to be selected is not less than the number of the virtual machine instances, randomly selecting the target edge virtual machines to be selected from the determined target edge virtual machines to be selected, wherein the number of the target edge virtual machines to be selected corresponds to the number of the virtual machine instances, determining the selected target edge virtual machines to be selected as target edge virtual machines in the target edge virtual machine list, and the number of application instances corresponding to each target edge virtual machine is 1;
if the determined number of the target edge virtual machines to be selected is smaller than the virtual machine instance number, determining all the determined target edge virtual machines to be selected as the target edge virtual machines in the target edge virtual machine list, and distributing the corresponding application instance number based on the ratio of the maximum virtual machine instance number supported by each target edge virtual machine to be selected.
4. The method of claim 1, wherein creating, by the edge cloud, a corresponding application instance based on the target container cluster API Server component address and based on the list of target virtual machines and a number of virtual machine instances corresponding to each target edge virtual machine comprises:
calling a container cluster API Server component interface through the edge cloud, pulling a software mirror image packet corresponding to a container instance from an edge software asset library through the container cluster API Server component interface, and installing the software mirror image packet to a target container cluster corresponding to a target container cluster APIServer component address;
and calling an edge agent of each target edge virtual machine through the edge cloud, pulling a software package corresponding to the virtual machine instance from the edge software asset library through the edge agent, and installing the software package to the corresponding target edge virtual machine.
5. The method of claim 4, further comprising:
and if the software mirror image package corresponding to the container instance is not pulled from the edge software asset library through the container cluster interface, and/or the software package corresponding to the virtual machine instance is not pulled from the edge software asset library through the edge agent, acquiring the software mirror image package corresponding to the container instance and/or the software package corresponding to the virtual machine instance from the central cloud through the edge software asset library.
6. The method of claim 1, further comprising:
if the type of the application management instruction is an application life cycle management instruction, calling a container cluster interface and an edge proxy of each target edge virtual machine through the edge cloud, executing the application life cycle management instruction on a container instance in each target container through the container cluster interface, and executing the application life cycle management instruction on a virtual machine instance in each target virtual machine through each edge proxy.
7. The method of claim 1, further comprising:
if the type of the application management instruction is an application service opening instruction, calling a container cluster interface and edge agents of each target edge virtual machine through the edge cloud, executing the application service opening instruction on container instances in each target container through the container cluster interface based on a reverse agent Traefik proxy, and executing the application service opening instruction on virtual machine instances in each target virtual machine through each edge agent based on the reverse agent Traefik proxy.
8. A cloud edge collaborative application management device in edge computing is characterized by comprising:
the application management instruction issuing module is used for determining a target edge virtual machine list, a target container cluster API Server component address and the number of application examples corresponding to each target edge virtual machine corresponding to application management through the central cloud, and sending an application management instruction carrying the target edge virtual machine list, the target container cluster API Server component address and the number of virtual machine examples corresponding to each target edge virtual machine to the edge cloud;
an application management instruction type determining module, configured to analyze the application management instruction through the edge cloud, and obtain the target edge virtual machine list, the target container cluster APIServer component address, and the application management instruction type;
and the application deployment module is used for creating a corresponding application instance based on the target container cluster API Server component address through the edge cloud and creating a corresponding application instance based on the target virtual machine list and the virtual machine instance number corresponding to each target edge virtual machine if the type of the application management instruction is the application deployment instruction.
9. An electronic device comprising a memory and a processor;
the memory has stored therein a computer program;
the processor for executing the computer program to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN202210179657.3A 2022-02-25 2022-02-25 Cloud edge collaborative application management method in edge computing and corresponding device Pending CN114625479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210179657.3A CN114625479A (en) 2022-02-25 2022-02-25 Cloud edge collaborative application management method in edge computing and corresponding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210179657.3A CN114625479A (en) 2022-02-25 2022-02-25 Cloud edge collaborative application management method in edge computing and corresponding device

Publications (1)

Publication Number Publication Date
CN114625479A true CN114625479A (en) 2022-06-14

Family

ID=81899986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210179657.3A Pending CN114625479A (en) 2022-02-25 2022-02-25 Cloud edge collaborative application management method in edge computing and corresponding device

Country Status (1)

Country Link
CN (1) CN114625479A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117235023A (en) * 2023-11-15 2023-12-15 广州嘉为科技有限公司 Remote warehouse cache management method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117235023A (en) * 2023-11-15 2023-12-15 广州嘉为科技有限公司 Remote warehouse cache management method, device, equipment and storage medium
CN117235023B (en) * 2023-11-15 2024-03-12 广州嘉为科技有限公司 Remote warehouse cache management method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107959582B (en) Slice instance management method and device
CN111984269A (en) Method for providing application construction service and application construction platform
CN111984270A (en) Application deployment method and system
CN113190282A (en) Android operating environment construction method and device
CN114625536B (en) Video memory allocation method, device, medium and electronic equipment
CN114625479A (en) Cloud edge collaborative application management method in edge computing and corresponding device
US20220278944A1 (en) Method for allocating resources of a network infrastructure
CN115167874B (en) Automatic driving software mirror image deployment method and device, electronic equipment and readable medium
CN108334374A (en) The method and apparatus of component dynamic load and execution
CN113726638B (en) Method, device and equipment for managing multi-cloud multi-core container and storage medium
CN111797160B (en) Method, system and electronic device for sharing intelligent contract
CN112527454A (en) Container group scheduling method and device, electronic equipment and computer readable medium
CN111182062A (en) Service multi-live calling method and system and electronic equipment
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
US11977922B2 (en) Resource reuse for pipeline workloads
US11953972B2 (en) Selective privileged container augmentation
Zanella Post-cloud Computing: Addressing Resource Management in the Resource Continuum
CN113934469B (en) Template loading method, control method, device, equipment and storage medium
CN115878296B (en) Resource management method and device, electronic equipment and readable storage medium
US11507433B2 (en) Infrastructure load balancing using software-defined networking controllers
CN112148448B (en) Resource allocation method, apparatus, device and computer readable medium
US11323512B2 (en) Peer to peer infrastructure management architecture
US20220350656A1 (en) Increase assignment effectiveness of kubernetes pods by reducing repetitive pod mis-scheduling
US11113119B2 (en) Managing computer resources
CN115309410A (en) Application release method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination