A method and system for one-key deployment of containerized applications based on K8S

By using a one-click deployment method for containerized applications based on Kubernetes, the problem of automated deployment of large-scale application service systems has been solved. This method enables efficient and reliable automated upgrades of application images, database scripts, and configuration files, thereby improving operational efficiency.

CN117369945BActive Publication Date: 2026-11-27NARI INFORMATION & COMM TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311298196.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2026-11-27
Estimated Expiration
2043-10-09

AI Technical Summary

Technical Problem

Existing technologies lack automated deployment methods in large-scale application service systems, resulting in long deployment cycles, low efficiency, and a high risk of human error.

Method used

This paper provides a one-click deployment method for containerized applications based on Kubernetes. By building a pipelined continuous integration, dynamically binding the deployment environment, and automatically comparing and orchestrating version package content, it enables automatic upgrades of application images, database scripts, and configuration files.

Benefits of technology

It has enabled the automated deployment of large-scale application service systems, improved operational efficiency, reduced the risk of human error, and ensured the flexibility and reliability of the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117369945B_ABST
    Figure CN117369945B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on K8S's container application one-key deployment method and system, it is related to the field of automation operation, method includes: constructing the pipeline of application program, one-key release generation version package;Dynamic binding deployment environment's cluster, image warehouse, data source and configuration center;Version package is compared with the actual running state of business system in deployment environment automatically, to container image, database script, configuration file one-key arrangement;One-key is automatically upgraded to application image, database script and configuration file;The application can realize the flexible adaptation of different upgrade scenarios, maintain high degree of customized flexibility;So that abnormal can be guaranteed in automatic upgrade process and handled in time;For the upgrade of large-scale container microservice architecture business system, can dispense with complicated artificial upgrade, can greatly facilitate operation and maintenance personnel, improve operation and maintenance efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated operation and maintenance, and in particular to a method and system for one-click deployment of containerized applications based on Kubernetes. Background Technology

[0002] With the continuous development and changes in software architecture, especially the popularization of microservice architecture and the maturity of containerization technology, the number of services and applications in the system is increasing, and the deployment cycle is becoming more frequent. The entire process of release package production and deployment requires manual intervention, which consumes a lot of time, is inefficient, and brings great challenges to integration and operation and maintenance. Especially when there are certain management problems, the increase in the amount of upgrade and deployment content will increase the probability of human error.

[0003] While there are some software and tools for automated deployment, there is still a lack of methods and systems for automated deployment, orchestration, and execution for systems with large-scale application services. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by this invention is: how to automate the deployment of systems with large-scale application services.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, embodiments of the present invention provide a method for one-click deployment of containerized applications based on Kubernetes, including:

[0008] The pipeline for building applications automatically merges and compresses container images, database scripts, and configuration files of multiple applications, and generates version packages with one click;

[0009] Dynamically bind the cluster, image repository, data source, and configuration center of the deployment environment;

[0010] Automatically compare the version package with the actual running status of the business system in the deployment environment, and orchestrate container images, database scripts, and configuration files with one click;

[0011] Based on the content and orchestration of the version package, the application image, database scripts, and configuration files can be automatically upgraded with one click.

[0012] As a preferred method for one-click deployment of containerized applications based on Kubernetes, the following applies:

[0013] The application building pipeline automatically merges and compresses container images, database scripts, and configuration files of multiple applications, and generates version packages with one click, including:

[0014] Based on the code repository, container images in Kubernetes are used as the pipeline runtime environment to download, compile, and build the code into an image, and then push the image to the image repository.

[0015] Customize release templates for business systems, component modules, applications, and application images;

[0016] Based on the specific version number, component module, application and application image tags, and the branches and versions of database files and configuration files in the code repository, the database scripts are merged according to the component module dimension, and the container images of all applications are merged with one click to generate version packages.

[0017] As a preferred method for one-click deployment of containerized applications based on Kubernetes, the following applies:

[0018] The cluster, image repository, data source, and configuration center of the dynamically bound deployment environment include:

[0019] Obtain cluster, user, namespace, and authentication information of the K8S cluster based on the configuration file;

[0020] Retrieve image repository information based on image repository address, repository type, repository user, repository password, and API version;

[0021] Retrieve data source information based on data source address, data source type, data source user, data source password, and data source version;

[0022] Based on the configuration center address, configuration center user, and configuration center password, obtain configuration center information;

[0023] Bind the cluster, image repository, data source, and configuration center to the deployment environment.

[0024] As a preferred method for one-click deployment of containerized applications based on Kubernetes, the following applies:

[0025] The automatic comparison of the version package with the actual running status of the business system in the deployment environment, and the one-click orchestration of container images, database scripts, and configuration files include:

[0026] Based on the version package, import and unpack the container image, database script, and configuration file contained in the version package;

[0027] The upgrade order of application images can be sorted by adding steps and then adding applications to those steps;

[0028] By compiling and uncompiling script files, database scripts with dangerous operations are marked as dangerous script files and require manual confirmation.

[0029] Scripts containing operations of type Truncate, Alter, Drop, Delete, and DropIndex are identified as dangerous scripts.

[0030] By parsing and comparing the configuration files modified or added in this upgrade, if there are new configuration items or changes in configuration item values ​​compared to the previous upgrade, the values ​​of these configuration items in this version package and the values ​​in the deployment environment configuration center will be compared, and the default values ​​will be updated to the values ​​in this version package; if there are no modified or added configuration files in this upgrade, they will not be arranged.

[0031] As a preferred method for one-click deployment of containerized applications based on Kubernetes, the following applies:

[0032] The automatic one-click upgrade of application images, database scripts, and configuration files based on the content and arrangement of version packages includes:

[0033] Based on the application deployment order orchestrated by the import orchestration module, and utilizing the K8S rolling upgrade interface, the application images are automatically deployed in the cluster obtained by the environment acquisition module in a way that allows simultaneous deployment within groups and sequential deployment between groups.

[0034] Based on the script deployment order arranged by the import orchestration module, the database scripts are automatically executed according to the data source obtained in the environment acquisition module;

[0035] The configuration files are updated sequentially based on the configuration and deployment order of the imported orchestration module.

[0036] If an abnormal failure occurs during the automatic update of application images, database scripts, and configuration files, an update snapshot is recorded, automatic upgrade is paused, and automatic upgrade continues after manual intervention or by selecting to skip.

[0037] Secondly, embodiments of the present invention provide a system for one-click deployment of containerized applications based on Kubernetes, comprising:

[0038] The one-click deployment module is used to build application pipelines, automatically merge and compress container images, database scripts, and configuration files of multiple applications, and generate version packages with one click;

[0039] The environment binding module is used to dynamically bind the deployment environment's cluster, image repository, data source, and configuration center;

[0040] The import orchestration module is used to automatically compare the version package with the actual running status of the business system in the deployment environment, and to orchestrate container images, database scripts and configuration files with one click;

[0041] The one-click deployment module is used to automatically upgrade application images, database scripts, and configuration files with a single click, based on the content and orchestration results of the version package.

[0042] As a preferred solution for one-click deployment of containerized applications based on Kubernetes, the following applies:

[0043] The one-click publishing module includes a pipeline module, a publishing template module, and an automatic publishing module.

[0044] The pipeline module is used to download, compile, and build images of code based on a code repository, using container images in K8S as the pipeline runtime environment, and push the images to the image repository.

[0045] The release template module is used to customize release templates for business systems, component modules, applications, and application images;

[0046] The automatic release module is used to select the specific version number, component module, application and application image tags, database files and configuration files in the code repository, branches and versions of the business system to be released according to the release template, merge the database scripts by component module dimension, merge the container images of all applications with one click, and generate version packages.

[0047] As a preferred solution for one-click deployment of containerized applications based on Kubernetes, the following applies:

[0048] The environment binding module includes cluster environment acquisition, image repository environment acquisition, data source environment acquisition, configuration center environment acquisition, and environment binding.

[0049] The cluster environment is obtained based on the kubeconfig file, which is used to obtain information about the K8S cluster, users, namespaces, and authentication.

[0050] The image repository environment is obtained based on the image repository address, repository type, repository user, repository password, and API version, and is used to obtain image repository information.

[0051] The data source environment is obtained based on the data source address, data source type, data source user, data source password, and data source version, and is used to obtain data source information.

[0052] The configuration center environment is obtained based on the configuration center address, configuration center user, and configuration center password, and is used to obtain configuration center information;

[0053] The environment binding binds the cluster, image repository, data source, and configuration center to the deployment environment.

[0054] Thirdly, embodiments of the present invention provide a computing device, including:

[0055] Memory and processor;

[0056] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for one-click deployment of containerized applications based on K8S as described in any embodiment of the present invention.

[0057] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method for one-click deployment of containerized applications based on Kubernetes.

[0058] The beneficial effects of this invention are as follows: This invention provides pipelined continuous integration and template-based one-click deployment, enabling standardized and automated deployment of business system version packages. Through automatic import and upgrade orchestration, it achieves flexible adaptation to different upgrade scenarios, maintaining a high degree of customization flexibility. The one-click deployment module enables automatic deployment and updates of application images, database scripts, and configuration files. Simultaneously, the exception handling module ensures timely intervention and handling of anomalies during the automatic upgrade process. For large-scale containerized microservice architecture business system upgrades, this invention eliminates cumbersome manual upgrades, greatly facilitating operations and maintenance personnel and improving operational efficiency. Attached Figure Description

[0059] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0060] Figure 1 This is an overall flowchart of the method for one-click deployment of containerized applications based on K8S as described in the first embodiment of the present invention;

[0061] Figure 2 This is a schematic diagram of pipeline creation operation in a simulation example of the one-click deployment method for containerized applications based on K8S described in the second embodiment of the present invention.

[0062] Figure 3 This is a schematic diagram of the operation of creating a release template in a simulation example of the one-click deployment method for containerized applications based on K8S described in the second embodiment of the present invention;

[0063] Figure 4This is a simulation example of the one-click deployment operation of the containerized application based on K8S in the second embodiment of the present invention.

[0064] Figure 5 This is a schematic diagram of the deployment and release package operation in a simulation example of the one-click deployment method for containerized applications based on K8S described in the second embodiment of the present invention. Detailed Implementation

[0065] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. 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 protection scope of the present invention.

[0066] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0067] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0068] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.

[0069] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0070] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0071] Example 1

[0072] Reference Figure 1 This is the first embodiment of the present invention, which provides a method for one-click deployment of containerized applications based on Kubernetes, including:

[0073] S1: Build an application pipeline that automatically merges and compresses container images, database scripts, and configuration files of multiple applications, and generates version packages with one click;

[0074] Specifically, the application building pipeline automatically merges and compresses container images, database scripts, and configuration files of multiple applications, and generates version packages with one click, including:

[0075] Based on the code repository, container images in Kubernetes are used as the pipeline runtime environment to download, compile, and build the code into an image, and then push the image to the image repository.

[0076] Customize release templates for business systems, component modules, applications, and application images;

[0077] Based on the specific version number, component module, application and application image tags, and the branches and versions of database files and configuration files in the code repository, the database scripts are merged according to the component module dimension, and the container images of all applications are merged with one click to generate version packages.

[0078] S2: Dynamically binds the cluster, image repository, data source, and configuration center of the deployment environment;

[0079] Specifically, the dynamically bound deployment environment's cluster, image repository, data source, and configuration center include:

[0080] Obtain cluster, user, namespace, and authentication information of the K8S cluster based on the configuration file;

[0081] Retrieve image repository information based on image repository address, repository type, repository user, repository password, and API version;

[0082] Retrieve data source information based on data source address, data source type, data source user, data source password, and data source version;

[0083] Based on the configuration center address, configuration center user, and configuration center password, obtain configuration center information;

[0084] Bind the cluster, image repository, data source, and configuration center to the deployment environment.

[0085] It should be noted that clusters, image repositories, data sources, and configuration centers can be dynamically replaced and dismantled.

[0086] S3: Automatically compares the version package with the actual running status of the business system in the deployment environment, and orchestrates container images, database scripts, and configuration files with one click;

[0087] Specifically, the automatic comparison of the version package with the actual running status of the business system in the deployment environment, and the one-click orchestration of container images, database scripts, and configuration files include:

[0088] Based on the version package, import and unpack the container image, database script, and configuration file contained in the version package;

[0089] The upgrade order of application images can be sorted by adding steps and then adding applications to those steps;

[0090] By compiling and uncompiling script files, database scripts with dangerous operations are marked as dangerous script files and require manual confirmation.

[0091] Scripts containing operations of type Truncate, Alter, Drop, Delete, and DropIndex are identified as dangerous scripts.

[0092] By parsing and comparing the configuration files modified or added in this upgrade, if there are new configuration items or changes in configuration item values ​​compared to the previous upgrade, the values ​​of these configuration items in this version package and the values ​​in the deployment environment configuration center will be compared, and the default values ​​will be updated to the values ​​in this version package; if there are no modified or added configuration files in this upgrade, they will not be arranged.

[0093] S4: Based on the content and orchestration results of the version package, automatically upgrade the application image, database script and configuration file with one click.

[0094] Specifically, the automatic one-click upgrade of application images, database scripts, and configuration files based on the content and arrangement of the version package includes:

[0095] Based on the application deployment order orchestrated by the import orchestration module, and utilizing the K8S rolling upgrade interface, the application images are automatically deployed in the cluster obtained by the environment acquisition module in a way that allows simultaneous deployment within groups and sequential deployment between groups.

[0096] Based on the script deployment order arranged by the import orchestration module, the database scripts are automatically executed according to the data source obtained in the environment acquisition module;

[0097] The configuration files are updated sequentially based on the configuration and deployment order of the imported orchestration module.

[0098] If an abnormal failure occurs during the automatic update of application images, database scripts, and configuration files, an update snapshot is recorded, automatic upgrade is paused, and automatic upgrade continues after manual intervention or by selecting to skip.

[0099] It should be noted that automatic import and upgrade orchestration enable flexible adaptation to different upgrade scenarios, maintaining a high degree of customization flexibility. The one-click deployment module facilitates the automatic deployment and updating of application images, database scripts, and configuration files. Furthermore, the exception handling module ensures timely intervention and handling of anomalies during the automatic upgrade process.

[0100] The above is an illustrative scheme of a method for one-click deployment of containerized applications based on Kubernetes (K8S) according to this embodiment. It should be noted that the technical solution of the system for one-click deployment of containerized applications based on Kubernetes (K8S) and the technical solution of the method for one-click deployment of containerized applications based on Kubernetes (K8S) belong to the same concept. Details not described in detail in the technical solution of the system for one-click deployment of containerized applications based on Kubernetes (K8S) in this embodiment can be found in the description of the technical solution of the method for one-click deployment of containerized applications based on Kubernetes (K8S).

[0101] This embodiment of the system for one-click deployment of containerized applications based on Kubernetes includes:

[0102] The one-click deployment module is used to build application pipelines, automatically merge and compress container images, database scripts, and configuration files of multiple applications, and generate version packages with one click;

[0103] The environment binding module is used to dynamically bind the deployment environment's cluster, image repository, data source, and configuration center;

[0104] The import orchestration module is used to automatically compare the version package with the actual running status of the business system in the deployment environment, and to orchestrate container images, database scripts and configuration files with one click;

[0105] The one-click deployment module is used to automatically upgrade application images, database scripts, and configuration files with a single click, based on the content and orchestration results of the version package.

[0106] This embodiment also provides a computing device applicable to the one-click deployment method of containerized applications based on Kubernetes, including:

[0107] The memory and processor are used to store computer-executable instructions and execute computer-executable instructions to realize the one-click deployment method of containerized applications based on K8S as proposed in the above embodiments.

[0108] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the one-click deployment method for containerized applications based on K8S as proposed in the above embodiments.

[0109] The storage medium proposed in this embodiment and the one-click deployment method for containerized applications based on K8S proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0110] Example 2

[0111] Reference Figures 2-5 As an embodiment of the present invention, a method for one-click deployment of containerized applications based on K8S is provided. In order to verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.

[0112] The first step is to build the application pipeline. Based on the code repository, the pipeline uses container images in Kubernetes as the runtime environment to download, compile, and build the image, and then push the image to the image repository.

[0113] First, maintain the basic information of the pipeline and related application information. This includes: entering the application name based on the selectable application; entering the pipeline name based on the project name; entering the pipeline description based on the pipeline's purpose; and entering the pipeline template script based on the pipeline template. Then, following the system guidance, maintain the source code retrieval information, code compilation information, and image runtime environment information in the pipeline to complete the pipeline creation.

[0114] The second step is to add release templates and customize release templates for business systems, component modules, applications, and application images.

[0115] Specifically, the steps include: entering a template name, selecting the product to be published, selecting the application of the product to be published on the left side of the page, clicking the right-pointing arrow button in the middle of the page to add it to the publishing template, and clicking OK to complete the creation of the new publishing template.

[0116] The third step is one-click deployment. Based on the specific version number, component modules, application and application image tags, and the branches and versions of database files and configuration files in the code repository, the application's container image, database scripts, and configuration files are deployed into a version package with one click.

[0117] Specifically, the process includes: selecting a template from the template list, clicking "One-Click Publish," entering the release version, selecting the application to be released, the mirror repository, the mirror version, and entering the mirror path, code path, code branch, and other required fields. Then, click "OK" to start building the release package for this version.

[0118] The fourth step is to obtain the deployment environment, including the cluster, image repository, data source, and configuration center.

[0119] This is used to retrieve image repository information based on the image repository address, repository type, repository user, repository password, and API version.

[0120] This is used to retrieve data source information based on the data source address, data source type, data source user, data source password, and data source version.

[0121] Based on the configuration center address, configuration center user, and configuration center password, this is used to obtain configuration center information.

[0122] The fifth step is to import and parse the version package. Based on the version package, the container image, database script, and configuration file contained in the version package are imported and parsed.

[0123] Step 6: Based on the content parsed from the version package, perform deployment and orchestration, including:

[0124] The upgrade order of application images is sorted by adding steps and adding applications to the steps. The upgrade of application images in the next step will only begin after the upgrade of application images in the previous step is completed.

[0125] By compiling and uncompiling script files, database scripts with dangerous operations are marked as dangerous script files and require manual confirmation.

[0126] Scripts containing the following types of operations are considered dangerous scripts: Truncate, Alter, Drop, Delete, DropIndex;

[0127] By parsing and comparing the configuration files that have been modified or added in this upgrade, if there are new configuration items or changes in configuration item values ​​compared to the previous version, the values ​​of these configuration items in this version package and the values ​​in the deployment environment configuration center will be compared and updated to the values ​​in this version package by default. Configuration files that have not been modified or added in this upgrade will not be arranged.

[0128] Step 7: Based on the content and orchestration results of the version package, automatically upgrade the application image, database scripts, and configuration files with one click, including:

[0129] Based on the application deployment order orchestrated by the import orchestration module, and utilizing the K8S rolling upgrade interface, the application images are automatically deployed in the cluster obtained by the environment acquisition module in a way that allows simultaneous deployment within groups and sequential deployment between groups.

[0130] Based on the script deployment order arranged by the import orchestration module, the database scripts are automatically executed according to the data source obtained in the environment acquisition module;

[0131] The configuration files are updated sequentially based on the configuration and deployment order of the imported orchestration module.

[0132] Meanwhile, if an error occurs during the automatic update of application images, database scripts, and configuration files, an update snapshot is recorded, and automatic upgrades are paused. Automatic upgrades can resume after manual intervention or by selecting to skip the update.

[0133] Specifically, this includes: On the one-click upgrade homepage, clicking the deploy button on a specific release package begins deployment. The deployment details upgrade list shows the overall deployment and upgrade process and node progress status, including: In the script execution list, information such as script file name, component name, database type, schema, data source name, and status is displayed, providing functions such as viewing script files, viewing logs, exception handling, and skipping; In the configuration item upgrade list, information such as application, file name, configuration item, type (added or modified), upgrade package version value, last version value, deployment environment value, and status is displayed, providing functions such as viewing logs and updating configuration items again for upgrades; In the application upgrade list, information such as component, application, image version number, image, and status is displayed, providing functions such as viewing logs and redeploying the application. When a script file fails to execute, subsequent scripts and upgrade actions will not be executed, the upgrade task ends, and the status is "failed." For this script, you can click "Exception Handling" or "Skip," and then click "Redeploy" to continue the upgrade task. Redeployment will re-upgrade the failed or unexecuted parts of this upgrade task.

[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for one-click deployment of containerized applications based on Kubernetes, characterized in that, include: The pipeline for building applications automatically merges and compresses container images, database scripts, and configuration files of multiple applications, and generates version packages with one click; Dynamically bind the cluster, image repository, data source, and configuration center of the deployment environment; Automatically compare the version package with the actual running status of the business system in the deployment environment, and orchestrate container images, database scripts, and configuration files with one click; Based on the content and arrangement of the version package, the application image, database script and configuration file can be automatically upgraded with one click; The automatic comparison of the version package with the actual running status of the business system in the deployment environment, and the one-click orchestration of container images, database scripts, and configuration files include: Based on the version package, import and unpack the container image, database script, and configuration file contained in the version package; The upgrade order of application images can be sorted by adding steps and then adding applications to those steps; By compiling and uncompiling script files, database scripts with dangerous operations are marked as dangerous script files and require manual confirmation. Scripts containing operations of type Truncate, Alter, Drop, Delete, and DropIndex are identified as dangerous scripts. By parsing and comparing the configuration files modified or added in this upgrade, if there are new configuration items or changes in configuration item values ​​compared to the previous upgrade, the values ​​of these configuration items in this version package and the values ​​in the deployment environment configuration center are compared, and the default value is updated to the value in this version package; if there are no modified or added configuration files in this upgrade, they are not arranged. The automatic one-click upgrade of application images, database scripts, and configuration files based on the content and arrangement of version packages includes: Based on the application deployment order orchestrated by the import orchestration module, and utilizing the K8S rolling upgrade interface, the application images are automatically deployed in the cluster obtained by the environment acquisition module in a way that allows simultaneous deployment within groups and sequential deployment between groups. Based on the script deployment order arranged by the import orchestration module, the database scripts are automatically executed according to the data source obtained in the environment acquisition module; The configuration files are updated sequentially based on the configuration and deployment order of the imported orchestration module. If an abnormal failure occurs during the automatic update of application images, database scripts, and configuration files, an update snapshot is recorded, automatic upgrade is paused, and automatic upgrade continues after manual intervention or by selecting to skip.

2. The method for one-click deployment of containerized applications based on Kubernetes as described in claim 1, characterized in that, The application build pipeline automatically merges and compresses container images, database scripts, and configuration files of multiple applications, and generates version packages with one click, including: Based on the code repository, container images in Kubernetes are used as the pipeline runtime environment to download, compile, and build the code into an image, and then push the image to the image repository. Customize release templates for business systems, component modules, applications, and application images; Based on the specific version number, component module, application and application image tags, and the branches and versions of database files and configuration files in the code repository, the database scripts are merged according to the component module dimension, and the container images of all applications are merged with one click to generate version packages.

3. The method for one-click deployment of containerized applications based on Kubernetes as described in claim 2, characterized in that, The cluster, image repository, data source, and configuration center of the dynamically bound deployment environment include: Obtain cluster, user, namespace, and authentication information of the K8S cluster based on the configuration file; Retrieve image repository information based on image repository address, repository type, repository user, repository password, and API version; Retrieve data source information based on data source address, data source type, data source user, data source password, and data source version; Based on the configuration center address, configuration center user, and configuration center password, obtain configuration center information; Bind the cluster, image repository, data source, and configuration center to the deployment environment.

4. A system for one-click deployment of containerized applications based on Kubernetes, wherein the method described in any one of claims 1-3 is characterized in that, include: The one-click deployment module is used to build application pipelines, automatically merge and compress container images, database scripts, and configuration files of multiple applications, and generate version packages with one click; The environment binding module is used to dynamically bind the deployment environment's cluster, image repository, data source, and configuration center; The import orchestration module is used to automatically compare the version package with the actual running status of the business system in the deployment environment, and to orchestrate container images, database scripts and configuration files with one click; The one-click deployment module is used to automatically upgrade application images, database scripts, and configuration files with a single click, based on the content and orchestration results of the version package.

5. The system for one-click deployment of containerized applications based on Kubernetes as described in claim 4, characterized in that, The one-click publishing module includes a pipeline module, a publishing template module, and an automatic publishing module. The pipeline module is used to download, compile, and build images of code based on a code repository, using container images in K8S as the pipeline runtime environment, and push the images to the image repository. The release template module is used to customize release templates for business systems, component modules, applications, and application images; The automatic release module is used to select the specific version number, component module, application and application image tags, database files and configuration files in the code repository, branches and versions of the business system to be released according to the release template, merge the database scripts by component module dimension, merge the container images of all applications with one click, and generate version packages.

6. The system for one-click deployment of containerized applications based on Kubernetes as described in claim 5, characterized in that, The environment binding module includes cluster environment acquisition, image repository environment acquisition, data source environment acquisition, configuration center environment acquisition, and environment binding. The cluster environment is obtained based on the kubeconfig file, which is used to obtain information about the K8S cluster, users, namespaces, and authentication. The image repository environment is obtained based on the image repository address, repository type, repository user, repository password, and API version, and is used to obtain image repository information. The data source environment is obtained based on the data source address, data source type, data source user, data source password, and data source version, and is used to obtain data source information. The configuration center environment is obtained based on the configuration center address, configuration center user, and configuration center password, and is used to obtain configuration center information; The environment binding binds the cluster, image repository, data source, and configuration center to the deployment environment.

7. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the method for one-click deployment of containerized applications based on Kubernetes as described in any one of claims 1 to 3.

8. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method for one-click deployment of a Kubernetes-based containerized application as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Automatic upgrading system for micro-service architecture product

    CN113127039A

  • Kubernetes-based software system rapid deployment upgrading method

    CN113312063A