Enterprise-level application system visual upgrading method and device based on container cloud platform
By adopting the visual upgrade method of B/S architecture on the container cloud platform, the problem of high complexity of enterprise-level application system upgrade work and difficulty in coordinating the consistency of multiple application system versions in distributed deployment scenarios is solved, and a simplified upgrade process and efficient batch upgrade are achieved.
Patent Information
- Application Number
- CN202510599914.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-05-12
AI Technical Summary
When deploying enterprise-level application systems using container cloud platforms, the upgrade work is complex and labor-intensive. In distributed deployment scenarios, the version consistency and upgrade rhythm coordination of multiple application systems is difficult.
The visual upgrade method based on the B/S architecture is adopted, and the upgrade package is uploaded through the front-end interface and the upgrade operation command is sent. The back-end service decompresses the upgrade package in the container where the upgrade service is located, calls the container cloud platform command to complete the update of the mirror version and configuration file, and calls the database cluster to complete the update of the table structure and data. At the same time, configure the container where the upgrade service is located and the password-free login of the upgrade node to be executed to realize batch upgrade and cascading upgrade.
It greatly lowers the threshold for upgrading and maintenance of application systems on the container cloud platform, simplifies the upgrade process, reduces workload, and realizes batch upgrades of multiple application systems in distributed deployment scenarios, ensuring the coordination of version consistency and upgrade rhythm.
Smart Images

Figure CN120122971A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information technology, and particularly relates to a method and device for visual upgrading of enterprise-level application systems based on a container cloud platform. Background Art
[0002] Compared with the traditional deployment architecture, the container cloud platform has multiple advantages, which can well solve the problems existing in the traditional deployment architecture and meet the complex requirements of enterprise-level application systems.
[0003] 1) The container cloud platform standardizes the running environment through container images, shields the environmental configuration differences in the application deployment process, and improves the stability of business applications.
[0004] 2) The container cloud platform can achieve centralized management of hosts, storage, and networks, dynamically replace and supplement resources, and improve resource utilization.
[0005] 3) The container cloud platform can achieve cross-data center switching to ensure high availability. In the event of a disaster, it can keep the system business running continuously and reduce data loss.
[0006] Therefore, when deploying enterprise-level application systems, due to considerations such as performance, it is often inclined to use a highly available deployment plan. Using the container cloud platform architecture is a mainstream choice. One of the more extensive solutions is to deploy application systems based on the kubernetes container cloud platform to achieve high availability, flexibility, and scalability of application services.
[0007] However, at the same time, the container cloud platform has a certain usage threshold. The application system upgrade work is highly complex and has a large workload. Maintenance personnel need to spend some time learning to master the methods of upgrading and iterating application systems and performing daily maintenance on the container cloud platform. In enterprise-customized business systems, the system upgrade and iteration are relatively frequent, and the upgrade work is a relatively large burden.
[0008] In addition, in large-scale enterprises, since a single set of application systems is difficult to meet the huge usage volume, a distributed deployment plan is usually adopted, that is, a set of application systems based on the container cloud platform is deployed in each subsidiary company. These application systems are cascaded with the headquarters system as the root node and the branch company application systems as the sub-nodes. All application systems need to maintain the same version and upgrade rhythm. If upgraded manually one by one, the workload is large and there is a time difference, and the existing batch upgrade solutions also have problems of high complexity and large workload. Summary of the Invention
[0009] The purpose of the present invention is to provide a visualization upgrade method and device for enterprise-level application systems based on a container cloud platform, which significantly reduces the threshold for upgrading application systems based on the container cloud platform, and maintenance personnel can complete the iterative upgrade of the application system without being familiar with the relevant concepts and operation commands of the cloud platform.
[0010] In order to achieve the above object, the technical solution of the present invention is as follows: A visualization upgrade method for enterprise-level application systems based on a container cloud platform, including: S1. Based on the B / S architecture of the application system on the container cloud platform, set up a front-end interface for uploading upgrade packages and sending upgrade operation commands, and a back-end service for interacting with the container cloud platform; S2. Keep the container where the upgrade service is located always running on the specified node of the application system cluster on the container cloud platform; S3. Mount the running files of the container cloud platform to the container where the upgrade service is located; S4. Configure passwordless login for the container where the upgrade service is located and the host of the node to be upgraded; S5. Upload the upgrade package to the specified node through the front-end interface. After receiving the upgrade operation command, the back-end service extracts the upgrade package in the container where the upgrade service is located, calls the container cloud platform command to complete the update of the image version and configuration file, and calls the database cluster to complete the update of the table structure and data.
[0011] Further, in step S1, the front-end interface sets functions such as immediate execution, scheduled execution, version rollback, and upgrade status display; it also sets a batch upgrade function for distributed deployment on the container cloud platform, and realizes batch upgrade through the cascading function of the distributed deployment application system.
[0012] Further, the specific method of step S2 includes: modifying the orchestration file of the container where the upgrade service is located, and configuring the nodeSelector parameter as the node name of the specified node to keep the upgrade service always running on the specified node.
[0013] Further, step S3 specifically includes: specifying a control node of the container cloud platform, and mounting the kubernetes configuration file and the run directory of containerd on the control node to the container where the upgrade service is located in a shared manner.
[0014] Further, step S4 specifically includes: generating an ssh key on the host of the node to be upgraded, mounting the ssh key to the ssh directory of the container where the upgrade service is located through a shared storage directory, and the container where the upgrade service is located remotely accesses the node to be upgraded through a pre-set ssh tool.
[0015] On the other hand, the present invention also provides an enterprise application system visualization upgrade device based on a container cloud platform, including: B / S architecture module: A front-end interface based on the B / S architecture of the application system on the container cloud platform for uploading upgrade packages and sending upgrade operation commands, and a back-end service for interacting with the container cloud platform; Service module: Keep the container where the upgrade service is located always running on a specified node in the application system cluster of the container cloud platform; Mounting module: Mount the running files of the container cloud platform to the container where the upgrade service is located; Password-free module: Configure password-free login for the container where the upgrade service is located and the host of the node to be upgraded; Execution module: Upload the upgrade package to the specified node through the front-end interface. After receiving the upgrade operation command, the back-end service extracts the upgrade package in the container where the upgrade service is located, calls the container cloud platform command to complete the update of the image version and configuration file, and calls the database cluster to complete the update of the table structure and data.
[0016] Furthermore, in the B / S architecture module, the front-end interface is set with functions such as immediate execution, scheduled execution, version rollback, and upgrade status display; it is also set with a batch upgrade function for distributed deployment on the container cloud platform, and the batch upgrade is realized through the cascading function of the distributed deployment application system.
[0017] Furthermore, the service module includes: Modify the orchestration file of the container where the upgrade service is located, and configure the nodeSelector parameter as the node name of the specified node to keep the upgrade service always running on the specified node.
[0018] Furthermore, the mounting module includes: Designate a control node of the container cloud platform, and mount the kubernetes configuration file and the run directory of containerd on the control node to the container where the upgrade service is located in a shared manner.
[0019] Furthermore, the password-free module includes: Generate an ssh key on the host of the node to be upgraded, mount the ssh key to the ssh directory of the container where the upgrade service is located through a shared storage directory, and the container where the upgrade service is located remotely accesses the node to be upgraded through a pre-set ssh tool.
[0020] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention is deployed based on the container cloud platform, and has obvious advantages in terms of performance, maintainability, scalability, etc.
[0021] (2) The present invention provides a visualization upgrade method based on the front-end interface of the application system, which can be upgraded through a browser. It can intuitively display the upgrade progress, upgrade status, and upgrade results, and provide functions such as rollback, scheduled upgrade, and cascading upgrade.
[0022] (3) The present invention breaks through the barriers between the application system and the container cloud platform, realizes the self-upgrade of the application system within the cloud platform, and greatly reduces the upgrade and maintenance threshold of the application system on the container cloud platform.
[0023] (4) Through the cascading function, the present invention realizes the batch upgrade of multiple sets of application systems based on the container cloud platform, and greatly reduces the workload of upgrading the application system in the distributed deployment scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the B / S architecture application system based on the container cloud platform in Embodiment 1 of the present invention.
[0025] Figure 2 It is a schematic diagram of the visualization upgrade work process of the B / S architecture application system based on the container cloud platform in Embodiment 1 of the present invention.
[0026] Figure 3 It is a schematic diagram of the scheduled upgrade process in Embodiment 1 of the present invention.
[0027] Figure 4 It is a schematic diagram of the process after upgrade in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0029] The purpose of the present invention is to visualize and simplify the upgrade work of the application system on the container cloud platform, which can be completed through the browser interface. It greatly reduces the operation difficulty of upgrading the application system on the container cloud platform. Based on this purpose, the design idea of the present invention is to initiate operations at the cloud platform level from the application level through the interaction between the application system and the container cloud platform, so as to realize the visual upgrade and iteration of the application system itself on the application system, thereby greatly reducing the upgrade threshold of the application system based on the container cloud platform. Customers can complete the iteration upgrade of the application system without being familiar with the relevant concepts and operation commands of the cloud platform. And through the cascading function of the application system, it is possible to push upgrades to multiple sets of application systems deployed distributively at the same time.
[0030] The following further illustrates the design idea of the present invention in conjunction with the drawings and specific embodiments.
[0031] Embodiment 1: Due to the characteristics of the container cloud platform, an application system cluster based on the container cloud platform usually consists of multiple physical machine nodes (at least three, with no upper limit, usually 6 - 10 in low-load scenarios). The application system usually contains dozens or hundreds of services, and each service replicates 3 - 10 replica containers according to the load pressure. Therefore, there are hundreds of containers running in an enterprise-level application system cluster of this type. These containers are randomly distributed on the worker nodes based on the scheduling algorithm, and the control layer of the container cloud platform is responsible for management, scheduling, upgrading, and maintenance.
[0032] To achieve the self-upgrade of the application system with this architecture, the key lies in how to break through the barrier between the application system running inside the cluster and the upper-layer container cloud control layer responsible for managing the application system cluster, and to achieve the upgrade of dozens of services and hundreds of containers of the application system by calling the container cloud control layer.
[0033] To solve this problem, the following steps are designed in this embodiment: S1. Set up a front-end interface for uploading upgrade packages and sending upgrade operation commands, and a back-end service for interacting with the container cloud platform based on the B / S architecture of the container cloud platform application system; As Figure 1 shown is a highly available deployment architecture based on the container cloud platform in this embodiment. In the service layer, load balancing is achieved through K8S container orchestration for each server. In the storage layer, a distributed database and a distributed cache are set up. On this basis, a B / S architecture is established, and upgrade operations can be performed through the browser interface at the user layer. The browser connects to the service layer through the DNS server.
[0034] The designed functions of the front-end interface and the back-end service of the B / S architecture include the following: (1) Upload the upgrade package from the front-end interface, and the back-end service completes the update and upgrade of the application system version. In this embodiment, the prepared upgrade package is uploaded through the browser interface, and the back-end service receives the upgrade package and verifies whether the md5, naming rules, architecture, upgrade script, etc. of the upgrade package match and comply with the specifications. If not, an error prompt is returned. If it passes, it is saved to the shared storage directory.
[0035] (2) The upgrade operations include immediate execution and scheduled execution; support for canceling scheduled upgrades that have not yet reached the specified time.
[0036] The immediate execution calls the upgrade service to execute the preset upgrade script (the script is a fixed template). The script steps are divided into updating the service image by calling the command of the container cloud platform, remotely copying the configuration file into the application helm container, copying the static file to the shared storage directory, and connecting to the database cluster to update the database table structure.
[0037] The described scheduled execution starts a timer and executes when the set time is reached (it cannot be too close to the current time). During the upgrade process, a redis lock is used to ensure the uniqueness of the upgrade task, ensuring that only one upgrade task can be executed simultaneously.
[0038] After the upgrade script execution is completed, the upgrade status and detailed upgrade logs are returned and displayed on the front-end interface.
[0039] (3)The front-end interface provides a "rollback" function, and the background service supports rolling back to the version before the upgrade. When rolling back, only the image and configuration file are rolled back. The database is required to be downward compatible in design and does not need to be rolled back.
[0040] Specifically, it includes: automatically backing up the application image version and configuration file before each upgrade execution. When the upgrade effect does not meet expectations, it can be rolled back to the version before the upgrade with one key. The rollback method is to replace the application image version and configuration file just upgraded with the backed-up application image version and configuration file, and restart the service to take effect.
[0041] (4)The front-end interface supports viewing the upgrade status and version number of the current domain and sub-domains.
[0042] (5)The front-end interface supports viewing the upgrade records of the current domain.
[0043] (6)The upgrade status is defined as follows: All statuses: empty, pending upgrade (before the scheduled time), upgrading (upgrade request has been sent), upgrade successful, upgrade failed, rolling back, rollback successful, rollback failed.
[0044] Statuses for which an upgrade can be executed: empty, upgrade successful, upgrade failed, rollback successful.
[0045] Status for which an upgrade can be cancelled: pending upgrade.
[0046] Status for which a rollback can be executed: upgrade successful.
[0047] The defined upgrade results include: upgrade successful, upgrade failed, rollback successful, rollback failed.
[0048] (7)The front-end interface provides a backup function. A backup is executed before the upgrade for abnormal rollback.
[0049] (8)The front-end interface provides a "batch upgrade" function. The batch upgrade is achieved through the cascading function of the enterprise container cloud platform. The cascading function means that when the enterprise adopts a distributed deployment solution, the application system based on the container cloud platform takes the headquarters system as the root node and the branch company application systems as the sub-nodes for cascading. During batch upgrade, the background service sends upgrade instructions through the cascading function of the application system itself, and can batch upgrade multiple sets of application system clusters deployed distributively on the root node application system, and intuitively display the current versions and upgrade statuses of all sub-application systems.
[0050] S2. Keep the container where the upgrade service is located running on the specified node all the time; In this step, modify the orchestration file (deployment.yaml) of the container where the upgrade service is located, and configure the nodeSelector parameter as the node name of the specified node to keep the upgrade service running on this node all the time.
[0051] S3. Mount the container cloud platform running files to the container where the upgrade service is located; The kubernetes configuration file and the run directory of containerd are the key files for the operation of the container cloud platform, and exist on each physical machine of the container cloud platform control node (usually located in ~ / kube / and / run / containerd / ). Either one can be selected for use. In this embodiment, the first control node is specified, and the kubernetes configuration file and the run directory of this node are mounted into the container where the upgrade service is located through the shared directory method. At this time, the commands of the container cloud platform control layer can be executed in the container where the upgrade service is located to implement operations such as upgrading and restarting the service container.
[0052] S4. Configure passwordless login between the container where the upgrade service is located and the host of the node to be upgraded; The node to be upgraded refers to the node that is ready to perform the upgrade. For example, select the first management node of the cluster as the node to be upgraded. During the application system deployment stage, an ssh key is generated on the host of the node to be upgraded, and the key is mounted into the ssh directory in the container where the upgrade service is located through the shared storage directory method. At this time, the remote ssh tool in the container can be used to remotely access the node to be upgraded, and the static files and configuration files in the container where the upgrade service is located (that is, the files and configurations to be upgraded extracted from the upgrade package) can be copied to the configuration file directory of the container cloud platform control center through the scp command. By executing the control layer command, the configuration file of the application service can be updated and reloaded.
[0053] S5. Upload the upgrade package through the front-end interface of the B / S architecture. After receiving the upgrade operation command, the back-end service decompresses the upgrade package, calls the container cloud platform command to complete the update of the image version and configuration file, and calls the database cluster to complete the update of the table structure and data.
[0054] After opening the channel between the application system and the cloud platform control center through steps S2-S4, the administrator can upload the upgrade package through the front-end interface. After the back-end service decompresses the upgrade package, it calls the container cloud platform command to complete the update of the image version and configuration file, and calls the database cluster to complete the update of the table structure and data. The specific process is as follows Figure 2 As shown, Figure 3 for Figure 2 In the timing execution process, Figure 4 This is the process after the upgrade is completed.
[0055] In addition, a backup is performed before each upgrade for visual rollback; during the execution, the status and logs are recorded and returned to the front-end interface for display.
[0056] If batch upgrade is required, the upgrade command is sent through the application system's own cascading function. Multiple application system clusters deployed in a distributed manner can be upgraded in batches on the root node application system, and the current version and upgrade status of all sub-application systems can be displayed intuitively.
[0057] Batch upgrade relies on the cascading function of the application system of this embodiment. If this function is not available, the upgrade interface of each application system can be called in batches (consistent with the interface called when the upgrade is initiated from the browser on the root node application system), and batch upgrade can also be completed.
[0058] The method described in this embodiment is based on the container cloud platform cluster (multiple physical nodes, dozens or hundreds of container copies) for the first time, breaking through the barriers between the application system and the container cloud platform control layer, and completing the upgrade operation at the container cloud platform level at the application system level. The self-upgrade of the application system based on the cloud platform architecture can be completed through the browser, and the upgrade progress, upgrade status, and upgrade log can be intuitively viewed, and scheduled upgrades and rollbacks can be performed, which greatly simplifies the upgrade and maintenance threshold of the application system on the container cloud platform. At the same time, it provides a solution for batch upgrading of application systems on dozens of container cloud platform clusters in a distributed deployment scenario, which greatly reduces the upgrade and maintenance workload in a distributed deployment scenario.
[0059] Embodiment 2: This embodiment proposes a visual upgrade device for an enterprise-level application system based on a container cloud platform, including: B / S architecture module: Based on the B / S architecture of the container cloud platform application system, the front-end interface for uploading upgrade packages and sending upgrade operation commands, as well as the back-end service for interacting with the container cloud platform; Service module: Keep the container where the upgrade service is located always running on the specified node of the application system cluster in the container cloud platform; Mounting module: Mount the running files of the container cloud platform to the container where the upgrade service is located; Password-free module: Configure password-free login between the container where the upgrade service is located and the host of the node to be upgraded; Execution module: Upload the upgrade package to the specified node through the front-end interface. After receiving the upgrade operation command, the back-end service extracts the upgrade package in the container where the upgrade service is located, calls the container cloud platform command to complete the update of the image version and configuration file, and calls the database cluster to complete the update of the table structure and data.
[0060] In the B / S architecture module, the front-end interface sets functions such as immediate execution, scheduled execution, version rollback, and upgrade status display; it also sets the batch upgrade function during the distributed deployment of the container cloud platform, and realizes batch upgrade through the cascading function of the distributed deployment application system.
[0061] The service module includes: modifying the orchestration file of the container where the upgrade service is located, and configuring the nodeSelector parameter as the node name of the specified node to keep the upgrade service always running on the specified node.
[0062] The mounting module includes: specifying a control node of the container cloud platform, and mounting the kubernetes configuration file and the run directory of containerd on the control node into the container where the upgrade service is located in a shared manner.
[0063] The password-free module includes: generating an ssh key on the host of the node to be upgraded, mounting the ssh key to the ssh directory of the container where the upgrade service is located through a shared storage directory, and the container where the upgrade service is located remotely accesses the node to be upgraded through the pre-set ssh tool.
[0064] The enterprise-level application system visualization upgrade device based on the container cloud platform proposed in this embodiment can execute the enterprise-level application system visualization upgrade method described in Embodiment 1, and has the same technical effects as Embodiment 1.
[0065] The above embodiments are only the preferred embodiments of the present invention, and are only used to help understand the method and its core idea of the present application. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and retouches should also be regarded as the protection scope of the present invention.
Claims
1. A method for visual upgrading of enterprise-level application systems based on a container cloud platform, characterized in that: include: S1. A front-end interface for uploading upgrade packages and sending upgrade operation commands, as well as a back-end service for interacting with the container cloud platform, is set based on the B / S architecture of the container cloud platform application system; S2. Keep the container where the upgrade service is located always running on the designated node of the application system cluster of the container cloud platform; S3. Mount the container cloud platform running file to the container where the upgrade service is located; S4. Configure the password-free login of the container where the upgrade service is located and the host machine of the node to be upgraded; S5. Upload the upgrade package to the designated node through the front-end interface. After receiving the upgrade operation command, the back-end service decompresses the upgrade package in the container where the upgrade service is located, calls the container cloud platform command to complete the update of the image version and configuration file, and calls the database cluster to complete the update of the table structure and data.
2. The method for visual upgrading of enterprise-level application systems based on container cloud platform according to claim 1 is characterized in that: In step S1, the front-end interface sets the functions of immediate execution, scheduled execution, version rollback, and upgrade status display; it also sets the batch upgrade function during distributed deployment of the container cloud platform, and realizes batch upgrade through the cascading function of the distributed deployment application system.
3. The method for visual upgrading of enterprise-level application systems based on container cloud platform according to claim 1 is characterized in that: The specific method of step S2 includes: modifying the orchestration file of the container where the upgrade service is located, and configuring the nodeSelector parameter to be the node name of the specified node, so as to keep the upgrade service always running on the specified node.
4. The method for visual upgrading of enterprise-level application systems based on container cloud platform according to claim 1 is characterized in that: Step S3 specifically includes: specifying a control node of the container cloud platform, and mounting the kubernetes configuration file and the run directory of containerd on the control node into the container where the upgrade service is located in a shared manner.
5. The method for visually upgrading an enterprise-level application system based on a container cloud platform according to claim 1 is characterized in that: Step S4 specifically includes: generating an ssh key on the host machine of the node to be upgraded, mounting the ssh key to the ssh directory of the container where the upgrade service is located through a shared storage directory, and remotely connecting the container where the upgrade service is located to the node to be upgraded through a preset ssh tool.
6. A visual upgrade device for enterprise-level application systems based on a container cloud platform, characterized in that: include: B / S architecture module: Based on the B / S architecture of the container cloud platform application system, the front-end interface for uploading upgrade packages and sending upgrade operation commands, as well as the back-end service for interacting with the container cloud platform; Service module: Keep the container where the upgrade service is located always running on the specified node of the application system cluster of the container cloud platform; Mounting module: mounts the container cloud platform running file to the container where the upgrade service is located; Password-free module: configures password-free login for the container where the upgrade service is located and the host machine of the node to be upgraded; Execution module: upload the upgrade package to the designated node through the front-end interface. After receiving the upgrade operation command, the back-end service decompresses the upgrade package in the container where the upgrade service is located, calls the container cloud platform command to complete the update of the image version and configuration file, and calls the database cluster to complete the update of the table structure and data.
7. The enterprise-level application system visualization upgrade device based on the container cloud platform according to claim 6 is characterized in that: In the B / S architecture module, the front-end interface sets up immediate execution, scheduled execution, version rollback, and upgrade status display functions; it also sets up a batch upgrade function for distributed deployment of the container cloud platform, and implements batch upgrades through the cascading function of the distributed deployment application system.
8. The enterprise-level application system visualization upgrade device based on container cloud platform according to claim 6 is characterized in that: The service module includes: modifying the orchestration file of the container where the upgrade service is located, and configuring the nodeSelector parameter to the node name of the specified node to keep the upgrade service always running on the specified node.
9. The enterprise-level application system visualization upgrade device based on the container cloud platform according to claim 6 is characterized in that: The mounting module includes: specifying a control node of the container cloud platform, and mounting the kubernetes configuration file and the run directory of containerd on the control node into the container where the upgrade service is located in a shared manner.
10. The enterprise-level application system visualization upgrade device based on container cloud platform according to claim 6 is characterized in that: The password-free module includes: generating an ssh key on the host machine of the upgrade node to be executed, mounting the ssh key to the ssh directory of the container where the upgrade service is located through a shared storage directory, and the container where the upgrade service is located remotely connects to the upgrade node to be executed through a preset ssh tool.
Citation Information
Patent Citations
Publishing method based on distributed storage container cloud application
CN110442430A
Method for automatically upgrading containerized cloud platform
CN113900676A
Container cloud platform upgrading method and device, electronic equipment and storage medium
CN114443090A
Incremental mirror image packaging method and system in container cloud scene
CN115525300A
Software-defined data acquisition method based on containerization technology
CN115934249A