Automatic container deployment method and device, medium and program product
By building container images and determining image hash values, configuring standardized service environments, and automating container deployment and monitoring, we address the issues of insufficient standardization and difficult operation and maintenance of automated container deployment on the cloud, and achieve efficient and reliable container deployment and operation and maintenance.
Patent Information
- Application Number
- CN202510802370.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-26
AI Technical Summary
In existing technologies, the automated deployment of containers on the cloud suffers from insufficient deployment standardization, poor deployment results, and difficulty in operation and maintenance. This is especially true when the build, testing, and deployment processes are inconsistent between different teams or projects, which increases the difficulty of operation and maintenance.
By building a container image and determining the image hash value, configuring a standardized service environment, determining the container to be deployed based on the image hash value, and automatically deploying and monitoring the container in a standardized environment, the container orchestration platform is used to achieve automated deployment and monitoring, reducing manual intervention.
It achieves automatic and standardized deployment of cloud containers, improves deployment effects, reduces operation and maintenance difficulties, ensures consistency across different service environments, and improves execution efficiency and reliability.
Smart Images

Figure CN120704697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing technology, and in particular to a container automated deployment method, device, medium, and program product. Background Art
[0002] Currently, automated deployment of cloud containers is typically achieved using cloud computing service platforms combined with continuous integration or continuous deployment pipelines. This typically includes code repository management, automated build and testing, container image building, and deployment on a container orchestration platform or similar.
[0003] However, different teams or projects may use different build, testing, and deployment processes, resulting in inconsistent container deployment operations within pipeline automation, making them difficult to manage. Manual intervention is still required during the deployment and monitoring phases. Configuration differences between different service environments can also lead to inconsistent application behavior, increasing the difficulty of debugging and maintenance. Consequently, current pipeline-based automated deployment of cloud containers suffers from insufficient deployment standardization, poor deployment results, and significant operational and maintenance difficulties. Summary of the Invention
[0004] The present invention provides a container automation deployment method, equipment, medium and program product to solve the problems of insufficient deployment standardization, poor deployment effect and difficult operation and maintenance in the current pipeline-based automated deployment of cloud containers.
[0005] According to one aspect of the present invention, a method for automated container deployment is provided, comprising:
[0006] Build a container image based on the target code and continuous integration tools, and determine the image hash value that matches the container image;
[0007] Configure at least one standardized service environment and determine the container to be deployed in the target release unit based on the image hash value;
[0008] Deploy the containers to be deployed in the target release unit in at least one standardized service environment and monitor the deployment.
[0009] According to another aspect of the present invention, there is provided a container automated deployment device, comprising:
[0010] An image hash value determination module is used to build a container image based on the target code and continuous integration tools, and determine the image hash value that matches the container image;
[0011] A module for determining a unit to be deployed is used to configure at least one standardized service environment and determine a container to be deployed in a target release unit based on the image hash value;
[0012] The container deployment and monitoring module is used to deploy the containers to be deployed in the target release unit in at least one standardized service environment and perform deployment monitoring.
[0013] According to another aspect of the present invention, an electronic device is provided, comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the container automatic deployment method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the container automatic deployment method according to any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the computer program implements the container automatic deployment method according to any embodiment of the present invention.
[0019] The technical solution of the embodiment of the present invention is to build a container image according to the target code and continuous integration tools, and determine the image hash value that matches the container image, thereby configuring at least one standardized service environment, and according to the image hash value, determine the container to be deployed in the target release unit, and then deploy the container to be deployed in the target release unit in at least one standardized service environment, and perform deployment monitoring. In this solution, the determination of the container to be deployed in the target release unit and the deployment on the cloud do not require manual intervention, and can be realized automatically, with high execution efficiency and strong reliability. The deployment of the container to be deployed in a standardized service environment can ensure consistency between different service environments, facilitate testing and operation and maintenance, and solve the current problems of insufficient deployment standardization, poor deployment effect and high difficulty in operation and maintenance in the automated deployment of containers on the cloud based on pipelines. It can automatically and standardizedly deploy containers on the cloud, improve deployment effects, and effectively reduce the difficulty of later operation and maintenance.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A flowchart of a container automated deployment method provided in Example 1 of the present invention;
[0023] Figure 2 A flowchart of a container automated deployment method provided in Example 2 of the present invention;
[0024] Figure 3 A schematic diagram of the structure of a container automatic deployment device provided in Example 3 of the present invention;
[0025] Figure 4 A schematic structural diagram of an electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "current", "target", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Example 1
[0029] Figure 1This is a flowchart of a container automation deployment method provided in the first embodiment of the present invention. This embodiment is applicable to the automated and efficient deployment of containers on the cloud. The method can be executed by a container automation deployment device, which can be implemented in the form of hardware and / or software. The container automation deployment device can be configured in an electronic device. The electronic device may include but is not limited to a server or a computer. Figure 1 As shown, the method includes:
[0030] Step 110: Build a container image based on the target code and the continuous integration tool, and determine an image hash value that matches the container image.
[0031] The target code can be code submitted by developers for deploying containers on the cloud. A continuous integration tool can be a tool that detects changes and initiates automated build and testing processes. The image hash value can be a hash value of a container image.
[0032] In an embodiment of the present invention, after the target code is pushed to the version control system repository, the continuous integration tool is triggered to build a container image using a script including all commands and instructions for creating an image, and the image hash value of the container image is calculated based on a hash encryption algorithm.
[0033] Step 120: Configure at least one standardized service environment, and determine the container to be deployed in the target release unit according to the image hash value.
[0034] The standardized service environment can be a predefined standardized cloud service environment. The target release unit can be the release unit corresponding to the target code. A release unit refers to an independently deployable part of an application, typically consisting of a set of related microservices or components that together constitute a functional or business logic unit of the application. The container to be deployed can be the containerized application deployed by the target release unit in the standardized service environment.
[0035] In an embodiment of the present invention, the standardized service environment configuration defined by the developer (such as environment variables, dependencies, and network configuration, etc.) can be obtained, so as to create at least one standardized service environment based on the defined standardized service configuration and business needs to ensure consistency between different service environments, and use the container that matches the image hash value as the container to be deployed in the target release unit.
[0036] Optionally, the source code and version of the target release unit can be managed through a version control system repository to ensure the traceability and manageability of the target release unit.
[0037] Step 130: Deploy the container to be deployed in the target release unit in at least one standardized service environment and perform deployment monitoring.
[0038] In an embodiment of the present invention, at least one standardized service environment required for the deployment of a target sending unit can be determined, and then the container to be deployed in the target sending unit can be deployed in the at least one determined standardized service environment. The process of container deployment can be monitored, and real-time indicators can be collected to evaluate the health of the container deployment.
[0039] For example, the atomic deployment unit status can be analyzed based on the rule engine, for example, a deployment status that has been restarted more than a predetermined number of times can be marked as abnormal. Deployment status includes healthy and abnormal status, and abnormal status includes alarm status and fault status.
[0040] The technical solution of the embodiment of the present invention is to build a container image according to the target code and continuous integration tools, and determine the image hash value that matches the container image, thereby configuring at least one standardized service environment, and according to the image hash value, determine the container to be deployed in the target release unit, and then deploy the container to be deployed in the target release unit in at least one standardized service environment, and perform deployment monitoring. In this solution, the determination of the container to be deployed in the target release unit and the deployment on the cloud do not require manual intervention, and can be realized automatically, with high execution efficiency and strong reliability. The deployment of the container to be deployed in a standardized service environment can ensure consistency between different service environments, facilitate testing and operation and maintenance, and solve the current problems of insufficient deployment standardization, poor deployment effect and high difficulty in operation and maintenance in the automated deployment of containers on the cloud based on pipelines. It can automatically and standardizedly deploy containers on the cloud, improve deployment effects, and effectively reduce the difficulty of later operation and maintenance.
[0041] Example 2
[0042] Figure 2 This is a flowchart of a container automation deployment method provided by the second embodiment of the present invention. This embodiment is specific based on the above embodiment and provides a specific optional implementation method for deploying the container to be deployed in the target release unit in at least one standardized service environment and performing deployment monitoring. Figure 2 As shown, the method includes:
[0043] Step 210: Build a container image based on the target code and the continuous integration tool, and determine an image hash value that matches the container image.
[0044] Step 220: Configure at least one standardized service environment, and determine the container to be deployed in the target release unit according to the image hash value.
[0045] In an optional embodiment of the present invention, configuring at least one standardized service environment may include: calling a code tool to create a target infrastructure according to the deployment environment, and configuring middleware based on an automated operation and maintenance tool to obtain at least one service environment to be compared; determining at least one standardized service environment based on at least one service environment to be compared and an environment configuration template.
[0046] The target infrastructure may be cloud infrastructure. The target infrastructure may include, but is not limited to, a container orchestration platform consisting of multiple nodes. The service environment to be compared may be a service environment created by code tools and automated operations and maintenance tools. The environment configuration template may be a pre-configured service environment configuration template. The environment configuration template may include, but is not limited to, environment variables, dependencies, and network configuration.
[0047] In an embodiment of the present invention, a code tool for automatically managing cloud infrastructure can be used to create a target infrastructure according to the production environment and / or development environment, and the middleware can be configured through an automated operation and maintenance tool to obtain at least one service environment to be compared. The obtained service environment to be compared is then compared with the environment configuration template to ensure that the final standardized service environment is consistent with the environment configuration template, so as to ensure the consistency between different environments of container deployment based on the standardized service environment and reduce the risk of deployment failure.
[0048] Step 230: Based on the container orchestration platform, deploy the to-be-deployed container in the target release unit in at least one standardized service environment.
[0049] In an embodiment of the present invention, a container orchestration platform is used to deploy the to-be-deployed container in the target release unit in at least one standardized service environment.
[0050] In an optional embodiment of the present invention, the target publishing unit may include associated microservices or components of the container to be deployed; the target publishing unit may be used to deploy the application according to the declarative configuration in the container orchestration platform.
[0051] Optionally, you can determine the associated microservices of the container to be deployed from the microservice list in the version control system repository.
[0052] In an embodiment of the present invention, a declarative configuration application in a container orchestration platform can be used to deploy a target publishing unit to achieve automated deployment of a target sending unit and improve the deployment efficiency of the sending unit.
[0053] Step 240: While deploying the container to be deployed, monitor the target time series data, and trigger an alarm when the target time series data deviates from the target error range.
[0054] The target time series data can be metrics collected in real time by monitoring and alerting tools during the deployment of the container to be deployed. This data can include, but is not limited to, container CPU usage and request latency. The target error range can be the range of values within which the time series data is allowed to fall when the container is deployed normally.
[0055] Accordingly, while deploying the container to be deployed, the target time series data can be collected in real time and compared with the target error range. If the target time series data does not appear in the target error range, it indicates that the target time series data deviates from the target error range, thereby triggering an alarm. This can act on the deployment process through monitoring feedback, reducing manual intervention while enabling staff to promptly discover abnormal deployment status.
[0056] In an optional embodiment of the present invention, when the target time series data deviates from the target error range, before triggering the alarm, it may also include: obtaining the target historical time series data; calculating the weighted average of the target historical time series data based on a preset weighting coefficient, and determining the elastic standard deviation based on the weighted average and the target historical time series data; determining the target error range based on the elastic standard deviation, the standard deviation deviation and the weighted average.
[0057] The target historical time series data can be the metrics of interest collected during historical container deployment. The preset weighting coefficient can be the weight of the target historical time series data. The target historical time series data closer to the current time has a higher weight. The specific weight value can be customized. The elastic standard deviation can be the standard deviation of the target historical time series data and its weighted average. The product of the standard deviation deviation and the elastic standard deviation is the allowable error of the time series data.
[0058] In an embodiment of the present invention, the target historical time series data and a preset weighting coefficient can be obtained first, and then the preset weighting coefficient and the target historical time series data are weighted and summed, and the average is calculated to obtain a weighted average value, so that the difference between the target historical time series data and the weighted average value of the target historical time series data is used as the elastic standard deviation, and the product value of the elastic standard deviation and the standard deviation deviation is further calculated to determine the target error range based on the sum of the weighted average value of the target historical time series data and the product value, and the difference between the weighted average value of the target historical time series data and the product value, that is, a statistical method is used instead of a static configuration, so that the target error range is more adaptable to business fluctuations.
[0059] In an optional embodiment of the present invention, when the target time series data deviates from the target error range, after the alarm is triggered, it can also include: obtaining the alarm trigger frequency of the current container deployment alarm; when the alarm trigger frequency of the current container deployment alarm meets the alarm continuous attention condition, automatically triggering the container grayscale release or rollback.
[0060] The current container deployment alarm can be an alarm triggered for abnormal deployment status during container deployment monitoring. The alarm trigger frequency describes the number of times the alarm is triggered within a certain period of time. The alarm continuous monitoring condition can be a predefined condition that the alarm must meet, such as the number of alarms exceeding a predetermined number within a preset period of time.
[0061] Specifically, the alarm trigger frequency of the current container deployment alarm can be obtained, and then the alarm trigger frequency of the current container deployment alarm can be compared with the alarm continuous attention condition. If the alarm trigger frequency of the current container deployment alarm meets the alarm continuous attention condition, the container grayscale release will be automatically triggered, or the container deployment operation will be rolled back. That is, after the alarm, the alarm can be further evaluated and the container deployment operation can be dynamically adjusted.
[0062] In an optional embodiment of the present invention, when the target time series data deviates from the target error range, after the alarm is triggered, it can also include: determining the container deployment alarm type of the current container deployment alarm; determining the alarm elimination action based on the decision tree method and the container deployment alarm type; and outputting the alarm elimination operation instruction according to the alarm elimination action.
[0063] The container deployment alarm type can be used to describe the type of alarm triggered during container deployment. The alarm elimination action can be an operation to eliminate the container deployment alarm. The alarm elimination operation instruction can be an operation instruction created based on the alarm elimination action to execute the alarm elimination action.
[0064] In an embodiment of the present invention, the alarm information of the current container deployment alarm can be parsed to obtain the container deployment alarm type of the current container deployment alarm, and the container deployment alarm type is input into the trained decision tree model to obtain the alarm elimination action. Based on the alarm elimination action, the next step of the pipeline instruction, i.e., the alarm elimination operation instruction, is created, which can automatically determine the actions required to eliminate the alarm, reduce manual intervention, and ensure the reliability and stability of the system.
[0065] In a specific example, the commit action of the target code in the version control system repository triggers the continuous integration tool, which builds the container image of the target code based on a predefined script and outputs the image hash value. The predefined script relies on the image layer cache to optimize the build time. If the build fails, the process is terminated and a notification is given.
[0066] After outputting the image hash value, unit and integration tests are executed, generating a coverage report. If the coverage falls below a threshold (e.g., 80%), the pipeline is paused and marked as "requiring manual review." The standardized service environment is dynamically configured, and the containers to be deployed in the target release unit are deployed. While deploying, the status of the atomic deployment units in the container orchestration platform is monitored. If the status of the atomic deployment unit indicates a startup timeout, a rollback to the previous version is triggered.
[0067] While the container to be deployed is being deployed in the target release unit, the target time series data is monitored, and the target error range is determined based on the exponentially weighted average algorithm and the target historical time series data. For example, if the historical mean CPU utilization rate is 50%, the elastic standard deviation is ±5%, and the standard deviation deviation is 3, the target error range of the CPU utilization rate is 35%-65%.
[0068] If the current container deployment alarm is triggered three times within 5 minutes, a grayscale release (only updating some atomic deployment units) or a rollback will be automatically triggered, forming a closed loop of deployment-monitoring-feedback-optimization, and generating a root cause analysis report (for example, if the alarm is caused by high CPU usage, it is recommended to expand the capacity). If the deployment is successful, the service endpoint corresponding to the successfully deployed container and a link to the monitoring dashboard will be output.
[0069] All of the aforementioned processes interact through a unified application programming interface (API) to ensure process consistency. This solution's automated container deployment and monitoring capabilities reduce manual O&M workload and lower O&M costs. Combined with standardized pipelines and modular design, the system is easily scalable and adaptable to diverse application scenarios and needs.
[0070] The technical solution of the embodiment of the present invention is to build a container image based on the target code and continuous integration tools, and determine the image hash value that matches the container image, thereby configuring at least one standardized service environment, and according to the image hash value, determine the container to be deployed in the target release unit, and then deploy the container to be deployed in the target release unit in at least one standardized service environment based on the container orchestration platform. Further, while deploying the container to be deployed, the target time series data is monitored, and an alarm is triggered when the target time series data deviates from the target error range. In this solution, the determination of the container to be deployed in the target release unit and the deployment on the cloud do not require manual intervention, can be automated, and have high execution efficiency and strong reliability. The deployment of the container to be deployed in a standardized service environment can ensure consistency between different service environments, facilitate testing and operation and maintenance, and solve the current problems of insufficient deployment standardization, poor deployment effect and high operation and maintenance difficulty in the automated deployment of cloud containers based on pipelines. It can automatically and standardizedly deploy containers on the cloud, improve deployment effect and effectively reduce the difficulty of later operation and maintenance.
[0071] Example 3
[0072] Figure 3 This is a schematic diagram of the structure of a container automatic deployment device provided by the third embodiment of the present invention. Figure 3 As shown, the device includes:
[0073] An image hash value determination module 310 is configured to build a container image based on the target code and continuous integration tools, and determine an image hash value that matches the container image;
[0074] The to-be-deployed unit determination module 320 is configured to configure at least one standardized service environment and determine the to-be-deployed container in the target release unit based on the image hash value;
[0075] The container deployment and monitoring module 330 is used to deploy the to-be-deployed container in the target release unit in at least one standardized service environment and perform deployment monitoring.
[0076] The technical solution of the embodiment of the present invention is to build a container image according to the target code and continuous integration tools, and determine the image hash value that matches the container image, thereby configuring at least one standardized service environment, and according to the image hash value, determine the container to be deployed in the target release unit, and then deploy the container to be deployed in the target release unit in at least one standardized service environment, and perform deployment monitoring. In this solution, the determination of the container to be deployed in the target release unit and the deployment on the cloud do not require manual intervention, and can be realized automatically, with high execution efficiency and strong reliability. The deployment of the container to be deployed in a standardized service environment can ensure consistency between different service environments, facilitate testing and operation and maintenance, and solve the current problems of insufficient deployment standardization, poor deployment effect and high difficulty in operation and maintenance in the automated deployment of containers on the cloud based on pipelines. It can automatically and standardizedly deploy containers on the cloud, improve deployment effects and effectively reduce the difficulty of later operation and maintenance.
[0077] Optionally, the module for determining the unit to be deployed 320 and the standardized service environment determination unit are used to call the code tool, create the target infrastructure according to the deployment environment, and configure the middleware based on the automated operation and maintenance tool to obtain at least one service environment to be compared; and determine at least one standardized service environment based on at least one of the service environments to be compared and the environment configuration template.
[0078] Optionally, the container deployment and monitoring module 330 is specifically used to deploy the to-be-deployed container in the target release unit in at least one standardized service environment based on the container orchestration platform; while deploying the to-be-deployed container, monitor the target time series data and trigger an alarm when the target time series data deviates from the target error range.
[0079] Optionally, the automated deployment device further includes a first alarm post-processing module to obtain the alarm trigger frequency of the current container deployment alarm; when the alarm trigger frequency of the current container deployment alarm meets the alarm continuous attention condition, the container grayscale release or rollback is automatically triggered.
[0080] Optionally, the automated deployment device also includes a second alarm post-processing module, which is used to determine the container deployment alarm type of the current container deployment alarm; determine the alarm elimination action based on the decision tree method and the container deployment alarm type; and output the alarm elimination operation instruction according to the alarm elimination action.
[0081] Optionally, the target publishing unit includes an associated application or service of the container to be deployed; the target publishing unit is used to deploy the application according to the declarative configuration in the container orchestration platform.
[0082] Optionally, the automated deployment device also includes a target error range determination module for obtaining target historical time series data; calculating the weighted average of the target historical time series data based on a preset weighting coefficient, and determining the elastic standard deviation based on the weighted average and the target historical time series data; determining the target error range based on the elastic standard deviation, the standard deviation deviation and the weighted average.
[0083] The container automation deployment device provided in the embodiment of the present invention can execute the container automation deployment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0084] Example 4
[0085] Figure 4 A schematic diagram of an electronic device that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are provided for example only and are not intended to limit the implementation of the present inventions described and / or claimed herein.
[0086] like Figure 4As shown, electronic device 10 includes at least one processor 11 and memory, such as ROM 12 and RAM 13, communicatively connected to at least one processor 11. The memory stores computer programs executable by the at least one processor, and processor 11 can perform various appropriate actions and processes based on the computer programs stored in ROM 12 or loaded from storage unit 18 into RAM 13. RAM 13 can also store various programs and data required for the operation of electronic device 10. Processor 11, ROM 12, and RAM 13 are interconnected via bus 14. I / O interface 15 is also connected to bus 14. ROM 12 is read-only memory, RAM 13 is random access memory, and I / O interface 15 is an input / output interface.
[0087] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0088] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the container automated deployment method.
[0089] In some embodiments, the container automation deployment method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the container automation deployment method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the container automation deployment method in any other appropriate manner (for example, by means of firmware).
[0090] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0092] In the context of the present invention, computer-readable storage medium can be a tangible medium that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, RAM, ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device or any suitable combination of the foregoing.
[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0094] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0095] A computing system may include clients and servers. The clients and servers are generally remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS servers.
[0096] The present application also discloses a computer program product comprising a computer program that, when executed by a processor, implements the automated container deployment method provided in any of the embodiments of the present application. This program product and the automated container deployment method disclosed in each embodiment of the present application share the same inventive concept and are therefore not described in detail here.
[0097] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0098] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A container automated deployment method, characterized in that: include: Build a container image based on the target code and continuous integration tools, and determine the image hash value that matches the container image; Configure at least one standardized service environment, and determine a container to be deployed in a target release unit based on the image hash value; In at least one standardized service environment, the container to be deployed in the target release unit is deployed and deployment monitoring is performed.
2. The method according to claim 1, characterized in that Configure at least one standardized service environment, including: Call the code tool to create the target infrastructure according to the deployment environment and configure the middleware based on the automated operation and maintenance tool to obtain at least one service environment to be compared; At least one standardized service environment is determined according to at least one service environment to be compared and an environment configuration template.
3. The method according to claim 1, characterized in that Deploying the container to be deployed in the target release unit in at least one standardized service environment and performing deployment monitoring includes: Deploying the to-be-deployed container in the target release unit in at least one standardized service environment based on a container orchestration platform; While deploying the container to be deployed, target time series data is monitored, and an alarm is triggered when the target time series data deviates from a target error range.
4. The method according to claim 3, characterized in that When the target time series data deviates from the target error range, after triggering an alarm, the method further includes: Get the alarm trigger frequency of the current container deployment alarm; When the alarm trigger frequency of the current container deployment alarm meets the alarm continuous attention condition, the container grayscale release or rollback is automatically triggered.
5. The method according to claim 3, characterized in that When the target time series data deviates from the target error range, after triggering an alarm, the method further includes: Determine the container deployment alarm type of the current container deployment alarm; Determine an alarm elimination action based on a decision tree method and the container deployment alarm type; According to the alarm elimination action, an alarm elimination operation instruction is output.
6. The method according to claim 3, characterized in that The target release unit includes the associated microservices or components of the container to be deployed; The target publishing unit is configured to deploy the application according to the declarative configuration in the container orchestration platform.
7. The method according to claim 3, characterized in that When the target time series data deviates from the target error range, before triggering an alarm, the method further includes: Get the target historical time series data; Calculating a weighted average of the target historical time series data based on a preset weighting coefficient, and determining an elastic standard deviation based on the weighted average and the target historical time series data; The target error range is determined according to the elastic standard deviation, the standard deviation deviation and the weighted average.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the container automatic deployment method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the container automatic deployment method according to any one of claims 1 to 7 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the container automatic deployment method according to any one of claims 1 to 7.