CN114237686A - Installation package generation method and device, electronic equipment and storage medium - Google Patents

Installation package generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114237686A
CN114237686A CN202111401675.3A CN202111401675A CN114237686A CN 114237686 A CN114237686 A CN 114237686A CN 202111401675 A CN202111401675 A CN 202111401675A CN 114237686 A CN114237686 A CN 114237686A
Authority
CN
China
Prior art keywords
deployment
program codes
installation package
determining
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111401675.3A
Other languages
Chinese (zh)
Inventor
彭彬
王维煜
王志华
张一麟
宋勋超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111401675.3A priority Critical patent/CN114237686A/en
Publication of CN114237686A publication Critical patent/CN114237686A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides an installation package generation method and device, electronic equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of artificial intelligence such as cloud computing and knowledge maps. The method comprises the following steps: the method comprises the steps of determining a plurality of code bases, respectively analyzing the code bases to obtain a plurality of target program codes, respectively constructing a plurality of mirror image containers corresponding to the target program codes, processing deployment information related to the corresponding target program codes in an environment provided by the mirror image containers to obtain deployment arrangement files corresponding to the target program codes, and packaging and issuing the corresponding target program codes according to the deployment arrangement files to obtain the on-line installation package.

Description

Installation package generation method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical field of artificial intelligence such as knowledge graphs and cloud computing, and specifically relates to an installation package generation method and device, electronic equipment and a storage medium.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning technology, a deep learning technology, a big data processing technology, a knowledge map technology and the like.
In the related art, in the process of deploying program code to generate an online installation package, high deployment cost and labor consumption are generally required, and the delivery deployment requirement of multiple scenes cannot be adapted.
Disclosure of Invention
The disclosure provides an installation package generation method, an installation package generation device, an electronic device, a storage medium and a computer program product.
According to a first aspect of the present disclosure, there is provided an installation package generation method, including: determining a plurality of codebases; respectively analyzing the plurality of code libraries to obtain a plurality of target program codes; respectively constructing a plurality of mirror image containers corresponding to the plurality of target program codes; processing deployment information related to the corresponding target program code in an environment provided by the mirror image container to obtain a deployment editing file corresponding to the target program code; and packaging and issuing the corresponding target program code according to the deployment layout file to obtain an online installation package.
According to a second aspect of the present disclosure, there is provided an installation package generation apparatus including: a determining module for determining a plurality of codebases; the analysis module is used for respectively analyzing the plurality of code libraries to obtain a plurality of target program codes; the construction module is used for respectively constructing a plurality of mirror image containers corresponding to the target program codes; the first processing module is used for processing the deployment information related to the corresponding target program code in the environment provided by the mirror image container so as to obtain a deployment editing file corresponding to the target program code; and the second processing module is used for packaging and issuing the corresponding target program codes according to the deployment layout file so as to obtain an online installation package.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the installation package generation method according to the first aspect of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the installation package generating method as the first aspect of the present disclosure.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the installation package generation method as in the first aspect of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic block diagram of a mirror construction system according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustration of an installation package generation method according to an embodiment of the disclosure;
FIG. 5 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 6 is a schematic diagram of deployment component granularity according to an embodiment of the present disclosure;
FIG. 7 is a flowchart illustrating an environment variable assignment process in a deployment orchestration file according to an embodiment of the present disclosure;
FIG. 8 is a schematic deployment flow diagram of a virtualized operation and maintenance system according to an embodiment of the disclosure;
FIG. 9 is a flowchart illustration of a candidate installation package deployment according to an embodiment of the disclosure;
FIG. 10 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 11 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 12 shows a schematic block diagram of an example electronic device for implementing the installation package generation method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure.
It should be noted that an execution main body of the installation package generation method of this embodiment is an installation package generation apparatus, which may be implemented in a software and/or hardware manner, and the apparatus may be configured in an electronic device, and the electronic device may include but is not limited to a terminal, a server, and the like.
The embodiment of the disclosure relates to the technical field of artificial intelligence such as knowledge graph and cloud computing.
Wherein, Artificial Intelligence (Artificial Intelligence), english is abbreviated as AI. The method is a new technical science for researching and developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
Cloud computing refers to a technical system that accesses a flexibly extensible shared physical or virtual resource pool through a network, and resources may include servers, operating systems, networks, software, applications, storage devices, and the like, and may be deployed and managed in a self-service manner on demand. Through the cloud computing technology, high-efficiency and strong data processing capacity can be provided for technical application and model training of artificial intelligence, block chains and the like.
The knowledge graph is a modern theory which achieves the aim of multi-discipline fusion by combining theories and methods of applying subjects such as mathematics, graphics, information visualization technology, information science and the like with methods such as metrology introduction analysis, co-occurrence analysis and the like and utilizing the visualized graph to vividly display the core structure, development history, frontier field and overall knowledge framework of the subjects.
As shown in fig. 1, the installation package generating method includes:
s101: a plurality of codebases is determined.
Among other things, a set of program code for storing multiple program codes, which may be referred to as a code library, may be used to manage and store the codes at a remote server in a multi-person collaboration scenario.
The determining of the multiple code libraries may be to obtain multiple program codes from an open source code library, for example, a GitHub code library of an open source project hosting platform, that is, to clone the program codes of a GitHub local to a local area, and then create a local code library based on the obtained multiple program codes, or may also be to write multiple program codes based on a code compiling tool in combination with a code compiling script, and then construct a code library based on multiple program codes, which is not limited in this respect.
S102: and respectively analyzing the target program codes from the code libraries to obtain a plurality of target program codes.
The code library may include a plurality of program codes, and among the plurality of program codes, a program code that may be used to generate the online installation package may be referred to as a target program code.
In some embodiments, the multiple target program codes are obtained by analyzing from the multiple code libraries, or the multiple target program codes may be obtained by responding to an installation package generation request, analyzing the installation package generation request, determining code library identifiers of one or more background programs corresponding to the online installation package to be generated, and reading the program codes from the corresponding code libraries as the target program codes according to the code library identifiers of the one or more background programs.
In other embodiments, the method may further include responding to the installation package generation request, analyzing the installation package generation request, determining a plurality of program codes corresponding to the installation package generation request from a plurality of code libraries, performing new addition and/or modification processing on the determined plurality of program codes in a code compiling manner according to an installation package generation requirement in an actual development scene, and using the processed codes as target program codes, or may further analyze the plurality of target program codes from the plurality of code libraries in any other possible manner, which is not limited herein.
S103: a plurality of mirror containers corresponding to the plurality of object program codes are respectively constructed.
The mirror image is a foundation for constructing a mirror image container, the mirror image is a read-only template, and the mirror image is a file system with a hierarchical structure. One read-only layer is called a mirror. Because the mirror image uses a uniform file system, the mirror image process considers that the whole file system is mounted in a read-write mode. But all changes occur in the top writable layer while the underlying original read-only image file is unchanged, and the image is stateless since it is not writable.
And the mirror container is generated based on the mirror creation. The mirror container can be understood as an example of mirror, so that a user can package an application and a program dependence package into a portable container and then deploy the container to a virtual machine supporting mirror, and meanwhile, process level virtualization is realized.
In the embodiment of the present disclosure, after the plurality of object program codes are obtained by analyzing the plurality of code libraries, the Dockerfile file may be used to construct a plurality of mirror image containers corresponding to the plurality of object program codes, or any other possible file form may be used to implement the construction of the plurality of mirror image containers corresponding to the plurality of object program codes, which is not limited to this.
The multiple mirror image containers in the embodiment of the present disclosure may also be pre-stored in a local cache and/or a mirror image repository of the electronic device, where the mirror image repository may be a place for centrally storing mirror images and is a service supporting HyperText Transfer Protocol (HTTP).
In some embodiments, the obtaining of the plurality of mirror containers corresponding to the object program code may be selecting the plurality of mirror containers corresponding to the object program code from a plurality of mirror containers pre-stored in a local cache and/or a mirror warehouse, and each pre-stored mirror container may be dynamically generated when compiling other tasks, so that when the object program code is compiled on the electronic device at this time, repeated compilation is effectively avoided, and thus the construction efficiency of the mirror containers is effectively improved.
Alternatively, a plurality of mirror containers corresponding to a plurality of object program codes may be constructed in any other possible manner, which is not limited to this.
S104: and processing the deployment information related to the corresponding target program codes in the environment provided by the mirror image container to obtain a deployment programming file corresponding to the target program codes.
After a plurality of mirror image containers corresponding to a plurality of object program codes are respectively constructed, the deployment information related to the corresponding object program codes can be processed in the environment provided by the mirror image containers, so that deployment editing files corresponding to the object program codes are obtained.
Some description information related to the deployment task on the object program code line may be referred to as deployment information, and the deployment information may specifically be, for example, deployment resource information, the number of instances, a deployment service port, and the like, which is not limited herein.
The deployment editing file may include complete deployment information required for deploying and operating the object program code, and the deployment editing file may be a script file that can be called and used to perform deployment tasks such as compiling, designing, combining, splitting, configuring and the like on the object program code when processing the object program code to generate the online installation package, and the deployment editing file may specifically include, without limitation, an environment variable, software and hardware configuration information and the like in an online deployment scene.
In some embodiments, the processing unit is configured to process the deployment information related to the corresponding object program code in the environment provided by the image container to obtain the deployment orchestration file corresponding to the object program code, where the determining unit is configured to determine a plurality of deployment information related to the object program code in the environment provided by the image container, package the plurality of deployment information into a file, and use the file as the deployment orchestration file corresponding to the object program code.
In the embodiment of the present disclosure, the plurality of mirror image containers may respectively provide different environments, that is, different mirror image containers may respectively correspond to different environment information.
In some embodiments, the deployment information related to the corresponding object program code is processed in the environment provided by the mirror image container to obtain the deployment layout file corresponding to the object program code, and the deployment layout file may be obtained by correspondingly adjusting a plurality of deployment information related to the object program code according to different environment information of the mirror image container to obtain a plurality of deployment information more suitable for the environment of the mirror image container, and then the deployment information obtained by the adjustment may be packaged into a file, and the file is used as the deployment layout file corresponding to the object program code, which is not limited herein.
S105: and packaging and issuing the corresponding target program codes according to the deployment layout file to obtain the online installation package.
After the deployment layout file corresponding to the target program code is obtained, the target program code can be packaged into the installation package according to the deployment layout file, and the installation package is issued to the online so that a plurality of clients can call the installation package online.
In some embodiments, the packaging and issuing of the corresponding object program code according to the deployment orchestration file may be activating a deployment task on the corresponding deployment platform, and the deployment task may pull the object program code in the code library to the deployment platform according to a pre-configured script, and perform packaging and issuing of the object program code in combination with the deployment orchestration file, so as to obtain the online installation package.
In other embodiments, the target program code may also be sent to the deployment server, and the deployment server performs a package issuing process on the target program code, for example, the packaged and compiled code may be sent to the target server by using a file transfer command (for example, a Secure transfer command (SCP), which is not limited), and then the package issuing test is performed on the deployment server, and if the test is successful, the on-line installation package is issued, which is not limited.
In the embodiment, the plurality of code bases are determined, the plurality of object program codes are obtained through respective analysis in the plurality of code bases, the plurality of mirror image containers corresponding to the plurality of object program codes are respectively constructed, the deployment information related to the corresponding object program codes is processed in the environment provided by the mirror image containers, so that deployment arrangement files corresponding to the object program codes are obtained, and the corresponding object program codes are packaged and issued according to the deployment arrangement files, so that the online installation package is obtained.
Fig. 2 is a schematic diagram according to a first embodiment of the present disclosure.
As shown in fig. 2, the installation package generating method includes:
s201: a plurality of codebases is determined.
The description information of S201 may specifically refer to the foregoing embodiments, and is not described herein again.
S202: and respectively analyzing the code libraries to obtain a plurality of program codes to be compiled.
Among the code libraries, the program code that can be used for compiling to obtain the installation package may be referred to as a program code to be compiled.
For specific explanation of a plurality of codes of a program to be compiled obtained by analyzing from a plurality of code libraries, reference may be made to the above embodiments, and details are not described herein.
S203: and respectively encrypting the plurality of program codes to be compiled to obtain a plurality of encrypted program codes.
After the plurality of to-be-compiled program codes are obtained through analysis from the plurality of code libraries, the encryption processing can be performed on the plurality of to-be-compiled codes respectively, and the encrypted program codes are used as the plurality of encrypted program codes.
The encryption processing refers to a processing mode of reinforcing codes through a corresponding encryption language, and the plurality of program codes to be compiled can be compiled into executable program codes by encrypting the plurality of program codes to be compiled, so that the program codes can be effectively prevented from being leaked in the deployment and operation process of the program codes.
In some embodiments, the plurality of program codes to be compiled are encrypted, and the plurality of program codes to be compiled are encrypted by using an encryption Algorithm (for example, without limitation, a Message Digest Algorithm (MD 5)), so as to obtain a plurality of encrypted program codes, or any other possible method may be used to encrypt the plurality of program codes to be compiled, without limitation.
S204: and respectively marking the encryption states of the plurality of encrypted program codes as encrypted to obtain a plurality of target program codes.
The encryption status may be used to describe an encryption condition of the program code, and the encryption status may specifically be, for example, encrypted, unencrypted, and the like, which is not limited herein.
The encryption processing method and the device have the advantages that after the encryption processing is respectively carried out on the plurality of code programs to be compiled to obtain the plurality of encrypted program codes, the encryption states of the plurality of encrypted program codes can be respectively marked as encrypted, the plurality of encrypted program codes with the encrypted states marked as encrypted serve as target program codes, and the plurality of program codes to be compiled are subjected to encryption processing, so that the occurrence of program code leakage events in the installation package generation process can be prevented, the safety of the program codes in the whole installation package generation process is effectively guaranteed, and the security level of the program codes is effectively improved.
S205: a plurality of mirror containers corresponding to the plurality of object program codes are respectively constructed.
Optionally, in some embodiments, the respectively constructing the plurality of mirror containers corresponding to the plurality of object program codes may be scanning and confirming encryption states of the plurality of object program codes, and when the encryption states of the plurality of object program codes are confirmed to be encrypted, respectively, constructing the plurality of mirror containers corresponding to the plurality of object program codes.
That is, the encryption status marked on the object program code can be confirmed, and when the encryption status marked on the object program code is confirmed to be encrypted, a plurality of mirror containers respectively corresponding to the plurality of object program codes can be constructed.
Optionally, in some embodiments, the constructing the plurality of mirror containers corresponding to the plurality of object program codes may be determining a plurality of pieces of related deployment information corresponding to the plurality of object program codes, determining a plurality of mirrors corresponding to the plurality of pieces of related deployment information, and reconstructing the plurality of mirror containers corresponding to the plurality of mirrors, because the plurality of pieces of related deployment information corresponding to the object program codes are determined, and the plurality of mirrors are constructed by referring to the deployment information, the plurality of mirrors obtained by construction can be more adapted to the plurality of object program codes, accuracy and reliability of mirror container construction are effectively improved, so that when the corresponding object program codes are processed in an environment provided based on the mirror containers, deployment processing logics for different object program codes are not interfered with each other, and parallel execution of the deployment processing logics is facilitated, therefore, the execution efficiency of the installation package generation method can be effectively improved in an auxiliary mode.
The information for deploying the target program code may be referred to as deployment information, and the deployment information may specifically be, for example, a version number, a construction identifier, and the like, which is not limited to this.
Alternatively, in some embodiments, the determining the plurality of pieces of related deployment information corresponding to the plurality of object program codes may be determining a plurality of pieces of version information and a plurality of pieces of on-line deployment information corresponding to the plurality of object program codes, and determining a build identifier, and then using the plurality of pieces of version information and the plurality of pieces of on-line deployment information corresponding to the plurality of object program codes and the build identifier together as the corresponding object program codes, so that the comprehensiveness and the referential property of the deployment information can be effectively improved, and when the deployment orchestration file for processing the object program codes is generated based on the deployment information, the deployment orchestration file can carry effective deployment information, thereby ensuring that the on-line deployment processing logic can be smoothly implemented, the requirement of deployment information in the on-line deployment processing task is met, and the on-line deployment and delivery of the target program code are facilitated.
The target program code may have a plurality of pieces of information related to versions, where the information may be referred to as version information, and the version information may specifically be, for example, a version number, a version identifier, and the like, which is not limited thereto.
The information for performing online deployment on the object program code may be referred to as online deployment information, and the online deployment information may specifically be, for example, a deployment environment, a deployment resource, a service port, the number of instances, and the like, which is not limited herein.
The construction identification is a pipeline identification for analyzing the code base to obtain the corresponding target program code.
That is to say, in the embodiment of the present disclosure, the object program code may be analyzed to respectively determine a plurality of version information, a plurality of online deployment information, and a construction identifier corresponding to the plurality of object program codes, and the determined plurality of version information, the plurality of online deployment information, and the construction identifier are collectively used as deployment information related to the object code program, which is not limited in this regard.
After determining a plurality of pieces of related deployment information respectively corresponding to a plurality of object program codes, the embodiment of the present disclosure may determine a plurality of mirror images respectively corresponding to the plurality of pieces of related deployment information, and then construct a plurality of mirror image containers respectively corresponding to the plurality of mirror images.
In some embodiments, a plurality of images respectively corresponding to a plurality of pieces of related deployment information may be determined by combining an image construction system, for example, the present embodiment may be specifically explained by combining with fig. 3, fig. 3 is a schematic structural diagram of the image construction system according to the embodiment of the present disclosure, as shown in fig. 3, a Dockerfile file may be reasonably arranged based on a design idea of an image hierarchy, that is, a layered image construction system may be designed to determine a plurality of images respectively corresponding to a plurality of pieces of related deployment information, and the image construction system may include: a first layer (Operating System), which may include a Community Enterprise Operating System (centros) and an alliance Operating System, and a second layer (runtime environment dependent layer) which may include: a programming language interpreter (GNU Compiler Collection, GCC), a software Development Kit (Java Development Kit, JDK), a Hypertext Preprocessor (PHP), a proxy server (Engine x, Nginx), a propeller (Paddle), a runtime dependent layer can be used to construct a basic runtime environment of an image, and a third layer (service image) can include a plurality of mirrored service modules (e.g., service module 1, service module 2, … …, service module 6).
Since the mirror container may be understood as an example of a mirror, after determining a plurality of mirrors respectively corresponding to a plurality of pieces of related deployment information, the mirror container may be constructed according to the mirrors, where the mirror container is corresponding to the mirror, and the mirror container is an example of a mirror, so that the persistent integrated processing of the deployment information of the corresponding object program code may be realized in an environment provided by the mirror container in the execution process of the subsequent installation package generation method, which may be specifically referred to in the subsequent embodiments.
S206: and processing the deployment information related to the corresponding target program code in the environment provided by the mirror container to obtain an initial programming file.
The initial arranging file comprises initial chart information, and the 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.
In the execution process of the installation package generating method, the obtained unprocessed layout file may be referred to as an initial layout file, the initial layout file may have corresponding chart information, the information may be referred to as initial chart information (charts), and the initial chart information (charts) may include all resource information required for running a program, a tool, or a service in the virtualized operation and maintenance system.
The virtualized operation and maintenance system may be, for example, a container arrangement engine (kubernets, k8s), which is not limited to this.
The parameters for describing the local operating environment of the virtualized operation and maintenance system may be referred to as environment variables.
In the embodiment of the present disclosure, the deployment information related to the corresponding object program code is processed in the environment provided by the mirror image container, and may be that, in the environment provided by the mirror image container, the deployment information related to the corresponding object program code is packaged into a file, and the file is used as an initial layout file, which is not limited to this.
S207: and injecting the version information and the construction identification into the initial chart information of the initial layout file in an environment variable mode to obtain the deployment layout file.
In the embodiment of the disclosure, after the deployment information related to the corresponding target program code is processed in the environment provided by the mirror image container to obtain the initial layout file, the version information and the construction identifier may be injected into the initial chart information (charts) of the initial layout file in an environment variable manner to obtain the deployment layout file.
That is to say, after the version information and the construction identifier are obtained, the version information and the construction identifier may be injected into initial chart information (charts) of an initial layout file in an environment variable manner and take effect on an environment variable applied to a container of a virtualized operation and maintenance system, so that, if an installation and deployment abnormality occurs in an execution process of a subsequent installation package generation method, tracing back to an original code library according to the version information and the construction identifier may be implemented in the embodiment of the present disclosure, traceability of the installation and deployment abnormality in the whole installation package generation method may be ensured, thereby effectively facilitating troubleshooting and solving of the installation and deployment abnormality in the installation package generation method process, effectively saving troubleshooting time of the installation and deployment abnormality, and effectively assisting in improving the execution efficiency of the installation package generation method.
S208: and packaging and issuing the corresponding target program codes according to the deployment layout file to obtain the online installation package.
For the description of S208, reference may be made to the above embodiments, which are not described herein again.
In this embodiment, as shown in fig. 4, fig. 4 is a flowchart of an installation package generating method according to an embodiment of the present disclosure, where the installation package generating method may include a development and test stage and a version publishing and packaging stage, where a plurality of code libraries (e.g., code library a, code library B, and code library C) may be determined in the development and test stage of an installation package, then the plurality of code libraries may be subjected to security scanning to avoid code holes in program codes in the code libraries, then the plurality of program codes are subjected to security reinforcement (encryption processing) to obtain target program codes, a plurality of mirror image containers corresponding to the target program codes are constructed, and in the plurality of mirror image containers, the development and test stage is completed in a manner of integrating initial chart information (charts) and virtualizing deployment of an operation and maintenance system (container arrangement engines (kuberneters, k8s)), and the version publishing and packaging stage may be performed with mirror image publishing, and issuing through initial chart information (charts) to obtain a deployment layout file, and then packaging and issuing corresponding target program codes according to the deployment layout file to obtain an online installation package.
In the embodiment, the plurality of code libraries are determined, the plurality of program codes to be compiled are obtained through analysis in the plurality of code libraries, the plurality of program codes to be compiled are encrypted to obtain the plurality of encrypted program codes, the encryption states of the plurality of encrypted program codes are marked as encrypted to obtain the plurality of target program codes, and the plurality of program codes to be compiled are encrypted, so that the occurrence of program code leakage events in the installation package generation process can be prevented, the safety of the program codes in the whole installation package generation process is effectively guaranteed, and the safety level of the program codes is effectively improved. Then a plurality of mirror image containers corresponding to a plurality of object program codes are respectively built, deployment information related to corresponding object program codes is processed in the environment provided by the mirror image containers to obtain an initial arrangement file, version information and a building identification are injected into initial chart information of the initial arrangement file in an environment variable mode to obtain the deployment arrangement file, if abnormal installation and deployment occur in the execution process of the subsequent installation package generation method, the tracing back to an original code library according to the version information and the building identification can be realized in the embodiment of the disclosure, the traceability of the abnormal installation and deployment in the whole process of the installation package generation method can be guaranteed, the abnormal installation and deployment in the process of the installation package generation method can be effectively checked and solved, the abnormal installation and deployment inspection time can be effectively saved, and the execution efficiency of the installation package generation method can be effectively improved in an auxiliary manner, and packaging and issuing the corresponding target program codes according to the deployment layout file to obtain the online installation package, so that the generation efficiency of the online installation package can be effectively improved.
Fig. 5 is a schematic diagram according to a third embodiment of the present disclosure.
As shown in fig. 5, the installation package generating method includes:
s501: a plurality of codebases is determined.
S502: and respectively analyzing the target program codes from the code libraries to obtain a plurality of target program codes.
S503: a plurality of mirror containers corresponding to the plurality of object program codes are respectively constructed.
S504: and processing the deployment information related to the corresponding target program codes in the environment provided by the mirror image container to obtain a deployment programming file corresponding to the target program codes.
For the description of S501-S504, reference may be made to the above embodiments, which are not described herein again.
S505: a plurality of deployment component granularities are determined.
The multiple object program codes may be deployed according to corresponding component granularities, where the component granularity may be referred to as a deployment component granularity, and the deployment component granularity may specifically be, for example, a granularity of a module, a granularity of a subsystem, a granularity of a whole system, and the like, which is not limited thereto.
S506: obtaining a plurality of environment variable values respectively corresponding to the plurality of deployment component granularities.
The environment variable value may be a value of an environment variable involved in online deployment and delivery of a module, a subsystem, or a whole system of the corresponding deployment component granularity, which is not limited herein.
After determining the multiple deployment component granularities, the embodiment of the present disclosure may obtain multiple environment variable values corresponding to the multiple deployment component granularities, as shown in fig. 6, fig. 6 is a schematic diagram of the deployment component granularities according to the embodiment of the present disclosure, and after determining the deployment component granularities of modules (e.g., module a, module B, module C, module D), subsystems, full systems, and the like, value files (values.yaml) corresponding to the respective deployment component granularities may be determined, and the value files corresponding to the respective determined deployment component granularities are used as the multiple environment variable values corresponding to the respective multiple deployment component granularities.
As shown in fig. 6, it can be understood that, because the deployment requirement for the full system granularity is higher in the on-line deployment delivery task, and the deployment requirement for the sub-system granularity is second, the deployment requirement for the module granularity is weaker, that is, the client tends to customize the on-line deployment of the whole set of system in the on-line deployment delivery task, in this embodiment, different weights may be set for the various deployment component granularities, and the value files corresponding to the respective deployment component granularities are determined based on the corresponding weights, which is not limited herein.
S507: and respectively carrying out assignment processing on the environment variables in the deployment layout file according to the various environment variable values to obtain a plurality of pieces respectively corresponding to the granularity of the plurality of deployment components.
After the various environment variable values corresponding to the multiple deployment components are obtained, the environment variables in the deployment layout files can be respectively subjected to assignment processing according to the various environment variable values, so that the multiple layout files corresponding to the deployment component granularities are obtained and serve as the target layout file.
For example, the present embodiment may be specifically explained with reference to fig. 7, fig. 7 is a flowchart illustrating an environment variable assignment process in a deployment orchestration file according to an embodiment of the present disclosure, as shown in fig. 7, the flow can be divided into two parts before modification and after modification, before modification, the granularity of the same deployment assembly can correspond to different environment variable values, for example, the environment variable value corresponding to module a is Extensible Markup Language (XML), the environment variable value corresponding to module B is configuration file (Config, Conf), the environment variable value corresponding to module C is C Markup Language (YAML Ain't Markup Language, YAML), after the transformation, the realization can be realized that the sub-modules, the sub-systems and the whole system have a global single environment variable, for example, it may be such that module a, module B, module C may have a global single environment variable: and assigning values according to environment variable values (values.yaml) respectively corresponding to the deployment component granularity by the global single environment variable to obtain a target deployment file corresponding to the sub-module component granularity.
S508: a portion of object program code associated with the deployment component granularity is determined, the portion of object program code to provide the online service provided by the component involved in the corresponding deployment component granularity.
In the embodiment of the present disclosure, after obtaining a plurality of object orchestration files corresponding to a plurality of deployment component granularities, a part of object program codes related to the deployment component granularity may be determined from among the plurality of object program codes, and the part of object program codes may be used to provide an online service provided by a component related to the corresponding deployment component granularity.
The different deployment component granularities may correspond to different object program codes, and the part of the object program codes related to the deployment component granularity is determined, or the part of the object program codes related to the deployment component granularity is determined from the plurality of object program codes by searching in the plurality of object program codes according to the deployment component granularity, which is not limited.
S509: and packaging the part of the object program codes according to the object arrangement file of the part corresponding to the part of the object program codes to obtain a candidate installation package, wherein the candidate installation package is used for generating the online installation package.
The installation package that is not published and online may be referred to as a candidate installation package, and the candidate installation package may be specifically an installation package obtained by performing a packaging process on a part of object program codes according to an object layout file of a part of object program codes corresponding to the part of object program codes, which is not limited to this.
That is, a plurality of object orchestration files corresponding to the deployment components may be determined, and a portion of object program codes corresponding to the deployment component granularity may be determined, then, according to deployment information of a corresponding portion of object program codes in the object orchestration files, a portion of the object program codes may be subjected to a packing process to obtain a candidate installation package, and then, a corresponding process may be performed on the candidate installation package to generate an online installation package, which may be referred to in detail in subsequent embodiments.
In the embodiment of the disclosure, multiple deployment component granularities are determined, multiple environment variable values corresponding to the multiple deployment component granularities are obtained, and then the environment variables in the deployment layout files are subjected to assignment processing according to the multiple environment variable values, so as to obtain multiple target layout files corresponding to the multiple deployment component granularities, so that the target layout files with the multiple deployment component granularities have a global single configuration variable.
S510: and deploying the candidate installation packages to a plurality of corresponding working nodes of the virtualization operation and maintenance system.
In this disclosure, as shown in fig. 8, fig. 8 is a schematic diagram of a deployment process of a virtualized operation and maintenance system according to this disclosure, and a whole deployment process of the virtualized operation and maintenance system may be abstracted into a plurality of working nodes, for example, a machine inspection node, a basic environment configuration node, an installation package uploading node, a virtualized operation and maintenance system environment installation node, a system installation node, and a system test node, as shown in fig. 8, the plurality of working nodes may include a plurality of specific working links.
In the embodiment of the present disclosure, multiple candidate installation packages may be deployed to multiple working nodes corresponding to the virtualized operation and maintenance system shown in fig. 8, and multiple candidate installation packages may also be deployed to specific working links of multiple working nodes corresponding to the virtualized operation and maintenance system shown in fig. 8, which is not limited to this.
In the embodiment of the disclosure, a plurality of candidate installation packages are deployed to a plurality of corresponding working nodes of the virtualized operation and maintenance system, so that existing resource information can be reused in the virtualized operation and maintenance system conveniently, the deployment management efficiency of the installation packages can be effectively improved, and the flexibility of configuration management of the installation package generation method can be effectively improved.
S511: an online deployment request is obtained.
The request for performing online deployment on the candidate installation package may be referred to as an online deployment request.
In the embodiment of the present disclosure, the obtaining of the online deployment request may be that the installation package generating device provides a corresponding deployment request interface in advance, and then obtains the corresponding online deployment request through the deployment request interface, which is not limited to this.
S512: the online deployment request is parsed to obtain a deployment task type and a requirement component granularity.
The deployment tasks can be divided into different deployment task types according to different online deployment requests, and the deployment task types can position corresponding working nodes of the virtualized operation and maintenance system.
The required deployment component granularity may be referred to as required component granularity, and the required component granularity may be used to describe the granularity requirement of the deployment component, such as the granularity requirement of sub-modules, the granularity requirement of subsystems, and the granularity requirement of the whole system, which is not limited thereto.
In some embodiments, the on-line deployment request may be parsed by using a text parsing manner to obtain the deployment task type and the requirement component granularity, or the on-line deployment request may be parsed by using any other possible manner to obtain the deployment task type and the requirement component granularity, which is not limited thereto.
S513: candidate installation packages corresponding to the required component granularity are determined.
According to the method and the device for determining the candidate installation packages, after the request for deploying the line is analyzed and the granularity of the demand components is obtained, the request can be searched in the candidate installation packages according to the granularity of the demand components, so that the candidate installation packages corresponding to the granularity of the demand components are determined from the candidate installation packages.
In the embodiment of the present disclosure, a detailed explanation may be made in conjunction with fig. 9, where fig. 9 is a schematic flow diagram of candidate installation package deployment according to the embodiment of the present disclosure, and as shown in fig. 9, after an online deployment request is obtained, the online deployment request may be analyzed to obtain a deployment task type and a required component granularity (for example, a granularity requirement of a sub-module, a granularity requirement of a sub-system, and a granularity requirement of a whole system), and then a candidate installation package corresponding to the online deployment request is determined according to the required component granularity, and then an online installation package is generated according to the candidate installation package, which may specifically refer to subsequent embodiments.
S514: and determining a target working node corresponding to the deployment task type from the plurality of working nodes.
Among the plurality of working nodes corresponding to the virtualized operation and maintenance system, the working node corresponding to the deployment task type may be referred to as a target working node.
That is to say, after the deployment request on the line is analyzed to obtain the deployment task type, according to the deployment task type, the working node corresponding to the deployment task type may be located from the plurality of working nodes of the virtualized operation and maintenance system, and is used as the target working node.
S515: and identifying the environment variable values in the target arrangement files corresponding to the candidate installation packages by adopting the target working nodes, and processing the candidate installation packages according to the environment variable values to obtain the on-line installation packages.
If the environment variable value is specifically adapted to the online deployment delivery environment, after the target work node is adopted to identify the environment variable value in the target layout file corresponding to the candidate installation package, the candidate installation package can be processed based on the environment variable value, so that the candidate installation package is configured to be suitable for the online deployment delivery environment (the online deployment delivery environment, which may be a hardware configuration environment for online deployment delivery and a software execution environment, without limitation), and the adapted installation package is taken as the online installation package.
According to the method and the device for deploying the installation package on the line, after the target working node corresponding to the deployment task type is determined from the plurality of working nodes corresponding to the virtualized operation and maintenance system, the target working node can be adopted to identify the environment variable value in the target arrangement file corresponding to the candidate installation package, and the candidate installation package is processed according to the environment variable value to obtain the on-line installation package, so that the deployment management efficiency of the installation package can be effectively improved, the generation effect of the installation package can be effectively improved, and the on-line deployment request of the installation package can be effectively met.
In this embodiment, a plurality of code libraries are determined, a plurality of object program codes are obtained by analyzing the code libraries, a plurality of mirror containers corresponding to the object program codes are respectively constructed, deployment information related to the object program codes is processed in an environment provided by the mirror containers, so as to obtain deployment layout files corresponding to the object program codes, a plurality of deployment component granularities are determined, a plurality of environment variable values corresponding to the deployment component granularities are obtained, and then the environment variables in the deployment layout files are assigned according to the environment variable values, so as to obtain a plurality of object layout files corresponding to the deployment component granularities, so that the object layout files with the deployment component granularities have a global single configuration variable, when the object program codes are packaged based on the object layout files, the method can effectively improve the simplicity of setting the configuration items, effectively facilitate the packing, processing and execution of the program codes, effectively eliminate the interference on the packing and processing of the target program codes caused by excessive configuration items, and effectively improve the applicability of the installation package generation method. And then deploying the candidate installation packages to a plurality of corresponding working nodes of the virtualized operation and maintenance system, so that the existing resource information can be conveniently multiplexed in the virtualized operation and maintenance system, the deployment management efficiency of the installation packages can be effectively improved, the configuration management flexibility of the installation package generation method can be effectively improved, then an on-line deployment request is obtained, the on-line deployment request is analyzed to obtain a deployment task type and a requirement component granularity, then the candidate installation packages corresponding to the requirement component granularity are determined, a target working node corresponding to the deployment task type is determined from the working nodes, then the target working node is adopted to identify an environment variable value in a target arrangement file corresponding to the candidate installation packages, and the candidate installation packages are processed according to the environment variable value to obtain the on-line installation packages. The delivery and deployment requirements of various online deployment scenes can be effectively met, one-button flexible deployment is achieved, and therefore the generation efficiency of the online installation package can be effectively improved.
Fig. 10 is a schematic diagram according to a fourth embodiment of the present disclosure.
As shown in fig. 10, the installation package generation apparatus 100 includes:
a determining module 1001 for determining a plurality of codebases;
the analysis module 1002 is configured to analyze a plurality of target program codes from a plurality of code libraries respectively;
a building module 1003, configured to respectively build a plurality of mirror containers corresponding to the plurality of target program codes;
a first processing module 1004, configured to process deployment information related to a corresponding target program code in an environment provided by the image container, so as to obtain a deployment orchestration file corresponding to the target program code; and
the second processing module 1005 is configured to perform a package and issue processing on the corresponding object program code according to the deployment layout file, so as to obtain an online installation package.
In some embodiments of the present disclosure, as shown in fig. 11, fig. 11 is a schematic diagram according to a fifth embodiment of the present disclosure, and the installation package generating apparatus 110 includes: the processing method includes a determining module 1101, an analyzing module 1102, a constructing module 1103, a first processing module 1104, and a second processing module 1105, where the analyzing module 1102 is specifically configured to:
respectively analyzing the code libraries to obtain a plurality of program codes to be compiled;
respectively encrypting a plurality of program codes to be compiled to obtain a plurality of encrypted program codes; and
respectively marking the encryption states of the plurality of encrypted program codes as encrypted to obtain a plurality of target program codes;
the building module 1103 is specifically configured to:
respectively scanning and confirming the encryption states of the target program codes;
when the encryption states of the object program codes are confirmed to be encrypted, a plurality of mirror containers corresponding to the object program codes are constructed.
In some embodiments of the present disclosure, among others, the constructing module 1103 includes:
a first determining sub-module 11031 configured to determine a plurality of pieces of relevant deployment information respectively corresponding to the plurality of target program codes;
a second determining sub-module 11032 configured to determine a plurality of mirror images corresponding to the plurality of pieces of relevant deployment information, respectively;
a building sub-module 11033 for building a plurality of mirror image containers corresponding to the plurality of mirror images, respectively.
In some embodiments of the present disclosure, the first determining sub-module 11031 is specifically configured to:
determining a plurality of version information and a plurality of on-line deployment information respectively corresponding to a plurality of target program codes;
determining a construction identifier, wherein the construction identifier is a pipeline identifier for analyzing a code base to obtain a corresponding target program code;
and taking the version information, the construction identifier and the on-line deployment information as the deployment information related to the corresponding target program code.
In some embodiments of the present disclosure, the first processing module 1104 is specifically configured to:
processing deployment information related to corresponding target program codes in an environment provided by a mirror image container to obtain an initial deployment file, wherein the initial deployment file comprises initial chart information, and a virtualization operation and maintenance system in an online deployment environment indicated by the online deployment information can configure local environment variables based on the initial chart information;
and injecting the version information and the construction identification into the initial chart information of the initial layout file in an environment variable mode to obtain the deployment layout file.
In some embodiments of the present disclosure, the second processing module 1105 is specifically configured to:
determining a plurality of deployment component granularities;
acquiring various environment variable values respectively corresponding to the granularity of the deployment components;
respectively carrying out assignment processing on the environment variables in the deployment layout files according to the various environment variable values to obtain a plurality of target layout files respectively corresponding to the granularity of the plurality of deployment components;
determining a part of object program code related to the deployment component granularity, wherein the part of object program code is used for providing online services provided by the components related to the corresponding deployment component granularity; and
and packaging the part of the object program codes according to the object arrangement file of the part corresponding to the part of the object program codes to obtain a candidate installation package, wherein the candidate installation package is used for generating the online installation package.
In some embodiments of the disclosure, the second processing module 1105 is further configured to:
and deploying the candidate installation packages to a plurality of corresponding working nodes of the virtualization operation and maintenance system.
In some embodiments of the disclosure, the second processing module 1105 is further configured to:
after a plurality of candidate installation packages are deployed to a plurality of corresponding working nodes of the virtualized operation and maintenance system, acquiring an online deployment request;
analyzing the online deployment request to obtain a deployment task type and a requirement component granularity;
determining a candidate installation package corresponding to the demand component granularity;
determining a target working node corresponding to the deployment task type from the plurality of working nodes;
and identifying the environment variable values in the target arrangement files corresponding to the candidate installation packages by adopting the target working nodes, and processing the candidate installation packages according to the environment variable values to obtain the on-line installation packages.
It is understood that the installation package generating device 110 in fig. 11 of this embodiment and the installation package generating device 100 in the foregoing embodiment, the determining module 1101 and the determining module 1001 in the foregoing embodiment, the parsing module 1102 and the parsing module 1002 in the foregoing embodiment, the constructing module 1103 and the constructing module 1003 in the foregoing embodiment, the first processing module 1104 and the first processing module 1004 in the foregoing embodiment, and the second processing module 1105 and the second processing module 1005 in the foregoing embodiment may have the same functions and structures.
It should be noted that the foregoing explanation of the installation package generation method is also applicable to the installation package generation apparatus of the present embodiment, and is not repeated herein.
In the embodiment, the plurality of code bases are determined, the plurality of object program codes are obtained through respective analysis in the plurality of code bases, the plurality of mirror image containers corresponding to the plurality of object program codes are respectively constructed, the deployment information related to the corresponding object program codes is processed in the environment provided by the mirror image containers, so that deployment arrangement files corresponding to the object program codes are obtained, and the corresponding object program codes are packaged and issued according to the deployment arrangement files, so that the online installation package is obtained.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 12 shows a schematic block diagram of an example electronic device for implementing the installation package generation method of an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may 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 meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 12, the apparatus 1200 includes a computing unit 1201 which can perform various appropriate actions and processes in accordance with 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 may also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other by a bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
Various components in the device 1200 are connected to the I/O interface 1205 including: an input unit 1206 such as a keyboard, a mouse, or the like; an output unit 1207 such as various types of displays, speakers, and the like; a storage unit 1208, such as a magnetic disk, optical disk, or the like; and a communication unit 1209 such as a network card, modem, wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 1201 may be a variety of general purpose and/or special purpose processing components having 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 specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 1201 executes the respective 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 tangibly embodied on a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program may be loaded and/or installed onto 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 perform the installation package generation method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods 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, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, 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 may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (19)

1. An installation package generation method, comprising:
determining a plurality of codebases;
respectively analyzing the plurality of code libraries to obtain a plurality of target program codes;
respectively constructing a plurality of mirror image containers corresponding to the plurality of target program codes;
processing deployment information related to the corresponding target program code in an environment provided by the mirror image container to obtain a deployment editing file corresponding to the target program code; and
and packaging and issuing the corresponding target program codes according to the deployment layout file to obtain an online installation package.
2. The method of claim 1, wherein said parsing a plurality of object program codes from the plurality of code libraries, respectively, comprises:
respectively analyzing the code libraries to obtain a plurality of program codes to be compiled;
respectively encrypting the plurality of program codes to be compiled to obtain a plurality of encrypted program codes; and
respectively marking the encryption states of the plurality of encrypted program codes as encrypted to obtain a plurality of target program codes;
wherein the respectively constructing a plurality of mirror containers corresponding to the plurality of object program codes comprises:
respectively scanning and confirming the encryption states of the target program codes;
and when the encryption states of the object program codes are confirmed to be encrypted respectively, constructing a plurality of mirror image containers corresponding to the object program codes respectively.
3. The method of claim 1, wherein the building a plurality of mirrored containers corresponding to the plurality of object program codes, respectively, comprises:
determining a plurality of relevant deployment information respectively corresponding to the target program codes;
determining a plurality of mirror images respectively corresponding to the plurality of related deployment information;
and constructing a plurality of mirror image containers respectively corresponding to the plurality of mirror images.
4. The method of claim 3, wherein the determining a plurality of relevant deployment information corresponding to the respective plurality of object program codes comprises:
determining a plurality of version information and a plurality of on-line deployment information respectively corresponding to the plurality of target program codes;
determining a construction identifier, wherein the construction identifier is a pipeline identifier for analyzing the code base to obtain the corresponding target program code;
and taking the version information, the construction identifier and the on-line deployment information together as deployment information related to the corresponding target program code.
5. The method of claim 4, wherein the processing deployment information associated with the corresponding object program code in the environment provided by the mirror container to obtain a deployment orchestration file corresponding to the object program code comprises:
processing deployment information related to the corresponding target program code in an environment provided by the mirror image container to obtain an initial deployment file, wherein the initial deployment file comprises initial chart information, and a virtualized operation and maintenance system in an online deployment environment indicated by the online deployment information can configure local environment variables based on the initial chart information;
and injecting the version information and the construction identification into initial chart information of the initial layout file in an environment variable mode to obtain the deployment layout file.
6. The method of claim 5, wherein the packaging and publishing the corresponding object program code according to the deployment orchestration file to obtain an online installation package comprises:
determining a plurality of deployment component granularities;
obtaining a plurality of environment variable values respectively corresponding to the deployment component granularities;
assigning values to the environment variables in the deployment layout file according to the plurality of environment variable values to obtain a plurality of target layout files respectively corresponding to the plurality of deployment component granularities;
determining a portion of object program code associated with the deployment component granularity, the portion of object program code for providing the online service provided by the component involved in the corresponding deployment component granularity; and
and packaging the part of the object program codes according to the object arrangement file of the part corresponding to the part of the object program codes to obtain a candidate installation package, wherein the candidate installation package is used for generating the online installation package.
7. The method of claim 6, wherein the packaging and publishing the corresponding object program code according to the deployment orchestration file to obtain an online installation package further comprises:
and deploying the candidate installation packages to a plurality of corresponding working nodes of the virtualization operation and maintenance system.
8. The method of claim 7, after the deploying the plurality of candidate installation packages into the corresponding plurality of working nodes of the virtualized operation and maintenance system, further comprising:
acquiring an online deployment request;
analyzing the online deployment request to obtain a deployment task type and a requirement component granularity;
determining a candidate installation package corresponding to the demand component granularity;
determining a target working node corresponding to the deployment task type from the plurality of working nodes;
and identifying the environment variable values in the target arrangement files corresponding to the candidate installation packages by adopting the target working nodes, and processing the candidate installation packages according to the environment variable values to obtain the on-line installation packages.
9. An installation package generation apparatus comprising:
a determining module for determining a plurality of codebases;
the analysis module is used for respectively analyzing the plurality of code libraries to obtain a plurality of target program codes;
the construction module is used for respectively constructing a plurality of mirror image containers corresponding to the target program codes;
the first processing module is used for processing the deployment information related to the corresponding target program code in the environment provided by the mirror image container so as to obtain a deployment editing file corresponding to the target program code; and
and the second processing module is used for packaging and issuing the corresponding target program codes according to the deployment layout file so as to obtain an online installation package.
10. The apparatus according to claim 9, wherein the parsing module is specifically configured to:
respectively analyzing the code libraries to obtain a plurality of program codes to be compiled;
respectively encrypting the plurality of program codes to be compiled to obtain a plurality of encrypted program codes; and
respectively marking the encryption states of the plurality of encrypted program codes as encrypted to obtain a plurality of target program codes;
wherein the building block is specifically configured to:
respectively scanning and confirming the encryption states of the target program codes;
and when the encryption states of the object program codes are confirmed to be encrypted respectively, constructing a plurality of mirror image containers corresponding to the object program codes respectively.
11. The apparatus of claim 9, wherein the building block comprises:
a first determining submodule configured to determine a plurality of pieces of relevant deployment information respectively corresponding to the plurality of target program codes;
a second determining submodule, configured to determine a plurality of mirror images corresponding to the plurality of pieces of relevant deployment information, respectively;
and the construction submodule is used for constructing a plurality of mirror image containers respectively corresponding to the plurality of mirror images.
12. The apparatus according to claim 11, wherein the first determining submodule is specifically configured to:
determining a plurality of version information and a plurality of on-line deployment information respectively corresponding to the plurality of target program codes;
determining a construction identifier, wherein the construction identifier is a pipeline identifier for analyzing the code base to obtain the corresponding target program code;
and taking the version information, the construction identifier and the on-line deployment information together as deployment information related to the corresponding target program code.
13. The apparatus according to claim 12, wherein the first processing module is specifically configured to:
processing deployment information related to the corresponding target program code in an environment provided by the mirror image container to obtain an initial deployment file, wherein the initial deployment file comprises initial chart information, and a virtualized operation and maintenance system in an online deployment environment indicated by the online deployment information can configure local environment variables based on the initial chart information;
and injecting the version information and the construction identification into initial chart information of the initial layout file in an environment variable mode to obtain the deployment layout file.
14. The apparatus according to claim 13, wherein the second processing module is specifically configured to:
determining a plurality of deployment component granularities;
obtaining a plurality of environment variable values respectively corresponding to the deployment component granularities;
assigning values to the environment variables in the deployment layout file according to the plurality of environment variable values to obtain a plurality of target layout files respectively corresponding to the plurality of deployment component granularities;
determining a portion of object program code associated with the deployment component granularity, the portion of object program code for providing the online service provided by the component involved in the corresponding deployment component granularity; and
and packaging the part of the object program codes according to the object arrangement file of the part corresponding to the part of the object program codes to obtain a candidate installation package, wherein the candidate installation package is used for generating the online installation package.
15. The apparatus of claim 14, wherein the second processing module is further configured to:
and deploying the candidate installation packages to a plurality of corresponding working nodes of the virtualization operation and maintenance system.
16. The apparatus of claim 15, the second processing module further to:
after the candidate installation packages are deployed to a plurality of corresponding working nodes of the virtualization operation and maintenance system, acquiring an online deployment request;
analyzing the online deployment request to obtain a deployment task type and a requirement component granularity;
determining a candidate installation package corresponding to the demand component granularity;
determining a target working node corresponding to the deployment task type from the plurality of working nodes;
and identifying the environment variable values in the target arrangement files corresponding to the candidate installation packages by adopting the target working nodes, and processing the candidate installation packages according to the environment variable values to obtain the on-line installation packages.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-8.
CN202111401675.3A 2021-11-19 2021-11-19 Installation package generation method and device, electronic equipment and storage medium Pending CN114237686A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111401675.3A CN114237686A (en) 2021-11-19 2021-11-19 Installation package generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111401675.3A CN114237686A (en) 2021-11-19 2021-11-19 Installation package generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114237686A true CN114237686A (en) 2022-03-25

Family

ID=80750788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111401675.3A Pending CN114237686A (en) 2021-11-19 2021-11-19 Installation package generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114237686A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116431277A (en) * 2023-03-13 2023-07-14 浙江海规技术有限公司 Multi-place operation and maintenance containerization method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116431277A (en) * 2023-03-13 2023-07-14 浙江海规技术有限公司 Multi-place operation and maintenance containerization method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10956130B2 (en) Method and system for implementing a cloud infrastructure visualizer and generator
US20180324051A1 (en) User interface for automated flows within a cloud based developmental platform
US8434070B2 (en) Generating specifications of client-server applications for static analysis
US20110209140A1 (en) Automated deployment and servicing of distributed applications
US10101972B1 (en) Data modelling and flow engine for building automated flows within a cloud based developmental platform
US10423408B2 (en) Identifying and isolating library code in software applications
US10303444B2 (en) Composable application session parameters
CA3017085C (en) Data modelling and flow engine for building automated flows within a cloud based developmental platform
CN112328301B (en) Method and device for maintaining consistency of operating environments, storage medium and electronic equipment
Zhu et al. If docker is the answer, what is the question?
CN115292026A (en) Management method, device and equipment of container cluster and computer readable storage medium
US20200057708A1 (en) Tracking Missing Data Using Provenance Traces and Data Simulation
CN113010342A (en) Operation and maintenance diagnosis method, device, equipment and storage medium
CN117149459A (en) Micro front-end system, construction method and device of micro front-end system and electronic equipment
US9513948B2 (en) Automated virtual machine provisioning based on defect state
CN115509522A (en) Interface arranging method and system for low-code scene and electronic equipment
Alipour et al. Model driven deployment of auto-scaling services on multiple clouds
JP2023038909A (en) Computer implemented method, computer program product, and system (constraints-based refactoring of monolith applications through attributed graph embeddings)
CN113448678A (en) Application information generation method, deployment method, device, system and storage medium
Brogi et al. A Petri net-based approach to model and analyze the management of cloud applications
CN114237686A (en) Installation package generation method and device, electronic equipment and storage medium
JP2023548500A (en) workflow patching
KR20150133902A (en) System and method for developing of service based on software product line
US20210011947A1 (en) Graphical rendering of automata status
Cai et al. Analysis for cloud testing of web application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination