Application program deployment method and device and storage medium

Through the DevOps framework and continuous integration tools, automated compilation, image generation and containerized deployment of applications are achieved, and the problem of low automation deployment level in traditional technologies is solved, deployment efficiency and environmental consistency are improved, and stable and efficient guarantees are provided for the production environment.

CN120085876APending Publication Date: 2025-06-03张本意
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510023537.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

During traditional software development and operation and maintenance, the level of automation deployment of applications is low, resulting in inconsistent container deployment, inefficient, prone to errors, increasing operation and maintenance burden and possibly causing system failures.

Method used

By introducing the DevOps framework, using continuous integration tools to automate code compilation and mirror generation, push it to the container image repository, and automatically deploy it to multiple target servers through container scheduling tools, realizing the automated deployment of large-scale applications.

Benefits of technology

It realizes cross-environment consistency of applications, improves deployment efficiency, reduces human errors, and ensures the stability and efficiency of the production environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120085876A_ABST
    Figure CN120085876A_ABST
Patent Text Reader

Abstract

The invention discloses an application program deployment method and device and a storage medium, and the method comprises the steps: automatically generating a mirror image file of an application program through a continuous integration tool, and automatically pushing the mirror image file to a container mirror image warehouse; and automatically pulling the latest mirror image file from the container mirror image warehouse to a plurality of target servers through a configuration file or a container scheduling tool, and starting container instances on the plurality of target servers in batches, thereby deploying the application programs on the plurality of target servers in a large scale. According to the method, automatic compiling, mirror image generation and containerization deployment of project codes are realized, so that the problem of low automation level in application program deployment in the prior art is effectively solved, and reliable guarantee is provided for stability and high efficiency of a production environment. The method can be widely applied to the technical field of computer operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of operation and maintenance applications, and in particular, to a method, device, and storage medium for deploying application programs. Background Art

[0002] With the rapid development of technologies such as cloud computing, big data, and artificial intelligence, the IT infrastructure of modern enterprises is gradually transforming towards containerization, automation, and cloud native. As a lightweight virtualization solution, containerization technology can reduce resource consumption while ensuring the consistency of the application environment, and improve the scalability and flexibility of the system. In this context, the automated deployment and operation and maintenance management of containerized applications have become the core requirements of IT operation and maintenance and development.

[0003] In the traditional software development and operation and maintenance process, developers and operation and maintenance personnel usually need to manually complete a series of cumbersome tasks such as code construction, environment deployment, problem diagnosis, and container management. In the development stage, code compilation, unit testing, dependency management, and environment setup are usually executed separately and highly rely on manual operations, which are prone to problems such as version inconsistency and environment out-of-sync. In the deployment stage, applications usually need to be manually deployed to different environments (such as development, testing, and production). The configurations and operation methods of each environment may vary, and in case of problems, both location and recovery rely on manual operations, resulting in low efficiency and easy errors.

[0004] For containerized application deployment, traditional technologies usually rely on manually creating Docker images and starting containers one by one through remote commands, which is difficult to ensure the consistency and efficiency of container deployment. As the system scale expands, the work of manually deploying and managing containers becomes more complex, not only increasing the operation and maintenance burden, but also easily causing system failures due to environment inconsistency or human operation errors. Summary of the Invention

[0005] The present invention aims to at least solve one of the technical problems in the related technologies to some extent. For this reason, an object of the present invention is to provide a method, device, and storage medium for deploying application programs, which can realize the automated compilation, image generation, and containerized deployment of project code by introducing the DevOps framework, thereby effectively overcoming the problem of low automation level in deploying application programs in the prior art and providing a reliable guarantee for the stability and efficiency of the production environment.

[0006] The technical solution adopted by the present invention is: In a first aspect, the present invention provides an application deployment method, which includes: automatically generating an image file of an application through a continuous integration tool, and automatically pushing the image file to a container image repository; automatically pulling the latest image file from the container image repository to multiple target servers through a configuration file or a container scheduling tool, and batch starting container instances on the multiple target servers, so as to deploy the application on a large scale on the multiple target servers.

[0007] Among them, automatically generating an image file of an application file through a continuous integration tool and pushing the image file to a container image repository includes: configuring the continuous integration tool; when receiving an operation of a developer submitting code, the continuous integration tool triggers a build process, and automatically performs pulling the latest code, installing project dependencies, executing unit tests, compiling the code, and generating a Docker image; the continuous integration tool automatically pushes the Docker image to the specified container image repository.

[0008] Among them, configuring the continuous integration tool includes: configuring a version control system integrated with the continuous integration tool, so that the build process can be started every time the code of the application is submitted; setting a continuous integration trigger, so that the build process can be started every time the code of the application changes; setting a build script, which is used to perform the following operations after starting the build process: pulling the latest code, installing project dependencies, executing unit tests, compiling the code, generating a Docker image; configuring authentication information of the Docker image repository, using the docker push command to push the built image to the image repository, and configuring storage and access permissions of the image in the image repository according to the configuration of the selected repository; configuring a communication module to automatically notify the developer through an instant notification software when the build fails; among them, the version control system is also used to manage multiple versions of the image, so as to tag the image with a suitable version label and push it to the container image repository after each successful build, and be able to roll back to a certain stable version when needed.

[0009] Among them, it also includes: using an automation script to batch manage containers, and the automation script uses a reinforcement learning algorithm to predict changes in future loads of the multiple target servers. When it is predicted that the future load increases, the number of containers is quickly increased through the automation script. On the contrary, when it is predicted that the future load decreases, the automation script automatically batch stops the containers that are no longer needed.

[0010] Among them, it also includes: providing an interface with a standardized design, so as to support integration with other systems or provide communication support for each module in a microservices architecture.

[0011] In addition, it further includes: using a custom monitoring panel to monitor the status metrics of the entire service cluster resources in real time and alarm for the status metrics; wherein, the types of the service cluster resources include: application programs, servers, and containers; the status metrics include: the running status of the cluster, resource utilization rate, and application health.

[0012] In a second aspect, the present invention provides an application program deployment device, which includes: an image file generation and push module, configured to automatically generate an image file of the application program through a continuous integration tool and automatically push the image file to a container image repository; an application program deployment module, configured to automatically pull the latest image file from the container image repository to multiple target servers through a configuration file or a container scheduling tool, and batch start container instances on the multiple target servers, so as to deploy the application program on a large scale on the multiple target servers.

[0013] Among them, the image file generation and push module includes: a continuous integration tool configuration unit, configured to configure the continuous integration tool; an image file generation unit, configured to when receiving an operation of a developer submitting code, the continuous integration tool triggers a build process, and automatically performs operations such as pulling the latest code, installing project dependencies, executing unit tests, compiling the code, and generating a Docker image; an image file push unit, configured to the continuous integration tool automatically push the Docker image to the specified container image repository.

[0014] Among them, the device further includes: a container management module, configured to batch manage containers by using an automated script; an interface providing module, configured to provide an interface with a standardized design, so as to support integration with other systems or provide communication support for each module in a microservices architecture; a monitoring module, configured to monitor the status metrics of the entire service cluster resources in real time by using a custom monitoring panel and alarm for the status metrics.

[0015] In a third aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute the method as described above.

[0016] The beneficial effects of the present invention are as follows: The present invention realizes automated code compilation through a continuous integration (CI) tool, ensures that each code submission can quickly trigger a build process, and automatically generates a container image containing the application program and all dependencies, ensuring cross-environment consistency. And through a configuration file or a container scheduling tool (such as Docker), by automatically pulling the latest image and batch starting container instances, it supports large-scale application deployment and ensures fast deployment and environment consistency.

[0017] Furthermore, the present invention realizes intelligent scheduling and management of container resources through automated scripts. A reinforcement learning algorithm and a Deep Q-Network (DQN) are introduced into the automated scripts to intelligently predict the load and optimize the decisions on container expansion and contraction.

[0018] In addition, the present invention also realizes real-time monitoring of various resources such as service clusters, containers, and applications by integrating the Prometheus monitoring tool and a custom monitoring panel. In this way, when a fault or performance bottleneck occurs, the operation and maintenance team can quickly locate the problem through the real-time monitoring panel and perform rapid repair in combination with the automated recovery script.

[0019] In addition, the continuous integration and automated deployment process of the present invention makes the rapid iteration of the production environment and the push of new versions more efficient, further ensuring the stability and performance of the service. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a schematic flowchart of an embodiment of the application program deployment method of the present invention; Figure 2 is Figure 1 a schematic flowchart of an embodiment of step S11 of Figure 3 is Figure 2 a schematic flowchart of an embodiment of step S111 of Figure 4 is a schematic flowchart of another embodiment of the application program deployment method of the present invention; Figure 5 is a schematic flowchart of yet another embodiment of the application program deployment method of the present invention; Figure 6 is a schematic flowchart of still another embodiment of the application program deployment method of the present invention; Figure 7 is a schematic structural diagram of an embodiment of the application program deployment device of the present invention; Figure 8 is Figure 7 a schematic structural diagram of an embodiment of the mirror file generation and push module 11 of Figure 9 is Figure 8 a schematic structural diagram of an embodiment of the continuous integration tool configuration unit 111 of Figure 10 is a schematic structural diagram of another embodiment of the application program deployment device of the present invention; Figure 11 is a schematic structural diagram of yet another embodiment of the application program deployment device of the present invention; Figure 12 is a schematic structural diagram of still another embodiment of the application program deployment device of the present invention. Detailed implementation manners

[0021] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. Embodiment 1

[0022] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the application deployment method of the present invention. As Figure 1 shown, the method includes the following steps: S11: Automatically generate an image file of the application through a continuous integration tool, and automatically push the image file to a container image repository; Specifically, please refer to Figure 2 , Figure 2 which Figure 1 is a schematic flowchart of an embodiment of step S11. As Figure 2 shown, step S11 includes the following sub-steps: S111: Configure the continuous integration tool; Before configuring the continuous integration (CI) tool, first select a suitable continuous integration tool. Generally, the most suitable CI tool is determined according to the scale of the project and the needs of the team. For example: Jenkins. Jenkins can highly customize the CI process, support large-scale distributed builds, and can be deeply integrated with various tools and platforms.

[0023] Specifically, please refer to Figure 3 ,step S111 includes the following sub-steps: S1111: Configure a version control system integrated with the continuous integration tool, so that the build process can be started every time the code of the application is committed; Optionally, the version control system adopts GitHub. Ensure that the project code is hosted in the version control system. The CI tool needs to be integrated with the version control system so that the build task can be triggered when the code is committed.

[0024] S1112: Set a continuous integration trigger, so that the build process can be started every time the code of the application changes; The continuous integration trigger is a component of the CI tool. Set the continuous integration trigger to trigger the automatic build process during operations such as code submission, branch merging, and Pull Request, and connect to the version control system (GitHub) through Webhooks to ensure that the build can be automatically started every time the code changes.

[0025] S1113: Set up a build script which is used to perform the following operations after starting the build process: pull the latest code, install project dependencies, execute unit tests, compile the code, and generate a Docker image; Write a build script in the CI tool. The build script will include the following: pull the latest code, install project dependencies, execute unit tests, compile the code, and generate a Docker image. Add an automated test step to the build script to ensure that the build after each code commit will not break the existing functions. The CI tool executes unit tests and integration tests to ensure code quality. Write a Dockerfile for the project to define how to build the project's image from a base image. The Dockerfile contains all the necessary commands to build the image, such as installing dependencies, copying files, running build commands, etc.

[0026] Use Docker build commands in the build script. During the build process, ensure that different versions of the image are available for subsequent management and use by tagging the image with a version label. In the CI tool, set up automatic testing after the image is built to ensure that the generated image can run properly in the local or development environment; S1114: Configure the authentication information for the Docker image repository, use the docker push command to push the built image to the image repository, and configure the storage and access permissions of the image in the image repository according to the configuration of the selected repository; Configure the authentication information for the Docker image repository in the CI tool. Use image repositories such as Docker Hub, Harbor, or GitLab Container Registry. Use the docker push command to push the built image to the image repository. Configure the storage and access permissions of the image in the image repository according to the configuration of the selected repository to ensure that only authorized users can pull the image. For private repositories, set up authentication and access control to ensure security. S1115: Configure the communication module to automatically notify developers via an instant notification software when the build fails; The communication module is a component of the CI tool. Configure the communication module to automatically notify developers when the build fails. This is achieved by integrating email, Slack, or other notification systems. For example, Jenkins can be configured for email notifications, while GitLab CI sends build status via Slack. Optimize the build process regularly according to project requirements to reduce unnecessary steps or redundant builds. For example, configure a caching mechanism to avoid reinstalling dependencies, or use Docker's multi-stage build to reduce the size of the final image. To track issues during the build process, ensure that the CI tool can record detailed log information for easy tracing of each build and image generation by operations or development personnel; It should be noted here that the version control system in step S1111 is also used to manage multiple versions of the image, so as to tag the image with a suitable version label and push it to the container image repository after each successful build, and be able to roll back to a certain stable version when needed. If a problem occurs in the production environment, roll back by pulling the previous stable version of the image. Using tags and version control can help the team quickly identify and restore to the correct state.

[0027] S112: When receiving the operation of a developer submitting code, the continuous integration tool will trigger the build process and automatically perform operations such as pulling the latest code, installing project dependencies, executing unit tests, compiling the code, and generating a Docker image; The project code is automatically compiled by the CI tool. When the developer submits code, the CI tool will trigger the build process, automatically compile and generate the corresponding Docker image, which will contain all the necessary dependencies, configuration files, and running environments of the application, ensuring consistent operation in any environment.

[0028] S113: The continuous integration tool automatically pushes the Docker image to the specified container image repository.

[0029] After the image is generated, the CI tool automatically pushes the image to the specified container image repository to prepare for subsequent automated deployment.

[0030] Through step S11, the entire project compilation and image generation process achieves a high degree of automation, and ensures the traceability, version management, and efficient deployment of the image, providing a solid foundation for subsequent automated deployment and production environment management. The entire process of automated build and image generation achieves a high degree of automation, from code submission to container image push is all automated, reducing human errors and operation delays.

[0031] S12: Automatically pull the latest image file from the container image repository to multiple target servers through a configuration file or a container scheduling tool, and batch start container instances on the multiple target servers, so as to deploy the application on a large scale on the multiple target servers.

[0032] Before pulling and starting the container, the target servers are necessarily configured through a configuration file to ensure that they can communicate with the container scheduling tool (Docker Swarm, Kubernetes). The container scheduling tool pulls the latest image and stores the image in the container image repository. Pulling the latest image by the target server is the first step in the container deployment process. This step can be automatically executed by the container scheduling tool, or executed through a configuration file, or triggered by a CI / CD tool.

[0033] After successfully pulling the image, the container instances are started on multiple target servers. When starting multiple container instances on multiple target servers, ensure that all instance configurations are consistent, including environment variables and network configurations.

[0034] In step S12, the operation and maintenance personnel do not need to intervene manually. The system will automatically pull the latest image according to the configuration file or container scheduling tool, and start multiple container instances on multiple target servers, quickly realizing large-scale application deployment. By automatically executing the batch start command, the deployment efficiency is greatly improved, and the consistency of container instances in different environments is ensured.

[0035] In this embodiment, by introducing continuous integration (CI) tools and containerization technologies, the full process automation from code submission to image building and automatic deployment is realized. In the traditional development and operation and maintenance process, the compilation, image generation and deployment of projects often rely on manual operations, which are not only inefficient but also easily affected by human factors. By using CI tools to automatically compile and generate Docker images and automatically push them to the image repository, the configuration consistency of each development environment, test environment and production environment is ensured. Without the intervention of operation and maintenance personnel, the system automatically pulls the image and starts container instances in batches, greatly reducing human errors, improving the consistency and accuracy of deployment, and thus reducing the frequency of failures in the production environment. Embodiment Two

[0036] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of another embodiment of the application program deployment method of the present invention. Figure 4 The difference from Figure 1 is that it further includes step S23.

[0037] Step S23: Use automation scripts to manage containers in batches.

[0038] To improve the operation and maintenance efficiency, this embodiment provides automation scripts for batch management of containers. These scripts support batch start and stop of containers, and can help operation and maintenance personnel quickly start or stop multiple container instances. For example, during peak periods or when the service demand surges, the scripts can quickly increase the number of containers to cope with traffic growth; while during off-peak periods or when system maintenance is carried out, the scripts can batch stop the containers that are no longer needed to optimize resource usage. These batch scripts ensure the efficient operation of containers and simplify the operation and maintenance management process. Traditional container management often relies on manual operations or basic scheduling tools, and the ability to batch start, stop and expand containers through automation scripts not only improves the deployment efficiency but also greatly reduces resource waste. For high-concurrency environments or scenarios with large fluctuations in service demand, automated container expansion and contraction can greatly optimize resource utilization; Specifically, the automated script batch management container introduces a reinforcement learning algorithm to predict future system loads, making the expansion and reduction of containers more intelligent and timely, thereby avoiding delays or resource waste that may occur in traditional load threshold-based scheduling. The reinforcement learning algorithm can not only help predict future loads, but also provide more accurate decision-making basis for the start and stop of containers, taking multi-dimensional factors such as historical data, external business events, container health status, and hardware resource usage as inputs to the reinforcement learning model.

[0039] To apply reinforcement learning in a multi-factor environment, the goal of the reinforcement learning algorithm is to learn the optimal policy through interaction with the environment, enabling the agent to make optimal decisions in the state space and maximizing the cumulative reward it obtains. The following formula describes how the reinforcement learning algorithm updates the Q value based on the current state, action, immediate reward, and the expectation of the future state, so that the agent gradually learns which action to take in different states to maximize the long-term cumulative reward, in order to achieve intelligent management of container resources, such as dynamically adjusting the number of containers according to the load situation, improving the overall system performance and resource utilization rate:

[0040] is the current state taking action of value, The value represents the expected return of taking a certain action in a specific state. In the container management scenario, the state includes information such as the current system load, container resource usage, and application running status. The action is an operation such as starting or stopping a container.

[0041] is the learning rate, which determines the update speed. The learning rate controls the influence of newly acquired information on the original value estimate. If is large, the model will adapt to new observation data faster, but will ignore previous experience; if is small, the model update will be relatively slow; is the discount factor, which represents the weight of future rewards. When is close to 0, the agent pays more attention to short-term rewards; when is close to 1, the agent also attaches great importance to future long-term rewards. In container management, it means that the algorithm will consider the impact of the current decision on future system performance and resource utilization to a certain extent is taking action in state taking action The immediate reward after that. The immediate reward is the feedback that the agent obtains immediately after executing an action. In the container management scenario, the immediate reward is defined according to system performance metrics (such as response time, throughput, etc.). For example, if the throughput of the system increases after starting a container, a positive immediate reward can be given; if starting the container causes excessive resource consumption or a decline in system performance, a negative immediate reward is given; is the next state The maximum Q-value that can be obtained in the next state. This value represents the maximum expected return that the agent can obtain among all possible actions after executing the action After that, the agent enters the next state When, it is the maximum expected return that can be obtained among all possible actions. It is used to estimate future potential rewards and helps the agent consider the optimal choice in the future when making current decisions; When the state space is large, a deep Q-network is used to approximate the Q-function. The deep Q-network uses a deep neural network to fit the Q-function and stabilizes the training process through replay memory.

[0042] The training process of the deep Q-network is based on the following objective:

[0043] Among them, is the current parameters of the network, is the target parameters of the network. The parameters of the target network are updated every once in a while.

[0044] Through continuous interaction with the environment, the agent continuously learns the optimal container expansion and contraction strategies through exploration and exploitation strategies.

[0045] In this embodiment, by combining automated scripts with reinforcement learning algorithms, intelligent scheduling and management of container resources are achieved. Traditional container management methods mostly rely on simple load threshold judgments and are difficult to effectively cope with changing load fluctuations and resource requirements. By introducing a deep Q-network combined with reinforcement learning, the system can predict future system loads based on multi-dimensional factors such as historical load data, external business events, container health status, and hardware resource usage, and dynamically adjust the number of containers according to the prediction results. This intelligent container management method can make more accurate resource scheduling decisions based on deep learning models, avoiding delays and resource waste in traditional methods. The deep Q-network fits the Q-function by training a deep neural network and continuously optimizes the decision-making strategy through interaction with the environment, making container expansion and contraction more efficient and timely, improving resource utilization, and ensuring that the system can adaptively cope with load fluctuations and optimize overall performance. Embodiment Three

[0046] Please refer to Figure 5 , Figure 5 which is a schematic flowchart of another embodiment of the application program deployment method of the present invention. Figure 5 The difference from Figure 1 is that it further includes step S33.

[0047] S33: Provide an interface with a standardized design to enable integration with other systems or provide communication support for each module in the microservices architecture.

[0048] In this embodiment, by providing an interface service, subsequent development and expansion become more flexible. The interface service supports integration with other systems or provides communication support for each module in the microservices architecture through methods such as RESTful API. The interface service provides a stable foundation for subsequent function development, can support rapid business expansion or modification, and ensures that future development is not restricted by the existing architecture. The standardized design of the interface enables seamless docking between different teams and systems, simplifying the expansion and maintenance of the overall architecture. Embodiment Four

[0049] Please refer to Figure 6 , Figure 6 which is a schematic flowchart of yet another embodiment of the application program deployment method of the present invention. Figure 6 The difference from Figure 1 is that it further includes step S43.

[0050] S43: Use a custom monitoring panel to monitor the status metrics of the entire service cluster resources in real time and alarm for the status metrics.

[0051] Among them, the types of the service cluster resources include: application programs, servers, and containers; the status metrics include: the running status of the cluster, resource utilization rate, and application health.

[0052] In this embodiment, to ensure that the deployed service cluster is always in a healthy state, this solution realizes real-time monitoring of the entire service cluster through a custom monitoring panel. The monitoring tool (Prometheus) will be integrated to collect the status metrics of various resources such as applications, containers, and servers in real time and display them through a visualization panel. The monitoring panel can not only display important information such as the running status of the cluster, resource utilization, and application health, but also customize alarm rules and alert strategies as needed to ensure that the operation and maintenance team can respond in a timely manner and take measures in case of any abnormal situation. Compared with the traditional operation and maintenance method, this automated fault diagnosis and recovery mechanism can significantly shorten the problem handling time and improve the availability and stability of the system. Through automated scripts, operation and maintenance personnel can restart faulty containers with one key or quickly perform horizontal scaling of containers to ensure that the production environment can quickly return to normal and minimize the service interruption time. Embodiment 5

[0053] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of an embodiment of the application program deployment device of the present invention. As Figure 7 shown, the device includes an image file generation and push module 11 and an application program deployment module 12.

[0054] The image file generation and push module 11 is used to automatically generate an image file of the application program through a continuous integration tool and automatically push the image file to a container image repository.

[0055] The application program deployment module 12 is used to automatically pull the latest image file from the container image repository to multiple target servers through a configuration file or a container scheduling tool and batch start container instances on the multiple target servers, so as to deploy the application program on a large scale on the multiple target servers.

[0056] Specifically, please refer to Figure 8 , Figure 8 which is Figure 7 a schematic structural diagram of an embodiment of the image file generation and push module 11 of Figure 8 As shown, the image file generation and push module 11 includes a continuous integration tool configuration unit 111, an image file generation unit 112, and an image file push unit 113. The continuous integration tool configuration unit 111 is used to configure the continuous integration tool. The image file generation unit 112 is used to trigger a build process when receiving an operation of a developer submitting code, and the continuous integration tool will automatically pull the latest code, install project dependencies, execute unit tests, compile the code, and generate a Docker image. The image file push unit 113 is used for the continuous integration tool to automatically push the Docker image to the specified container image repository.

[0057] Specifically, please refer to Figure 9 , Figure 9 which Figure 8 is a schematic structural diagram of an embodiment of the continuous integration tool configuration unit 111. As Figure 9 shown, the continuous integration tool configuration unit 111 includes a version control system configuration subunit 1111, a continuous integration trigger setting subunit 1112, a build script setting subunit 1113, a mirror push configuration subunit 1114, and a communication module configuration subunit 1115. The version control system configuration subunit 1111 is used to configure the version control system integrated with the continuous integration tool, so that the build process can be started every time the code of the application is committed. The continuous integration trigger setting subunit 1112 is used to set the continuous integration trigger, so that the build process can be started every time the code of the application changes. The build script setting subunit 1113 is used to set the build script, and the build script is used to perform the following operations after the build process is started: pulling the latest code, installing project dependencies, executing unit tests, compiling the code, and generating a Docker image. The mirror push configuration subunit 1114 is used to configure the authentication information of the Docker image repository, push the built image to the image repository using the docker push command, and configure the storage and access permissions of the image in the image repository according to the configuration of the selected repository. The communication module configuration subunit 1115 is used to configure the communication module to automatically notify the developer through an instant notification software when the build fails.

[0058] Specifically, the working methods of the modules in this embodiment have been elaborated in detail in Embodiment 1, and will not be repeated here. Embodiment 6

[0059] Please refer to Figure 10 , Figure 10 which Figure 10 is a schematic structural diagram of another embodiment of the application deployment device of the present invention. As

[0060] shown, the device further includes a container management module 23.

[0061] The container management module 23 is used to batch manage containers using automation scripts. Specifically, the working method of the container management module 23 has been elaborated in detail in Embodiment 2, and will not be repeated here.

[0062] Please refer to Figure 11 , Figure 11 which Figure 11 is a schematic structural diagram of yet another embodiment of the application deployment device of the present invention. As

[0063] The interface providing module 33 is used to provide interfaces with a standardized design, enabling integration with other systems or providing communication support for each module in a microservices architecture.

[0064] Specifically, the working method of the interface providing module 33 has been elaborated in detail in Embodiment 3 and will not be repeated here. Embodiment 8

[0065] Please refer to Figure 12 , Figure 12 which is a schematic structural diagram of another embodiment of the application deployment device of the present invention. As Figure 12 shown, the device further includes a monitoring module 43.

[0066] The monitoring module 43 is used to monitor the status indicators of the entire service cluster resources in real time using a custom monitoring panel and alarm for the status indicators.

[0067] Specifically, the working method of the monitoring module 43 has been elaborated in detail in Embodiment 4 and will not be repeated here. Embodiment 9

[0068] The present invention also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the method as described in Embodiment 1, or Embodiment 2, or Embodiment 3, or Embodiment 4.

[0069] The present invention is developed based on the DevOps framework. By introducing the DevOps framework, automatic compilation of project code, image generation, and containerized deployment are realized. Combining with automatic scripts and reinforcement learning algorithms, intelligent management of container scaling and reduction is achieved, and the health status of the service cluster is monitored in real time through a custom monitoring panel, thus effectively overcoming problems such as low automation level, low resource utilization rate, and slow fault recovery in the prior art, and providing a reliable guarantee for the stability and efficiency of the production environment.

[0070] The above is a specific description of the preferred embodiments of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art can make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for deploying an application program, characterized in that: include: Automatically generate application image files through continuous integration tools, and automatically push the image files to the container image repository; The latest image file is automatically pulled from the container image repository to multiple target servers through a configuration file or a container scheduling tool, and container instances are started in batches on the multiple target servers, thereby deploying the application on a large scale on the multiple target servers.

2. The method according to claim 1, characterized in that The method of automatically generating an image file of the application file by using a continuous integration tool and pushing the image file to a container image repository includes: configuring the continuous integration tool; When receiving the code submission operation from the developer, the continuous integration tool will trigger the build process to automatically pull the latest code, install project dependencies, execute unit tests, compile code, and generate Docker images; The continuous integration tool automatically pushes the Docker image to the specified container image repository.

3. The method according to claim 2, characterized in that The configuring of the continuous integration tool includes: Configuring a version control system integrated with the continuous integration tool so that the build process can be started each time the code of the application is submitted; Setting a continuous integration trigger so that the build process can be started every time the code of the application changes; Set up a build script, which is used to perform the following operations after starting the build process: pull the latest code, install project dependencies, execute unit tests, compile code, and generate a Docker image; Configure the authentication information of the Docker image repository, use the docker push command to push the built image to the image repository, and configure the storage and access rights of the image in the image repository according to the configuration of the selected repository; Configure the communication module to automatically notify developers via instant notification software when a build fails; The version control system is also used to manage multiple versions of the image, so that after each successful build, the image is labeled with a suitable version tag and pushed to the container image repository, and can be rolled back to a stable version when necessary.

4. The method according to claim 1, characterized in that Also includes: An automated script is used to manage containers in batches, wherein the automated script uses a reinforcement learning algorithm to predict changes in the future loads of the multiple target servers. When the future load is predicted to increase, the number of containers is quickly increased through the automated script. Conversely, when the future load is predicted to decrease, the automated script is used to automatically batch stop containers that are no longer needed.

5. The method according to claim 1, characterized in that Also includes: Provide standardized interfaces to support integration with other systems or provide communication support for various modules in the microservice architecture.

6. The method according to claim 1, characterized in that Also includes: Use a custom monitoring panel to monitor the status indicators of the entire service cluster resources in real time and issue alarms for the status indicators; The types of service cluster resources include: applications, servers, and containers; the status indicators include: cluster operation status, resource utilization, and application health.

7. An application deployment device, characterized in that: include: An image file generation and push module is used to automatically generate an application image file through a continuous integration tool and automatically push the image file to a container image repository; The application deployment module is used to automatically pull the latest image file from the container image repository to multiple target servers through a configuration file or a container scheduling tool, and batch start container instances on the multiple target servers, thereby deploying the application on a large scale on the multiple target servers.

8. The device according to claim 7, characterized in that The image file generation and push module includes: A continuous integration tool configuration unit, used to configure the continuous integration tool; The image file generation unit is used to trigger the build process when receiving the code submission operation from the developer, automatically pull the latest code, install project dependencies, execute unit tests, compile code, and generate a Docker image; The image file pushing unit is used for the continuous integration tool to automatically push the Docker image to the specified container image repository.

9. The device according to claim 7, characterized in that Also includes: Container management module, used to manage containers in batches using automated scripts; The interface provider module is used to provide standardized interfaces to support integration with other systems or provide communication support for various modules in the microservice architecture. The monitoring module is used to monitor the status indicators of the entire service cluster resources in real time using a custom monitoring panel and to issue an alarm for the status indicators.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Mirror image generation method and device, equipment, medium and program product

    CN120848908A

  • Mirror image generation method, apparatus, device, medium, and program product

    CN120848908B