A method and system for configuring an automated application deployment pipeline

By storing application parameters in Kubernetes and using Operator to process them automatically, the problem of manually obtaining parameters during application deployment is solved, realizing an automated deployment pipeline and improving operational efficiency and process stability.

CN114398155BActive Publication Date: 2025-10-31SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210173247.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2025-10-31
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

In a Kubernetes environment, application deployment requires manually obtaining parameters from the preceding application, which makes automated deployment impossible and increases the operational difficulty and time consumption for operations and maintenance personnel.

Method used

By storing application parameters in Kubernetes' secret/configmap and using Operator to automatically retrieve and merge these parameters, an automated deployment pipeline is achieved, including parameter processing in the application installation and deletion process.

Benefits of technology

It has enabled an automated deployment pipeline for applications, reducing manual operations, improving deployment smoothness, avoiding parameter errors, and saving time and human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398155B_ABST
    Figure CN114398155B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for configuring an automated application deployment pipeline, belonging to the field of application deployment technology. It uses deployment results as configuration information for automated deployment pipelines: during installation, application parameters are saved in the Kubernetes secret / configmap; upon successful application installation, a predefined hook operation is triggered, sending the data to the operator in a given format; during application installation, the operator retrieves the application configuration and analyzes whether the application needs to provide parameters to subsequent applications; if so, the hook is injected into the Helm configuration; simultaneously, the operator analyzes whether the application needs to use parameters from previously installed applications. This invention can automatically retrieve parameters during deployment and apply them to subsequent applications, making the process more automated and reducing the operational difficulty and time consumption for operations personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of application deployment technology, and more specifically to a method and system for configuring an automated application deployment pipeline. Background Technology

[0002] Kubernetes is a portable, scalable, open-source platform for managing containerized workloads and services, enabling declarative configuration and automated deployment. Kubernetes boasts a large and rapidly growing ecosystem with a wide range of services, support, and tools available. We chose Helm, a derivative of Kubernetes, to manage our applications, significantly improving operational efficiency.

[0003] When deploying applications, it is common to encounter situations where some applications need to use the results of previously installed applications. For example, Ceph can only obtain its randomly generated authentication information after it is installed, and subsequent business needs to set authentication information in order to access Ceph and perform operations on it normally.

[0004] In this situation, we usually need to manually obtain the corresponding parameters after installing Ceph, refresh them to the application, and then start the subsequent deployment process. This results in the inability to automatically deploy all applications and incurs some time loss. Summary of the Invention

[0005] The technical objective of this invention is to address the above-mentioned shortcomings by providing a method and system for configuring an automated application deployment pipeline. This method and system can automatically acquire parameters during the deployment process and apply them to subsequent applications, making the process more automated and reducing the operational difficulty and time consumption for maintenance personnel.

[0006] The technical solution adopted by this invention to solve its technical problem is:

[0007] A method for configuring an automated application deployment pipeline, which uses deployment results as configuration information for the automated deployment pipeline:

[0008] During installation, application parameters are saved in Kubernetes' secret / configmap; upon successful application installation, the predefined hook operation is triggered and sent to the operator in the given format.

[0009] During application installation, the operator obtains the application configuration and analyzes whether the application needs to provide parameters to subsequent applications. If so, the hook is injected into the Helm configuration. At the same time, the operator analyzes whether the application needs to use the parameters of the previously installed application. If so, the parameters of secret / configmap are merged into the parameter configuration of Helm.

[0010] This method automatically acquires parameters during application deployment and applies them to subsequent applications, thereby making the process automation smoother.

[0011] Kubernetes is an open-source container orchestration engine from Google that supports automated deployment, large-scale scalability, and containerized application management.

[0012] In this article, Operator refers to a mass application management tool based on Helm; Helm refers to a higher-level application management tool based on Kubernetes.

[0013] Both Secret and configmap are text resources defined in Kubernetes.

[0014] The parameters are stored in Kubernetes' secret / configmap, ensuring that parameter variables are not lost after the operator restarts. Parameters generated during the current installation can continuously provide parameters for subsequent installations.

[0015] Preferably, the parameter uses the name of the release as the name of the secret / configmap;

[0016] Internal key-value pairs include: parameters (parameters provided by the application), and other releases that use its variables.

[0017] Release: An instance generated after deploying the app. Each Helm install generates a new release.

[0018] App refers to upper-layer applications based on Kubernetes;

[0019] Hook: Allows developers to execute hook functions at key points in the release lifecycle. The hook we are currently using is post-install (executed after the application is installed).

[0020] Furthermore, regarding the application of parameters, the parameters used are declared in the application parameter variable, such as releaseA.parameterA; the operator will automatically obtain the secret / configmap with the corresponding name and refresh the value to the corresponding value, such as valueA; after installation, the operator will refresh the release name of the current application to the corresponding used_released;

[0021] When an application is deleted, the operator prompts the operations personnel with the components whose parameters are used based on the used_released in the corresponding secret / configmap. The operations personnel then confirm whether they really want to delete the application. After confirmation, the operator deletes the secret / configmap and removes the release from the used_released associated with other applications, ensuring that the saved parameters are consistent with the actual application in the environment.

[0022] Preferably, when an application is deleted, the operator obtains the application's configuration and analyzes whether the application provides any configuration parameters. If so, the operator is prompted that the application provides parameters, which applications use these parameters, and whether uninstalling the related applications will have an impact.

[0023] Preferably, the specific implementation process of application installation is as follows:

[0024] 1) The maintenance personnel start the pre-configured installation process;

[0025] 2) The Operator obtains the application configuration;

[0026] 3) The Operator analyzes whether the application needs to provide parameters to subsequent applications. If so, it injects the extracted hook.

[0027] 4) The Operator analyzes whether the application needs to use the parameters of the previously installed application. If so, it merges the parameters of secret / configmap into the parameter configuration of Helm.

[0028] 5) Refresh its parameter file;

[0029] 6) The Operator calls Helm commands to install the application;

[0030] 7) Helm detects that the app is installed successfully, triggers the predefined hook operation, and sends it to the operator in the given format;

[0031] 8) After receiving the parameter feedback, the Operator saves it in secret / configmap;

[0032] 9) Repeat steps 2) through 8) until all applications are installed.

[0033] Preferably, the specific deletion process for the application is as follows:

[0034] 1) The maintenance personnel initiate the pre-configured deletion process;

[0035] 2) The Operator obtains the application configuration;

[0036] 3) The Operator analyzes whether the application provides configuration parameters. If so, it prompts the operations and maintenance personnel, who then decide whether to continue deleting the application.

[0037] 4) The Operator calls the helm command to delete the application.

[0038] Preferably, the hook is encapsulated and automatically injected into the Helm configuration, avoiding the need for application modifications;

[0039] Hooks support retrieving parameters from specified paths, including reading configmap / secret / files. These paths are placed in the application's configuration, making it easier for operations and maintenance personnel to make appropriate configurations based on the environment.

[0040] Hooks support automatic injection, allowing operations and maintenance personnel to add scripts to the corresponding applications as needed, chaining necessary parameters without having to modify the application each time.

[0041] This invention also claims a configuration system for an automated application deployment pipeline, including an automated application installation module and an automated application removal module.

[0042] This system implements the above-mentioned method for configuring an automated application deployment pipeline.

[0043] The present invention also claims a configuration apparatus for an application automation deployment pipeline, comprising: at least one memory and at least one processor;

[0044] The at least one memory is used to store a machine-readable program;

[0045] The at least one processor is used to call the machine-readable program to execute the above-described application automation deployment pipeline configuration method.

[0046] The present invention also claims protection for a computer-readable medium storing computer instructions that, when executed by a processor, cause the processor to perform the above-described application automation deployment pipeline configuration method.

[0047] Compared with the prior art, the application automated deployment pipeline configuration method and system of the present invention have the following advantages:

[0048] In this method, the automated hook injection approach and flexible configuration make operation and maintenance simpler;

[0049] By streamlining the acquisition, storage, and use of configuration parameters, the entire process is streamlined, reducing the need for manual parameter acquisition and resulting in a smoother workflow. This addresses issues encountered with Helm, a Kubernetes-based application management tool, where parameters are not fixed and can only be generated after application installation.

[0050] This automated deployment pipeline configuration method makes it easier for environmental personnel to deploy and upgrade environments, saving a lot of waiting time;

[0051] Using this method can avoid many basic errors, such as copying parameters incorrectly.

[0052] Using this method for application deployment allows for flexible modification of parameter configurations as the environment changes. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the installation process of the application automated deployment pipeline configuration method provided in the embodiments of the present invention;

[0054] Figure 2 This is a schematic diagram of the deletion process of the application automated deployment pipeline configuration method provided in the embodiment of the present invention. Detailed Implementation

[0055] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0056] This invention provides a method for configuring an automated deployment pipeline for applications, using deployment results as configuration information for the automated deployment pipeline.

[0057] During installation, application parameters are saved in Kubernetes' secret / configmap, ensuring that parameter variables are not lost after the operator restarts; parameters generated during the current installation can continuously provide parameters for subsequent installations.

[0058] The parameter uses the name of the release as the name of the secret / configmap;

[0059] Internal key-value pairs include: parameters (parameters provided by the application), and other releases that use its variables;

[0060] Format example:

[0061]

[0062] The parameters used can be declared in the application parameter variables, such as relsaseA.parameterA; the operator will automatically obtain the secret / configmap with the corresponding name and refresh the value to the corresponding value, such as valueA; after installation, the operator will refresh the release name of the current application (such as releaseB) to relsaseA.used_release.

[0063] When an application is deleted, the operator prompts the operations personnel with the components whose parameters are used based on the `used_released` field in the corresponding `secret / configmap`. The operations personnel then confirm whether they truly want to delete the application. After confirmation, the operator deletes the `secret / configmap` and removes the `release` attribute from the `used_released` fields associated with other applications. This ensures that the saved parameters are consistent with the actual application in the environment.

[0064] The hook is encapsulated and automatically injected into the Helm configuration, avoiding the need for application modifications;

[0065] Hooks support retrieving parameters from specified paths, including reading configmap / secret / files, etc. The paths are placed in the application's configuration, making it convenient for operations and maintenance personnel to make appropriate configurations based on the environment.

[0066] Hooks support automatic injection, allowing operations and maintenance personnel to add scripts to the corresponding applications as needed, chaining necessary parameters without having to modify the application each time.

[0067] like Figure 1 As shown, the specific implementation process of application installation is as follows:

[0068] 1) The maintenance personnel start the pre-configured installation process;

[0069] 2) The Operator obtains the application configuration;

[0070] 3) The Operator analyzes whether the application needs to provide parameters to subsequent applications. If so, it injects the extracted hook.

[0071] 4) The Operator analyzes whether the application needs to use the parameters of the previously installed application. If so, it merges the parameters of secret / configmap into the parameter configuration of Helm.

[0072] 5) Refresh its parameter file;

[0073] 6) The Operator calls Helm commands to install the application;

[0074] 7) Helm detects that the app is installed successfully, triggers the predefined hook operation, and sends it to the operator in the given format;

[0075] 8) After receiving the parameter feedback, the Operator saves it in secret / configmap;

[0076] 9) Repeat steps 2) through 8) until all applications are installed.

[0077] like Figure 2 As shown, the specific deletion process for the application is as follows:

[0078] 1) The maintenance personnel initiate the pre-configured deletion process;

[0079] 2) The Operator obtains the application configuration;

[0080] 3) The Operator analyzes whether the application provides configuration parameters. If so, it prompts the operations and maintenance personnel that the application provides parameters, which applications use these parameters, and whether uninstalling the related applications will have an impact. The operations and maintenance personnel then decide whether to continue deleting the application.

[0081] 4) The Operator calls the helm command to delete the application.

[0082] This invention also provides an automated application deployment pipeline configuration system, including an automated application installation module and an automated application deletion module.

[0083] This system implements the application automated deployment pipeline configuration method described in the above embodiments of the present invention.

[0084] This invention also provides an application automation deployment pipeline configuration apparatus, comprising: at least one memory and at least one processor;

[0085] The at least one memory is used to store a machine-readable program;

[0086] The at least one processor is used to call the machine-readable program to execute the application automation deployment pipeline configuration method described in the above embodiments of the present invention.

[0087] This invention also provides a computer-readable medium storing computer instructions. When executed by a processor, the computer instructions cause the processor to perform the application automation deployment pipeline configuration method described in the above embodiments of this invention. Specifically, a system or apparatus equipped with a storage medium storing software program code that implements the functions of any of the above embodiments can be provided, and the computer (or CPU or MPU) of the system or apparatus can read and execute the program code stored in the storage medium.

[0088] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.

[0089] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.

[0090] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0091] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0092] The present invention has been shown and described in detail above with reference to the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above embodiments, those skilled in the art will know that more embodiments of the present invention can be obtained by combining the code review methods in the different embodiments. These embodiments are also within the protection scope of the present invention.

Claims

1. A method for configuring an automated application deployment pipeline, characterized in that, Use deployment results as configuration information in automated deployment pipelines: During installation, application parameters are stored in Kubernetes' secret / configmap, with the release name used as the name of the secret / configmap. The internal key-value pairs of a release include: parameters, and variables from other releases that use the currently installed release; Once the application is successfully installed, the predefined hook operation is triggered, and the data is sent to the operator in the given format. During application installation, the operator obtains the application configuration and analyzes whether the application needs to provide parameters to subsequent applications. If so, the hook is injected into the Helm configuration. At the same time, the operator analyzes whether the application needs to use the parameters of the previously installed application. If so, the parameters of secret / configmap are merged into the parameter configuration of Helm.

2. The application automated deployment pipeline configuration method according to claim 1, characterized in that, The operator automatically retrieves the secret / configmap with the corresponding name and refreshes the value accordingly when the application parameter variable is declared. After installation, the operator refreshes the release name of the current application to the corresponding used_released. When an application is deleted, the operator prompts the operations personnel with the components whose parameters are used based on the used_released in the corresponding secret / configmap. The operations personnel then confirm whether they really want to delete the application. After confirmation, the operator deletes the secret / configmap and removes the release from the used_released associated with other applications.

3. The application automated deployment pipeline configuration method according to claim 1 or 2, characterized in that, When an application is deleted, the operator retrieves the application's configuration and analyzes whether the application provides any configuration parameters. If so, the system prompts the operations personnel that the application provided parameters, which applications used these parameters, and how uninstalling the related applications will affect them.

4. A method for configuring an automated application deployment pipeline according to claim 1 or 2, characterized in that... The specific implementation process of application installation is as follows: 1) The maintenance personnel start the pre-configured installation process; 2) The operator obtains the application configuration; 3) The operator analyzes whether the application needs to provide parameters to subsequent applications. If so, it injects the extracted hook. 4) The operator analyzes whether the application needs to use the parameters of the previously installed application. If so, it merges the parameters of secret / configmap into the parameter configuration of Helm. 5) Refresh its parameter file; 6) The operator calls Helm commands to install the application; 7) Helm detects that the app is installed successfully and triggers the predefined hook operation, sending it to the operator in the given format; 8) After receiving the parameter feedback, the operator saves it in secret / configmap; 9) Repeat steps 2) through 8) until all applications are installed.

5. The method for configuring an automated application deployment pipeline according to claim 3, characterized in that... The specific deletion process for the application is as follows: 1) The maintenance personnel initiate the pre-configured deletion process; 2) The operator obtains the application configuration; 3) The operator analyzes whether the application provides configuration parameters. If so, it prompts the operations and maintenance personnel, who then decide whether to continue the deletion. 4) The operator calls the Helm command to delete the application.

6. A method for configuring an automated application deployment pipeline according to claim 1 or 2, characterized in that, Hooks support retrieving parameters from specified paths, including reading configmaps, secrets, or files. The paths are placed in the application's configuration, making it convenient for operations and maintenance personnel to make appropriate configurations based on the environment. Hooks support automatic injection, allowing operations and maintenance personnel to add scripts to the corresponding applications as needed, chaining necessary parameters without having to modify the application each time.

7. An application automated deployment pipeline configuration system, characterized in that, Includes an automated application installation module and an automated application removal module. The system implements the application automated deployment pipeline configuration method as described in any one of claims 1 to 6.

8. An application automation deployment pipeline configuration device, characterized in that, include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to execute the application automation deployment pipeline configuration method according to any one of claims 1 to 6.

9. A computer-readable medium, characterized in that, The computer-readable medium stores computer instructions that, when executed by a processor, cause the processor to perform the application automation deployment pipeline configuration method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Mobile terminal performance testing method and device

    CN108228438A

  • Method for testing OpenStack function

    CN111444104A