Heterogeneous application generation method and device of cross-CPU architecture and electronic equipment

By associating multiple container images with different CPU architectures into a unified heterogeneous image and configuring heterogeneous application information, the problem of insufficient support for cross-CPU architecture applications on the container cloud platform is solved, and efficient scheduling of cross-CPU architecture applications is achieved. and run.

CN118567784APending Publication Date: 2024-08-30JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410675281.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Mainstream container cloud platforms have insufficient support for cross-CPU architecture applications and cannot effectively manage and schedule container instances across different CPU architectures, resulting in poor resource utilization or performance degradation.

Method used

By associating multiple target container images with different CPU architectures into a unified target heterogeneous image, and configuring heterogeneous application information based on this image, a target heterogeneous application that can run in any CPU architecture is generated to realize heterogeneous applications. Intelligent scheduling and operation.

Benefits of technology

It reduces the complexity of separately configuring and managing images for each architecture, improves the resource utilization and flexibility of cross-CPU architecture applications, and ensures that target heterogeneous applications can be intelligently and regularly scheduled and run in different CPU architectures. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567784A
    Figure CN118567784A
Patent Text Reader

Abstract

The invention provides a heterogeneous application generation method and device of a cross-CPU architecture and electronic equipment, and relates to the field of application creation, the method is applied to a container cloud platform, and the method comprises the following steps: determining a plurality of target container mirror images required for realizing a target heterogeneous application function from container mirror images uploaded to a mirror image warehouse; configuring the same heterogeneous mirror image name and heterogeneous mirror image label for the plurality of target container mirror images; generating a target heterogeneous mirror image according to the heterogeneous mirror image name and the heterogeneous mirror image label; according to the method disclosed by the invention, the generated target heterogeneous application can be intelligently and regularly scheduled and run in any CPU architecture according to the running logic specified by the configured application information, so that the target heterogeneous application can be intelligently and regularly scheduled and run in any CPU architecture according to the running logic specified by the configured application information. And the complexity of independently configuring and managing the mirror image for each framework is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of application creation, and in particular to a method, device and electronic device for generating heterogeneous applications across CPU architectures. Background Art

[0002] With the development of emerging technologies such as edge computing and the Internet of Things, the demand for cross-CPU architecture application deployment has further increased. In order to meet the needs of different users, the container cloud platform needs to support application deployment across multiple CPU architectures.

[0003] However, mainstream container cloud platforms usually do not provide adequate support for cross-CPU architecture applications, and are unable to effectively and regularly manage and schedule container instances across different CPU architectures, resulting in poor resource utilization or performance degradation. Container platforms also face certain challenges in orchestrating and scheduling cross-CPU architecture applications, and are unable to effectively manage and schedule container instances across different CPU architectures. Summary of the invention

[0004] The embodiments of the present disclosure provide a method, device and electronic device for generating heterogeneous applications across CPU architectures, aiming to solve the problems existing in the above-mentioned background technologies.

[0005] In order to solve the above technical problems, the present disclosure is implemented as follows:

[0006] In a first aspect, an embodiment of the present disclosure provides a method for generating heterogeneous applications across CPU architectures, which is applied to a container cloud platform. The method includes:

[0007] Determine, from the container images uploaded to the image repository, a plurality of target container images required to implement the target heterogeneous application function, wherein the plurality of target container images belong to different CPU architectures;

[0008] Configuring the same heterogeneous image name and heterogeneous image tag for the multiple target container images;

[0009] Generate a target heterogeneous image according to the heterogeneous image name and the heterogeneous image label, where the target heterogeneous image is used to characterize the association relationship between the multiple target container images, and the target heterogeneous image can run in any CPU architecture;

[0010] Based on the target heterogeneous image, heterogeneous application information is configured to generate the target heterogeneous application.

[0011] Optionally, generating a target heterogeneous image according to the heterogeneous image name and the heterogeneous image tag includes:

[0012] Associating the multiple target container images according to the heterogeneous image name and the heterogeneous image label to obtain the target heterogeneous image;

[0013] Encapsulating the target heterogeneous image into a manifest list, wherein the manifest list is a list of heterogeneous images corresponding to one and / or multiple heterogeneous applications;

[0014] The method further comprises:

[0015] The manifest list is pushed to the image repository, and the progress of the push is simultaneously displayed to the local image repository and the third-party image repository.

[0016] Optionally, configuring heterogeneous application information based on the target heterogeneous image includes:

[0017] Configure the type of the target container of the target heterogeneous application, where the type of the target container includes an initial container type and a working container type, and the target container is a running instance of the target container image in the CPU architecture;

[0018] Configuring an image pulling strategy for the target heterogeneous application, wherein the image pulling strategy is any one of the following strategies: a strategy of giving priority to using local container images, a strategy of pulling only the latest container images, and a strategy of using only local container images;

[0019] Configure the maximum and / or minimum requirements of the target container of the target heterogeneous application for CPU and memory resources;

[0020] Configure a custom startup command, parameters, environment variables, container storage volumes, health check probes, and log collection operations for the target container of the target heterogeneous application;

[0021] Configure the application service name, service port, and service access method of the target heterogeneous application, and configure a load balancing strategy for the application instance of the target heterogeneous application under each CPU architecture;

[0022] Configure application update strategy, scheduling strategy and elastic scaling of the target heterogeneous application.

[0023] Optionally, the method further comprises:

[0024] The application tenant basic information of the target heterogeneous application is configured, wherein the application tenant basic information includes: the tenant to which the application belongs, the application space of the tenant to which the application belongs, the members of the tenant to which the application belongs, and the application name.

[0025] Optionally, the method further comprises:

[0026] The application component information of the target heterogeneous application is configured, wherein the application component information includes a load type and a load component resource name.

[0027] Optionally, the method further comprises:

[0028] Configure the application instance number distribution strategy and application traffic strategy for each CPU architecture, wherein the application traffic strategy is used to indicate the response of the application instance in the CPU architecture to the access request;

[0029] Follow the steps below to configure the application instance distribution strategy for each CPU architecture:

[0030] Determine the total number of application instances that need to be set up;

[0031] According to different CPU architectures, allocate the number of application instances in each CPU architecture;

[0032] Follow the steps below to configure application traffic policies for each CPU architecture:

[0033] Determine a traffic policy type, where the traffic policy types include: a default policy, a policy based on request traffic ratio, and a policy based on request content;

[0034] In the case where the traffic policy type is determined to be a default policy, upon receiving the access request, traffic is distributed to the application instances of the target heterogeneous application in each CPU architecture according to the load balancing policy;

[0035] When it is determined that the traffic policy type is a traffic proportion policy based on request traffic, the application instances in each CPU architecture are configured with respect to the traffic proportion to be processed by the access request;

[0036] In the case where it is determined that the traffic policy type is a policy based on request content, configuring access rules for each CPU architecture, wherein the access rules are used to indicate a CPU architecture that matches the access request;

[0037] The method further comprises:

[0038] When it is determined that the traffic policy type is a request content policy, the traffic of the access request that meets the access rule is sent to the application instance in the corresponding CPU architecture.

[0039] Optionally, configuring access rules for each CPU architecture includes:

[0040] Configure the preset strings for each CPU architecture;

[0041] The step of sending the traffic of the access request that complies with the access rule to the application instance in the corresponding CPU architecture includes:

[0042] Obtaining a character string in the access request, and determining a CPU architecture matching the access request according to the character string in the access request and respective preset character strings of each CPU architecture configuration;

[0043] The traffic of the access request is sent to the application instance in the CPU architecture matching the access request, and the preset character string includes a preset Header character string and a preset URI character string.

[0044] Optionally, configuring access rules for each CPU architecture includes:

[0045] Configure the default browser kernel for each CPU architecture;

[0046] The step of sending the traffic of the access request that complies with the access rule to the application instance in the corresponding CPU architecture includes:

[0047] Obtaining the browser kernel of the initiator corresponding to the access request, configuring respective preset browser kernels according to the browser kernel of the initiator corresponding to the access request and each CPU architecture, and determining the CPU architecture matching the access request;

[0048] The traffic of the access request is sent to the application instance in the CPU architecture matching the access request.

[0049] In a second aspect, an embodiment of the present disclosure provides a heterogeneous application generation device across CPU architectures, which is applied to a container cloud platform, and the device includes:

[0050] A determination module, configured to determine, from the container images uploaded to the image repository, a plurality of target container images required to implement a target heterogeneous application function, wherein the plurality of target container images belong to different CPU architectures;

[0051] A configuration module, used to configure the same heterogeneous image name and heterogeneous image label for the multiple target container images;

[0052] A heterogeneous image generation module, used to generate a target heterogeneous image according to the heterogeneous image name and the heterogeneous image label, wherein the target heterogeneous image is used to characterize the association relationship between the multiple target container images, and the target heterogeneous image can run in any CPU architecture;

[0053] The heterogeneous application generation module is used to configure heterogeneous application information based on the target heterogeneous image and generate the target heterogeneous application.

[0054] Optionally, the heterogeneous image generation module includes:

[0055] An association submodule, configured to associate the multiple target container images according to the heterogeneous image name and the heterogeneous image label to obtain the target heterogeneous image;

[0056] An encapsulation submodule, used to encapsulate the target heterogeneous image into a manifest list, wherein the manifest list is a list of heterogeneous images corresponding to one and / or multiple heterogeneous applications;

[0057] The device also includes:

[0058] The push module is used to push the manifest list to the image repository and simultaneously display the push progress to the local image repository and the third-party image repository.

[0059] Optionally, the heterogeneous application generation module includes:

[0060] A container type configuration submodule, used to configure the type of the target container of the target heterogeneous application, wherein the type of the target container includes an initial container type and a working container type, and the target container is a running instance of the target container image in the CPU architecture;

[0061] An image pulling strategy configuration submodule, used to configure the image pulling strategy of the target heterogeneous application, wherein the image pulling strategy is any of the following strategies: a strategy of giving priority to using local container images, a strategy of pulling only the latest container images, and a strategy of using only local container images;

[0062] A resource specification configuration submodule, used to configure the maximum and / or minimum requirements of the target container of the target heterogeneous application for CPU and memory resources;

[0063] An operation configuration submodule, used to configure a custom startup command, parameters, environment variables, container storage volumes, health check probes, and log collection operations of the target container of the target heterogeneous application;

[0064] An application service configuration submodule, used to configure the application service name, service port, and service access mode of the target heterogeneous application, and to configure a load balancing strategy for the application instance of the target heterogeneous application under each CPU architecture;

[0065] The orchestration configuration submodule is used to configure the application update strategy, scheduling strategy and elastic scaling of the target heterogeneous application.

[0066] Optionally, the device further comprises:

[0067] The application tenant basic information configuration module is used to configure the application tenant basic information of the target heterogeneous application, wherein the application tenant basic information includes: the tenant to which the application belongs, the application space of the tenant to which the application belongs, the members of the tenant to which the application belongs, and the application name.

[0068] Optionally, the device further comprises:

[0069] The application component information configuration module is used to configure the application component information of the target heterogeneous application, wherein the application component information includes a load type and a load component resource name.

[0070] Optionally, the device further comprises:

[0071] A heterogeneous application configuration module, used to configure a strategy for dispersing the number of application instances and an application traffic strategy for each CPU architecture, wherein the application traffic strategy is used to indicate a response of an application instance in a CPU architecture to an access request;

[0072] The device also includes:

[0073] An application instance quantity determination module is used to determine the total number of application instances that need to be set;

[0074] An allocation module, used to allocate the number of application instances in each CPU architecture according to different CPU architectures;

[0075] The device also includes:

[0076] A traffic policy type determination module, used to determine the traffic policy type, wherein the traffic policy types include: a default policy, a policy based on the requested traffic ratio, and a policy based on the requested content;

[0077] A traffic distribution module, configured to distribute traffic to application instances of the target heterogeneous application in each CPU architecture according to the load balancing strategy when the traffic policy type is determined to be a default policy and when the access request is received;

[0078] A traffic proportion configuration module, for configuring the traffic proportion to be processed by the application instance in each CPU architecture for the access request when determining that the traffic policy type is a request traffic proportion policy;

[0079] An access rule configuration module, configured to configure access rules for each CPU architecture when determining that the traffic policy type is a request content policy, wherein the access rule is used to indicate a CPU architecture that matches the access request;

[0080] The device also includes:

[0081] The sending module is used to send the traffic of the access request that meets the access rule to the application instance in the corresponding CPU architecture when it is determined that the traffic policy type is a request content policy.

[0082] Optionally, the access rule configuration module includes:

[0083] The string configuration submodule is used to configure the preset strings for each CPU architecture;

[0084] The sending module comprises:

[0085] A CPU architecture determination submodule, configured to obtain a character string in the access request, and determine a CPU architecture matching the access request according to the character string in the access request and respective preset character strings of each CPU architecture configuration;

[0086] The sending submodule is used to send the traffic of the access request to the application instance in the CPU architecture matching the access request, and the preset character string includes a preset Header character string and a preset URI character string.

[0087] Optionally, the access rule configuration module includes:

[0088] The browser kernel configuration submodule is used to configure the preset browser kernel for each CPU architecture;

[0089] The sending module comprises:

[0090] The browser kernel acquisition submodule is used to acquire the browser kernel of the initiator corresponding to the access request, configure respective preset browser kernels according to the browser kernel of the initiator corresponding to the access request and each CPU architecture, and determine the CPU architecture matching the access request;

[0091] The traffic sending submodule is used to send the traffic of the access request to the application instance in the CPU architecture that matches the access request.

[0092] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of a method for generating heterogeneous applications across CPU architectures.

[0093] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0094] The present disclosure associates target container images of multiple different CPU architectures with a unified target heterogeneous image, and performs subsequent heterogeneous application information configuration for target heterogeneous applications based on the target heterogeneous image, so as to decouple target heterogeneous applications across CPU architectures from infrastructure, just like encapsulating multiple target container images required for running target heterogeneous application functions into a heterogeneous image of mixed CPU architecture without architecture identification, which can be intelligently and regularly scheduled and run in any CPU architecture according to the running logic specified by the configured application information, thereby reducing the complexity of configuring and managing images separately for each architecture. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0096] Figure 1 It is a schematic diagram of the steps of a method for generating heterogeneous applications across CPU architectures provided by an embodiment of the present disclosure;

[0097] Figure 2 It is a flowchart of a method for generating heterogeneous applications across CPU architectures provided by an embodiment of the present disclosure;

[0098] Figure 3 It is a structural block diagram of a heterogeneous application generation device across CPU architectures provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0099] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0100] The present disclosure is applied to the container cloud platform, which is a cloud computing platform based on container technology, used to help users manage, deploy and run containerized applications. It provides a complete set of tools and services, including container orchestration, automated deployment, elastic expansion, monitoring and management functions, aiming to simplify the development, deployment and management process of applications. In particular, in a cross-multiple cloud platform or hybrid cloud environment, since different cloud providers use different hardware architectures, applications need to be deployed between different CPU architectures. The method disclosed in the present disclosure can package applications for different CPU architectures into a universal image, and then deploy them to the corresponding architectures of each cloud platform, so as to achieve unified management and scheduling of various devices in the Internet of Things environment, and can help users deploy and manage cross-CPU architecture applications on different cloud platforms, and improve the utilization and flexibility of cloud resources.

[0101] Figure 1 FIG. 1 is a schematic diagram of steps of a method for generating heterogeneous applications across CPU architectures provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes:

[0102] Step S101, determining multiple target container images required to implement a target heterogeneous application function from the container images uploaded to the image repository, wherein the multiple target container images belong to different CPU architectures;

[0103] Step S102, configuring the same heterogeneous image name and heterogeneous image label for the multiple target container images;

[0104] Step S103: generating a target heterogeneous image according to the heterogeneous image name and the heterogeneous image label, wherein the target heterogeneous image is used to characterize the association relationship between the multiple target container images, and the target heterogeneous image can run in any CPU architecture;

[0105] Step S104: Based on the target heterogeneous image, configure heterogeneous application information to generate the target heterogeneous application.

[0106] Involving step S101, the target heterogeneous application that needs to be created and run in the present disclosure is a containerized application that can be run on computers with different CPU architectures. The target heterogeneous application can be various types of applications, designed and deployed according to specific business needs and scenarios. The target heterogeneous application can be a microservice application containing multiple container instances, each of which runs on a different CPU architecture. For example, an e-commerce application can contain multiple container instances, some of which run on servers with x86 architecture, and other instances run on edge devices with ARM architecture. The target heterogeneous application can also be a cross-platform Internet of Things application, in which different types of devices (such as sensors, controllers) run on different CPU architectures, and they are integrated together through containerization technology to achieve unified management and collaborative work. In short, the target heterogeneous application can be designed and built according to specific business needs and scenarios to meet the application deployment and operation requirements of different CPU architectures. Before performing this step, it is necessary to upload multiple target container images required to implement the target heterogeneous application function to the image warehouse. Exemplarily, the container images of each CPU architecture can be uploaded to the image warehouse through the image upload capability of the container cloud platform. The image warehouse includes a local image warehouse and a third-party image warehouse. A local image repository is a local repository provided by the container cloud platform, which is used to store and manage container images uploaded by users. It is usually deployed and run in the environment of the container cloud platform, and can provide efficient image upload and download services. A third-party image repository is a container image repository provided and managed by a third party. These image repositories are usually public, and users can obtain and use various container images from them. Common third-party image repositories include Docker Hub, Google Container Registry, Amazon Elastic Container Registry, etc. Users can upload their own container images to a third-party image repository through the image upload function of the container cloud platform, or pull and use container images shared by other users or developers from a third-party image repository.

[0107] Each target container image corresponds to a specific CPU architecture. For example, if the application needs to run on the x86 architecture and the ARM architecture, then you need to prepare corresponding container images for the x86 architecture and the ARM architecture. The target container image can contain components and resources required for the application, dependent libraries, configuration files, etc. In order to create heterogeneous applications, it is necessary to identify multiple target container images required to implement the target heterogeneous application functions from the container images that have been uploaded to the image repository in advance. Optionally, the user can determine the target container image by viewing the list of uploaded container images in the image repository.

[0108] It should be noted that, as mentioned above, there are multiple container images uploaded to the image repository, and the target container image is only the container image required to implement the target heterogeneous application function. The image repository also stores multiple container images corresponding to other heterogeneous applications. Therefore, the present disclosure is applicable to the creation of one and / or multiple heterogeneous applications. In the embodiments of the present disclosure, a single heterogeneous application of the target heterogeneous application is taken as an example to explain the complete cross-CPU architecture heterogeneous application generation method.

[0109] In step S102, the same heterogeneous image name and heterogeneous image label are configured in multiple target container images, that is, multiple container images can share the same heterogeneous image (target heterogeneous image). For example, suppose there are two target container images A and B, and they both need to use the same heterogeneous image C. Then when configuring these two container images, according to the image name and label of the heterogeneous image C to be generated, the heterogeneous image name and heterogeneous image label are configured for image A and image B respectively, so that they can share the same heterogeneous image C.

[0110] In step S103, a target heterogeneous image is generated according to the heterogeneous image name and the heterogeneous image label. Please refer to the previous example. For example, the heterogeneous image name and heterogeneous image label configured for the target container images A and B are "myapp" and "v1.0" respectively. The name of the generated target heterogeneous image is "myapp" and the label is "v1.0". In this way, the generated target heterogeneous image has the feature of no architecture identification, which means that it can run on any CPU architecture without being restricted by a specific architecture.

[0111] In step S104, in the process of creating the target heterogeneous application, it is necessary to configure the heterogeneous application information, that is, various information of the target heterogeneous application. This information includes the basic information of the application, component information, failover strategy, instance number dispersion strategy, container group and service, etc. By configuring this information, it can be ensured that the heterogeneous application can be correctly deployed and run in the environment of cross-CPU architecture, so as to improve the scalability and portability of the application, reduce maintenance costs, and achieve maintainability and sustainability in the overall operation.

[0112] The present disclosure associates target container images of multiple different CPU architectures with a unified target heterogeneous image, and performs subsequent heterogeneous application information configuration for target heterogeneous applications based on the target heterogeneous image, so as to decouple target heterogeneous applications across CPU architectures from infrastructure, just like encapsulating multiple target container images required for running target heterogeneous application functions into a heterogeneous image of mixed CPU architecture without architecture identification, which can be intelligently and regularly scheduled and run in any CPU architecture according to the running logic specified by the configured application information, thereby reducing the complexity of configuring and managing images separately for each architecture.

[0113] Exemplarily, generating a target heterogeneous image according to the heterogeneous image name and the heterogeneous image tag includes: associating the multiple target container images according to the heterogeneous image name and the heterogeneous image tag to obtain the target heterogeneous image; encapsulating the target heterogeneous image into a manifest list, wherein the manifest list is a list of heterogeneous images corresponding to one and / or more heterogeneous applications.

[0114] The container cloud platform will generate a target heterogeneous image representing the association between these target container images based on the configured heterogeneous image names and tags. The target heterogeneous image created in this step is not an actual container runtime environment, but a logical representation that identifies the association between images of different architectures. The manifest list is a file used to describe a container image and its configuration. It can include heterogeneous image information corresponding to one or more heterogeneous applications. Encapsulate the generated target heterogeneous image information into the manifest list. This list describes in detail the properties of the target heterogeneous image containing images of different CPU architectures, such as the image name, tag, architecture type, etc. The manifest list allows container management systems such as Kubernetes or Docker Swarm to understand how to pull the correct container image from various CPU architecture environments and deploy them. Suppose an e-commerce application needs to run on both x86 servers in the data center and ARM devices at the edge. The development team can use the same application name "ecommerce_app" and version tag "v2.0" for the x86 image prepared for the data center environment and the ARM image for the edge environment. By configuring this information, a target heterogeneous image "ecommerce_app:v2.0" containing these two images is generated, and then this information is encapsulated in the manifest list. In this way, each CPU architecture can pull the corresponding container image to be run from the manifest to the appropriate physical node.

[0115] Exemplarily, the method further includes: pushing the manifest list to the image repository, and synchronously displaying the progress of the push to the local image repository and the third-party image repository.

[0116] In the above steps, the target heterogeneous image generated according to the heterogeneous image name and tag will be encapsulated into a manifest list. This list records in detail information including image name, tag, supported CPU architecture, etc. The push operation involves uploading the manifest list to the preset image repository. This can be a local image repository, that is, a repository inside the container cloud platform, or a third-party image repository, such as Docker Hub, Google Container Registry, etc. During the push process, real-time display of the push progress is very important for operation and maintenance personnel. It can help monitor the status of the release process and promptly discover and solve problems that may arise in the push. Implementing push progress synchronization usually involves two aspects: using the API provided by the image repository or the callback mechanism of the push tool to obtain the push status in real time, and feedback to the user through the user interface or CLI tool of the container management platform. In the user interface of the container management platform, a progress bar or log output can be provided to the user, showing all detailed steps and status changes from the start of the push to the completion of the push.

[0117] If you use multiple image repositories (such as local and third-party repositories), you need to ensure that the status of all repositories is synchronized. Optionally, set corresponding triggers and event listeners in each repository so that when the status of one repository is updated, other repositories can also update their status synchronously. Considering that heterogeneous applications may need to run on a variety of hardware and network environments, the operation of pushing the manifest list and synchronously displaying the progress can ensure that all target deployment environments can obtain the latest container images in a timely manner. For example, an IoT application running on the cloud and edge devices may need to quickly deploy new feature updates on x86 servers, while ensuring that the ARM processors in the edge devices are also updated synchronously to maintain the overall consistency and latest status of the system. In this way, the deployment of container applications across CPU architectures can be effectively managed and maintained, ensuring the continuity and consistency of applications and reducing the failure rate caused by environmental inconsistencies.

[0118] Exemplarily, based on the target heterogeneous image, heterogeneous application information is configured, including: configuring the type of the target container of the target heterogeneous application, the type of the target container includes an initial container type and a working container type, and the target container is a running instance of the target container image in the CPU architecture; configuring the image pulling strategy of the target heterogeneous application, the image pulling strategy is any of the following strategies: giving priority to local container image strategy, only pulling the latest container image strategy and only using local container image strategy; configuring the maximum and / or minimum demand for CPU and memory resources of the target container of the target heterogeneous application; configuring the custom startup command, parameters, environment variables, container storage volume, health check probe and log collection operation of the target container of the target heterogeneous application; configuring the application service name, service port, service access method of the target heterogeneous application, and configuring the load balancing strategy for the application instance of the target heterogeneous application under each CPU architecture; configuring the application update strategy, scheduling strategy and elastic scaling of the target heterogeneous application.

[0119] Configure heterogeneous application information based on the target heterogeneous image, including the settings of different container types, image pulling strategies, resource requirements, custom configurations, service configurations, and update and scheduling strategies. For the settings of different container types, that is, configuring the target container type of the target heterogeneous application, the container corresponding to the initial container type is mainly responsible for performing some pre-tasks before the main application container is started, such as setting configuration files, downloading necessary data, etc. The container corresponding to the working container type is the main running container of the application, which is used to execute the core business logic of the application. Each type of container is a running instance of the target container image on a specific CPU architecture. This classification helps optimize the efficiency of application startup and operation.

[0120] The image pulling strategy for the target heterogeneous application includes the following three strategies: First, the local container image strategy is used first, indicating that if there is an image locally, the local image is used, otherwise it is pulled from the remote repository. The pull latest container image strategy only indicates that the latest version of the image is pulled from the image repository every time, regardless of whether it exists locally. The use local container image strategy only indicates that only the existing local image is used, and no remote pull is performed.

[0121] For resource requirements, configure the maximum and minimum requirements for CPU and memory to ensure that the container can run stably under various loads while avoiding resource waste.

[0122] The configuration of custom startup commands and parameters for target heterogeneous applications is a customized form of configuration. It sets custom commands and parameters when starting the container, configures environment variables and container storage volumes, and sets health check probes and log collection operations. These are important tools to ensure the healthy operation of containers and track problems.

[0123] The service configuration includes the configuration of the application service name, service port, and service access method, as well as the configuration of load balancing strategies for application instances under different CPU architectures to ensure that requests are evenly distributed to each instance.

[0124] For update and scheduling strategies, including application update strategies, such as rolling updates, blue-green deployment, etc.; scheduling strategies are strategies that determine how to allocate containers in the cluster; elastic scaling strategies indicate automatic adjustment of the number of application instances based on load. Through the configuration of the above heterogeneous application information, a target heterogeneous application can be effectively deployed and run on different CPU architectures while achieving efficient, stable and secure operation standards.

[0125] The present disclosure not only makes the target heterogeneous application portable and scalable through the configuration of the above-mentioned heterogeneous application information, but also ensures that the target heterogeneous application can balance the load and cope with various operating conditions in a diverse computing environment.

[0126] Exemplarily, the method further includes: configuring application tenant basic information of the target heterogeneous application, the application tenant basic information including: the tenant to which the application belongs, the application space of the tenant to which the application belongs, members of the tenant to which the application belongs, and the application name.

[0127] Figure 2 is a flow chart of a method for generating heterogeneous applications across CPU architectures provided by an embodiment of the present disclosure, such as Figure 2 As shown, in addition to the configuration of heterogeneous application information based on the target heterogeneous image as described above, which is equivalent to the application container group, service and other configurations, it is also necessary to configure the application tenant basic information, application component information, application failover strategy and application strength data dispersion strategy. Next, the embodiment of the present disclosure will provide a detailed and complete description of other configurations to achieve flexible and intelligent scheduling of target heterogeneous applications under various CPU architectures based on the overall logic of these configurations.

[0128] The configuration of application tenant basic information includes configuring the application tenant, the application space of the application tenant, the members of the application tenant, and the application name. The application tenant is the specific tenant that manages the application in a multi-tenant environment. A multi-tenant environment allows multiple tenants to share the same system or application resources while ensuring that the data and configuration of each tenant are isolated from each other. When configuring this information, it is necessary to clearly specify which tenant the heterogeneous application belongs to, which helps the system to reasonably manage and allocate resource usage and access rights. The application space is a logical partition assigned to an application under a specific tenant. It can be regarded as a logical division of resources (such as runtime environment, storage, and network) in the container cloud platform. Multiple related services and applications can be deployed in each application space to support different business needs. The configuration of the application space helps to organize and isolate application components, ensure the consistency of the environment, and simplify resource management and permission control. Configuring the members of the application tenant involves determining which users or user groups can access and manage the application. This includes the allocation of operation permissions for the application, such as who can update the application configuration and who is responsible for daily maintenance tasks. By accurately controlling member access rights, security and operation and maintenance efficiency can be improved. The application name is a unique name that identifies the application in the entire system or platform. In a multi-application or multi-service environment, a clear naming convention is necessary to quickly identify and reference specific applications. Application names are usually used in logging, monitoring, troubleshooting, and other aspects, so you should choose a name that is easy to understand and descriptive. Configuring the above application tenant basic information is the basis for building and managing heterogeneous applications across CPU architectures. Figure 2 As shown, in all the configuration processes illustrated in the right box diagram of the figure, the application tenant basic information is configured in the first step, and other configurations have no restrictions on steps or order.

[0129] The present disclosure divides different applications into different logical partitions through the configuration of the above-mentioned application tenant basic information, realizes the management and isolation of applications, ensures that the data and configurations of different tenants are isolated from each other, and improves the security and stability of the system. At the same time, the access rights of members can be accurately controlled to improve the efficiency of operation and maintenance. By configuring the application name, the application is uniquely identified in the entire system or platform. In this way, specific applications can be easily identified and referenced, providing convenience in logging, monitoring, troubleshooting, etc.

[0130] Exemplarily, the method further includes: configuring application component information of the target heterogeneous application, the application component information including a load type and a load component resource name.

[0131] Configure the application component information of the target heterogeneous application, including the configuration of the load type and the configuration of the load component resource name. The load type refers to the type of application component, which can be divided into stateful load and stateless load. Stateful load refers to application components that need to maintain state or data, such as database services; stateless load refers to application components that do not need to maintain state or data, such as web servers. The load component resource name refers to the name of the resource required by the application component. These resources can be computing resources, storage resources, or network resources. Computing resources include CPU and memory, storage resources include disk space and database, and network resources include bandwidth and network connections. By configuring the application component information, the load type and required resource name of each component can be clearly specified. In this way, when the target heterogeneous application needs to be deployed and scheduled, the container cloud platform can select the most suitable physical node based on this information and allocate appropriate resources to each component. For example, for stateful load components, you can select a node with persistent storage capabilities; for stateless load components, you can select a node with high computing capabilities.

[0132] Through the configuration of the above application component information, the present disclosure enables the container cloud platform to select the most suitable physical node according to the load type and resource requirements of the application components, and allocate appropriate resources to each component, thereby improving the performance and reliability of the generated target heterogeneous applications.

[0133] Exemplarily, the method further includes: configuring an application instance number distribution strategy and an application traffic strategy for each CPU architecture, wherein the application traffic strategy is used to indicate a response of an application instance in the CPU architecture to an access request.

[0134] The purpose of configuring the application instance number distribution strategy and application traffic strategy for each CPU architecture is to achieve the control of the number allocation and traffic distribution of application instances of different CPU architectures. The following is a detailed description of the application instance number distribution strategy and application traffic strategy.

[0135] First, configure the application instance number dispersion strategy for each CPU architecture. For example, the application instance number dispersion strategy for each CPU architecture is configured according to the following steps: determine the total number of application instances that need to be set; allocate the number of application instances in each CPU architecture according to different CPU architectures. For example, if a total of 5 instances are set, the x86 architecture can be configured as 3 instances and the ARM architecture can be configured as 2 instances. Through such a configuration, the number of application instances can be reasonably allocated according to the characteristics and requirements of different CPU architectures to achieve optimal utilization of resources.

[0136] Secondly, configure the application traffic policy to indicate how the application instance in the CPU architecture responds to the access request, wherein the access request is a network access request for the target heterogeneous application. The types of application traffic policies include three types: default policy, traffic ratio by request, and content by request. Exemplarily, the application traffic policy of each CPU architecture is configured according to the following steps: determine the traffic policy type, the traffic policy type includes: default policy, traffic ratio by request policy, and content by request policy; when the traffic policy type is determined to be the default policy, when the access request is received, according to the load balancing policy, the traffic is distributed to the application instances of the target heterogeneous application in each CPU architecture; when the traffic policy type is determined to be the traffic ratio by request policy, the application instances in each CPU architecture are configured with respect to the traffic proportion to be processed by the access request; when the traffic policy type is determined to be the content by request policy, the access rules of each CPU architecture are configured, and the access rules are used to indicate the CPU architecture that matches the access request.

[0137] Choosing the right policy type is critical to ensuring application responsiveness and resource utilization. The default policy is typically used in scenarios where specific traffic distribution logic is not required. Under this policy, traffic is automatically distributed to application instances in each CPU architecture based on the load balancing policy previously configured for each CPU architecture. The policy based on the request traffic ratio distributes traffic to different CPU architectures according to the set ratio, which is suitable for architectures with different processing capabilities or cost efficiency. The policy based on the request content determines the distribution of traffic based on the set access rules and the specific content of the access request, allowing for more detailed control of traffic.

[0138] After the application traffic strategy is configured, for traffic distribution under the default strategy, when an access request is received, the container cloud platform will automatically distribute the traffic to the application instances in each CPU architecture according to the set load balancing strategy (such as polling, minimum number of connections, etc.). Under the strategy of traffic proportion by request, the traffic proportion that each CPU architecture should bear needs to be set in advance. For example, if the x86 architecture has stronger processing power, it may be configured to handle a higher proportion of traffic, such as 70%, while the ARM architecture handles 30% of the traffic.

[0139] Exemplarily, the method further includes: in a case where it is determined that the traffic policy type is a content-by-request policy, sending the traffic of the access request that complies with the access rule to an application instance in a corresponding CPU architecture.

[0140] When the traffic policy type is determined to be a policy based on request content, determine which CPU architecture should handle different types of requests. You can configure access rules to match the specific content of the request, similar to filtering access requests. Only access requests that meet the access rules are allowed to be forwarded. You can filter and match requests based on request content, headers, cookies, URIs, operating systems, or browsers, and then forward qualified request traffic to the corresponding heterogeneous application instances. When multiple rules are set, only request traffic that meets multiple rules at the same time will be forwarded to the application instance in the corresponding CPU architecture.

[0141] The present disclosure can achieve the optimal use of resources by configuring the application instance number dispersion strategy, which can reasonably allocate the number of application instances according to the characteristics and requirements of different CPU architectures; by configuring the application traffic strategy, it can achieve the flexible control of traffic distribution by selecting the appropriate policy type according to different requirements and scenarios; and by configuring access rules to match the specific content of the request, fine-grained traffic control is achieved. Based on the above application instance number dispersion strategy and application traffic strategy, the flexibility and efficiency of the deployment and scheduling of cross-CPU architecture applications are improved, while ensuring that containers of different CPU architectures can run appropriately, regularly and in a hybrid architecture cluster.

[0142] Exemplarily, the configuring access rules for each CPU architecture includes: configuring a respective preset string for each CPU architecture; sending the traffic of the access request that meets the access rules to the application instance in the corresponding CPU architecture includes: obtaining the string in the access request, and determining the CPU architecture that matches the access request based on the string in the access request and the respective preset string configured for each CPU architecture; sending the traffic of the access request to the application instance in the CPU architecture that matches the access request, the preset string including a preset Header string and a preset URI string.

[0143] like Figure 2As shown, when the traffic policy type is determined to be a request content policy, five optional filtering and screening methods for access requests are included. For each CPU architecture, a respective preset string can be configured. The preset string can be a specific Header string or a URI string, which is used to match the corresponding part in the access request. When an access request is received, the string in the access request is obtained. Then, based on the string in the access request and the preset string configured for each CPU architecture, the CPU architecture that matches the access request is determined. Once the CPU architecture that matches the access request is determined, the traffic of the access request is sent to the application instance in the CPU architecture. In this way, the traffic can be distributed to the application instance in the corresponding CPU architecture in a targeted manner according to the specific content in the access request. The preset string includes a preset Header string and a preset URI string. The preset Header string refers to a string of a specific Header field set in advance, which is used to match the Header content in the access request. The preset URI string refers to a string of a specific URI set in advance, which is used to match the URI content in the access request.

[0144] For example, assume that there are two CPU architectures, x86 and ARM. For the x86 architecture, the preset header string is configured as "User-Agent: Chrome", and for the ARM architecture, the preset header string is configured as "User-Agent: Safari". When an access request is received, the header content in the access request, such as "User-Agent: Chrome", is obtained. Then, the header content in the access request is matched with the preset header string configured for each CPU architecture. In this example, the header content of the access request matches the preset header string of the x86 architecture because they are both "User-Agent: Chrome". Based on the matching result, the CPU architecture that matches the access request is determined, that is, the x86 architecture. Once the CPU architecture that matches the access request is determined, the traffic of the access request is sent to the application instance in the CPU architecture. In this way, the traffic can be distributed to the application instance in the corresponding CPU architecture in a targeted manner according to the specific content in the access request (such as the header content). In this example, the traffic of the access request will be sent to the application instance in the x86 architecture. Similarly, a preset URI string can be used to filter access requests. The URI content in the access request is matched with the preset URI string, and then the CPU architecture matching the access request is determined, and the traffic is sent to the corresponding application instance.

[0145] Exemplarily, the configuring access rules for each CPU architecture includes: configuring a respective preset browser kernel for each CPU architecture; sending the traffic of the access request that meets the access rules to the application instance in the corresponding CPU architecture includes: obtaining the browser kernel of the initiator corresponding to the access request, and determining the CPU architecture that matches the access request based on the browser kernel of the initiator corresponding to the access request and the respective preset browser kernels configured for each CPU architecture; and sending the traffic of the access request to the application instance in the CPU architecture that matches the access request.

[0146] In addition to the method of using a preset string, the present disclosure also provides a method of matching access requests with CPU architectures according to preset browser kernels. First, the preset browser kernels of each CPU architecture are configured, the browser kernel of the initiator corresponding to the access request is obtained, and the CPU architecture matching the access request is determined according to the configuration of the preset browser kernel and the CPU architecture, and finally the traffic of the access request is sent to the application instance of the matching CPU architecture for processing.

[0147] For example, suppose there is a cross-CPU architecture application, which includes application instances of x86 architecture and ARM architecture. In the traffic policy configuration, we can set traffic distribution by browser kernel. First, we need to configure the preset browser kernel of each CPU architecture, such as configuring the x86 architecture to support AppleWebkit kernel browsers (such as Chrome, Safari, etc.), and configuring the ARM architecture to support Firefox browser. When an access request arrives, we need to obtain the browser kernel of the initiator of the request. Assume that the initiator of the request is using Chrome browser. Then, based on the configuration of the preset browser kernel and CPU architecture, we can determine that the request matches the application instance of x86 architecture. Finally, send the traffic of the access request to the application instance of x86 architecture for processing. In this way, we send the access request traffic that meets the rules to the application instance of the corresponding CPU architecture according to the configuration of the browser kernel and CPU architecture of the initiator of the access request, and realize the function of traffic distribution according to the browser kernel.

[0148] Figure 3 1 is a structural block diagram of a device for generating heterogeneous applications across CPU architectures provided by an embodiment of the present disclosure. Figure 3 As shown, the device is applied to a container cloud platform, and the device includes:

[0149] A determination module 201 is used to determine, from the container images uploaded to the image repository, a plurality of target container images required to implement a target heterogeneous application function, wherein the plurality of target container images belong to different CPU architectures;

[0150] A configuration module 202, configured to configure the same heterogeneous image name and heterogeneous image tag for the multiple target container images;

[0151] A heterogeneous image generation module 203 is used to generate a target heterogeneous image according to the heterogeneous image name and the heterogeneous image label, wherein the target heterogeneous image is used to characterize the association relationship between the multiple target container images, and the target heterogeneous image can run in any CPU architecture;

[0152] The heterogeneous application generation module 204 is used to configure heterogeneous application information based on the target heterogeneous image and generate the target heterogeneous application.

[0153] Exemplarily, the heterogeneous image generation module includes:

[0154] An association submodule, configured to associate the multiple target container images according to the heterogeneous image name and the heterogeneous image label to obtain the target heterogeneous image;

[0155] An encapsulation submodule, used to encapsulate the target heterogeneous image into a manifest list, wherein the manifest list is a list of heterogeneous images corresponding to one and / or multiple heterogeneous applications;

[0156] The device also includes:

[0157] The push module is used to push the manifest list to the image repository and simultaneously display the push progress to the local image repository and the third-party image repository.

[0158] Exemplarily, the heterogeneous application generation module includes:

[0159] A container type configuration submodule, used to configure the type of the target container of the target heterogeneous application, wherein the type of the target container includes an initial container type and a working container type, and the target container is a running instance of the target container image in the CPU architecture;

[0160] An image pulling strategy configuration submodule, used to configure the image pulling strategy of the target heterogeneous application, wherein the image pulling strategy is any of the following strategies: a strategy of giving priority to using local container images, a strategy of pulling only the latest container images, and a strategy of using only local container images;

[0161] A resource specification configuration submodule, used to configure the maximum and / or minimum requirements of the target container of the target heterogeneous application for CPU and memory resources;

[0162] An operation configuration submodule, used to configure a custom startup command, parameters, environment variables, container storage volumes, health check probes, and log collection operations of the target container of the target heterogeneous application;

[0163] An application service configuration submodule, used to configure the application service name, service port, and service access mode of the target heterogeneous application, and to configure a load balancing strategy for the application instance of the target heterogeneous application under each CPU architecture;

[0164] The orchestration configuration submodule is used to configure the application update strategy, scheduling strategy and elastic scaling of the target heterogeneous application.

[0165] Exemplarily, the device further includes:

[0166] The application tenant basic information configuration module is used to configure the application tenant basic information of the target heterogeneous application, wherein the application tenant basic information includes: the tenant to which the application belongs, the application space of the tenant to which the application belongs, the members of the tenant to which the application belongs, and the application name.

[0167] Exemplarily, the device further includes:

[0168] The application component information configuration module is used to configure the application component information of the target heterogeneous application, wherein the application component information includes a load type and a load component resource name.

[0169] Exemplarily, the device further includes:

[0170] A heterogeneous application configuration module, used to configure a strategy for dispersing the number of application instances and an application traffic strategy for each CPU architecture, wherein the application traffic strategy is used to indicate a response of an application instance in a CPU architecture to an access request;

[0171] The device also includes:

[0172] An application instance quantity determination module is used to determine the total number of application instances that need to be set;

[0173] An allocation module, used to allocate the number of application instances in each CPU architecture according to different CPU architectures;

[0174] The device also includes:

[0175] A traffic policy type determination module, used to determine the traffic policy type, wherein the traffic policy types include: a default policy, a policy based on the requested traffic ratio, and a policy based on the requested content;

[0176] A traffic distribution module, configured to distribute traffic to application instances of the target heterogeneous application in each CPU architecture according to the load balancing strategy when the traffic policy type is determined to be a default policy and when the access request is received;

[0177] A traffic proportion configuration module, for configuring the traffic proportion to be processed by the application instance in each CPU architecture for the access request when determining that the traffic policy type is a request traffic proportion policy;

[0178] An access rule configuration module, configured to configure access rules for each CPU architecture when determining that the traffic policy type is a request content policy, wherein the access rule is used to indicate a CPU architecture that matches the access request;

[0179] The device also includes:

[0180] The sending module is used to send the traffic of the access request that meets the access rule to the application instance in the corresponding CPU architecture when it is determined that the traffic policy type is a request content policy.

[0181] Exemplarily, the access rule configuration module includes:

[0182] The string configuration submodule is used to configure the preset strings for each CPU architecture;

[0183] The sending module comprises:

[0184] A CPU architecture determination submodule, configured to obtain a character string in the access request, and determine a CPU architecture matching the access request according to the character string in the access request and respective preset character strings of each CPU architecture configuration;

[0185] The sending submodule is used to send the traffic of the access request to the application instance in the CPU architecture matching the access request, and the preset character string includes a preset Header character string and a preset URI character string.

[0186] Exemplarily, the access rule configuration module includes:

[0187] The browser kernel configuration submodule is used to configure the preset browser kernel for each CPU architecture;

[0188] The sending module comprises:

[0189] The browser kernel acquisition submodule is used to acquire the browser kernel of the initiator corresponding to the access request, configure respective preset browser kernels according to the browser kernel of the initiator corresponding to the access request and each CPU architecture, and determine the CPU architecture matching the access request;

[0190] The traffic sending submodule is used to send the traffic of the access request to the application instance in the CPU architecture that matches the access request.

[0191] The embodiments of the present disclosure also provide an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned embodiment of the heterogeneous application generation method across CPU architectures are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0192] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, devices, and electronic devices. Therefore, the embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0193] The embodiments of the present disclosure are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, and electronic devices according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0194] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.

[0195] Finally, it should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "include..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements. The above is a detailed introduction to a heterogeneous application generation method, device and electronic device across CPU architectures provided by the present disclosure. The present disclosure is explained in detail using specific examples in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present disclosure; at the same time, for those of ordinary skill in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A method for generating heterogeneous applications across CPU architectures, characterized in that: Applied to a container cloud platform, the method includes: Determine, from the container images uploaded to the image repository, a plurality of target container images required to implement the target heterogeneous application function, wherein the plurality of target container images belong to different CPU architectures; Configuring the same heterogeneous image name and heterogeneous image tag for the multiple target container images; Generate a target heterogeneous image according to the heterogeneous image name and the heterogeneous image label, where the target heterogeneous image is used to characterize the association relationship between the multiple target container images, and the target heterogeneous image can run in any CPU architecture; Based on the target heterogeneous image, heterogeneous application information is configured to generate the target heterogeneous application.

2. The method according to claim 1, characterized in that Generate a target heterogeneous image according to the heterogeneous image name and the heterogeneous image tag, including: Associating the multiple target container images according to the heterogeneous image name and the heterogeneous image label to obtain the target heterogeneous image; Encapsulating the target heterogeneous image into a manifest list, wherein the manifest list is a list of heterogeneous images corresponding to one and / or multiple heterogeneous applications; The method further comprises: The manifest list is pushed to the image repository, and the progress of the push is simultaneously displayed to the local image repository and the third-party image repository.

3. The method according to claim 1, characterized in that Based on the target heterogeneous image, heterogeneous application information is configured, including: Configure the type of the target container of the target heterogeneous application, where the type of the target container includes an initial container type and a working container type, and the target container is a running instance of the target container image in the CPU architecture; Configuring an image pulling strategy for the target heterogeneous application, wherein the image pulling strategy is any one of the following strategies: a strategy of giving priority to using local container images, a strategy of pulling only the latest container images, and a strategy of using only local container images; Configure the maximum and / or minimum requirements of the target container of the target heterogeneous application for CPU and memory resources; Configure a custom startup command, parameters, environment variables, container storage volumes, health check probes, and log collection operations for the target container of the target heterogeneous application; Configure the application service name, service port, and service access method of the target heterogeneous application, and configure a load balancing strategy for the application instance of the target heterogeneous application under each CPU architecture; Configure application update strategy, scheduling strategy and elastic scaling of the target heterogeneous application.

4. The method according to claim 1, characterized in that: The method further comprises: The application tenant basic information of the target heterogeneous application is configured, wherein the application tenant basic information includes: the tenant to which the application belongs, the application space of the tenant to which the application belongs, the members of the tenant to which the application belongs, and the application name.

5. The method according to claim 1, characterized in that The method further comprises: The application component information of the target heterogeneous application is configured, wherein the application component information includes a load type and a load component resource name.

6. The method according to claim 3, characterized in that: The method further comprises: Configure the application instance number distribution strategy and application traffic strategy for each CPU architecture, wherein the application traffic strategy is used to indicate the response of the application instance in the CPU architecture to the access request; Follow the steps below to configure the application instance distribution strategy for each CPU architecture: Determine the total number of application instances that need to be set up; According to different CPU architectures, allocate the number of application instances in each CPU architecture; Follow the steps below to configure application traffic policies for each CPU architecture: Determine a traffic policy type, where the traffic policy types include: a default policy, a policy based on request traffic ratio, and a policy based on request content; In the case where the traffic policy type is determined to be a default policy, upon receiving the access request, traffic is distributed to the application instances of the target heterogeneous application in each CPU architecture according to the load balancing policy; When it is determined that the traffic policy type is a traffic proportion policy based on request traffic, the application instances in each CPU architecture are configured with respect to the traffic proportion to be processed by the access request; In the case where it is determined that the traffic policy type is a policy based on request content, configuring access rules for each CPU architecture, wherein the access rules are used to indicate a CPU architecture that matches the access request; The method further comprises: When it is determined that the traffic policy type is a request content policy, the traffic of the access request that meets the access rule is sent to the application instance in the corresponding CPU architecture.

7. The method according to claim 6, characterized in that The configuration of access rules for each CPU architecture includes: Configure the preset strings for each CPU architecture; The step of sending the traffic of the access request that complies with the access rule to the application instance in the corresponding CPU architecture includes: Obtaining a character string in the access request, and determining a CPU architecture matching the access request according to the character string in the access request and respective preset character strings of each CPU architecture configuration; The traffic of the access request is sent to the application instance in the CPU architecture matching the access request, and the preset character string includes a preset Header character string and a preset URI character string.

8. The method according to claim 6, characterized in that The configuration of access rules for each CPU architecture includes: Configure the default browser kernel for each CPU architecture; The step of sending the traffic of the access request that complies with the access rule to the application instance in the corresponding CPU architecture includes: Obtaining the browser kernel of the initiator corresponding to the access request, configuring respective preset browser kernels according to the browser kernel of the initiator corresponding to the access request and each CPU architecture, and determining the CPU architecture matching the access request; The traffic of the access request is sent to the application instance in the CPU architecture matching the access request.

9. A heterogeneous application generation device across CPU architectures, characterized in that: Applied to a container cloud platform, the device comprises: A determination module, configured to determine, from the container images uploaded to the image repository, a plurality of target container images required to implement a target heterogeneous application function, wherein the plurality of target container images belong to different CPU architectures; A configuration module, used to configure the same heterogeneous image name and heterogeneous image label for the multiple target container images; A heterogeneous image generation module, used to generate a target heterogeneous image according to the heterogeneous image name and the heterogeneous image label, wherein the target heterogeneous image is used to characterize the association relationship between the multiple target container images, and the target heterogeneous image can run in any CPU architecture; The heterogeneous application generation module is used to configure heterogeneous application information based on the target heterogeneous image and generate the target heterogeneous application.

10. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 8 when executed by the processor.

Citation Information

Cited By

  • Development state and application state container mirror image association method based on OCI specification

    CN119396426A

  • A method for associating development and application container images based on OCI specifications

    CN119396426B

  • Application deployment method, system, equipment and medium

    CN119621239A

  • A method, system, device and medium for application deployment

    CN119621239B

  • Compatibility test method, related device and medium

    CN120066949A