Method, device, computer device and storage medium for containerized deployment

By adding pre-written target containerized components to the initial pipeline, containerized deployment is achieved, solving the problem of long containerized deployment cycles in existing technologies and realizing a rapid, low-skill-requirement containerized transformation.

CN114185566BActive Publication Date: 2026-01-02ZHAOLIAN CONSUMER FINANCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111505592.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2026-01-02
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

In existing technologies, enterprises need to train a large number of developers to master containerization knowledge when migrating applications from virtual machines to container images, resulting in an excessively long containerization deployment cycle.

Method used

By adding pre-written target containerization components to the initial pipeline corresponding to the artifact package, the image can be packaged and deployed. Developers do not need to learn containerization knowledge; they can simply call the target containerization components to complete the deployment.

Benefits of technology

It shortens containerization deployment time, reduces the professional skills required of developers, and greatly reduces the containerization deployment cycle for enterprises.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114185566B_ABST
    Figure CN114185566B_ABST
Patent Text Reader

Abstract

The application relates to a method, device, computer equipment, storage medium and computer program product for containerized deployment. The method comprises the following steps: obtaining modification code, generating an artifact package based on the modification code, and determining an initial pipeline according to the artifact package; determining a target containerization component according to the artifact package, and determining a containerization pipeline according to the target containerization component and the initial pipeline; and executing the containerization pipeline to perform containerized deployment of the artifact package. According to the method, containerization operations such as building an image file and a configuration file are not required, and containerized deployment can be achieved by only calling the target containerization component, the professional skill requirement of a developer is low, and the containerization operations such as building an image file and a configuration file are omitted, so that the duration of containerized deployment is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software development, in particular to a containerization deployment method and device, computer equipment and storage medium. BACKGROUND

[0002] With the development of software technology, the scale of software application is getting larger and larger, and the modules contained are getting more and more, and software continuous integration is becoming more and more important in the application development process. Containerization deployment is to integrate the application into a container and run it.

[0003] At present, most of the applications of enterprises are deployed on virtual machines, and the existing containerization deployment method converts the application from a virtual machine to a container image deployment. It requires developers to master the containerization related knowledge, the syntax and compilation principle of DockerFile, and the developers need to write DockerFile required for container construction, as well as the DockerFile construction of each subsystem. Based on the code, the image is built. Generally, enterprises need to train developers a lot of docker containers, kubernetes clusters, dockerfile writing, k8s deployment files and other knowledge, so as to have the basic transformation foundation and realize the replacement of the deployment method of most applications. Generally, it takes 2 to 3 years for an enterprise to change, resulting in a too long period of containerization deployment. SUMMARY

[0004] Therefore, it is necessary to provide a containerization deployment method, device, computer equipment and storage medium which do not require developers to write containerization deployment files and have a short containerization deployment time, in view of the above technical problems.

[0005] In a first aspect, the present application provides a containerization deployment method. The method comprises:

[0006] obtaining modified code, generating a product package based on the modified code, and determining an initial pipeline according to the product package;

[0007] determining a target containerization component according to the product package, and determining a containerization pipeline according to the target containerization component and the initial pipeline;

[0008] executing the containerization pipeline to perform containerization deployment of the product package.

[0009] In one embodiment, determining the initial pipeline according to the product package comprises:

[0010] receiving the subsystem type of the product package;

[0011] determine an initial pipeline according to the subsystem type in a plurality of preset pipelines.

[0012] In one of the embodiments, the determining the initial pipeline according to the subsystem type in the plurality of preset pipelines comprises:

[0013] determine a default pipeline corresponding to the subsystem type in the plurality of preset pipelines, wherein the default pipeline comprises a plurality of default components;

[0014] add a plurality of preset components based on the plurality of default components, and / or delete a plurality of default components to obtain the initial pipeline.

[0015] In one of the embodiments, the determining the target containerization component according to the artifact package comprises:

[0016] receive a subsystem type of the artifact package;

[0017] select a target containerization component corresponding to the subsystem type in a plurality of preset target containerization components.

[0018] In one of the embodiments, the target containerization component comprises a target combined image component; and the executing the containerization pipeline to perform the containerization deployment of the artifact package comprises:

[0019] executing the target combined image component to write the artifact package into a running directory of a base image to obtain a complete image package;

[0020] running the complete image package to perform the containerization deployment of the artifact package.

[0021] In one of the embodiments, the target containerization component further comprises a target push image component; and after the executing the target combined image component to write the artifact package into a running directory of a base image to obtain a complete image package, the method further comprises:

[0022] pushing the complete image package to an image repository according to the complete image package and the target push image component.

[0023] In a second aspect, the application further provides a containerization deployment device. The device comprises:

[0024] an initial pipeline determination module configured to obtain a modification code, generate an artifact package based on the modification code, and determine an initial pipeline according to the artifact package;

[0025] a containerization pipeline determination module configured to determine a target containerization component according to the artifact package, and determine a containerization pipeline according to the target containerization component and the initial pipeline;

[0026] a containerization deployment module configured to execute the containerization pipeline to perform containerization deployment of the artifact package.

[0027] In a third aspect, the present application provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0028] obtaining modification code, generating an artifact package based on the modification code, and determining an initial pipeline according to the artifact package;

[0029] determining a target containerization component according to the artifact package, and determining a containerization pipeline according to the target containerization component and the initial pipeline;

[0030] executing the containerization pipeline to perform containerization deployment of the artifact package.

[0031] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program implements the following steps when executed by a processor:

[0032] obtaining modification code, generating an artifact package based on the modification code, and determining an initial pipeline according to the artifact package;

[0033] determining a target containerization component according to the artifact package, and determining a containerization pipeline according to the target containerization component and the initial pipeline;

[0034] executing the containerization pipeline to perform containerization deployment of the artifact package.

[0035] In a fifth aspect, the present application provides a computer program product. The computer program product comprises a computer program, and the computer program implements the following steps when executed by a processor:

[0036] obtaining modification code, generating an artifact package based on the modification code, and determining an initial pipeline according to the artifact package;

[0037] determining a target containerization component according to the artifact package, and determining a containerization pipeline according to the target containerization component and the initial pipeline;

[0038] executing the containerization pipeline to perform containerization deployment of the artifact package.

[0039] The containerization deployment method, device, computer equipment, storage medium and computer program product realize deployment of an application to a virtual machine through a corresponding initial pipeline of an artifact package, increase a target containerization component on the initial pipeline, the target containerization component is pre-written, and realize packaging and deployment of an image through the target containerization component. The containerization deployment method does not require a developer to learn any docker container image, image repository, kubernetes cluster and the like, does not require the developer to perform containerization operations such as building an image file and a configuration file, and only needs to call the target containerization component to realize containerization deployment, which is low in requirement for professional skills of the developer, saves containerization operations such as building an image file and a configuration file, shortens the time length of containerization deployment, and greatly reduces the containerization deployment cycle of an enterprise for an application scenario in which the enterprise needs to transform a large number of virtual machine deployment to containerization deployment, only needs to pre-write the target containerization component, and greatly reduces the containerization deployment cycle of the enterprise. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 A flowchart of a containerization deployment method in an embodiment;

[0041] Figure 2 A schematic diagram of a containerization deployment page in an embodiment;

[0042] Figure 3 A structural block diagram of a containerization deployment device in an embodiment;

[0043] Figure 4 An internal structure diagram of a computer equipment in an embodiment. DETAILED DESCRIPTION

[0044] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.

[0045] In an embodiment, as shown in Figure 1 , a containerization deployment method is provided, and the embodiment takes the method applied to a terminal as an example. It should be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is realized through interaction of the terminal and the server. In the embodiment, the method includes the following steps.

[0046] S101, obtaining modified code, generating an artifact package based on the modified code, and determining an initial pipeline according to the artifact package.

[0047] The modified code is the code submitted by a developer in an application development process, and the modified code can be newly added code based on the original code, or the modified code can be used to replace the original code to achieve the function implemented by the original code. The product package can be a full package of the application or an incremental package of the application.

[0048] Specifically, the modified code is obtained, the application corresponding to the modified code is determined, the module code, the installation script, the interface definition and the configuration parameter of the application are obtained from the database, and the product package is generated according to the module code, the installation script, the interface definition and the configuration parameter of the application. The subsystem type of the product package is obtained, and the initial pipeline is determined according to the subsystem type, and the initial pipeline is executed to implement the deployment of the application to the virtual machine.

[0049] S102, determining a target containerization component according to the product package, and determining a containerization pipeline according to the target containerization component and the initial pipeline.

[0050] The target containerization component is used to implement the containerization deployment of the application.

[0051] Specifically, the initial pipeline includes a plurality of components for deploying the application to the virtual machine, and a preset target containerization component is added to the initial pipeline; the target containerization component is determined according to the subsystem type of the product package; the target containerization component can be designed and made by an operation and maintenance personnel or a professional, and the target containerization component supports shell execution, http interface calling, input and output interface definition, and returns a json format, so as to be easily added to the initial pipeline to realize the dependency between components. The preset target containerization component is added to the initial pipeline, and the application deployed to the virtual machine can be seamlessly connected to the containerization deployment.

[0052] S103, executing the containerization pipeline to perform the containerization deployment of the product package.

[0053] Specifically, the containerization pipeline is executed to write the product package into a running directory of a base image to obtain a complete image package, and the complete image package is run to implement the containerization deployment.

[0054] The method for container deployment, by means of the initial pipeline corresponding to the artifact package, realizes deployment of the application to the virtual machine, and the target containerization component is added to the initial pipeline, the target containerization component is pre-written, and the packaging and deployment of the image are realized through the target containerization component. The method for container deployment does not require the developer to learn any knowledge of docker container image, image repository, kubernetes cluster and the like, does not require the developer to perform containerization operations such as building an image file and a configuration file, and only needs to call the target containerization component to realize container deployment, which has a lower requirement on the professional skills of the developer, saves the containerization operations such as building an image file and a configuration file, shortens the time length of container deployment, and greatly reduces the container deployment cycle of the enterprise for the application scenario in which the enterprise needs to transform a large number of virtual machine deployment to container deployment, only needs to pre-write the target containerization component, and greatly reduces the container deployment cycle of the enterprise.

[0055] In one embodiment, in S101, the initial pipeline is determined according to the artifact package, including:

[0056] In S111, the subsystem type of the artifact package is received.

[0057] Specifically, the subsystem type is determined according to the front end, the back end and the type of the development language, and the subsystem type is a Java back end. A containerization deployment page is pre-developed, and the containerization deployment page can receive the subsystem type input by the developer.

[0058] In S112, the initial pipeline is determined from the plurality of preset pipelines according to the subsystem type.

[0059] Specifically, the plurality of preset pipelines are pre-configured for the plurality of subsystem types, the preset pipeline corresponding to the subsystem type includes a plurality of default components corresponding to the subsystem, and the plurality of default components are used to realize each process of deploying the artifact package to the virtual machine.

[0060] The environment of the artifact package, the subsystem, the initial pipeline name, the initial pipeline description and the like are received through the containerization deployment page, the initial pipeline is determined according to the subsystem of the artifact package and the plurality of preset pipelines.

[0061] In one embodiment, S112 includes:

[0062] In S1121, the default pipeline corresponding to the subsystem type is determined from the plurality of preset pipelines.

[0063] The default pipeline includes a plurality of default components.

[0064] Specifically, a plurality of preset components are pre-written, including: a version acquisition component, a code scanning component, a version comparison component, a code building component, an execution DDL component, an execution DML component, a file configuration modification component, an execution shell component, an automated testing component, an update deployment component, and other components for deploying an artifact package to a virtual machine. For any subsystem type, a plurality of components corresponding to the subsystem type are determined in the plurality of preset components, and a preset pipeline corresponding to the subsystem type is obtained, and a plurality of preset pipelines corresponding to a plurality of subsystem types are obtained.

[0065] Through the containerization deployment page, the subsystem type of the artifact package is received, and the default pipeline corresponding to the subsystem type of the artifact package is selected from the plurality of preset pipelines, so that the default pipeline corresponding to the subsystem type can be quickly obtained.

[0066] In S1122, based on the plurality of default components, a plurality of preset components are added, and / or a plurality of default components are deleted, to obtain an initial pipeline.

[0067] Specifically, if the default pipeline needs to be modified, a plurality of default components in the initial pipeline can be deleted according to requirements, and a plurality of preset components can be added, to obtain the initial pipeline.

[0068] In an implementation manner, as shown in Figure 2 Through the containerization deployment page, the environment and the subsystem type of the artifact package, the initial pipeline name, and the initial pipeline description are received, the default pipeline is determined according to the subsystem type, and the default pipeline is displayed in the containerization deployment page, specifically, a plurality of default components included in the default pipeline are displayed in order; the containerization deployment page also displays a component list, the component list includes all preset components, all preset components can be displayed according to execution order, and default components in the default pipeline can be displayed differently from non-default components (preset components not in the default pipeline); a plurality of preset components are added and / or a plurality of default components are deleted through the containerization deployment page; each component carries an execution order, when adding a preset component, the added preset component is added to the default pipeline according to the execution order of the preset component and the execution order in the default pipeline.

[0069] In one embodiment, in S102, the target containerization component is determined according to the artifact package, including:

[0070] In S211, the subsystem type of the artifact package is received, and a target containerization component corresponding to the subsystem type is selected from a plurality of preset target containerization components.

[0071] Specifically, the plurality of preset target containerization components are obtained by adaptation development by operation and maintenance personnel or other professionals according to a plurality of subsystem types; a subsystem type is received through a containerization deployment page, and then a target containerization component corresponding to the subsystem type of the product package is selected from the plurality of preset target containerization components.

[0072] In one embodiment, the preset target containerization component includes a target combined image component; S103 includes:

[0073] S311, executing the target combined image component to write the product package into a running directory of the base image to obtain a complete image package.

[0074] Specifically, the target combined image component is used to write the product package into a running directory of the base image to combine and package to obtain a complete image package. The target combined image component includes a base image script, and when the base image script has a security vulnerability or needs to be upgraded, the base image script can be directly modified. However, in the prior art, when the base image needs to be modified, a new image needs to be reconstructed and packaged from the code layer, which is time-consuming.

[0075] S312, running the complete image package to perform containerization deployment of the product package.

[0076] Specifically, the complete image package is run to create and run a container engine of an application, and finally containerization deployment is implemented. Developers do not need to write code according to the product package to obtain a complete image package. Compared with the current containerization deployment method, one code recompilation process is saved, time is saved, and developers can generate a product package in the manner of virtual machine deployment. By adding a target combined image component in an initial pipeline, a complete image package required for containerization deployment can be obtained, and developers are not required to master professional skills related to containerization deployment.

[0077] In one embodiment, the preset target containerization component further includes a target push image component; accordingly, S311 further includes:

[0078] S313, according to the complete image package and the target push image component, pushing the complete image package to an image warehouse.

[0079] Specifically, the target push image component is used to push the complete image package to the image warehouse.

[0080] In this embodiment, the application is deployed to the virtual machine through the initial pipeline corresponding to the artifact package, the target containerization component is added on the initial pipeline, the target containerization component is pre-written, the packaging and deployment of the image are implemented through the target containerization component, the developer does not need to learn any docker container image, image repository, kubernetes cluster and the like, does not need to perform containerization operations such as building an image file and a configuration file, and only needs to call the target containerization component to implement containerization deployment, the professional skill requirement of the developer is low, and the containerization operation such as building an image file and a configuration file is saved, and the time length of containerization deployment is shortened. For an application scenario in which an enterprise needs to transform a large number of virtual machine deployments to containerization deployment, only the time for pre-writing the target containerization component is needed, and the containerization deployment cycle of the enterprise is greatly reduced.

[0081] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the order of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.

[0082] Based on the same inventive concept, the present application also provides a containerization deployment device for implementing the containerization deployment method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in the following containerization deployment device embodiments can refer to the limitations of the containerization deployment method described above, which will not be repeated here.

[0083] In one embodiment, as shown in Figure 3 a containerization deployment device is provided, comprising:

[0084] An initial pipeline determination module is configured to obtain modified code, generate an artifact package based on the modified code, and determine an initial pipeline according to the artifact package;

[0085] A containerization pipeline determination module is configured to determine a target containerization component according to the artifact package, and determine a containerization pipeline according to the target containerization component and the initial pipeline;

[0086] a containerization deployment module configured to execute the containerization pipeline to perform the containerization deployment of the product package.

[0087] In one embodiment, the initial pipeline determination module comprises:

[0088] a subsystem type determination unit configured to receive a subsystem type of the product package;

[0089] an initial pipeline determination unit configured to determine an initial pipeline from the plurality of preset pipelines according to the subsystem type.

[0090] In one embodiment, the initial pipeline determination unit comprises:

[0091] a first sub-unit configured to determine a default pipeline corresponding to the subsystem type from the plurality of preset pipelines, wherein the default pipeline comprises a plurality of default components;

[0092] a second sub-unit configured to add a plurality of preset components and / or delete a plurality of default components based on the plurality of default components to obtain the initial pipeline.

[0093] In one embodiment, the containerization pipeline determination module comprises:

[0094] a target containerization component determination unit configured to select a target containerization component corresponding to the subsystem type from a plurality of preset target containerization components.

[0095] In one embodiment, the target containerization component comprises a target combined image component; and the containerization deployment module comprises:

[0096] a complete image package determination unit configured to execute the target combined image component to write the product package into a running directory of a base image to obtain a complete image package;

[0097] a containerization deployment unit configured to run the complete image package to perform the containerization deployment of the product package.

[0098] In one embodiment, the target containerization component further comprises a target push image component; and the containerization deployment module further comprises:

[0099] a pushing unit configured to push the complete image package to an image repository according to the complete image package and the target push image component.

[0100] Each of the modules in the above containerized deployment apparatus can be implemented wholly or partially by software, hardware and combinations thereof. The above modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform the operations corresponding to the above modules.

[0101] In one embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram thereof can be as shown in Figure 4 The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program is executed by the processor to implement a containerized deployment method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0102] Those skilled in the art can understand that Figure 4 The structure shown in the above embodiment is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0103] In one embodiment, a computer device is provided, which includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the following steps:

[0104] Obtaining modification code, generating an artifact package based on the modification code, and determining an initial pipeline according to the artifact package;

[0105] Determining a target containerization component according to the artifact package, and determining a containerized pipeline according to the target containerization component and the initial pipeline;

[0106] Executing the containerized pipeline to perform containerized deployment of the artifact package.

[0107] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0108] The determining the initial pipeline according to the product package comprises:

[0109] receiving a subsystem type of the product package;

[0110] determining an initial pipeline from a plurality of preset pipelines according to the subsystem type.

[0111] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0112] The determining the initial pipeline according to the subsystem type comprises:

[0113] determining a default pipeline corresponding to the subsystem type from a plurality of preset pipelines, wherein the default pipeline comprises a plurality of default components;

[0114] adding a plurality of preset components based on the plurality of default components, and / or deleting a plurality of default components to obtain the initial pipeline.

[0115] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0116] The determining the target containerization component according to the product package comprises:

[0117] receiving a subsystem type of the product package;

[0118] selecting a target containerization component corresponding to the subsystem type from a plurality of preset target containerization components.

[0119] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0120] The target containerization component comprises a target combined image component; and the executing the containerization pipeline to perform containerization deployment of the product package comprises:

[0121] executing the target combined image component to write the product package into a running directory of a base image to obtain a complete image package;

[0122] running the complete image package to perform containerization deployment of the product package.

[0123] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0124] The target containerization component further comprises a target push image component; after the executing the target combination image component and writing the artifact package into a run directory of the base image to obtain the complete image package, the method further comprises:

[0125] According to the complete image package and the target push image component, the complete image package is pushed to an image repository.

[0126] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0127] An artifact package is generated based on the modification code, and an initial pipeline is determined according to the artifact package;

[0128] A target containerization component is determined according to the artifact package, and a containerization pipeline is determined according to the target containerization component and the initial pipeline;

[0129] The containerization pipeline is executed to perform containerization deployment of the artifact package.

[0130] In one embodiment, the computer program is executed by the processor to further implement the following steps:

[0131] The initial pipeline is determined according to the artifact package, and the method comprises:

[0132] A subsystem type of the artifact package is received;

[0133] An initial pipeline is determined from a plurality of preset pipelines according to the subsystem type.

[0134] In one embodiment, the computer program is executed by the processor to further implement the following steps:

[0135] The initial pipeline is determined according to the subsystem type from a plurality of preset pipelines, and the method comprises:

[0136] A default pipeline corresponding to the subsystem type is determined from a plurality of preset pipelines, and the default pipeline comprises a plurality of default components;

[0137] Based on the plurality of default components, a plurality of preset components are added, and / or a plurality of default components are deleted to obtain the initial pipeline.

[0138] In one embodiment, the computer program is executed by the processor to further implement the following steps:

[0139] The target containerization component is determined according to the artifact package, and the method comprises:

[0140] A subsystem type of the artifact package is received;

[0141] In the plurality of preset target containerization components, a target containerization component corresponding to the subsystem type is selected.

[0142] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0143] The target containerization component includes a target combined image component; and the executing the containerization pipeline to perform the containerization deployment of the product package includes:

[0144] The target combined image component is executed to write the product package into a running directory of a base image to obtain a complete image package;

[0145] The complete image package is run to perform the containerization deployment of the product package.

[0146] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0147] The target containerization component further includes a target push image component; and after the target combined image component is executed to write the product package into a running directory of a base image to obtain a complete image package, the method further includes:

[0148] According to the complete image package and the target push image component, the complete image package is pushed to an image repository.

[0149] In one embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the following steps:

[0150] A modification code is obtained, a product package is generated based on the modification code, and an initial pipeline is determined according to the product package;

[0151] A target containerization component is determined according to the product package, and a containerization pipeline is determined according to the target containerization component and the initial pipeline;

[0152] The containerization pipeline is executed to perform the containerization deployment of the product package.

[0153] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0154] The determining the initial pipeline according to the product package includes:

[0155] A subsystem type of the product package is received;

[0156] According to the subsystem type, an initial pipeline is determined from a plurality of preset pipelines.

[0157] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0158] The determining of the initial flow line according to the subsystem type comprises:

[0159] The determining of the default flow line corresponding to the subsystem type in the plurality of preset flow lines, wherein the default flow line comprises a plurality of default components.

[0160] Based on the plurality of default components, a plurality of preset components are added and / or a plurality of default components are deleted to obtain the initial flow line.

[0161] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0162] The determining of the target containerization component according to the product package comprises:

[0163] Receiving a subsystem type of the product package;

[0164] Selecting a target containerization component corresponding to the subsystem type from a plurality of preset target containerization components.

[0165] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0166] The target containerization component comprises a target combined image component; and the executing of the containerization flow line for the containerization deployment of the product package comprises:

[0167] Executing the target combined image component to write the product package into a running directory of a base image to obtain a complete image package;

[0168] Running the complete image package to perform the containerization deployment of the product package.

[0169] In one embodiment, the computer program, when executed by the processor, further implements the following steps:

[0170] The target containerization component further comprises a target push image component; and after the executing of the target combined image component to write the product package into a running directory of a base image to obtain a complete image package, the method further comprises:

[0171] According to the complete image package and the target push image component, the complete image package is pushed to an image warehouse.

[0172] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0173] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0174] The technical features of the above embodiments can be combined in any way. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.

[0175] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method of containerized deployment, characterized by, The method comprises: acquiring modification code, generating a product package based on the modification code; receiving a subsystem type of the product package, determining an initial flow line among a plurality of preset flow lines according to the subsystem type; the initial flow line comprises a plurality of components for deploying an application to a virtual machine; determining a target containerization component according to the subsystem type of the product package, and determining a containerization flow line according to the target containerization component and the initial flow line; executing the containerization flow line to perform containerization deployment of the product package.

2. The method of claim 1, wherein, The determining of the initial flow line among the plurality of preset flow lines according to the subsystem type comprises: determining a default flow line corresponding to the subsystem type among the plurality of preset flow lines, wherein the default flow line comprises a plurality of default components; based on the plurality of default components, adding a plurality of preset components and / or deleting a plurality of default components to obtain the initial flow line.

3. The method of claim 1, wherein, The determining of the target containerization component according to the subsystem type of the product package comprises: receiving the subsystem type of the product package; selecting a target containerization component corresponding to the subsystem type among a plurality of preset target containerization components.

4. The method of claim 1, wherein, The target containerization component comprises a target combined image component; the executing of the containerization flow line to perform the containerization deployment of the product package comprises: executing the target combined image component to write the product package into a running directory of a base image to obtain a complete image package; running the complete image package to perform the containerization deployment of the product package.

5. The method of claim 4, wherein, The target containerization component further comprises a target push image component; after the executing of the target combined image component to write the product package into a running directory of a base image to obtain a complete image package, the method further comprises: pushing the complete image package to an image repository according to the complete image package and the target push image component.

6. An apparatus for containerized deployment, the apparatus comprising: The device comprises: an initial flow line determination module configured to acquire modification code, generate a product package based on the modification code, and determine an initial flow line according to the product package; a containerization flow line determination module configured to determine a target containerization component according to the product package, and determine a containerization flow line according to the target containerization component and the initial flow line. The initial flow line determination module comprises: a subsystem type determination unit configured to receive a subsystem type of the product package; an initial flow line determination unit configured to determine an initial flow line among a plurality of preset flow lines according to the subsystem type; the initial flow line comprises a plurality of components for deploying an application to a virtual machine.

7. The apparatus of claim 6, wherein, The initial flow line determination unit comprises: a first subunit configured to determine a default flow line corresponding to the subsystem type among the plurality of preset flow lines, wherein the default flow line comprises a plurality of default components; a second subunit configured to add a plurality of preset components and / or delete a plurality of default components based on the plurality of default components to obtain the initial flow line.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 5.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.

10. A computer program product comprising a computer program, characterized in that, The computer program, which when executed by the processor, implements the steps of the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Application deployment method and device

    CN106874028A

  • Application publishing system and method applied to heterogeneous multi-cloud environment

    CN111580832A

  • Application containerization method and device, electronic equipment and storage medium

    CN112181588A