Container-based application intelligent deployment method and device
By using a containerized intelligent deployment method, application containers are automatically generated and deployed, solving the problems of time consumption and errors caused by manual deployment, and achieving efficient and reliable application deployment and service startup.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN COMTOP INFORMATION TECH
- Filing Date
- 2022-10-14
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, application deployment requires manual involvement throughout the entire process, which leads to significant time consumption and is prone to errors, impacting the network service quality of enterprise business systems.
The application deployment method based on containerization is adopted. By receiving application deployment instructions, a deployment container is generated and deployed to the target partition. The application is started using the container image and configuration file, reducing manual intervention.
It improves the efficiency and reliability of application deployment, reduces runtime environment errors, ensures smooth application service startup, saves resources, and meets user business needs.
Smart Images

Figure CN115562689B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a containerized application intelligent deployment method and apparatus. Background Technology
[0002] With the rapid development of internet technology, people have increasingly higher requirements for the deployment of business applications. In a period of rapid business iteration for large enterprises, the ability to quickly deploy applications that meet their business needs is crucial to providing ideal network services for the large-scale development of their business systems.
[0003] Currently, application deployment typically requires full manual involvement. However, manual deployment is not only time-consuming but also prone to runtime errors, leading to application service startup failures and hindering the provision of ideal network services to enterprise business systems. Therefore, providing a method for rapid and accurate application deployment is crucial. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and apparatus for intelligent deployment of applications based on containerization, which can not only improve the deployment efficiency of applications and thus deploy applications quickly, but also reduce the occurrence of runtime environment errors, thereby improving the reliability and accuracy of application deployment, and thus enabling the application service to start smoothly.
[0005] To address the aforementioned technical problems, the first aspect of this invention discloses a containerized intelligent application deployment method, the method comprising:
[0006] Receive the application deployment instruction of the target application, and determine the deployment information of the target application based on the application deployment instruction of the target application; the deployment information of the target application includes all target release packages required to deploy the target application, and each target release package includes a target container image and a deployment configuration file of the target container image;
[0007] Based on each target release package, generate a container corresponding to each target release package, which serves as all deployment containers for the target application;
[0008] For each of the aforementioned deployment containers, the deployment container is deployed to the corresponding target partition;
[0009] Based on the target container image and the corresponding deployment configuration file for each deployment container, all deployment containers are started to deploy the target application through all deployment containers.
[0010] As an optional implementation, in the first aspect of the invention, before receiving the application deployment instruction for the target application, the method further includes:
[0011] Receive build instructions for multiple pending deployment applications;
[0012] Based on the build instructions for each of the pending deployment applications, obtain the application code for each of the pending deployment applications;
[0013] Based on the application code of each pending deployment application, a code building operation is performed on each pending deployment application to obtain all release packages corresponding to each pending deployment application; each release package includes a container image and a deployment configuration file of the container image.
[0014] As an optional implementation, in the first aspect of the present invention, obtaining the application code of each of the pending deployment applications according to the build instructions of each pending deployment application includes:
[0015] Based on the build instructions for each application to be deployed, multiple task queues are generated for each application to be deployed; all task queues for each application to be deployed have a corresponding task queue execution order;
[0016] For each application to be deployed, the application code of the application to be deployed is obtained sequentially according to all the task queues of the application to be deployed and the execution order of the task queues corresponding to each task queue.
[0017] As an optional implementation, in the first aspect of the present invention, deploying the deployment container to the corresponding target partition for each deployment container includes:
[0018] Determine the partition parameters of a plurality of preset partitions; the partition parameters of each partition include at least one of the partition memory parameters, partition type, and partition running status;
[0019] For each of the deployment containers, the runtime environment parameters of the deployment container are determined; the runtime environment parameters of the deployment container include the startup command of the deployment container and / or the required startup memory parameters;
[0020] Based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, a target partition that matches the deployment container is determined from all the partitions, and the deployment container is deployed to the corresponding target partition.
[0021] As an optional implementation, in the first aspect of the invention, before determining a target partition matching the deployment container from all the partitions based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, and deploying the deployment container to the corresponding target partition, the method further includes:
[0022] Determine the application information of the target application; the application information of the target application includes at least one of the application type, application communication method, and application scenario type of the target application.
[0023] Based on the application information of the target application, determine whether the partitioning influence of the target application is less than or equal to a preset influence threshold.
[0024] When the determination result is yes, the operation of determining the target partition that matches the deployment container from all the partitions based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, and deploying the deployment container to the corresponding target partition is triggered;
[0025] If the determination result is negative, the target partition that matches the deployment container is determined from all the partitions based on the runtime environment parameters of the deployment container, the application information of the target application, and the partition parameters of all the partitions.
[0026] As an optional implementation, in the first aspect of the present invention, determining whether the partitioning influence of the target application is less than or equal to a preset influence threshold based on the application information of the target application includes:
[0027] Based on the application information of the target application, predict the impact of partitioning on the target application; the impact of partitioning on the target application includes at least one of the following: partition deployment, partition communication, and partition service provision.
[0028] Based on the impact of partitioning on the target application, determine whether the impact of partitioning is a preset impact condition; the preset impact condition represents the impact condition corresponding to when the target application can be deployed normally.
[0029] When the judgment result is yes, it is determined that the partitioning influence of the target application is less than or equal to the preset influence threshold.
[0030] If the judgment result is negative, it is determined that the partitioning influence of the target application is greater than the preset influence threshold.
[0031] As an optional implementation, in the first aspect of the present invention, after performing a code building operation on each of the pending deployment applications based on the application code of each pending deployment application to obtain all release packages corresponding to each pending deployment application, the method further includes:
[0032] For each application to be deployed, obtain the predicted network transmission situation corresponding to the deployment of the application to be deployed;
[0033] Based on the network transmission status and all the release packets corresponding to the application to be deployed, determine whether the network deployment conditions required for the application to be deployed are met.
[0034] When the judgment result is negative, the storage area information and storage naming method of each release package are determined according to the release package content of each release package corresponding to the pending deployment application;
[0035] Based on the storage area information of each release package and the storage naming method, each release package is stored in a matching storage area.
[0036] A second aspect of the present invention discloses a containerized application intelligent deployment device, the device comprising:
[0037] The receiving module is used to receive application deployment instructions from the target application.
[0038] The determination module is used to determine the deployment information of the target application based on the application deployment instructions of the target application; the deployment information of the target application includes all target release packages required to deploy the target application, and each target release package includes a target container image and a deployment configuration file of the target container image;
[0039] The generation module is used to generate a container corresponding to each target release package based on each target release package, which serves as all deployment containers corresponding to the target application;
[0040] The deployment module is used to deploy each deployment container to the corresponding target partition.
[0041] The startup module is used to start all the deployment containers based on the target container image and the corresponding deployment configuration file for each deployment container, so as to deploy the target application through all the deployment containers.
[0042] As an optional implementation, in a second aspect of the invention, the receiving module is further configured to:
[0043] Before receiving the application deployment instruction for the target application, build instructions for multiple pending deployment applications are received;
[0044] The device also includes:
[0045] The acquisition module is used to acquire the application code of each of the pending deployment applications based on the build instructions of each pending deployment application;
[0046] The build module is used to perform code build operations on each of the pending deployment applications based on the application code of each pending deployment application, to obtain all the release packages corresponding to each pending deployment application; each release package includes a container image and a deployment configuration file of the container image.
[0047] As an optional implementation, in the second aspect of the present invention, the method by which the acquisition module acquires the application code of each application to be deployed based on the build instructions of each application to be deployed is specifically as follows:
[0048] Based on the build instructions for each application to be deployed, multiple task queues are generated for each application to be deployed; all task queues for each application to be deployed have a corresponding task queue execution order;
[0049] For each application to be deployed, the application code of the application to be deployed is obtained sequentially according to all the task queues of the application to be deployed and the execution order of the task queues corresponding to each task queue.
[0050] As an optional implementation, in a second aspect of the invention, the deployment module includes:
[0051] A determination submodule is used to determine the partition parameters of a plurality of preset partitions; the partition parameters of each partition include at least one of the partition memory parameters, partition type, and partition running status; for each deployment container, the runtime environment parameters of the deployment container are determined; the runtime environment parameters of the deployment container include the startup command of the deployment container and / or the required startup memory parameters; based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, a target partition that matches the deployment container is determined from all the partitions, and the deployment container is deployed to the corresponding target partition.
[0052] As an optional implementation, in a second aspect of the invention, the determining submodule is further configured to:
[0053] Before determining the target partition that matches the deployment container from all the partitions based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, and before deploying the deployment container to the corresponding target partition, the application information of the target application is determined; the application information of the target application includes at least one of the application type, application communication method, and application scenario type of the target application.
[0054] Furthermore, the deployment module also includes:
[0055] The judgment submodule is used to determine whether the partitioning influence of the target application is less than or equal to a preset influence threshold based on the application information of the target application. When the judgment result is yes, the determination submodule is triggered to perform the operation of determining the target partition that matches the deployment container from all the partitions based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, and deploying the deployment container to the corresponding target partition.
[0056] The determining submodule is further configured to, when the judgment submodule determines the result of the judgment, determine the target partition that matches the deployment container from all the partitions based on the runtime environment parameters of the deployment container, the application information of the target application, and the partition parameters of all the partitions.
[0057] As an optional implementation, in the second aspect of the present invention, the method by which the determining submodule determines whether the partitioning influence of the target application is less than or equal to a preset influence threshold based on the application information of the target application is specifically as follows:
[0058] Based on the application information of the target application, predict the impact of partitioning on the target application; the impact of partitioning on the target application includes at least one of the following: partition deployment, partition communication, and partition service provision.
[0059] Based on the impact of partitioning on the target application, determine whether the impact of partitioning is a preset impact condition; the preset impact condition represents the impact condition corresponding to when the target application can be deployed normally.
[0060] When the judgment result is yes, it is determined that the partitioning influence of the target application is less than or equal to the preset influence threshold.
[0061] If the judgment result is negative, it is determined that the partitioning influence of the target application is greater than the preset influence threshold.
[0062] As an optional implementation, in a second aspect of the invention, the acquisition module is further configured to:
[0063] After the building module performs code building operations on each application to be deployed based on the application code of each application to be deployed, and obtains all release packages corresponding to each application to be deployed, it obtains the predicted network transmission situation corresponding to the deployment of each application to be deployed.
[0064] The device also includes:
[0065] The judgment module is used to determine whether the network deployment conditions required by the application to be deployed are met based on the network transmission status and all the release packets corresponding to the application to be deployed.
[0066] The determining module is further configured to, when the judgment module determines the result of the judgment, determine the storage area information and storage naming method of each release package according to the release package content of each release package corresponding to the pending deployment application;
[0067] The storage module is used to store each of the published packages to a matching storage area according to the storage area information of each package and the storage naming method.
[0068] A third aspect of the present invention discloses another containerized application intelligent deployment device, the device comprising:
[0069] Memory containing executable program code;
[0070] A processor coupled to the memory;
[0071] The processor calls the executable program code stored in the memory to execute the containerized application intelligent deployment method disclosed in the first aspect of the present invention.
[0072] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute the containerized application intelligent deployment method disclosed in the first aspect of the present invention.
[0073] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0074] In this embodiment of the invention, an application deployment instruction for a target application is received, and the deployment information of the target application is determined based on the instruction. For each target release package, a container corresponding to that package is generated, serving as all deployment containers for the target application. For each deployment container, it is deployed to the corresponding target partition. Based on the target container image and deployment configuration file for each deployment container, all deployment containers are started to deploy the target application through all deployment containers. Therefore, implementing this invention enables intelligent application deployment via deployment containers, eliminating the need for manual intervention throughout the entire deployment process. This not only improves deployment efficiency and speeds up deployment but also reduces runtime environment errors, thereby enhancing deployment reliability and accuracy, and ensuring smooth application service startup. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 This is a schematic diagram of the architecture of a lightweight containerized platform disclosed in an embodiment of the present invention;
[0077] Figure 2 This is a flowchart illustrating a containerized intelligent application deployment method disclosed in an embodiment of the present invention.
[0078] Figure 3 This is a flowchart illustrating another containerized application intelligent deployment method disclosed in an embodiment of the present invention;
[0079] Figure 4 This is a schematic diagram of the structure of a containerized application intelligent deployment device disclosed in an embodiment of the present invention;
[0080] Figure 5 This is a schematic diagram of another containerized application intelligent deployment device disclosed in an embodiment of the present invention;
[0081] Figure 6 This is a schematic diagram of another containerized application intelligent deployment device disclosed in an embodiment of the present invention. Detailed Implementation
[0082] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0083] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.
[0084] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0085] This invention discloses a containerized intelligent application deployment method and apparatus, which not only improves the efficiency of application deployment, enabling rapid deployment, but also reduces runtime environment errors, thereby improving the reliability and accuracy of application deployment and ensuring smooth service startup. Detailed descriptions follow.
[0086] Example 1
[0087] Please see Figure 2 , Figure 2 This is a flowchart illustrating a containerized intelligent application deployment method disclosed in an embodiment of the present invention. Figure 2 The described containerized intelligent application deployment method can be applied to deploying various application types. Optionally, the application can be one of the following: artificial intelligence application, general microservice application, build service application, and middleware service application; this embodiment of the invention is not limited thereto. Further optionally, this method can be implemented by an application deployment system (such as a lightweight containerization platform). This application deployment system can be integrated into an application deployment device, or it can be a local server or cloud server used to process the application deployment process, etc., this embodiment of the invention is not limited thereto. Figure 2 As shown, this containerized application intelligent deployment method may include the following operations:
[0088] 101. Receive the application deployment instructions of the target application, and determine the deployment information of the target application based on the application deployment instructions of the target application.
[0089] In this embodiment of the invention, optionally, the application deployment instructions for the target application may include the addresses of all distribution packages corresponding to the target application. Further optionally, the deployment information of the target application includes all target distribution packages required to deploy the target application. Still further optionally, each target distribution package includes a target container image and a deployment configuration file for the target container image.
[0090] 102. Based on each target release package, generate a container corresponding to each target release package, which will serve as all deployment containers for the target application.
[0091] In this embodiment of the invention, all deployment containers are used to deploy the target application. Optionally, all target distribution packages can be stored in the target storage area, and then all target distribution packages can be retrieved from the target storage area to generate the corresponding containers. Alternatively, they can be used directly to generate the corresponding containers without being stored in the target storage area.
[0092] 103. For each deployment container, deploy the deployment container to the corresponding target partition.
[0093] In this embodiment of the invention, the target partition can optionally be at least one of an application partition, a build partition, and other partitions. Specifically, the target partition corresponding to each deployment container can be determined based on the container parameters of each deployment container, thereby deploying each deployment container to the corresponding target partition.
[0094] 104. Based on the target container image and the corresponding deployment configuration file for each deployment container, start all deployment containers to deploy the target application through all deployment containers.
[0095] In this embodiment of the invention, after the target application has been deployed through all deployment containers, the target application can provide application services to the outside world. Specifically, the startup process of all deployment containers can be performed by a lightweight containerization platform, such as... Figure 1 As shown, Figure 1 This is a schematic diagram of the architecture of a lightweight containerized platform disclosed in an embodiment of the present invention.
[0096] As can be seen, implementing the embodiments of the present invention enables intelligent application deployment through container deployment, eliminating the need for manual intervention throughout the entire application deployment process. This not only improves deployment efficiency and speeds up deployment but also reduces runtime environment errors, thereby enhancing deployment reliability and accuracy, and ensuring smooth application service startup. Furthermore, compared to directly launching virtual machines or physical machines for resource isolation deployment, this method saves more resources, and the application deployment process is simpler, allowing users to assemble applications as needed, better meeting their business requirements.
[0097] In an optional embodiment, before receiving the application deployment instruction of the target application in step 101 above, the method further includes:
[0098] Receive build instructions for multiple pending deployment applications;
[0099] Based on the build instructions for each pending deployment application, obtain the application code for each pending deployment application;
[0100] Based on the application code of each pending deployment application, perform code building operations on each pending deployment application to obtain all release packages corresponding to each pending deployment application.
[0101] In this optional embodiment, specifically, the code build operations performed on all pending deployment applications can be performed through a lightweight containerization platform, wherein all pending deployment applications include the target application. Optionally, each release package includes a container image and a deployment configuration file for the container image.
[0102] As can be seen, this optional embodiment can build the application code of each pending deployment application according to the build instructions, thereby building all the release packages corresponding to each pending deployment application. This helps to improve the reliability and accuracy of the code building operation of the pending deployment application, and in turn, improves the reliability and accuracy of all the release packages corresponding to each pending deployment application. This makes it easier to directly obtain the target release package through the deployment instructions and deploy the target application.
[0103] In another optional embodiment, the step of obtaining the application code of each application to be deployed based on the build instructions of each application to be deployed includes:
[0104] Based on the build instructions for each pending deployment application, generate multiple task queues for each pending deployment application;
[0105] For each application to be deployed, the application code of the application is obtained sequentially according to all task queues of the application to be deployed and the execution order of the task queues corresponding to each task queue.
[0106] In this optional embodiment, the build instructions for each pending deployment application include the build request order and build request content of the pending deployment application. Further, as an optional implementation, generating multiple task queues for each pending deployment application based on the build instructions for each pending deployment application may include: generating multiple task queues for each pending deployment application based on the build request order and build request content of each pending deployment application, wherein all task queues for each pending deployment application have a corresponding task queue execution order.
[0107] As can be seen, this optional embodiment can sequentially obtain the application code of the application to be deployed based on the generated task queue, and then perform code building operations on the application to be deployed. This helps to improve the reliability and accuracy of obtaining the application code of the application to be deployed, and thus helps to ensure the orderly execution of the application code acquisition operation, which in turn facilitates the smooth execution of the subsequent code building operation of the application to be deployed.
[0108] In yet another optional embodiment, after performing a code build operation on each pending deployment application based on its application code to obtain all release packages corresponding to each pending deployment application, the method further includes:
[0109] For each application to be deployed, obtain the predicted network transmission status corresponding to the application to be deployed.
[0110] Based on the network transmission status and all release packages corresponding to the application to be deployed, determine whether the network deployment conditions required for the application to be deployed are met.
[0111] When the judgment result is negative, the storage area information and storage naming method of each release package are determined based on the release package content of each release package corresponding to the application to be deployed.
[0112] Each release package is stored in a matching storage area based on its storage region information and storage naming convention.
[0113] In this optional embodiment, network delivery status may optionally include network delivery type and / or whether network delivery was successful or not. Further optionally, the storage area may include a mirror repository. Further, as an optional implementation, the method may also include: when it is determined that the network deployment conditions required for the pending application deployment are not met, it may be unnecessary to perform storage status checks on all release packages.
[0114] As can be seen, this optional embodiment can determine whether the corresponding release package needs to be stored based on the predicted network deployment situation of the application to be deployed. This helps to improve the reliability and accuracy of the storage operation of the release package, and thus improves the effectiveness of the storage operation of the release package. This allows for targeted application of the storage area of the release package to make reasonable use of storage area resources, while also reducing the network transmission process and improving the service stability of the target application.
[0115] Example 2
[0116] Please see Figure 3 , Figure 3 This is a flowchart illustrating a containerized intelligent application deployment method disclosed in an embodiment of the present invention. Figure 3 The described containerized intelligent application deployment method can be applied to deploying various application types. Optionally, the application can be one of the following: artificial intelligence application, general microservice application, build service application, and middleware service application; this embodiment of the invention is not limited thereto. Further optionally, this method can be implemented by an application deployment system (such as a lightweight containerization platform). This application deployment system can be integrated into an application deployment device, or it can be a local server or cloud server used to process the application deployment process, etc., this embodiment of the invention is not limited thereto. Figure 3 As shown, this containerized application intelligent deployment method may include the following operations:
[0117] 201. Receive the application deployment instructions of the target application, and determine the deployment information of the target application based on the application deployment instructions of the target application.
[0118] 202. Based on each target release package, generate a container corresponding to each target release package, which will serve as all deployment containers for the target application.
[0119] 203. Determine the partition parameters for the preset multiple partitions.
[0120] In this embodiment of the invention, optionally, the partition parameters of each partition include at least one of the partition memory parameters, partition type, and partition running status, wherein the partition memory parameters may include the partition memory size, and the partition running status may include the partition read / write rate.
[0121] 204. For each deployed container, determine the runtime environment parameters of the deployed container.
[0122] In this embodiment of the invention, optionally, the runtime environment parameters for deploying the container include the startup command for deploying the container and / or the required startup memory parameters, wherein the required startup memory parameters may include the required startup memory size.
[0123] 205. Based on the runtime environment parameters of the deployed container and the partition parameters of all partitions, determine the target partition that matches the deployed container from all partitions, and deploy the deployed container to the corresponding target partition.
[0124] In this embodiment of the invention, the deployment container is deployed to a target partition that matches its required startup memory size, based on the startup memory size required for the deployment container and the partition memory size of all partitions.
[0125] 206. Based on the target container image and the corresponding deployment configuration file for each deployment container, start all deployment containers to deploy the target application through all deployment containers.
[0126] In this embodiment of the invention, for other descriptions of steps 201, 202 and 206, please refer to the detailed description of steps 101, 102 and 104 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.
[0127] As can be seen, by implementing the embodiments of the present invention, the target partition corresponding to the deployment container can be determined based on the runtime environment parameters of the deployment container and the partition parameters of all partitions, and the deployment container can be deployed to the target partition. In this way, the deployment reliability and accuracy of the deployment container can be improved, and the deployment container can run smoothly in the target partition, thereby enabling the target application to be deployed smoothly through the deployment container.
[0128] In an optional embodiment, before determining the target partition matching the deployment container from all partitions based on the runtime environment parameters of the deployment container and the partition parameters of all partitions in step 205 above, and deploying the deployment container to the corresponding target partition, the method further includes:
[0129] Determine the application information of the target application;
[0130] Based on the application information of the target application, determine whether the impact of the partitioning of the target application is less than or equal to the preset impact threshold.
[0131] When the judgment result is yes, the operation of step 205 is triggered, which involves determining the target partition that matches the deployment container from all partitions based on the runtime environment parameters of the deployment container and the partition parameters of all partitions, and deploying the deployment container to the corresponding target partition.
[0132] If the result is negative, the target partition that matches the deployment container is determined from all partitions based on the runtime environment parameters of the deployed container, the application information of the target application, and the partition parameters of all partitions.
[0133] In this optional embodiment, the application information of the target application may optionally include at least one of the following: application type, application communication method, and application scenario type. Specifically, the determination of the impact of partitioning the target application can be understood as follows: when the impact of partitioning is less than or equal to a preset impact threshold, meaning the partitioning deployment will not have a significant impact on the target application, the application information of the target application does not need to be used as the basis for partitioning the deployment container; however, when the impact of partitioning is greater than the preset impact threshold, meaning the partitioning deployment will have a significant impact on the target application, such as affecting resource transfer during deployment, then the application information of the target application needs to be used as the basis for partitioning the deployment container. For example, when the application information of the target application needs to be used as the basis for partitioning the deployment container, ordinary microservice applications can be deployed to the application partition, build service applications to the build partition, middleware service applications to other partitions, and artificial intelligence applications to the GPU partition.
[0134] As can be seen, this optional embodiment can determine the magnitude of the impact of partitioning on the target application by using the application information of the target application, and then determine the target partition corresponding to the deployment container, thereby intelligently deploying the deployment container to the target partition. In this way, the target partition matching the deployment container can be determined more comprehensively, thereby improving the reliability and accuracy of the deployment of the deployment container, and enabling the deployment of the target application to proceed smoothly.
[0135] In another optional embodiment, the step of determining whether the partitioning influence of the target application is less than or equal to a preset influence threshold based on the application information of the target application includes:
[0136] Based on the application information of the target application, predict the impact of partitioning on the target application;
[0137] Based on the impact of partitioning on the target application, determine whether the impact of partitioning is the preset impact.
[0138] When the judgment result is yes, the partitioning influence of the target application is determined to be less than or equal to the preset influence threshold.
[0139] If the judgment result is negative, it is determined that the impact of the partitioning of the target application is greater than the preset impact threshold.
[0140] In this optional embodiment, the impact of partitioning on the target application may optionally include at least one of the following: partition deployment status, partition communication status, and partition service provision status. Specifically, the preset impact status represents the impact status corresponding to when the target application can be deployed normally. For example, if the application type of the target application will not affect its normal service provision in a certain partition, the partitioning impact status can be determined as the preset impact status; otherwise, the application type of the target application needs to be used as the basis for determining its partitioning.
[0141] As can be seen, this optional embodiment can determine the magnitude of the impact of partitioning on the target application based on the predicted impact of partitioning on the target application. This can improve the reliability and accuracy of the determination of the impact of partitioning on the target application, and further improve the reliability and accuracy of the deployment of the container, thereby enabling the rapid and accurate deployment of the target application.
[0142] Example 3
[0143] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a containerized application intelligent deployment device disclosed in an embodiment of the present invention. Figure 4 As shown, the containerized application intelligent deployment device may include:
[0144] Receiver module 301 is used to receive application deployment instructions from the target application;
[0145] The determination module 302 is used to determine the deployment information of the target application based on the application deployment instructions of the target application;
[0146] The generation module 303 is used to generate a container corresponding to each target release package based on each target release package, which serves as all deployment containers for the target application.
[0147] Deployment module 304 is used to deploy each deployment container to the corresponding target partition.
[0148] The startup module 305 is used to start all deployment containers based on the target container image and the corresponding deployment configuration file for each deployment container, so as to deploy the target application through all deployment containers.
[0149] In this embodiment of the invention, the deployment information of the target application includes all target release packages required to deploy the target application, and each target release package includes a target container image and a deployment configuration file of the target container image.
[0150] It is evident that implementation Figure 4The described containerized intelligent application deployment device can intelligently deploy applications by deploying containers, eliminating the need for manual intervention throughout the entire deployment process. This not only improves deployment efficiency and speeds up deployment but also reduces runtime environment errors, thereby enhancing deployment reliability and accuracy, and ensuring smooth application service startup. Furthermore, compared to directly launching virtual machines or physical machines for resource isolation deployment, it saves more resources, and the application deployment process is simpler, allowing users to assemble applications on demand and better meet their business needs.
[0151] In an optional embodiment, the receiving module 301 is further configured to:
[0152] Before receiving the application deployment instructions for the target application, it receives build instructions for multiple pending deployment applications;
[0153] The device also includes:
[0154] The acquisition module 306 is used to acquire the application code of each application to be deployed based on the build instructions of each application to be deployed.
[0155] Module 307 is used to perform code building operations on each pending deployment application based on the application code of each pending deployment application, so as to obtain all the release packages corresponding to each pending deployment application.
[0156] In this optional embodiment, each release package includes a container image and a deployment configuration file for the container image.
[0157] It is evident that implementation Figure 5 The described containerized intelligent application deployment device can build the application code of each pending deployment application according to the build instructions, thereby building all the release packages corresponding to each pending deployment application. This helps to improve the reliability and accuracy of the code building operation of the pending deployment application, and in turn, improves the reliability and accuracy of all the release packages corresponding to each pending deployment application. This makes it easier to directly obtain the target release package and deploy the target application through the deployment instructions.
[0158] In another optional embodiment, the acquisition module 306 acquires the application code of each application to be deployed based on the build instructions of each application to be deployed in the following specific way:
[0159] Based on the build instructions for each pending deployment application, generate multiple task queues for each pending deployment application;
[0160] For each application to be deployed, the application code of the application is obtained sequentially according to all task queues of the application to be deployed and the execution order of the task queues corresponding to each task queue.
[0161] In this optional embodiment, all task queues for each pending deployment application have a corresponding task queue execution order.
[0162] It is evident that implementation Figure 5 The described containerized application intelligent deployment device can sequentially obtain the application code of the application to be deployed according to the generated task queue, and then perform code building operations on the application to be deployed. This helps to improve the reliability and accuracy of obtaining the application code of the application to be deployed, and thus facilitates the orderly execution of the application code acquisition operation, which in turn facilitates the smooth execution of the subsequent code building operation of the application to be deployed.
[0163] In yet another alternative embodiment, the deployment module 304 includes:
[0164] The determination submodule 3041 is used to determine the partition parameters of multiple preset partitions; for each deployment container, the runtime environment parameters of the deployment container are determined; based on the runtime environment parameters of the deployment container and the partition parameters of all partitions, the target partition that matches the deployment container is determined from all partitions, and the deployment container is deployed to the corresponding target partition.
[0165] In this optional embodiment, the partition parameters of each partition include at least one of the partition memory parameters, partition type, and partition running status; the runtime environment parameters of the deployment container include the startup command of the deployment container and / or the required startup memory parameters.
[0166] It is evident that implementation Figure 5 The described containerized application intelligent deployment device can determine the target partition corresponding to the deployment container based on the runtime environment parameters of the deployment container and the partition parameters of all partitions, and deploy the deployment container to the target partition. This can improve the deployment reliability and accuracy of the deployment container, and enable the deployment container to run smoothly in the target partition, thereby enabling the successful deployment of the target application through the deployment container.
[0167] In yet another optional embodiment, the determining submodule 3041 is further configured to:
[0168] Before determining the target partition that matches the deployment container from all partitions based on the runtime environment parameters of the deployment container and the partition parameters of all partitions, and before deploying the deployment container to the corresponding target partition, the application information of the target application is determined.
[0169] In addition, the deployment module 304 also includes:
[0170] The judgment submodule 3042 is used to determine whether the partitioning influence of the target application is less than or equal to a preset influence threshold based on the application information of the target application. When the judgment result is yes, the determination submodule 3041 is triggered to perform the operation of determining the target partition that matches the deployment container from all partitions based on the runtime environment parameters of the deployment container and the partition parameters of all partitions, and deploying the deployment container to the corresponding target partition.
[0171] The determination submodule 3041 is also used to determine the target partition that matches the deployment container from all partitions when the determination result of the determination submodule 3042 is negative, based on the runtime environment parameters of the deployment container, the application information of the target application, and the partition parameters of all partitions.
[0172] In this optional embodiment, the application information of the target application includes at least one of the following: application type, application communication method, and application scenario type.
[0173] It is evident that implementation Figure 5 The described containerized application intelligent deployment device can determine the impact of partitioning on the target application by using the application information of the target application, and then determine the target partition corresponding to the deployment container. In this way, the deployment container is intelligently deployed to the target partition. This can more comprehensively determine the target partition that matches the deployment container, thereby improving the reliability and accuracy of the deployment container, and enabling the deployment of the target application to proceed smoothly.
[0174] In another optional embodiment, the determination submodule 3042 determines whether the partitioning influence of the target application is less than or equal to a preset influence threshold based on the application information of the target application in the following specific manner:
[0175] Based on the application information of the target application, predict the impact of partitioning on the target application;
[0176] Based on the impact of partitioning on the target application, determine whether the impact of partitioning is the preset impact.
[0177] When the judgment result is yes, the partitioning influence of the target application is determined to be less than or equal to the preset influence threshold.
[0178] If the judgment result is negative, it is determined that the impact of the partitioning of the target application is greater than the preset impact threshold.
[0179] In this optional embodiment, the impact of partitioning of the target application includes at least one of the partition deployment status, partition communication status, and partition service provision status of the target application; the preset impact status represents the impact status corresponding to when the target application can be deployed normally.
[0180] It is evident that implementation Figure 5 The described containerized application intelligent deployment device can determine the magnitude of the impact of partitioning on the target application based on the predicted impact of partitioning. This improves the reliability and accuracy of determining the impact of partitioning on the target application, and further improves the reliability and accuracy of container deployment, thereby enabling rapid and accurate deployment of the target application.
[0181] In yet another optional embodiment, the acquisition module 306 is further configured to:
[0182] After the building module 307 performs code building operations on each pending deployment application based on the application code of each pending deployment application to obtain all the release packages corresponding to each pending deployment application, it obtains the predicted network transmission situation corresponding to the deployment of each pending deployment application for each pending deployment application.
[0183] The device also includes:
[0184] The judgment module 308 is used to determine whether the network deployment conditions required by the application to be deployed are met based on the network transmission status and all the release packages corresponding to the application to be deployed.
[0185] The determination module 302 is also used to determine the storage area information and storage naming method of each release package based on the release package content of each release package corresponding to the pending deployment application when the determination result of the determination module 308 is negative;
[0186] Storage module 309 is used to store each release package to a matching storage area according to the storage area information and storage naming method of each release package.
[0187] It is evident that implementation Figure 5 The described containerized application intelligent deployment device can determine whether to store the corresponding deployment package based on the predicted network deployment status of the application to be deployed. This helps improve the reliability and accuracy of the storage operation of the deployment package, and thus improves the effectiveness of the storage operation. This allows for targeted application of the storage area of the deployment package to make reasonable use of storage area resources, while also reducing the network transmission process and improving the service stability of the target application.
[0188] Example 4
[0189] Please see Figure 6 , Figure 6 This is a schematic diagram of another containerized application intelligent deployment device disclosed in an embodiment of the present invention. For example... Figure 6 As shown, the containerized application intelligent deployment device may include:
[0190] Memory 401 storing executable program code;
[0191] Processor 402 coupled to memory 401;
[0192] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the containerized application intelligent deployment method described in Embodiment 1 or Embodiment 2 of the present invention.
[0193] Example 5
[0194] This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute the steps in the containerized application intelligent deployment method described in Embodiment 1 or Embodiment 2 of this invention.
[0195] Example 6
[0196] This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the containerized application intelligent deployment method described in Embodiment 1 or Embodiment 2.
[0197] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0198] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0199] Finally, it should be noted that the containerized application intelligent deployment method and apparatus disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A containerized intelligent application deployment method, characterized in that, The method includes: Receive the application deployment instruction of the target application, and determine the deployment information of the target application based on the application deployment instruction of the target application; the deployment information of the target application includes all target release packages required to deploy the target application, and each target release package includes a target container image and a deployment configuration file of the target container image; Based on each target release package, generate a container corresponding to each target release package, which serves as all deployment containers for the target application; Determine the partition parameters of a plurality of preset partitions; the partition parameters of each partition include at least one of the partition memory parameters, partition type, and partition running status; For each of the deployment containers, the runtime environment parameters of the deployment container are determined; the runtime environment parameters of the deployment container include the startup command of the deployment container and / or the required startup memory parameters; Based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, a target partition that matches the deployment container is determined from all the partitions, and the deployment container is deployed to the corresponding target partition; Based on the target container image and the corresponding deployment configuration file for each deployment container, start all deployment containers to deploy the target application through all deployment containers; And, before determining the target partition matching the deployment container from all the partitions based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, and deploying the deployment container to the corresponding target partition, the method further includes: Determine the application information of the target application; the application information of the target application includes at least one of the application type, application communication method, and application scenario type of the target application. Based on the application information of the target application, determine whether the partitioning influence of the target application is less than or equal to a preset influence threshold. When the determination result is yes, the operation of determining the target partition that matches the deployment container from all the partitions based on the runtime environment parameters of the deployment container and the partition parameters of all the partitions, and deploying the deployment container to the corresponding target partition is triggered; If the determination result is negative, based on the runtime environment parameters of the deployment container, the application information of the target application, and the partition parameters of all the partitions, a target partition that matches the deployment container is determined from all the partitions, and the deployment container is deployed to the corresponding target partition.
2. The containerized application intelligent deployment method according to claim 1, characterized in that, Before receiving the application deployment instruction for the target application, the method further includes: Receive build instructions for multiple pending deployment applications; Based on the build instructions for each of the pending deployment applications, obtain the application code for each of the pending deployment applications; Based on the application code of each pending deployment application, a code building operation is performed on each pending deployment application to obtain all release packages corresponding to each pending deployment application; each release package includes a container image and a deployment configuration file of the container image.
3. The containerized application intelligent deployment method according to claim 2, characterized in that, The step of obtaining the application code of each application to be deployed based on the build instructions of each application to be deployed includes: Based on the build instructions for each application to be deployed, multiple task queues are generated for each application to be deployed; all task queues for each application to be deployed have a corresponding task queue execution order; For each application to be deployed, the application code of the application to be deployed is obtained sequentially according to all the task queues of the application to be deployed and the execution order of the task queues corresponding to each task queue.
4. The containerized application intelligent deployment method according to any one of claims 1-3, characterized in that, The step of determining whether the partitioning influence of the target application is less than or equal to a preset influence threshold based on the application information of the target application includes: Based on the application information of the target application, predict the impact of partitioning on the target application; the impact of partitioning on the target application includes at least one of the following: partition deployment, partition communication, and partition service provision. Based on the impact of partitioning on the target application, determine whether the impact of partitioning is a preset impact condition; the preset impact condition represents the impact condition corresponding to when the target application can be deployed normally. When the judgment result is yes, it is determined that the partitioning influence of the target application is less than or equal to the preset influence threshold. If the judgment result is negative, it is determined that the partitioning influence of the target application is greater than the preset influence threshold.
5. The containerized application intelligent deployment method according to claim 2, characterized in that, After performing a code building operation on each of the pending deployment applications based on their application code to obtain all release packages corresponding to each pending deployment application, the method further includes: For each application to be deployed, obtain the predicted network transmission situation corresponding to the deployment of the application to be deployed; Based on the network transmission status and all the release packets corresponding to the application to be deployed, determine whether the network deployment conditions required for the application to be deployed are met. When the judgment result is negative, the storage area information and storage naming method of each release package are determined according to the release package content of each release package corresponding to the pending deployment application; Based on the storage area information of each release package and the storage naming method, each release package is stored in a matching storage area.
6. A containerized application intelligent deployment device, characterized in that, The apparatus is used to execute the containerized application intelligent deployment method as described in any one of claims 1-5, and the apparatus comprises: The receiving module is used to receive application deployment instructions from the target application. The determination module is used to determine the deployment information of the target application based on the application deployment instructions of the target application; the deployment information of the target application includes all target release packages required to deploy the target application, and each target release package includes a target container image and a deployment configuration file of the target container image; The generation module is used to generate a container corresponding to each target release package based on each target release package, which serves as all deployment containers corresponding to the target application; The deployment module is used to deploy each deployment container to the corresponding target partition. The startup module is used to start all the deployment containers based on the target container image and the corresponding deployment configuration file for each deployment container, so as to deploy the target application through all the deployment containers.
7. A containerized application intelligent deployment device, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the containerized application intelligent deployment method as described in any one of claims 1-5.
8. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the containerized application intelligent deployment method as described in any one of claims 1-5.
Citation Information
Patent Citations
Project deployment method and device, electronic equipment and storage medium
CN112764753A