An application deployment method, apparatus, equipment, medium, and product

By acquiring user-defined resource rendering workloads and cluster distribution strategies, and generating target workloads and configuration files, the problems of configuration errors and resource waste in traditional deployment methods are solved. This enables efficient cross-environment application deployment and operation and maintenance management, and improves resource utilization efficiency and flexibility.

CN119987792BActive Publication Date: 2025-10-31TRANSWARP TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510067569.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-10-31
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

Traditional application deployment methods are prone to configuration errors and resource waste, and it is difficult to maintain high availability and stability in different environments. Existing technologies are inefficient when configuring complex applications in multiple layers and deploying them across environments, and they also increase the risk of errors.

Method used

By acquiring user-defined resources, rendering workloads and cluster distribution strategies, generating target workloads and configuration files, and deploying applications in Kubernetes clusters based on these files, it supports multi-level configuration and cross-cluster deployment, optimizes the deployment process using Application CR and TosFed controllers, and introduces hierarchical configuration management and atomic operation and maintenance.

Benefits of technology

The deployment mechanism across multiple clusters has been optimized, improving resource utilization efficiency and application performance, reducing the risk of configuration errors, enhancing operational efficiency and flexibility, and adapting to the diverse needs of different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987792B_ABST
    Figure CN119987792B_ABST
Patent Text Reader

Abstract

This invention discloses an application deployment method, apparatus, device, medium, and product. The method includes: acquiring user-deployed application-custom resources; rendering workloads and cluster distribution strategies based on the application-custom resources to obtain target workloads and configuration files; and deploying the application based on the target workloads and configuration files. Through the technical solution of this invention, the deployment mechanism across multiple clusters is optimized, enabling complex applications to be efficiently deployed in different environments, meeting diverse needs, improving resource utilization efficiency and application performance, and enhancing configuration flexibility and adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of big data technology, and in particular to an application deployment method, apparatus, device, medium and product. Background Technology

[0002] With the rapid development of cloud computing and distributed systems, enterprises need to deploy complex applications in different environments. These applications typically include multiple services and components, involving diverse configuration and resource requirements. Traditional deployment methods often rely on manual operations, which can easily lead to configuration errors and wasted resources. Furthermore, maintaining high availability and stability of applications in different environments is also a significant challenge. Summary of the Invention

[0003] This invention provides an application deployment method, apparatus, device, medium, and product to improve resource utilization efficiency and application performance, and enhance configuration flexibility and adaptability.

[0004] According to one aspect of the present invention, an application deployment method is provided, comprising:

[0005] Retrieve user-deployed application custom resources;

[0006] Based on the application's custom resource rendering workload and cluster distribution strategy, the target workload and configuration file are obtained.

[0007] Deploy the application based on the target workload and the configuration file.

[0008] According to another aspect of the present invention, an application deployment apparatus is provided, the apparatus comprising:

[0009] The acquisition module is used to acquire custom resources deployed by the user's application.

[0010] The rendering module is used to obtain the target workload and configuration file based on the application's custom resource rendering workload and cluster distribution strategy.

[0011] The deployment module is used to deploy the application based on the target workload and the configuration file.

[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0013] At least one processor; and

[0014] A memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the application deployment method described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the application deployment method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the application deployment method described in any embodiment of the present invention.

[0018] This invention, through its embodiments, obtains user-deployed application-defined resources, renders workloads based on these resources, and implements a cluster distribution strategy to determine the target workload and configuration file. The application is then deployed based on this target workload and configuration file. This technical solution optimizes the deployment mechanism across multiple clusters, enabling complex applications to be deployed efficiently in different environments, meeting diverse needs, improving resource utilization efficiency and application performance, and enhancing configuration flexibility and adaptability.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of an application deployment method in an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram illustrating rendering using containers based on various configurations in an embodiment of the present invention;

[0023] Figure 3 This is a schematic diagram illustrating how to trace the execution status and results of an operation and maintenance operation during its execution, according to an embodiment of the present invention.

[0024] Figure 4This is a schematic diagram of an application deployment method in an embodiment of the present invention;

[0025] Figure 5 This is a schematic diagram of the structure of an application deployment device according to an embodiment of the present invention;

[0026] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the application deployment method of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and their derivatives, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0030] Example 1

[0031] To address the cluster deployment issue, existing technologies mainly include the following methods:

[0032] Option 1: Karmada is an open-source Kubernetes multi-cluster management solution designed to solve application deployment and management issues across clusters. However, Karmada primarily focuses on multi-cluster management and may not perform well when handling complex applications with multi-layered configurations and cross-environment deployments. Furthermore, the operational tools provided by Karmada mostly focus on basic atomic functions and cannot support complex operational scenarios, requiring more manual intervention. In terms of meeting the specific storage needs of different applications, Karmada lacks flexibility and efficiency.

[0033] Option 2: KubeBlocks is a cloud-native data infrastructure based on Kubernetes, designed to simplify and optimize the management of database services. It boasts excellent scalability, supporting elastic scaling to meet the needs of applications of varying sizes.

[0034] Option 3: OAM (Open Application Model) provides a declarative approach to application definition, allowing operational capabilities to be integrated as part of the application lifecycle. Components can define their required operational strategies by binding traits. This makes it easier for operations personnel to manage and monitor applications without needing in-depth knowledge of the underlying infrastructure.

[0035] However, the above methods all have certain drawbacks and shortcomings:

[0036] Option 1: Karmada is primarily used for basic multi-cluster management, such as multi-cluster distribution and state aggregation of a single workload, but it lacks sufficient support for multi-level configuration and cross-environment deployment of complex applications. Its lack of configuration and deployment management capabilities for complex applications can easily lead to inefficiency and increase the risk of configuration errors.

[0037] Option 2: KubeBlocks primarily provides declarative database services for cloud platforms, boasting excellent scalability and supporting flexible elastic scaling. However, it does not support the deployment and operation of stateful services across multiple or cross-cluster environments, limiting its ability to deploy stateful applications in multi-cluster environments.

[0038] Option 3: OAM allows users to uniformly describe all components and operational processes of modern microservice applications as an infrastructure-independent "deployment plan." However, OAM requires users to master and be familiar with a large number of terms, which significantly increases the cognitive burden and operational complexity. Furthermore, OAM does not support the operation and management of multi-cluster or cross-cluster service applications, limiting its application in multi-cluster environments.

[0039] Figure 1This is a flowchart of an application deployment method according to an embodiment of the present invention. This embodiment is applicable to application deployment scenarios. The method can be executed by the application deployment device according to the present invention, which can be implemented in software and / or hardware, such as... Figure 1 As shown, the method specifically includes the following steps:

[0040] S101. Obtain user-deployed application custom resources.

[0041] In this embodiment, application custom resources can be represented as Application CR, where CR is an abbreviation for CustomResource, which is a custom resource, a specific instance corresponding to CRD, and extends the API functionality of Kubernetes.

[0042] It's important to note that CRDs (Custom Resource Definitions) are Kubernetes custom resource definitions that allow users to extend Kubernetes functionality through a declarative API, enabling the creation and management of custom resources. These resources are not part of the standard Kubernetes API, allowing Kubernetes to go beyond built-in resources (such as Pods and Services; a Pod is the smallest deployment unit in Kubernetes, containing one or more containers with shared storage and network; a Service is an abstraction in Kubernetes that defines a logical collection of Pods and provides methods for accessing them) to support user-defined resource types.

[0043] Kubernetes, or K8s for short, is an open-source container orchestration platform used to automate the deployment, scaling, and management of containerized applications. Kubernetes' primary goal is to help developers and system administrators more easily deploy applications, scale services, and manage containers across host clusters.

[0044] Specifically, obtain the Application CR deployed by the user.

[0045] S102. Based on the application's custom resource rendering workload and cluster distribution strategy, obtain the target workload and configuration file.

[0046] In this embodiment, a workload can be represented as a Deployment. For example, a workload can be a Deployment, which represents a resource object in Kubernetes used to manage the deployment and scaling of stateless applications.

[0047] As we know, cluster distribution strategy refers to how to manage and allocate resources, tasks or data in a cluster to achieve efficient, reliable and scalable operation.

[0048] It should be noted that the target workload can be the final Kubernetes target workload generated after rendering and configuring the workload.

[0049] It should be explained that the configuration file can be a file obtained by populating the configuration template with the configuration information contained in the Application CR.

[0050] Specifically, the corresponding workload and cluster distribution strategy are defined through the Application definition.

[0051] S103. Deploy applications based on target workload and configuration files.

[0052] Specifically, after generating the configuration file, the system interacts with the Kubernetes cluster based on the configuration file to deploy the target workload within the cluster.

[0053] This invention, through its embodiments, obtains user-deployed application-defined resources, renders workloads based on these resources, and implements a cluster distribution strategy to determine the target workload and configuration file. The application is then deployed based on this target workload and configuration file. This technical solution optimizes the deployment mechanism across multiple clusters, enabling complex applications to be deployed efficiently in different environments, meeting diverse needs, improving resource utilization efficiency and application performance, and enhancing configuration flexibility and adaptability.

[0054] Optionally, application-custom resources include cross-cluster distribution rules and configuration information corresponding to the application deployment.

[0055] As we know, cross-cluster distribution rules are typically used to distribute and manage resources, data, or tasks across multiple clusters. These rules are crucial in distributed systems, microservice architectures, and cloud computing environments to ensure efficient resource utilization and high system availability.

[0056] In this embodiment, the configuration information may include information such as the configuration method of the Kubernetes workload contained in the Application CR deployed by the user. For example, the configuration information may include: cluster affinity configuration; target cluster (a cluster is a collection of Kubernetes nodes used to run containerized applications); the weight of the target cluster for distributing replicas, which is generally defined as the number of replicas to be distributed; influencing scheduling by automatically labeling nodes, so that adding or removing nodes (a node is a machine in a Kubernetes cluster, which can be a physical machine or a virtual machine running pods) will not cause existing pods to restart; same-node affinity, which filters nodes for scheduling by labeling nodes; affinity or anti-affinity; cluster taint tolerance settings; cloud template; cloud instance name; total number of cloud replicas, which is generally defined as the sum of the weights of all target clusters, and a value of 0 means no replicas will be created.

[0057] Based on the application's custom resource rendering workload and cluster distribution strategy, the target workload and configuration file are obtained, including:

[0058] The application controller renders the workload based on the configuration information.

[0059] As is known, in Kubernetes, the Controller is a component used to manage the application's state, ensuring that the application runs as expected by monitoring resource objects. In this embodiment, the ApplicationController is responsible for managing the application's lifecycle, including operations such as starting, stopping, and restarting, and ensuring the application's consistency and availability in a multi-cluster environment by monitoring its state.

[0060] Specifically, users deploy Application CR, and the Application Controller renders the corresponding workload through the Application definition.

[0061] The application controller renders the cluster distribution strategy based on the cross-cluster distribution rules.

[0062] The cluster distribution strategy includes: propagation strategy and coverage strategy.

[0063] In this embodiment, Propagation Policy and Override Policy are two important configuration policies used to manage and control the distribution and configuration of resources across multiple clusters. The Propagation Policy defines how configurations, resources, or tasks are propagated from one cluster to other clusters; it controls the distribution method and scope of resources. The Override Policy defines how to handle conflicts when multiple configurations or resources conflict; it determines which configuration or resource has higher priority.

[0064] Specifically, users deploy Application CR, and the Application Controller defines the rendering cluster distribution policies, Propagation Policy and Override Policy, through the Application definition.

[0065] If the target controller detects changes in workload and cluster distribution policy, it creates the target workload and configuration file in the target cluster.

[0066] In this embodiment, the target controller can be a TosFed controller. TosFed is a federated multi-cluster container orchestration system in a multi-cluster scenario.

[0067] It should be noted that the target cluster can be a cluster where the workload and cluster distribution strategy have changed. The target workload and configuration file can be the actual running workload and configuration file.

[0068] Specifically, the TosFed controller listens for changes in resources such as workloads and cluster distribution policies, and creates the actual running workloads and configuration files in the corresponding clusters.

[0069] The technical solution of this invention supports multi-level configuration and cross-cluster deployment of complex applications, significantly improving management efficiency and reducing error risks. By configuring node-level resource scheduling strategies, resource utilization and system performance are further optimized, maximizing the utilization of hardware resources.

[0070] Optionally, the configuration information includes how the workload is configured.

[0071] In this embodiment, the Application is compatible with the configuration methods of native Kubernetes workloads and supports configuration sharing, heterogeneous configuration, and merging. Configuration sharing refers to support for common configuration templates, such as images and other common configurations. Configuration heterogeneity and merging mean that heterogeneous fields can be configured as needed based on different deployment modes / roles / target clusters, and configurations are automatically overridden and merged during workload rendering, improving flexibility in multi-cluster / cross-cluster deployments.

[0072] Before rendering the workload based on configuration information via the application controller, the following is also included:

[0073] Set target heterogeneous fields based on the target deployment mode, target role, and target cluster so that configuration overlay and merging are performed based on the target heterogeneous fields during workload rendering.

[0074] This embodiment introduces a multi-cluster deployment, which refers to a design that supports application deployment and management across multiple Kubernetes clusters. It provides cluster-node granular scheduling control, facilitating cross-cluster resource planning for stateful services. The Application supports direct configuration of target clusters and nodes or selector rules for workload distribution in Cloud / Local mode. The Application Controller generates corresponding Propagation Policies based on user configuration and ultimately distributes the workloads to the nodes in the target cluster. When the distribution rules in the Application change, the Propagation Policies are updated simultaneously, adjusting the actual number of replicas to the desired value. The distribution rules support node-level selection, enabling fine-grained resource planning and configuration for workload pods.

[0075] This embodiment also introduces hierarchical configuration management, simplifying the configuration management process through hierarchical configuration and embedded templates. Different configuration merging and overriding strategies are provided for different configuration types to ensure configuration flexibility across various scenarios. Configurations are divided into multiple layers from the outside in, depending on the deployment mode. Outer layer configurations can be shared by multiple workloads. Configurations not present in the inner layer are inherited from the outside, while each workload also has its own unique inner layer configuration. In Cloud mode, workload configurations are divided into outer Role configurations and inner Cloud configurations, with outer layer configurations inheriting from the inner layer configurations. In Local mode, workload configurations are divided from the outside in into Role configurations, Local configurations, Instance configurations, and Location configurations. If the same workload has different configuration definitions on different clusters, the Application Controller will distribute different configurations according to the different cluster Override Policy rules.

[0076] In multi-cluster deployment and management, configuring heterogeneous fields on demand based on different deployment modes, roles, and target clusters helps ensure that each cluster is optimized for its specific environment and needs. First, define a common configuration template containing all possible configuration fields, including service configurations, resource limits, environment variables, etc. Then, adjust the configuration using an override policy based on different deployment modes, roles, and target clusters. This can be done through environment variables, ConfigMaps, Secrets, or directly in the deployment file. For cross-cluster management, Kubernetes Federation or GitOps tools (such as Argo CD, Flux) can be used to automate configuration distribution and management. Finally, use automated scripts and CI / CD tools (such as Jenkins, GitHub Actions) to automate configuration generation and deployment. Simultaneously, use verification tools (such as KubeConform, Kustomize) to ensure the correctness and consistency of the configuration. Finally, use monitoring and logging tools (such as Prometheus, Grafana, ELK Stack) to monitor the effectiveness of the configuration and the application's running status. By following the steps above, heterogeneous fields can be configured as needed according to different deployment modes, roles, and target clusters, ensuring that the configuration of each cluster meets its specific requirements while maintaining configuration consistency and manageability.

[0077] Optionally, the workload can be rendered by the application controller based on configuration information, including:

[0078] Based on the configuration template, the application controller merges the configurations sequentially according to the inner configuration priority strategy.

[0079] For example, the configuration template may include: Application version; dry run switch (used to simulate or test the effect of a process or command without actually performing an operation, helping users verify the correctness of the operation and avoid potential errors and risks. Using the dry run function in command-line tools, scripts, configuration files, web applications, and database migrations can improve system reliability and user confidence); role definition list; cluster capability control switch (hpa indicates enabling autoscaling for local load); cloud template; local template; shared template, i.e., role template, which will be inherited downwards.

[0080] In practice, when rendering and configuring workloads, they are merged sequentially according to the inner configuration priority strategy to generate the final Kubernetes workload.

[0081] Depending on the specific deployment method and target cluster, you can customize the configuration on the common configuration template.

[0082] Optionally, the inner configuration priority strategy is as follows:

[0083] If the workload is a cloud workload, role configuration takes precedence over cloud configuration.

[0084] Specifically, the template inheritance hierarchy is from the outside in:

[0085] For cloud workloads: role template → cloud template. Here, role template represents role configuration, and cloud template represents cloud configuration.

[0086] If the workload is a local workload, role configuration takes precedence over local configuration, which takes precedence over instance configuration, which takes precedence over location configuration.

[0087] Specifically, for local workloads: role template → local template → instance template → location template. Here, the role template represents role configuration, the local template represents local configuration, the instance template represents instance configuration, and the location template represents location configuration.

[0088] In practice, configurations not defined in the inner layer will inherit the configurations of the outer layer; otherwise, they will be overridden according to the rules.

[0089] For example, Figure 2 This is a schematic diagram illustrating rendering using containers based on various configurations in an embodiment of the present invention. For example... Figure 2 As shown, based on the role template, local template, and instance template, the Local c1 container uses the nginx:v2 image and adds an annotation to the cluster1 cluster to obtain the final rendering 1; based on the role template and cloud template, the Cloud c2 container uses the foobar:v2 image to obtain the final rendering 2.

[0090] In practice, when users have multiple cloud operating system clusters, such as both version 3.x and version 2.x, considering the wide range of compatibility issues, they want to deploy workloads that have undergone compatibility testing on different versions of the cloud operating system. Therefore, this embodiment, based on maintaining only one configuration template, utilizes Application to customize the configuration for different clusters / workloads, and ultimately deploys the desired workload version on the target cluster.

[0091] Specifically, for List-type configuration items, such as Containers / Volumes, the Application Controller compares each item's name and adds the configuration to the desired location. For example, in cross-cluster deployment of the Quark Executor computing service, different clusters have different available resources (CPU, memory), requiring different resource requests based on the same configuration template. Application's configuration sharing, heterogeneous configuration, and merging features easily enable different cluster workloads to use different environment variables, meeting user needs.

[0092] The technical solution of this invention provides a refined configuration hierarchy abstraction in terms of configuration management, improving the flexibility and scalability of configuration. Through multi-level configuration merging and overriding, it ensures the consistency and accuracy of multi-cluster workload configurations while supporting independent configuration customization strategies, thus adapting to different complex field environments.

[0093] Optionally, the method further includes:

[0094] If the application detects a change in the running status of the workload, it updates the resource status with the change information.

[0095] In actual operation, the Application monitors the real-time running status changes of the workload and updates the corresponding resource status, making it convenient for users to observe the actual running status of the workload.

[0096] Optionally, after deploying the application based on the target workload and configuration files, the following may also be included:

[0097] Receive user-deployed custom resources for operation and maintenance.

[0098] In this embodiment, custom resources for operation and maintenance can be represented by Operation CR.

[0099] Specifically, when users perform operations and maintenance tasks, such as restarting or pausing a pod, they can deploy corresponding custom operations and maintenance resources.

[0100] The operation and maintenance controller can formulate operation and maintenance operations based on the parameters defined in the custom operation and maintenance resources.

[0101] Operations and maintenance include: starting, stopping, expanding, and shrinking.

[0102] In this embodiment, the Operation Controller focuses on automating operations and maintenance, enabling dynamic adjustment and optimization of applications. In addition, it provides a standardized set of operation interfaces, including steps such as pre-inspection, execution, and checking, which facilitates the decomposition and expansion of load operations and maintenance. It also defines commonly used operations and maintenance, such as start, stop, and restart operations, simplifying the operation and maintenance process.

[0103] Specifically, after a user deploys an Operation, the Operation Controller will gradually formulate the predefined operation and maintenance procedures according to the parameters defined in the Operation CR.

[0104] Operations and maintenance are performed through the target controller.

[0105] Specifically, the Operation Controller executes the actual operation and maintenance tasks through TosFed.

[0106] In this embodiment, atomic operation and maintenance (O&M) operations are introduced. These atomic O&M operations automatically execute predefined O&M behaviors, reducing manual intervention. These atomic O&M operations can be combined and arranged according to actual scenarios and business needs. The Operation Controller encapsulates common cross-cluster O&M operations, improving the development and O&M efficiency across cluster platforms. The Operation Controller provides methods such as creating Override Policies to add special annotations to workloads, directly operating member cluster resources or application fields through the cluster client, and completing O&M operations.

[0107] Optional operations include: Validate, Execute, and Check.

[0108] The method also includes:

[0109] During the execution of operations and maintenance, the execution status and results of the operations and maintenance are traced.

[0110] In practice, Operation encapsulates common operational tasks such as start / stop / scale up / down, and defines generic interfaces for additional operational tasks to facilitate customized operational operations. Furthermore, the actual execution status and results can be traced during execution, enhancing operational capabilities in multi-cluster scenarios.

[0111] Optionally, the execution status and results of the operation and maintenance procedures can be traced during execution, including:

[0112] When the execution status is verification, the validity of the operation and maintenance parameters is verified, and the status of the operation object is verified.

[0113] Specifically, during the verification phase, the validity of the Operation parameters and the status of the object being operated on are checked. If these conditions are not met, the operation is rejected.

[0114] When the execution status is "Executing", perform operation and maintenance operations.

[0115] Specifically, during the execution phase, corresponding operational and maintenance operations are performed, such as restarting the pod or updating fields in the Application CR.

[0116] When the execution status is "checking", the expected status of the workload is checked cyclically.

[0117] Specifically, during the inspection phase, some operations need to verify the execution results of maintenance operations. This involves repeatedly checking the expected status of pods or workloads and ultimately updating the status field of the Operation CR.

[0118] The technical solution of this invention provides standard atomic operation (CR) operations, which facilitates rapid integration into the operation and maintenance workflow, reduces manual intervention, and lowers the complexity and cost of operation and maintenance.

[0119] For example, Figure 3 This is a schematic diagram illustrating how to trace the execution status and results of maintenance operations during their execution, according to an embodiment of the present invention. Figure 3 As shown, when the Operation Phase is the Validate phase, the corresponding Operation Status is Validating. When the Operation Phase is the Execute phase, the corresponding Operation Status is Running. When the Operation Phase is the Check phase, some Operations need to verify the execution results of the maintenance operations. This involves looping through the expected status of the pod or workload, such as Success or Failed, and finally updating the status field of the Operation CR.

[0120] The technical solution of this invention firstly optimizes the deployment mechanism across multiple clusters, enabling complex applications to be deployed efficiently in different environments to meet diverse needs. Secondly, it achieves more granular resource scheduling, allocating resources across clusters and specific nodes, thereby improving resource utilization efficiency and application performance. Furthermore, by introducing hierarchical configuration and embedded templates, configuration management is simplified, configuration errors are reduced, and configuration flexibility and adaptability are improved. This invention also enhances application operation and maintenance capabilities by defining standardized atomic operation and maintenance operations, achieving high scalability and reducing costs and complexity. Finally, this invention supports diverse storage needs and provides flexible volume mounting strategies to adapt to different application scenarios and storage requirements.

[0121] As an exemplary description of an embodiment of the present invention Figure 4 This is a schematic diagram of an application deployment method according to an embodiment of the present invention. For example... Figure 4As shown, users deploy Application CRs. The Application Controller, through the Application definition, renders the corresponding workloads and cluster distribution strategies. The TosFed controller listens for changes to these resources and creates the actual running workloads and configuration files in the corresponding clusters. For example, Sync Workload Cluster1, Cluster2, and Cluster3 complete the startup (OPStart). When users perform operational operations, such as restarting (OP Restart) or stopping (OP Stop), they create corresponding Operation CRs. The Operation Controller, through TosFed, executes the actual operational operations, i.e., Operation Pods, and simultaneously feeds back the actual execution status and results (Status Update) to the Application Controller.

[0122] The technical solution of this invention provides a mechanism to support unified management and coordination of workloads in a multi-cluster environment, solving the problems of cross-cluster resource scheduling and application deployment. At the same time, it introduces configuration-level abstraction, which simplifies configuration management for multi-cluster / cross-cluster deployments and supports dynamic configuration merging and updating. In addition, it provides multi-cluster / cross-cluster atomic operation and maintenance tools, defines extensible interfaces, simplifies daily management tasks, and improves operation and maintenance efficiency and accuracy.

[0123] Example 2

[0124] Figure 5 This is a schematic diagram of an application deployment device according to an embodiment of the present invention. This embodiment is applicable to application deployment scenarios. The device can be implemented using software and / or hardware, and can be integrated into any device that provides application deployment functionality, such as… Figure 5 As shown, the application deployment device specifically includes: an acquisition module 201, a rendering module 202, and a deployment module 203.

[0125] Among them, the acquisition module 201 is used to acquire user-deployed application custom resources;

[0126] Rendering module 202 is used to obtain the target workload and configuration file based on the application's custom resource rendering workload and cluster distribution strategy;

[0127] Deployment module 203 is used to deploy the application based on the target workload and the configuration file.

[0128] Optionally, the application-customized resources include cross-cluster distribution rules and configuration information corresponding to the application deployment.

[0129] The rendering module 202 includes:

[0130] The first rendering unit is used to render the workload according to the configuration information via the application controller;

[0131] The second rendering unit is used to render the cluster distribution strategy according to the cross-cluster distribution rules through the application controller. The cluster distribution strategy includes: a propagation strategy and an coverage strategy.

[0132] A creation unit is used to create a target workload and configuration file in the target cluster if the target controller detects changes in the workload and the cluster distribution policy.

[0133] Optionally, the configuration information includes the configuration method of the workload;

[0134] The device further includes:

[0135] The configuration unit is used to set target heterogeneous fields according to the target deployment mode, target role, and target cluster, so that the configuration is overridden and merged according to the target heterogeneous fields during workload rendering.

[0136] Optionally, the first rendering unit is specifically used for:

[0137] Based on the configuration template, the application controller merges the configuration information sequentially according to the inner configuration priority strategy.

[0138] Optionally, the inner layer configuration priority strategy is:

[0139] If the workload is a cloud-based workload, then role configuration takes precedence over cloud configuration;

[0140] If the workload is a local workload, then role configuration takes precedence over local configuration, which takes precedence over instance configuration, which takes precedence over location configuration.

[0141] Optionally, the device further includes:

[0142] The update module is used to update the resource status with the change information if the application detects a change in the running status of the workload.

[0143] Optionally, the device further includes:

[0144] The receiving module is used to receive user-deployed operation and maintenance custom resources;

[0145] The module is used to formulate operation and maintenance operations based on the defined parameters in the operation and maintenance custom resources through the operation and maintenance controller. The operation and maintenance operations include: starting, stopping, expanding and shrinking.

[0146] The execution module is used to execute the operation and maintenance operations through the target controller.

[0147] Optionally, the operation and maintenance operations may also include: verification, execution, and inspection;

[0148] The device further includes:

[0149] The traceability module is used to trace the execution status and results of the operation and maintenance operation during its execution.

[0150] Optionally, the traceability module is specifically used for:

[0151] When the execution status is verification, the validity of the operation and maintenance parameters is verified, and the status of the operation object is verified.

[0152] When the execution status is "execution", the operation and maintenance operation is performed.

[0153] When the execution state is in the check state, the expected state of the workload is checked cyclically.

[0154] The above-mentioned products can execute the application deployment method provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects of the execution method.

[0155] Example 3

[0156] Figure 6 A schematic diagram of an electronic device 30 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0157] like Figure 6As shown, the electronic device 30 includes at least one processor 31 and a memory, such as a read-only memory (ROM) 32 or a random access memory (RAM) 33, communicatively connected to the at least one processor 31. The memory stores computer programs executable by the at least one processor. The processor 31 can perform various appropriate actions and processes based on the computer program stored in the ROM 32 or loaded from storage unit 38 into the RAM 33. The RAM 33 can also store various programs and data required for the operation of the electronic device 30. The processor 31, ROM 32, and RAM 33 are interconnected via a bus 34. An input / output (I / O) interface 35 is also connected to the bus 34.

[0158] Multiple components in electronic device 30 are connected to I / O interface 35, including: input unit 36, such as keyboard, mouse, etc.; output unit 37, such as various types of monitors, speakers, etc.; storage unit 38, such as disk, optical disk, etc.; and communication unit 39, such as network card, modem, wireless transceiver, etc. Communication unit 39 allows electronic device 30 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0159] Processor 31 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 31 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 31 performs the various methods and processes described above, such as application deployment methods:

[0160] Retrieve user-deployed application custom resources;

[0161] Based on the application's custom resource rendering workload and cluster distribution strategy, the target workload and configuration file are obtained.

[0162] Deploy the application based on the target workload and the configuration file.

[0163] In some embodiments, the application deployment method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 38. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 30 via ROM 32 and / or communication unit 39. When the computer program is loaded into RAM 33 and executed by processor 31, one or more steps of the application deployment method described above may be performed. Alternatively, in other embodiments, processor 31 may be configured to perform the application deployment method by any other suitable means (e.g., by means of firmware).

[0164] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0165] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0166] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0167] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0168] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0169] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0170] In one embodiment, the present invention further includes a computer program product, which includes a computer program that, when executed by a processor, implements the application deployment method of any embodiment of the present invention.

[0171] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0172] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0173] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An application deployment method, characterized in that, include: Obtain custom resources deployed by the user's application; Based on the application's custom resource rendering workload and cluster distribution strategy, the target workload and configuration file are obtained. Deploy the application based on the target workload and the configuration file; The application-customized resources include cross-cluster distribution rules and configuration information corresponding to the application deployment. Based on the application's custom resource rendering workload and cluster distribution strategy, the target workload and configuration file are obtained, including: The application controller renders the workload based on the configuration information; The application controller renders a cluster distribution strategy based on the cross-cluster distribution rules, the cluster distribution strategy including: a propagation strategy and an coverage strategy; If the target controller detects changes in the workload and the cluster distribution policy, it creates the target workload and configuration file in the target cluster.

2. The method according to claim 1, characterized in that, The configuration information includes the configuration method of the workload; Before rendering the workload based on the configuration information via the application controller, the following is also included: Set target heterogeneous fields according to the target deployment mode, target role, and target cluster so that the configuration is overridden and merged according to the target heterogeneous fields during workload rendering.

3. The method according to claim 1, characterized in that, The application controller renders the workload based on the configuration information, including: Based on the configuration template, the application controller merges the configuration information sequentially according to the inner configuration priority strategy.

4. The method according to claim 3, characterized in that, The inner layer configuration priority strategy is as follows: If the workload is a cloud-based workload, then role configuration takes precedence over cloud configuration; If the workload is a local workload, then role configuration takes precedence over local configuration, which takes precedence over instance configuration, which takes precedence over location configuration.

5. The method according to claim 1, characterized in that, Also includes: If the application detects a change in the running status of the workload, it updates the resource status with the change information.

6. The method according to claim 1, characterized in that, After deploying the application based on the target workload and the configuration file, the process also includes: Receive user-deployed custom resources for operation and maintenance; The operation and maintenance controller formulates operation and maintenance operations based on the defined parameters in the operation and maintenance custom resources. The operation and maintenance operations include: starting, stopping, expanding and shrinking. The operation and maintenance are performed through the target controller.

7. The method according to claim 6, characterized in that, The operation and maintenance procedures also include: verification, execution, and inspection; The method further includes: During the execution of the operation and maintenance operation, the execution status and results of the operation and maintenance operation are traced.

8. The method according to claim 7, characterized in that, During execution, the execution status and results of the operation and maintenance activities are traced, including: When the execution status is verification, the validity of the operation and maintenance parameters is verified, and the status of the operation object is verified. When the execution status is "execution", the operation and maintenance operation is performed. When the execution state is in the check state, the expected state of the workload is checked cyclically.

9. An application deployment device, characterized in that, include: The acquisition module is used to acquire custom resources deployed by the user's application. The rendering module is used to obtain the target workload and configuration file based on the application's custom resource rendering workload and cluster distribution strategy. The deployment module is used to deploy the application based on the target workload and the configuration file; The application-customized resources include cross-cluster distribution rules and configuration information corresponding to the application deployment. The rendering module includes: The first rendering unit is used to render the workload according to the configuration information via the application controller; The second rendering unit is used to render the cluster distribution strategy according to the cross-cluster distribution rules through the application controller. The cluster distribution strategy includes: a propagation strategy and an coverage strategy. A creation unit is used to create a target workload and configuration file in the target cluster if the target controller detects changes in the workload and the cluster distribution policy.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the application deployment method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the application deployment method according to any one of claims 1-8.

12. A computer program product comprising a computer program that, when executed by a processor, implements the application deployment method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Application deployment method and system

    CN111984270A

  • Application deployment method and device, controller, equipment and storage medium

    CN118860418A