CN-121996257-A - Containerized application deployment and management method, device and system
Abstract
The invention discloses a method, a device and a system for deploying and managing containerized applications, and belongs to the technical field of information processing. The method comprises the steps of receiving a containerized application deployment blueprint defined by a user through a visual deployment interface in a dragging and form-making mode, writing structural information of the deployment blueprint into a list file, converting the list file into executable containerized scripts by using an operation and maintenance tool, and automatically executing environment preparation, containerized cluster initialization and service deployment and starting processes in a target server cluster based on the containerized scripts. The invention converts the complex arrangement process of high-availability container deployment into visual operation, and automatically generates the full-quantity deployment configuration and script, thereby realizing full-flow automatic closed loop from architecture design to service online, obviously reducing the deployment technical threshold and the manual error rate, and improving the deployment efficiency and the system reliability.
Inventors
- YU CHENGZHOU
- ZHOU ZHENTAO
- WU XIAOZHEN
- YANG FAN
- PAN NENGGANG
Assignees
- 徐工汉云技术股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260122
Claims (10)
- 1. A containerized application deployment and management method, comprising: Receiving a containerized application deployment blueprint of a user through a visual deployment interface; Writing the structural information of the deployment blueprint into an operation and maintenance list file; converting and generating the operation and maintenance list file into an executable container editing script; and based on the container arrangement script, automatically executing environment preparation, container application deployment and starting flow in the target server cluster.
- 2. The method for deploying and managing containerized applications according to claim 1, further comprising providing monitoring and automatic capacity expansion functions for the target server cluster of the deployed containerized applications, and specifically comprising: the monitoring specifically comprises the steps of collecting target server indexes in a global mode by starting a monitoring service and a self-defined controller so as to realize the monitoring of a target server cluster: the automatic capacity expansion and contraction function specifically comprises the steps of acquiring the resource utilization rate of a target server cluster at fixed time through a self-defined controller, and expanding the capacity of the target server cluster according to a preset capacity expansion step length when the resource utilization rate is higher than a set threshold value and the current number of the copies does not reach an upper limit; When the resource utilization rate is lower than a set threshold value and the current copy number is lower than a lower limit, carrying out capacity reduction on the target server cluster according to a preset capacity reduction step length; The resource utilization rate comprises memory utilization rate and cpu utilization rate.
- 3. The method of claim 1, wherein the deployment blueprint comprises service topology and target server information, The service topology comprises structural information which is planned in a dragging or selecting mode in a visual deployment interface and is used for indicating the distribution relation of each service module or component in a target server cluster; The target server information comprises an IP address of the target server, a secure shell protocol port SSH and login credentials.
- 4. The method for deploying and managing a containerized application according to claim 3, wherein the receiving the containerized application deployment blueprint of the user through the visual deployment interface specifically comprises: Kernel parameter tuning is performed on a server where a visual deployment script is running, a mounting catalog with the largest available space is selected as a mounting root catalog, a front-end service and a rear-end service are started in a container mode when a container engine Docker is used by a mounting operation tool Ansible, a visual deployment interface is accessed through a browser, the visual deployment interface is realized based on a front-end frame, a blueprint generator is called, and the deployment blueprint is generated before the mounting begins.
- 5. The method for deploying and managing a containerized application according to claim 4, wherein the writing the structural information of the deployment blueprint into the operation and maintenance manifest file specifically comprises: writing the IP address and the service topology of the target server in the deployment blueprint into an operation and maintenance list file, wherein: And taking the service name as a packet name, writing the Internet protocol address of the corresponding target server under the packet, and writing the rest variable information into the global variable packet.
- 6. The method for deploying and managing a containerized application according to claim 5, wherein the converting and generating the operation and maintenance manifest file into an executable container editing script specifically comprises: The executable container orchestration script is generated by the template module of the operation and maintenance tool Ansible replacing variables in the predefined container orchestration script template with corresponding values obtained from the operation and maintenance manifest file.
- 7. The method for deploying and managing containerized applications according to claim 6, wherein the automating the execution environment preparation, application deployment and startup processes in the target server cluster based on the containerized script specifically comprises: When the application container engine Docker is installed and used on all target servers through the operation tool Ansible and the kernel parameters are adjusted, Executing a cluster initialization command on a head server under a management group in an operation and maintenance list file, and initializing a container arrangement cluster; executing a join manager command on the rest of servers in the management group, and registering the join manager command as a cluster management node; Executing a join worker command on all servers under the working group, registering the join worker command as a cluster working node, and completing environmental preparation; and marking service labels on corresponding servers based on the container arrangement script, executing stack deployment commands on the management node, deploying the services to target servers with corresponding labels, and completing application deployment and starting.
- 8. A containerized application deployment and management apparatus, comprising: The visual deployment interface module is used for receiving the user's containerized application deployment blueprint through the visual deployment interface; The writing module is used for writing the structural information of the deployment blueprint into an operation and maintenance list file; The generation module is used for converting the operation and maintenance list file into an executable container arrangement script; And the execution module is used for automatically executing environment preparation, containerized application deployment and starting processes in the target server cluster based on the container arrangement script.
- 9. A containerized application deployment and management system, comprising: a memory for storing computer programs/instructions; A processor for executing the computer program/instructions to implement the steps of the containerized application deployment and management method of any one of claims 1-7.
- 10. A computer readable storage medium having stored thereon a computer program/instruction which, when executed by a processor, implements the steps of the containerized application deployment and management method of any one of claims 1-7.
Description
Containerized application deployment and management method, device and system Technical Field The invention relates to a method, a device and a system for deploying and managing containerized applications, and belongs to the technical field of information processing. Background With the popularization of container technology, a containerized platform represented by Docker and Kubernetes has become a fact standard for the deployment and operation of modern applications, and the technology effectively solves the problem of inconsistent environment and promotes the landing of a micro-service architecture by packing the applications and the dependence thereof into a standardized mirror image. However, in practical operation to achieve a high availability, large scale deployment, the prior art solutions still face a series of significant challenges, especially for small and medium enterprises and teams with limited technical resources or talent reserves: the Kubernetes scheme has the advantages that a learning curve is steep, complex etcd clusters and control plane components are required to be maintained, and excessive design problems exist for medium-small-scale service; Traditional Docker Compose, lacking a high availability mechanism, the failover needs to rely on a third party tool (such as KEEPALIVED), and network topology management is difficult; Manual arrangement, namely Ansible Playbook, writing a large number of repeated codes, and reducing the version rollback efficiency; Visualization tools limitations existing visualization platforms (e.g., portainer) only provide runtime management, lack full lifecycle orchestration capabilities, are disjoint from the infrastructure, code (IaC), concept; The elastic expansion is difficult, namely the existing system is difficult to realize automatic expansion and contraction capacity based on service indexes; The fault recovery is slow, namely the response speed of a fault detection and recovery mechanism is insufficient, and the service continuity is affected; therefore, a solution capable of deep fusion of visual design and automation arrangement is needed. Disclosure of Invention The invention aims to provide a containerized application deployment and management method, device and system, which can realize high-availability container application deployment and management by allowing a user to complete the whole process from architecture design and resource configuration to one-key deployment through an intuitive graphical interface, automatically generating all necessary bottom configuration and execution scripts and simultaneously providing integrated monitoring and intelligent expansion capability. In order to achieve the above purpose/solve the above technical problems, the present invention is realized by adopting the following technical scheme. In one aspect, the present invention provides a method for deploying and managing a containerized application, including: Receiving a containerized application deployment blueprint of a user through a visual deployment interface; Writing the structural information of the deployment blueprint into an operation and maintenance list file; Converting and generating the manifest file into an executable container arrangement script; and based on the container arrangement script, automatically executing environment preparation, container application deployment and starting flow in the target server cluster. Further, the method also comprises the step of providing monitoring and automatic capacity expansion and contraction functions for the target server cluster of the deployed containerized application, and specifically comprises the following steps: the monitoring specifically comprises the steps of collecting target server indexes in a global mode by starting a monitoring service and a self-defined controller so as to realize the monitoring of a target server cluster: the automatic capacity expansion and contraction function specifically comprises the steps of acquiring the resource utilization rate of a target server cluster at fixed time through a self-defined controller, and expanding the capacity of the target server cluster according to a preset capacity expansion step length when the resource utilization rate is higher than a set threshold value and the current number of the copies does not reach an upper limit; When the resource utilization rate is lower than a set threshold value and the current copy number is lower than a lower limit, carrying out capacity reduction on the target server cluster according to a preset capacity reduction step length; The resource utilization rate comprises memory utilization rate and cpu utilization rate. Further, the deployment blueprint includes service topology and target server information, The service topology comprises structural information which is planned in a dragging or selecting mode in a visual deployment interface and is used for indicating the distribution relation o