Installation package generation method, device, electronic device and storage medium

By parsing the target program code in the code base, building a mirror container and processing deployment information, generating deployment orchestration files and online installation packages, the problems of high deployment costs and poor adaptability in the existing technology are solved, and an efficient and flexible installation package generation method is realized.

CN114237686BActive Publication Date: 2025-05-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111401675.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-05-23
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

During the process of program code deployment, the existing technology requires high deployment costs and labor consumption, and cannot adapt to the delivery and deployment requirements of multiple scenarios.

Method used

By determining multiple code bases, multiple target program codes are obtained, mirror containers are built, deployment information is processed in the container environment, deployment orchestration files are generated, and online installation packages are packaged and published according to the files.

Benefits of technology

It realizes the separation of the background development of installation packages and the online release deployment services, meets the delivery and deployment needs of multiple online deployment scenarios, and improves the efficiency and flexibility of installation package generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114237686B_ABST
    Figure CN114237686B_ABST
Patent Text Reader

Abstract

The present disclosure provides an installation package generation method, device, electronic device and storage medium, which relate to the field of computer technology, and specifically to the field of artificial intelligence technology such as cloud computing and knowledge graphs. The method includes: determining multiple code bases, and respectively parsing multiple target program codes from the multiple code bases, and then respectively constructing multiple image containers corresponding to the multiple target program codes, and processing the deployment information related to the corresponding target program code in the environment provided by the image container to obtain the deployment arrangement file corresponding to the target program code, and packaging and publishing the corresponding target program code according to the deployment arrangement file to obtain an online installation package, thereby enabling the background development of the installation package to be separated from the online publishing and deployment business, and effectively meeting the delivery and deployment requirements of various online deployment scenarios, and realizing one-click flexible deployment, thereby effectively improving the generation efficiency of the online installation package.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of artificial intelligence technology such as knowledge graphs and cloud computing, and specifically to a method, device, electronic device and storage medium for generating an installation package. Background Art

[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning, deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] In the related art, in the process of deploying program code to generate an online installation package, high deployment costs and manpower consumption are usually required, and it is impossible to adapt to the delivery and deployment requirements of multiple scenarios. Summary of the invention

[0004] The present disclosure provides a method, device, electronic device, storage medium and computer program product for generating an installation package.

[0005] According to a first aspect of the present disclosure, there is provided an installation package generation method, comprising: determining a plurality of code libraries; respectively parsing a plurality of target program codes from the plurality of code libraries; respectively constructing a plurality of image containers corresponding to the plurality of target program codes; processing deployment information related to the corresponding target program codes in an environment provided by the image containers to obtain a deployment orchestration file corresponding to the target program codes; and packaging and publishing the corresponding target program codes according to the deployment orchestration file to obtain an online installation package.

[0006] According to a second aspect of the present disclosure, an installation package generating device is provided, comprising: a determination module for determining a plurality of code libraries; a parsing module for parsing the plurality of code libraries to obtain a plurality of target program codes; a construction module for respectively constructing a plurality of image containers corresponding to the plurality of target program codes; a first processing module for processing deployment information related to the corresponding target program code in an environment provided by the image container to obtain a deployment orchestration file corresponding to the target program code; and a second processing module for packaging and publishing the corresponding target program code according to the deployment orchestration file to obtain an online installation package.

[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the installation package generation method as described in the first aspect of the present disclosure.

[0008] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the installation package generation method according to the first aspect of the present disclosure.

[0009] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the installation package generation method of the first aspect of the present disclosure.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0012] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0013] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;

[0014] Figure 3 is a structural schematic diagram of an image building system according to an embodiment of the present disclosure;

[0015] Figure 4 is a flowchart of a method for generating an installation package according to an embodiment of the present disclosure;

[0016] Figure 5 is a schematic diagram according to a third embodiment of the present disclosure;

[0017] Figure 6 is a schematic diagram of the granularity of deployment components according to an embodiment of the present disclosure;

[0018] Figure 7 is a flow chart of the environment variable assignment process in the deployment arrangement file according to an embodiment of the present disclosure;

[0019] Figure 8 is a schematic diagram of the deployment process of a virtualized operation and maintenance system according to an embodiment of the present disclosure;

[0020] Fig. 9is a schematic diagram of a process of deploying a candidate installation package according to an embodiment of the present disclosure;

[0021] Fig.10 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0022] Fig.11 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0023] Fig.12 A schematic block diagram of an example electronic device for implementing the installation package generation method according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0024] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0025] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure.

[0026] It should be noted that the executor of the installation package generation method of this embodiment is an installation package generation device, which can be implemented by software and / or hardware. The device can be configured in an electronic device, and the electronic device may include but is not limited to a terminal, a server, etc.

[0027] The disclosed embodiments relate to the fields of artificial intelligence technologies such as knowledge graphs and cloud computing.

[0028] Among them, Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.

[0029] Cloud computing refers to a technology system that uses the network to access a shared pool of physical or virtual resources that is elastic and scalable. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed in an on-demand, self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain, as well as model training.

[0030] The knowledge graph is a modern theory that achieves the purpose of multidisciplinary integration by combining the theories and methods of applied mathematics, graphics, information visualization technology, information science and other disciplines with metrological citation analysis, co-occurrence analysis and other methods, and using visual graphs to vividly display the core structure, development history, frontier fields and overall knowledge architecture of the discipline.

[0031] like Figure 1 As shown, the installation package generation method includes:

[0032] S101: Determine multiple code bases.

[0033] Among them, the program code set used to store multiple program codes can be called a code library, and the code library can be used to manage and store codes on a remote server in the case of multi-person collaboration.

[0034] Among them, determining multiple code bases can be to obtain multiple program codes from open source code bases, for example, the open source project hosting platform GitHub code base, that is, the local program code of GitHub can be cloned locally, and then a local code base can be created based on the multiple program codes. Alternatively, multiple program codes can be written based on a code compilation tool combined with a code compilation script, and then a code base can be built based on the multiple program codes. There is no restriction on this.

[0035] S102: Parse and obtain multiple target program codes from multiple code libraries respectively.

[0036] The code library may include multiple program codes, and the program code among the multiple program codes that can be used to generate an online installation package may be referred to as the target program code.

[0037] In some embodiments, multiple target program codes are respectively parsed from multiple code repositories. This may be in response to an installation package generation request, and the installation package generation request is parsed to determine the code library identifiers of one or more background programs corresponding to the online installation package to be generated. Based on the code library identifiers of the one or more background programs, the program code is read from the corresponding code library as the target program code.

[0038] In other embodiments, it is also possible to respond to an installation package generation request and parse the installation package generation request to determine multiple program codes corresponding to the installation package generation request from multiple code repositories, and then, based on the installation package generation requirements in the actual development scenario, add and / or modify the aforementioned multiple program codes by code compilation, and use the code obtained by the aforementioned processing as the target program code, or, it is also possible to use any other possible method to parse and obtain multiple target program codes from multiple code repositories separately, without limitation.

[0039] S103: constructing a plurality of image containers corresponding to the plurality of target program codes respectively.

[0040] Among them, the image is the basis for building an image container. The image is a read-only template and a hierarchical file system. A read-only layer is called an image. Since the image uses a unified file system, the image process considers the entire file system to be mounted in read-write mode. However, all changes occur in the top writable layer, while the original read-only image file in the lower layer does not change. Since the image is not writable, the image is stateless.

[0041] The image container is created based on the image. The image container can be understood as an instance of the image, allowing users to package applications and program dependencies into a portable container, and then deploy it to a virtual machine that supports the image, while achieving process-level virtualization.

[0042] After parsing multiple target program codes from multiple code repositories respectively, the embodiment of the present disclosure can use the Dockerfile file to respectively construct multiple image containers corresponding to the multiple target program codes, or can also use any other possible file format to realize the construction of multiple image containers corresponding to the multiple target program codes, without limitation.

[0043] The multiple image containers of the embodiments of the present disclosure may also be pre-stored in a local cache and / or an image repository of the electronic device, wherein the image repository may be a centralized location for storing images and is a service that supports the HyperText Transfer Protocol (HTTP).

[0044] In some embodiments, obtaining multiple image containers corresponding to the target program code can be performed by selecting multiple image containers corresponding to the target program code from multiple image containers pre-stored in a local cache and / or an image repository, and since each pre-stored image container can be dynamically generated when compiling other tasks, when compiling the target program code on the electronic device this time, repeated compilation is effectively avoided, thereby effectively improving the construction efficiency of the image container.

[0045] Alternatively, any other possible manner may be used to construct multiple image containers corresponding to multiple target program codes respectively, and there is no limitation to this.

[0046] S104: Processing deployment information related to the corresponding target program code in the environment provided by the image container to obtain a deployment orchestration file corresponding to the target program code.

[0047] After constructing multiple image containers corresponding to multiple target program codes respectively, the embodiment of the present disclosure can process deployment information related to the corresponding target program codes in the environment provided by the image containers to obtain deployment orchestration files corresponding to the target program codes.

[0048] Among them, some descriptive information related to the online deployment task of the target program code can be called deployment information, and the deployment information can specifically include deployment resource information, number of instances, deployment service port, etc., without limitation.

[0049] Among them, the deployment orchestration file may include complete deployment information required for deploying and running the target program code. The deployment orchestration file can be used as a script file that can be called when processing the target program code to generate an online installation package, and is used to perform deployment tasks such as compiling, designing, combining, splitting, and configuring the target program code. The deployment orchestration file can specifically include environment variables, software and hardware configuration information, etc. in the online deployment scenario, and there is no limitation on this.

[0050] In some embodiments, deployment information related to the corresponding target program code is processed in the environment provided by the image container to obtain a deployment orchestration file corresponding to the target program code. This can be to determine multiple deployment information related to the target program code in the environment provided by the image container, package the multiple deployment information into a file, and use the file as the deployment orchestration file corresponding to the target program code.

[0051] In the embodiments of the present disclosure, a plurality of image containers may respectively provide different environments, that is, different image containers may respectively correspond to different environment information.

[0052] In some embodiments, the deployment information related to the corresponding target program code is processed in the environment provided by the image container to obtain a deployment orchestration file corresponding to the target program code. According to different environmental information of the image container, multiple deployment information related to the target program code can be adjusted accordingly to obtain multiple deployment information that is more suitable for the image container environment. The deployment information obtained by the above adjustments can then be packaged into a file, and the file can be used as the deployment orchestration file corresponding to the target program code, without limitation.

[0053] S105: Packaging and publishing the corresponding target program code according to the deployment arrangement file to obtain an online installation package.

[0054] After obtaining the deployment orchestration file corresponding to the target program code, the embodiment of the present disclosure can package the target program code into an installation package according to the deployment orchestration file, and publish the installation package online so that multiple clients can call the installation package online.

[0055] In some embodiments, packaging and publishing the corresponding target program code according to the deployment orchestration file may be performed by activating a deployment task on the corresponding deployment platform. The deployment task may pull the target program code in the code library to the deployment platform according to a pre-configured script, and package and publish the target program code in combination with the deployment orchestration file to obtain an online installation package.

[0056] In other embodiments, the target program code can also be sent to a deployment server, and the deployment server can be used to package and publish the target program code. For example, a file transfer command (such as a secure copy (SCP) command, which is not limited to this) can be used to send the packaged and compiled code to the target server, and then the package and publish test can be performed on the deployment server, and the online installation package can be published if the test is successful, and there is no limitation on this.

[0057] In this embodiment, by determining multiple code bases, and parsing multiple target program codes from the multiple code bases respectively, and then respectively constructing multiple image containers corresponding to the multiple target program codes, and processing the deployment information related to the corresponding target program code in the environment provided by the image container to obtain the deployment orchestration file corresponding to the target program code, and packaging and publishing the corresponding target program code according to the deployment orchestration file to obtain an online installation package, thereby separating the background development of the installation package from the online publishing and deployment business, effectively meeting the delivery and deployment requirements of various online deployment scenarios, and realizing one-click flexible deployment, thereby effectively improving the generation efficiency of online installation packages.

[0058] Figure 2 is a schematic diagram according to the first embodiment of the present disclosure.

[0059] like Figure 2 As shown, the installation package generation method includes:

[0060] S201: Determine multiple code bases.

[0061] The description information of S201 can be specifically referred to the above embodiment, which will not be described again here.

[0062] S202: Parse and obtain a plurality of program codes to be compiled from a plurality of code libraries respectively.

[0063] Among them, the program code in the multiple code libraries that can be used for compilation to obtain the installation package can be called the program code to be compiled.

[0064] For the specific explanation of respectively parsing a plurality of program codes to be compiled from a plurality of code libraries, please refer to the above embodiments, which will not be described in detail here.

[0065] S203: Encrypting the plurality of program codes to be compiled respectively to obtain a plurality of encrypted program codes.

[0066] After parsing multiple code libraries to obtain multiple program codes to be compiled, the disclosed embodiment can encrypt the multiple codes to be compiled respectively, and use the encrypted program codes as multiple encrypted program codes.

[0067] Among them, encryption processing refers to a processing method of strengthening the code through the corresponding encryption language. By encrypting multiple program codes to be compiled, multiple program codes to be compiled can be compiled into executable program codes, thereby effectively preventing program code leakage during the deployment and operation of the program code.

[0068] In some embodiments, multiple program codes to be compiled are encrypted, and an encryption algorithm (for example, Message Digest Algorithm (MD5), which is not limited to this) is used to encrypt the multiple program codes to be compiled to obtain multiple encrypted program codes, or any other possible method can be used to encrypt the multiple program codes to be compiled separately, which is not limited to this.

[0069] S204: Mark the encryption status of the plurality of encrypted program codes as encrypted respectively to obtain a plurality of target program codes.

[0070] The encryption status may be used to describe the encryption status of the program code, and the encryption status may specifically be, for example, encrypted, unencrypted, etc., which is not limited.

[0071] After encrypting multiple code programs to be compiled to obtain multiple encrypted program codes, the disclosed embodiment can mark the encryption status of the multiple encrypted program codes as encrypted, and use the multiple encrypted program codes whose encryption status is marked as encrypted as target program codes. By encrypting the multiple program codes to be compiled, it is possible to prevent program code leakage incidents from occurring during the installation package generation process, effectively ensure the security of the program code in the entire installation package generation process, and effectively improve the security and confidentiality level of the program code.

[0072] S205: Construct a plurality of image containers corresponding to the plurality of target program codes respectively.

[0073] Optionally, in some embodiments, constructing multiple image containers corresponding to multiple target program codes respectively may be to scan and confirm the encryption status of the multiple target program codes respectively, and when the encryption status of the multiple target program codes is respectively confirmed to be encrypted, constructing multiple image containers corresponding to the multiple target program codes respectively.

[0074] That is, the encryption status marked on the target program code may be confirmed, and when it is confirmed that the encryption status marked on the target program code is encrypted, multiple image containers corresponding to the multiple target program codes are constructed.

[0075] Optionally, in some embodiments, constructing multiple image containers corresponding to multiple target program codes may be to determine multiple related deployment information corresponding to the multiple target program codes, determine multiple images corresponding to the multiple related deployment information, and then construct multiple image containers corresponding to the multiple images. Since multiple related deployment information corresponding to the target program code is determined, and then multiple images are constructed with reference to the deployment information, the constructed multiple images can be more suitable for the multiple target program codes, effectively improving the accuracy and reliability of the image container construction. Therefore, when processing the corresponding target program code in the environment provided by the image container, the deployment processing logics for different target program codes will not interfere with each other, which facilitates the execution of parallel deployment processing logic, thereby effectively assisting in improving the execution efficiency of the installation package generation method.

[0076] The information used to deploy the target program code may be referred to as deployment information, and the deployment information may specifically be, for example, a version number, a build identifier, etc., which is not limited.

[0077] Optionally, in some embodiments, determining multiple related deployment information corresponding to multiple target program codes may be to determine multiple version information and multiple online deployment information corresponding to the multiple target program codes, and determine a build identifier, and then use the version information, build identifier, and online deployment information together as the deployment information related to the corresponding target program code. Since the multiple version information and multiple online deployment information corresponding to the target program code and the build identifier are used together as the deployment information related to the target program code, the comprehensiveness and referenceability of the deployment information can be effectively improved. When a deployment orchestration file for processing the target program code is generated based on the deployment information, the deployment orchestration file can carry valid deployment information, thereby ensuring that the online deployment processing logic can be smoothly implemented, meeting the deployment information requirements in the online deployment processing tasks, and facilitating the online deployment and delivery of the target program code.

[0078] The target program code may have a plurality of version-related information, which may be referred to as version information. The version information may specifically be, for example, a version number, a version identifier, etc., which is not limited.

[0079] Among them, the information used for online deployment of the target program code can be called online deployment information, and the online deployment information can be specific, for example, deployment environment, deployment resources, service ports, number of instances, etc., without limitation.

[0080] The build identifier is a pipeline identifier for parsing the code base to obtain the corresponding target program code.

[0081] That is to say, in the embodiments of the present disclosure, the target program code can be parsed to respectively determine multiple version information, multiple online deployment information, and build identifiers corresponding to the multiple target program codes, and the aforementioned multiple version information, multiple online deployment information, and build identifiers can be used together as deployment information related to the target code program, without limitation.

[0082] After determining multiple related deployment information corresponding to multiple target program codes, the disclosed embodiment can determine multiple images corresponding to the multiple related deployment information, and then construct multiple image containers corresponding to the multiple images.

[0083] In some embodiments, the image building system may be combined to determine multiple images corresponding to multiple related deployment information. For example, Figure 3 The present embodiment is explained in detail. Figure 3 is a structural diagram of an image building system according to an embodiment of the present disclosure, such as Figure 3 As shown, the Dockerfile file can be reasonably arranged based on the design idea of ​​image layering, that is, a layered image building system can be designed to determine multiple images corresponding to multiple related deployment information. The image building system may include: a first layer (operating system), the operating system may include a community enterprise operating system (Community Enterprise Operating System, CentOS) and an Alpline operating system, the second layer (operating environment dependency layer) may include: a programming language translator (GNU Compiler Collection, GCC), a software development kit (Java Development Kit, JDK), a hypertext preprocessor (Hypertext Preprocessor, PHP), a proxy server (Engine x, Nginx), and a Parallel Distributed Deep Learning (Paddle). The operating environment dependency layer can be used to build the basic operating environment of the image, and the third layer (business image) may include multiple image business modules (for example, business module 1, business module 2, ..., business module 6).

[0084] Since the image container can be understood as an instance of an image, after determining multiple images corresponding to multiple related deployment information, an image container can be constructed according to the image. The image container corresponds to the image. The image container is an instance of the image, so that in the execution process of the subsequent installation package generation method, the deployment information of the corresponding target program code can be continuously integrated and processed in the environment provided by the image container. For details, please refer to the subsequent embodiments.

[0085] S206: Processing the deployment information related to the corresponding target program code in the environment provided by the image container to obtain an initial arrangement file.

[0086] The initial orchestration file includes initial chart information, and the virtualization operation and maintenance system in the online deployment environment indicated by the online deployment information can configure local environment variables based on the initial chart information.

[0087] Among them, during the execution of the installation package generation method, the unprocessed orchestration file obtained can be called the initial orchestration file, and the initial orchestration file can have corresponding chart information, which can be called initial chart information (charts). The initial chart information (charts) can include all resource information required to run programs, tools or services in the virtualization operation and maintenance system.

[0088] The virtualization operation and maintenance system may specifically be, for example, a container orchestration engine (kubernetes, k8s), without limitation.

[0089] Among them, the parameters used to describe the local operating environment of the virtualization operation and maintenance system can be called environment variables.

[0090] In the embodiment of the present disclosure, the deployment information related to the corresponding target program code is processed in the environment provided by the image container. The deployment information related to the corresponding target program code can be packaged into a file in the environment provided by the image container and used as the initial orchestration file. There is no limitation on this.

[0091] S207: injecting the version information and the build identifier into the initial chart information of the initial orchestration file in the form of environment variables to obtain a deployment orchestration file.

[0092] In the embodiment of the present disclosure, after processing the deployment information related to the corresponding target program code in the environment provided by the image container to obtain the initial orchestration file, the version information and the build identifier can be injected into the initial chart information (charts) of the initial orchestration file in the form of environment variables to obtain the deployment orchestration file.

[0093] That is to say, after obtaining the version information and build identifier, the version information and build identifier can be injected into the initial chart information (charts) of the initial orchestration file in the form of environment variables, and take effect on the environment variables of the container application of the virtualization operation and maintenance system. Therefore, if an installation and deployment exception occurs during the execution of the subsequent installation package generation method, the embodiment of the present disclosure can trace back to the original code base based on the version information and build identifier, thereby ensuring the traceability of the installation and deployment exceptions throughout the installation package generation method, thereby effectively facilitating the troubleshooting and resolution of installation and deployment exceptions during the installation package generation method, effectively saving the time for troubleshooting installation and deployment exceptions, and thus effectively assisting in improving the execution efficiency of the installation package generation method.

[0094] S208: Packaging and publishing the corresponding target program code according to the deployment arrangement file to obtain an online installation package.

[0095] The description of S208 can be specifically referred to the above embodiment, which will not be repeated here.

[0096] In this embodiment, Figure 4 As shown, Figure 4 It is a flow chart of the installation package generation method according to the embodiment of the present disclosure. The installation package generation method may include a development and testing phase and a version release and packaging phase. In the installation package development and testing phase, multiple code bases (for example: code base A, code base B, code base C) can be determined, and then the multiple code bases can be security scanned to avoid code vulnerabilities in the program code in the code base, and then the multiple program codes are security reinforced (encrypted) to obtain the target program code, and multiple image containers corresponding to the target program code are constructed, and in the multiple image containers, the initial chart information (charts) are integrated and the virtualization operation and maintenance system (container orchestration engine (kubernetes, k8s)) is deployed to complete the development and testing phase. In the version release and packaging phase, the image can be released, and the initial chart information (charts) is released to obtain the deployment orchestration file, and then the corresponding target program code is packaged and released according to the deployment orchestration file to obtain an online installation package.

[0097] In this embodiment, by determining multiple code libraries, and parsing them respectively to obtain multiple program codes to be compiled, the multiple program codes to be compiled are encrypted respectively to obtain multiple encrypted program codes, and the encryption status of the multiple encrypted program codes are marked as encrypted respectively to obtain multiple target program codes. By encrypting the multiple program codes to be compiled, it is possible to prevent program code leakage incidents during the installation package generation process, effectively ensure the security of the program code in the entire installation package generation process, and effectively improve the security and confidentiality level of the program code. Then, multiple image containers corresponding to multiple target program codes are respectively constructed, and deployment information related to the corresponding target program codes is processed in the environment provided by the image container to obtain an initial orchestration file, and then the version information and build identifier are injected into the initial chart information of the initial orchestration file in the form of environment variables to obtain a deployment orchestration file. If an installation and deployment exception occurs during the execution of the subsequent installation package generation method, the embodiment of the present disclosure can trace back to the original code base according to the version information and the build identifier to ensure the traceability of the installation and deployment exceptions throughout the installation package generation method, thereby effectively facilitating the troubleshooting and resolution of installation and deployment exceptions during the installation package generation method, effectively saving the troubleshooting time for installation and deployment exceptions, thereby effectively assisting in improving the execution efficiency of the installation package generation method, and packaging and publishing the corresponding target program code according to the deployment orchestration file to obtain an online installation package, thereby effectively improving the generation efficiency of the online installation package.

[0098] Figure 5 is a schematic diagram according to a third embodiment of the present disclosure.

[0099] like Figure 5 As shown, the installation package generation method includes:

[0100] S501: Determine multiple code bases.

[0101] S502: parse and obtain multiple target program codes from multiple code libraries respectively.

[0102] S503: Construct a plurality of image containers corresponding to the plurality of target program codes respectively.

[0103] S504: Processing deployment information related to the corresponding target program code in the environment provided by the image container to obtain a deployment orchestration file corresponding to the target program code.

[0104] The description of S501 - S504 can be specifically referred to the above embodiment, which will not be repeated here.

[0105] S505: Determine various deployment component granularities.

[0106] Among them, multiple target program codes can be deployed according to the corresponding component granularity, which can be called deployment component granularity. The deployment component granularity can be specific, for example, module granularity, subsystem granularity, whole system granularity, etc., without limitation.

[0107] S506: Acquire multiple environment variable values ​​corresponding to multiple deployment component granularities.

[0108] The environment variable value may be the value of the environment variable involved in the online deployment and delivery of a module, a subsystem, or the entire system at the corresponding deployment component granularity, and there is no restriction on this.

[0109] After determining multiple deployment component granularities, the embodiment of the present disclosure can obtain multiple environment variable values ​​corresponding to the multiple deployment component granularities, such as Figure 6 As shown, Figure 6 It is a schematic diagram of the deployment component granularity according to an embodiment of the present disclosure. After determining the deployment component granularity of modules (for example, module A, module B, module C, module D), subsystems, and the entire system, the value files (values.yaml) corresponding to each deployment component granularity can be determined, and the value files corresponding to each deployment component granularity determined above can be used as multiple environment variable values ​​corresponding to multiple deployment component granularities.

[0110] like Figure 6 As shown, it can be understood that since the deployment demand for the whole system granularity is usually higher in the online deployment and delivery tasks, the deployment demand for the subsystem granularity is second, and the deployment demand for the module granularity is weaker, that is, in the online deployment and delivery tasks, the client usually tends to customize the online deployment of the entire system. Therefore, in the embodiment of the present disclosure, different weights can also be set for the above-mentioned multiple deployment component granularities, and the value files corresponding to each deployment component granularity can be assisted in determining based on the corresponding weights, and there is no limitation on this.

[0111] S507: Perform value assignment processing on the environment variables in the deployment orchestration file according to the multiple environment variable values, so as to obtain multiple pieces corresponding to the multiple deployment component granularities.

[0112] After obtaining multiple environment variable values ​​corresponding to multiple deployment components, the embodiment of the present disclosure can assign values ​​to the environment variables in the deployment orchestration file according to the multiple environment variable values ​​to obtain multiple orchestration files corresponding to the deployment component granularity, and use them as target orchestration files.

[0113] For example, you can combine Figure 7 This embodiment is explained in detail. Figure 7is a flow chart of the environment variable assignment process in the deployment arrangement file according to an embodiment of the present disclosure, such as Figure 7 As shown, the process can be divided into two parts, before and after the transformation. Before the transformation, the same deployment component granularity can correspond to different environment variable values. For example, the environment variable value corresponding to module A is a. Extensible Markup Language (XML), the environment variable value corresponding to module B is b. Configuration file (Config, Conf), and the environment variable value corresponding to module C is c. Markup Language (YAML Ain't Markup Language, YAML). After the transformation, it can be achieved that sub-modules, subsystems, and the entire system have a global single environment variable. For example, modules A, B, and C can have a global single environment variable: .global environment configuration file (.env), and then the environment variable values ​​(values.yaml) corresponding to the deployment component granularity are assigned according to the global single environment variable to obtain the target orchestration file corresponding to the sub-module component granularity.

[0114] S508: Determine a portion of target program code related to the deployment component granularity, where the portion of target program code is used to provide online services provided by components involved in the corresponding deployment component granularity.

[0115] In the disclosed embodiment, after obtaining multiple target orchestration files corresponding to multiple deployment component granularities, part of the target program code related to the deployment component granularity can be determined from the multiple target program codes, and the part of the target program code can be used to provide online services provided by the components involved in the corresponding deployment component granularity.

[0116] Among them, different deployment component granularities can correspond to different target program codes. To determine the part of the target program code related to the deployment component granularity, the part of the target program code related to the deployment component granularity can be determined by searching in multiple target program codes according to the deployment component granularity to determine the part of the target program code related to the deployment component granularity from multiple target program codes. There is no limitation to this.

[0117] S509: Packaging the partial target program code according to the target arrangement file corresponding to the partial target program code to obtain a candidate installation package, wherein the candidate installation package is used to generate an online installation package.

[0118] Among them, an installation package that has not been released online can be called a candidate installation package. The candidate installation package can specifically be an installation package obtained by packaging part of the target program code according to the target arrangement file corresponding to the part of the target program code. There is no limitation on this.

[0119] That is to say, multiple target orchestration files corresponding to the deployment components can be determined, and partial target program codes corresponding to the deployment component granularity can be determined. Then, according to the deployment information of the corresponding partial target program codes in the target orchestration files, the partial target program codes can be packaged to obtain candidate installation packages, and then the candidate installation packages can be processed accordingly to generate an online installation package. For details, please refer to the subsequent embodiments.

[0120] In the disclosed embodiment, by determining multiple deployment component granularities and obtaining multiple environment variable values ​​corresponding to the multiple deployment component granularities, and then assigning values ​​to the environment variables in the deployment orchestration file according to the multiple environment variable values, multiple target orchestration files corresponding to the multiple deployment component granularities are obtained, thereby achieving that the target orchestration files of the multiple deployment component granularities have a global single configuration variable. When the target program code is packaged based on the target orchestration file, the simplicity of the configuration item settings can be effectively improved, the program code packaging and execution can be effectively facilitated, and the interference with the target program code packaging caused by too many configuration items can be effectively eliminated, thereby effectively improving the applicability of the installation package generation method.

[0121] S510: Deploy multiple candidate installation packages to multiple corresponding working nodes of the virtualization operation and maintenance system.

[0122] In the present disclosure, Figure 8 As shown, Figure 8 The deployment process diagram of the virtualization operation and maintenance system according to the embodiment of the present disclosure can abstract the entire deployment process of the virtualization operation and maintenance system into multiple working nodes, such as a machine inspection node, a basic environment configuration node, an installation package upload node, a virtualization operation and maintenance system environment installation node, a system installation node, and a system test node. Figure 8 As shown, multiple working nodes may include multiple specific working links.

[0123] In the embodiment of the present disclosure, multiple candidate installation packages can be deployed to Figure 8 In the corresponding multiple working nodes of the virtualized operation and maintenance system shown in FIG. Figure 8 There is no restriction on this in the specific working links of the corresponding multiple working nodes of the virtualized operation and maintenance system shown.

[0124] In the disclosed embodiment, by deploying multiple candidate installation packages to multiple corresponding working nodes of the virtualization operation and maintenance system, it is possible to facilitate the reuse of existing resource information in the virtualization operation and maintenance system, and can also effectively improve the deployment management efficiency of the installation packages, thereby effectively improving the flexibility of the configuration management of the installation package generation method.

[0125] S511: Obtain an online deployment request.

[0126] The request for online deployment of the candidate installation package may be referred to as an online deployment request.

[0127] In the disclosed embodiment, obtaining the online deployment request may be performed by the installation package generating device providing a corresponding deployment request interface in advance, and then obtaining the corresponding online deployment request via the deployment request interface, and there is no limitation to this.

[0128] S512: Parse the online deployment request to obtain the deployment task type and required component granularity.

[0129] Among them, according to different online deployment requests, the deployment tasks can be divided into different deployment task types, and the deployment task types can locate the corresponding working nodes of the virtualization operation and maintenance system.

[0130] Among them, the required deployment component granularity can be called the required component granularity, and the required component granularity can be used to describe the granularity requirements of the deployment components, such as the granularity requirements of the sub-modules, the granularity requirements of the subsystems, and the granularity requirements of the entire system, without any restrictions.

[0131] In some embodiments, the online deployment request may be parsed by text parsing to obtain the deployment task type and the required component granularity, or the online deployment request may be parsed by any other possible method to obtain the deployment task type and the required component granularity, without limitation.

[0132] S513: Determine a candidate installation package corresponding to the required component granularity.

[0133] After parsing the online deployment request and obtaining the required component granularity, the disclosed embodiment can search among multiple candidate installation packages according to the required component granularity to determine a candidate installation package corresponding to the required component granularity from among the multiple candidate installation packages.

[0134] In the embodiment of the present disclosure, it can be combined with Fig. 9 This embodiment is explained in detail. Fig. 9 is a schematic diagram of the process of deploying a candidate installation package according to an embodiment of the present disclosure, such as Fig. 9 As shown, after obtaining the online deployment request, the online deployment request can be parsed to obtain the deployment task type and the required component granularity (for example: the granularity requirement of the sub-module, the granularity requirement of the subsystem, the granularity requirement of the whole system), and then the candidate installation package corresponding to the online deployment request is determined according to the required component granularity, and then the online installation package is generated according to the candidate installation package. For details, please refer to the subsequent embodiments.

[0135] S514: Determine a target working node corresponding to the deployment task type from the multiple working nodes.

[0136] Among the multiple working nodes corresponding to the virtualization operation and maintenance system, the working node corresponding to the deployment task type can be called the target working node.

[0137] That is to say, after parsing the online deployment request and obtaining the deployment task type, the embodiment of the present disclosure can locate the working node corresponding to the deployment task type from multiple working nodes of the virtualization operation and maintenance system according to the deployment task type, and use it as the target working node.

[0138] S515: Using the target working node to identify the environment variable value in the target orchestration file corresponding to the candidate installation package, and processing the candidate installation package according to the environment variable value to obtain an online installation package.

[0139] Among them, the environment variable value can be specifically adapted to the online deployment and delivery environment. After the target working node is used to identify the environment variable value in the target orchestration file corresponding to the candidate installation package, the candidate installation package can also be processed based on the environment variable value to configure the candidate installation package as an installation package suitable for the online deployment and delivery environment (the online deployment and delivery environment can be the hardware configuration environment and software execution environment of the online deployment and delivery, and there is no restriction on this) as an online installation package.

[0140] After determining the target working node corresponding to the deployment task type from the corresponding multiple working nodes of the virtualization operation and maintenance system, the embodiment of the present disclosure can use the target working node to identify the environment variable value in the target orchestration file corresponding to the candidate installation package, and process the candidate installation package according to the environment variable value to obtain an online installation package, thereby effectively improving the deployment management efficiency of the installation package, thereby effectively improving the generation effect of the installation package, and effectively meeting the online deployment request of the installation package.

[0141] In this embodiment, by determining multiple code bases, and parsing multiple target program codes from the multiple code bases respectively, and then respectively constructing multiple image containers corresponding to the multiple target program codes, and processing the deployment information related to the corresponding target program codes in the environment provided by the image container to obtain a deployment orchestration file corresponding to the target program code, by determining multiple deployment component granularities, and obtaining multiple environment variable values ​​corresponding to the multiple deployment component granularities, and then assigning values ​​to the environment variables in the deployment orchestration file according to the multiple environment variable values ​​to obtain multiple target orchestration files corresponding to the multiple deployment component granularities, it is possible to achieve that the target orchestration files of multiple deployment component granularities have a global single configuration variable. When the target program code is packaged based on the target orchestration file, the simplicity of the configuration item settings can be effectively improved, the execution of program code packaging processing can be effectively facilitated, and the interference of the target program code packaging processing caused by too many configuration items can be effectively eliminated, and the applicability of the installation package generation method can be effectively improved. Then, multiple candidate installation packages are deployed to multiple corresponding working nodes of the virtualization operation and maintenance system, so that existing resource information can be reused in the virtualization operation and maintenance system, and the deployment management efficiency of the installation package can be effectively improved, so that the flexibility of the configuration management of the installation package generation method can be effectively improved, and then the online deployment request is obtained and parsed to obtain the deployment task type and the required component granularity, and then the candidate installation package corresponding to the required component granularity is determined, and the target working node corresponding to the deployment task type is determined from multiple working nodes, and then the target working node is used to identify the environment variable value in the target orchestration file corresponding to the candidate installation package, and the candidate installation package is processed according to the environment variable value to obtain the online installation package. It can effectively meet the delivery and deployment requirements of various online deployment scenarios, realize one-click flexible deployment, and effectively improve the generation efficiency of online installation packages.

[0142] Fig.10 is a schematic diagram according to a fourth embodiment of the present disclosure.

[0143] like Fig.10 As shown, the installation package generating device 100 includes:

[0144] A determination module 1001 is used to determine multiple code bases;

[0145] The parsing module 1002 is used to parse and obtain multiple target program codes from multiple code libraries respectively;

[0146] A construction module 1003 is used to respectively construct a plurality of image containers corresponding to a plurality of target program codes;

[0147] A first processing module 1004 is used to process the deployment information related to the corresponding target program code in the environment provided by the image container to obtain a deployment arrangement file corresponding to the target program code; and

[0148] The second processing module 1005 is used to package and publish the corresponding target program code according to the deployment arrangement file to obtain an online installation package.

[0149] In some embodiments of the present disclosure, Fig.11 As shown, Fig.11 1 is a schematic diagram according to the fifth embodiment of the present disclosure, the installation package generating device 110 comprises: a determining module 1101, a parsing module 1102, a building module 1103, a first processing module 1104, and a second processing module 1105, wherein the parsing module 1102 is specifically used for:

[0150] Parsing and obtaining a plurality of program codes to be compiled from a plurality of code bases respectively;

[0151] encrypting the plurality of program codes to be compiled respectively to obtain a plurality of encrypted program codes; and

[0152] Marking the encryption status of the plurality of encrypted program codes as encrypted respectively to obtain a plurality of target program codes;

[0153] The construction module 1103 is specifically used for:

[0154] Scan and confirm the encryption status of multiple target program codes respectively;

[0155] When it is confirmed that the encryption status of the plurality of target program codes is encrypted, a plurality of image containers corresponding to the plurality of target program codes are constructed.

[0156] In some embodiments of the present disclosure, the building block 1103 includes:

[0157] The first determining submodule 11031 is used to determine a plurality of related deployment information corresponding to a plurality of target program codes respectively;

[0158] The second determining submodule 11032 is used to determine a plurality of images corresponding to the plurality of related deployment information respectively;

[0159] The construction submodule 11033 is used to construct multiple image containers corresponding to the multiple images respectively.

[0160] In some embodiments of the present disclosure, the first determining submodule 11031 is specifically used to:

[0161] Determine a plurality of version information and a plurality of online deployment information corresponding to the plurality of target program codes respectively;

[0162] Determining a build identifier, wherein the build identifier is a pipeline identifier for parsing a code base to obtain a corresponding target program code;

[0163] The version information, build identifier, and online deployment information are taken together as deployment information related to the corresponding target program code.

[0164] In some embodiments of the present disclosure, the first processing module 1104 is specifically configured to:

[0165] Processing deployment information related to the corresponding target program code in the environment provided by the image container to obtain an initial orchestration file, wherein the initial orchestration file includes initial chart information, and the virtualization operation and maintenance system in the online deployment environment indicated by the online deployment information can configure local environment variables based on the initial chart information;

[0166] The version information and the build identifier are injected into the initial chart information of the initial orchestration file by using environment variables to obtain the deployment orchestration file.

[0167] In some embodiments of the present disclosure, the second processing module 1105 is specifically configured to:

[0168] Determine the granularity of various deployment components;

[0169] Get multiple environment variable values ​​corresponding to multiple deployment component granularities;

[0170] Assign values ​​to environment variables in the deployment orchestration file according to the multiple environment variable values ​​to obtain multiple target orchestration files corresponding to multiple deployment component granularities;

[0171] Determine a portion of the target program code related to the deployment component granularity, where the portion of the target program code is used to provide online services provided by the components involved in the corresponding deployment component granularity; and

[0172] The partial target program code is packaged according to the target arrangement file corresponding to the partial target program code to obtain a candidate installation package, wherein the candidate installation package is used to generate an online installation package.

[0173] In some embodiments of the present disclosure, the second processing module 1105 is further configured to:

[0174] Deploy multiple candidate installation packages to corresponding multiple working nodes of the virtualization operation and maintenance system.

[0175] In some embodiments of the present disclosure, the second processing module 1105 is further configured to:

[0176] After deploying multiple candidate installation packages to multiple corresponding working nodes of the virtualization operation and maintenance system, obtaining an online deployment request;

[0177] Parse online deployment requests to obtain deployment task types and required component granularity;

[0178] Determine candidate installation packages corresponding to the required component granularity;

[0179] Determine a target working node corresponding to the deployment task type from multiple working nodes;

[0180] The target working node is used to identify the environment variable value in the target orchestration file corresponding to the candidate installation package, and the candidate installation package is processed according to the environment variable value to obtain the online installation package.

[0181] It is understandable that the present embodiment Fig.11 The installation package generating device 110 in the embodiment may have the same function and structure as the installation package generating device 100 in the above embodiment, the determining module 1101 may have the same function and structure as the determining module 1001 in the above embodiment, the parsing module 1102 may have the same function and structure as the parsing module 1002 in the above embodiment, the building module 1103 may have the same function and structure as the first processing module 1004 in the above embodiment, the second processing module 1105 may have the same function and structure as the second processing module 1005 in the above embodiment.

[0182] It should be noted that the aforementioned explanation of the installation package generating method is also applicable to the installation package generating device of this embodiment and will not be repeated here.

[0183] In this embodiment, by determining multiple code bases, and parsing multiple target program codes from the multiple code bases respectively, and then respectively constructing multiple image containers corresponding to the multiple target program codes, and processing the deployment information related to the corresponding target program code in the environment provided by the image container to obtain the deployment orchestration file corresponding to the target program code, and packaging and publishing the corresponding target program code according to the deployment orchestration file to obtain an online installation package, thereby separating the background development of the installation package from the online publishing and deployment business, effectively meeting the delivery and deployment requirements of various online deployment scenarios, and realizing one-click flexible deployment, thereby effectively improving the generation efficiency of online installation packages.

[0184] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0185] Fig.12A schematic block diagram of an example electronic device for implementing the installation package generation method of an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0186] like Fig.12 As shown, the device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0187] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0188] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as the installation package generation method. For example, in some embodiments, the installation package generation method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the installation package generation method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to execute the installation package generating method in any other appropriate manner (eg, by means of firmware).

[0189] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0190] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0191] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0192] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0193] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0194] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0195] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0196] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating an installation package, including: Determining a plurality of code libraries; Respectively parsing a plurality of target program codes from the plurality of code libraries; Respectively constructing a plurality of mirror containers corresponding to the plurality of target program codes; Processing deployment information related to the corresponding target program code in the environment provided by the mirror container to obtain a deployment orchestration file corresponding to the target program code; and Performing a packaging and release process on the corresponding target program code according to the deployment orchestration file to obtain an online installation package; wherein, the respectively constructing a plurality of mirror containers corresponding to the plurality of target program codes includes: Determining a plurality of version information and a plurality of online deployment information respectively corresponding to the plurality of target program codes; Determining a build identifier, wherein the build identifier is a pipeline identifier for parsing the code library to obtain the corresponding target program code; Using the version information, the build identifier, and the online deployment information together as deployment information related to the corresponding target program code; Determining a plurality of mirrors respectively corresponding to the plurality of related deployment information; Constructing a plurality of mirror containers respectively corresponding to the plurality of mirrors.

2. The method according to claim 1, wherein, the respectively parsing a plurality of target program codes from the plurality of code libraries includes: Respectively parsing a plurality of program codes to be compiled from the plurality of code libraries; Respectively performing encryption processing on the plurality of program codes to be compiled to obtain a plurality of encrypted program codes; and Respectively marking the encryption status of the plurality of encrypted program codes as encrypted to obtain the plurality of target program codes; wherein, the respectively constructing a plurality of mirror containers corresponding to the plurality of target program codes includes: Respectively scanning and confirming the encryption status of the plurality of target program codes; When respectively confirming that the encryption status of the plurality of target program codes is the encrypted status, constructing a plurality of mirror containers respectively corresponding to the plurality of target program codes.

3. The method according to claim 1, wherein, the processing deployment information related to the corresponding target program code in the environment provided by the mirror container to obtain a deployment orchestration file corresponding to the target program code includes: Processing deployment information related to the corresponding target program code in the environment provided by the mirror container to obtain an initial orchestration file, wherein the initial orchestration file includes initial chart information, and a virtualized operation and maintenance system in the online deployment environment indicated by the online deployment information can configure local environment variables based on the initial chart information; Injecting the version information and the build identifier into the initial chart information of the initial orchestration file in the form of environment variables to obtain the deployment orchestration file.

4. The method according to claim 3, wherein, the performing a packaging and release process on the corresponding target program code according to the deployment orchestration file to obtain an online installation package includes: Determining multiple deployment component granularities; Obtaining multiple environment variable values respectively corresponding to the multiple deployment component granularities; According to the multiple environment variable values, respectively, the environment variables in the deployment orchestration file are assigned values ​​to obtain multiple target orchestration files corresponding to the multiple deployment component granularities; Determining a portion of target program code related to the deployment component granularity, wherein the portion of target program code is used to provide an online service provided by a component involved in the deployment component granularity; and The part of the target program code is packaged according to the target arrangement file corresponding to the part of the target program code to obtain a candidate installation package, wherein the candidate installation package is used to generate the online installation package.

5. The method according to claim 4, in, The step of packaging and publishing the corresponding target program code according to the deployment arrangement file to obtain an online installation package further includes: Deploy the plurality of candidate installation packages to the corresponding plurality of working nodes of the virtualization operation and maintenance system.

6. The method according to claim 5, after deploying the plurality of candidate installation packages to the corresponding plurality of working nodes of the virtualization operation and maintenance system, further include: Get online deployment request; Parsing the online deployment request to obtain the deployment task type and required component granularity; Determine a candidate installation package corresponding to the required component granularity; Determine a target working node corresponding to the deployment task type from the multiple working nodes; The target working node is used to identify the environment variable value in the target orchestration file corresponding to the candidate installation package, and the candidate installation package is processed according to the environment variable value to obtain an online installation package.

7. A device for generating an installation package, include: A determination module is used to determine multiple code bases; A parsing module, used to parse and obtain multiple target program codes from the multiple code libraries respectively; A construction module, used to respectively construct a plurality of image containers corresponding to the plurality of target program codes; A first processing module, configured to process deployment information related to the target program code in the environment provided by the image container to obtain a deployment arrangement file corresponding to the target program code; as well as A second processing module is used to package and publish the corresponding target program code according to the deployment arrangement file to obtain an online installation package; Wherein, the building blocks include: A first determining submodule is used to determine a plurality of version information and a plurality of online deployment information respectively corresponding to the plurality of target program codes; Determine a build identifier, wherein the build identifier is a pipeline identifier for parsing the code library to obtain the corresponding target program code; The version information, the build identifier, and the online deployment information are used together as deployment information related to the target program code; A second determination submodule is used to determine a plurality of images corresponding to the plurality of related deployment information respectively; The construction submodule is used to construct a plurality of image containers corresponding to the plurality of images respectively.

8. The device according to claim 7, in, The analysis module is specifically used for: Parsing the plurality of code libraries to obtain a plurality of program codes to be compiled; Encrypting the plurality of program codes to be compiled respectively to obtain a plurality of encrypted program codes; as well as marking the encryption status of the plurality of encrypted program codes as encrypted respectively, so as to obtain the plurality of target program codes; Wherein, the building block is specifically used for: Scanning and confirming the encryption status of the plurality of target program codes respectively; When the encryption states of the plurality of target program codes are respectively confirmed to be the encrypted state, a plurality of image containers corresponding to the plurality of target program codes are constructed.

9. The device according to claim 7, in, The first processing module is specifically used for: Processing the deployment information related to the target program code in the environment provided by the image container to obtain an initial orchestration file, wherein the initial orchestration file includes initial chart information, and the virtualization operation and maintenance system in the online deployment environment indicated by the online deployment information can configure local environment variables based on the initial chart information; The version information and the build identifier are injected into the initial chart information of the initial orchestration file in an environment variable manner to obtain the deployment orchestration file.

10. The device according to claim 9, in, The second processing module is specifically used for: Determine the granularity of various deployment components; Acquire multiple environment variable values ​​corresponding to the multiple deployment component granularities respectively; According to the multiple environment variable values, respectively, the environment variables in the deployment orchestration file are assigned values ​​to obtain multiple target orchestration files corresponding to the multiple deployment component granularities; Determine a portion of target program code related to the deployment component granularity, where the portion of target program code is used to provide online services provided by components involved in the deployment component granularity; as well as The part of the target program code is packaged according to the target arrangement file corresponding to the part of the target program code to obtain a candidate installation package, wherein the candidate installation package is used to generate the online installation package.

11. The device according to claim 10, in, The second processing module is further used for: Deploy the plurality of candidate installation packages to the corresponding plurality of working nodes of the virtualization operation and maintenance system.

12. The device according to claim 11, wherein the second processing module is further configured to: After deploying the plurality of candidate installation packages to the corresponding plurality of working nodes of the virtualization operation and maintenance system, obtaining an online deployment request; Parsing the online deployment request to obtain the deployment task type and required component granularity; Determine a candidate installation package corresponding to the required component granularity; Determine a target working node corresponding to the deployment task type from the multiple working nodes; The target working node is used to identify the environment variable value in the target orchestration file corresponding to the candidate installation package, and the candidate installation package is processed according to the environment variable value to obtain an online installation package.

13. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

15. A computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Code compiling method and device, storage medium and electronic device

    CN113434146A

  • Synchronizing development code and deployed executable versioning within distributed systems

    US20120180024A1