CN115878128A - Deployment method and device of application program - Google Patents

Deployment method and device of application program Download PDF

Info

Publication number
CN115878128A
CN115878128A CN202211569895.1A CN202211569895A CN115878128A CN 115878128 A CN115878128 A CN 115878128A CN 202211569895 A CN202211569895 A CN 202211569895A CN 115878128 A CN115878128 A CN 115878128A
Authority
CN
China
Prior art keywords
program
file
code
target
processed
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
CN202211569895.1A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211569895.1A priority Critical patent/CN115878128A/en
Publication of CN115878128A publication Critical patent/CN115878128A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a deployment method and device of an application program, and relates to the technical field of computers. The method can respond to received code processing request information, and pull a program file to be processed from a preset first database according to code matching information included in the code processing request information; processing the program file to be processed to obtain a program image file; the program image file comprises an executable engineering file corresponding to the program file to be processed; uploading the program image file to a preset image warehouse; and sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction. The method can realize more efficient iterative updating of the application program, and effectively improve the efficiency of the deployment process of the application program.

Description

Deployment method and device of application program
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a deployment method and device of an application program.
Background
At present, in the development, operation and maintenance of a financial service system, deployment of an application program to a distributed cluster is often involved, for example, deployment of the application program to a K8s cluster.
In the current development operation and maintenance environment, the application program is usually deployed manually, so that the application program runs in a container form in a distributed cluster. In the program deployment process, operation and maintenance personnel are required to participate in the whole process, manual misoperation is easy to occur, a large amount of time, manpower and material resources are consumed when problems are solved for deployment, and the software iteration efficiency is low. In the related art, the deployment of the application program to the distributed cluster mainly depends on manual deployment, and the deployment efficiency of the application program is low.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present application provide a deployment method and an apparatus for an application program, which implement automatic deployment of the application program and improve efficiency of a deployment process of the application program.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a method for deploying an application program, where the method includes:
responding to the received code processing request information, and pulling a program file to be processed from a preset first database according to code matching information included in the code processing request information;
processing the program file to be processed to obtain a program image file; the program image file comprises an executable project file corresponding to the program file to be processed;
uploading the program image file to a preset image warehouse;
and sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction.
According to the deployment method of the application program, the received code processing request information can be responded, and the program file to be processed is pulled from the preset first database according to the code matching information included in the code processing request information; processing the program file to be processed to obtain a program image file; the program image file comprises an executable engineering file corresponding to the program file to be processed; uploading the program image file to a preset image warehouse; and sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction. The method provides an automatic application program deployment mechanism, reduces manual misoperation, simplifies the deployment process of the application program, can realize more efficient iterative update of the application program, and effectively improves the efficiency of the deployment process of the application program.
In an alternative embodiment, the code matching information includes a code identity; the pulling the program file to be processed from the first database according to the code matching information included in the code processing request information includes:
acquiring the code identity included in the code matching information;
and retrieving the first database based on the code identity, and searching and pulling the program file to be processed corresponding to the code identity.
According to the method of the embodiment, the to-be-processed program file is automatically and efficiently pulled according to the code identity included in the code matching information, so that human misoperation is further reduced, the deployment process of the application program is simplified, more efficient iterative updating of the application program can be realized, and the efficiency of the deployment process of the application program is effectively improved.
In an alternative embodiment, the first database stores the files of the program to be processed submitted by the user; the code matching information also comprises identity verification information of the user; before the obtaining of the code identity included in the code matching information, the method further includes:
sending the acquired authentication information to the first database so that the first database returns a check result of the authentication information;
the obtaining of the code identity included in the code matching information includes:
and if the checking result is that the code identity included in the code matching information passes, acquiring the code identity included in the code matching information.
In the method of the above embodiment, the code matching information further includes the identity authentication information of the user, and the identity of the person who performs the application program deployment operation can be authenticated, so that the security of the deployment of the application program is improved.
In an optional embodiment, the processing the to-be-processed program file to obtain a program image file includes:
compiling the program file to be processed through a target compiling tool to obtain an executable engineering file corresponding to the program file to be processed;
and carrying out mirror image processing on the obtained executable engineering file to obtain a program mirror image file.
According to the method of the embodiment, the program file to be processed is compiled through a target compiling tool, and an executable engineering file corresponding to the program file to be processed is obtained; the obtained executable engineering file is subjected to image processing to obtain a program image file, the program file to be processed can be automatically compiled and subjected to image processing, convenience can be further provided for iterative updating of the application program, and the efficiency of the deployment process of the application program is improved.
In an alternative embodiment, the code processing request information further includes code type information; the compiling the program file to be processed through the target compiling tool comprises the following steps:
determining a target compiling tool corresponding to the code type information according to a first mapping relation between a preset code type and the compiling tool;
and sending a target compiling instruction to the target compiling tool so that the target compiling tool compiles the program file to be processed based on the target compiling instruction.
According to the method, the compiling processing can be automatically carried out through the target compiling tool according to the code type, convenience can be further provided for iterative updating of the application program, and the efficiency of the deployment process of the application program is improved.
In an optional embodiment, the performing an image processing on the obtained executable engineering file to obtain a program image file includes:
determining a target basic mirror image corresponding to the code type information according to a second mapping relation between a preset code type and the basic mirror image;
and carrying out mirror image processing on the obtained executable engineering file based on the target basic mirror image to obtain a program mirror image file.
According to the method, the user automatically selects the target basic image according to the code type and generates the program image file, the deployment convenience of the application program is further improved, convenience is provided for iterative updating of the application program, and the deployment efficiency of the application program can be improved.
In a second aspect, an embodiment of the present application further provides an apparatus for deploying an application, where the apparatus includes:
the target file determining unit is used for responding to the received code processing request information, and pulling a program file to be processed from a preset first database according to code matching information included in the code processing request information;
the file processing unit is used for processing the program file to be processed to obtain a program mirror image file; the program image file comprises an executable engineering file corresponding to the program file to be processed;
the file transfer unit is used for uploading the program image file to a preset image warehouse;
and the deployment control unit is used for sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction.
In an alternative embodiment, the code matching information includes a code identity; the target file determining unit is specifically configured to:
acquiring the code identity included in the code matching information;
and retrieving the first database based on the code identity, and searching and pulling the program file to be processed corresponding to the code identity.
In an optional embodiment, the first database stores the program files to be processed submitted by the user; the code matching information also comprises identity verification information of the user; the target file determining unit is further configured to:
sending the acquired authentication information to the first database so that the first database returns a check result of the authentication information;
the target file determining unit is specifically configured to:
and if the checking result is that the code identity included in the code matching information passes, acquiring the code identity included in the code matching information.
In an optional embodiment, the file processing unit is specifically configured to:
compiling the program file to be processed through a target compiling tool to obtain an executable engineering file corresponding to the program file to be processed;
and carrying out mirror image processing on the obtained executable engineering file to obtain a program mirror image file.
In an alternative embodiment, the code processing request information further includes code type information; the file processing unit is specifically configured to:
determining a target compiling tool corresponding to the code type information according to a first mapping relation between a preset code type and the compiling tool;
and sending a target compiling instruction to the target compiling tool so that the target compiling tool compiles the program file to be processed based on the target compiling instruction.
In an optional embodiment, the file processing unit is specifically configured to:
determining a target basic mirror image corresponding to the code type information according to a second mapping relation between a preset code type and the basic mirror image;
and carrying out mirror image processing on the obtained executable engineering file based on the target basic mirror image to obtain a program mirror image file.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the deployment method of the application program in the first aspect is implemented.
In a fourth aspect, the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the processor is enabled to implement the deployment method of the application program of the first aspect.
In a fifth aspect, an embodiment of the present application is a computer program product, which includes computer instructions stored in a computer-readable storage medium; when the processor of the computer device reads the computer instructions from the computer readable storage medium, the processor executes the computer instructions, so that the computer device executes the steps of any one of the above deployment methods of the application program.
The technical effect brought by any one implementation manner in the second to fifth aspects can be referred to the technical effect brought by the implementation manner in the first aspect, and is not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a deployment method of an application according to an embodiment of the present application;
fig. 2 is one of schematic flow diagrams illustrating pulling a to-be-processed program file in a deployment method of an application according to an embodiment of the present application;
fig. 3 is a second schematic flowchart illustrating a process of pulling a pending program file according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a process of generating a program image file according to a deployment method of an application program according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a compiling process procedure of a deployment method of an application according to an embodiment of the present application;
fig. 6 is a schematic diagram of a process of processing a mirror image generated by a deployment method of an application according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an application deployment apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
Some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
(1) Git (distributed version control system): git is an open-source distributed version control system, and can effectively process version management of development projects at high speed. In Git, a repository is similar to a data structure, and is used to store metadata for a set of files and directories. It contains a collection of files, and a history of modifications to those files. The repository in Git corresponds to the project folder. The warehouse has all data related to the items. Different projects have different warehouses. In the embodiment of the present application, the warehouse in Git is referred to as Git warehouse.
(2) Jenkins: jenkins is an open source software project, is a continuous integration tool developed based on Java, is used for monitoring continuous and repeated work, and aims to provide an open and easy-to-use software platform so that the software project can be continuously integrated.
(3) K8S (kubernets) cluster: the K8S cluster is an open-source container cluster management system for automatically deploying, expanding, and managing containerized (containerized) applications, e.g., containerized applications on multiple nodes in a cloud platform may be managed.
(4) Docker warehouse: the Docker warehouse is used to contain the locations of the images, and the Docker provides a registry server (Register) to hold a plurality of warehouses, each of which may contain a plurality of images with different tags. In the embodiment of the application, the program image file can be stored through a Docker warehouse.
In order to improve efficiency of a deployment process of an application program, embodiments of the present application provide a deployment method and an apparatus of an application program. In order to better understand the technical solution provided by the embodiments of the present application, the basic principle of the solution is briefly described here.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The technical scheme provided by the embodiment of the application is described below with reference to the accompanying drawings.
At present, in the development, operation and maintenance of a financial service system, deployment of an application program to a distributed cluster is often involved, for example, deployment of the application program to a K8s cluster.
In the current development operation and maintenance environment, the application program is usually deployed manually, so that the application program runs in a container form in a distributed cluster. In the program deployment process, operation and maintenance personnel are required to participate in the whole process, manual misoperation is easy to occur, a large amount of time, manpower and material resources are consumed when problems are solved for deployment, and the software iteration efficiency is low. In the related art, the deployment of the application program to the distributed cluster mainly depends on manual deployment, and the deployment efficiency of the application program is low.
In view of this, an embodiment of the present application provides an application deployment method and an application deployment device, where the application deployment method may respond to received code processing request information, and pull a to-be-processed program file from a preset first database according to code matching information included in the code processing request information; processing a program file to be processed to obtain a program mirror image file; the program image file comprises an executable engineering file corresponding to the program file to be processed; uploading the program image file to a preset image warehouse; and sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction. The method provides an automatic application program deployment mechanism, reduces manual misoperation, simplifies the deployment process of the application program, can realize more efficient iterative update of the application program, and effectively improves the efficiency of the deployment process of the application program.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it should be understood that the preferred embodiments described herein are merely for illustrating and explaining the present application, and are not intended to limit the present application, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The following further explains the deployment method of the application provided in the embodiment of the present application. The deployment method of the application program, as shown in fig. 1, includes the following steps:
s101, responding to the received code processing request information, and pulling the program file to be processed from a preset first database according to code matching information included in the code processing request information.
In particular implementations, the first database may be a Git repository. The developer can upload newly developed program code to the Git repository. The method provided by the embodiment of the application can be applied to electronic equipment. In some embodiments, a Jenkins client may be running on the electronic device.
The electronic device executing the method provided by the embodiment of the application can be a terminal device or a server. In the following, the deployment method of the application program in the embodiment of the present application is applied to a server as an example for description. And the server responds to the received code processing request information and pulls the program file to be processed from a preset Git warehouse according to the code matching information included in the code processing request information.
Illustratively, in response to the received Code processing Request information Request _1, the Program _01 of the Program file to be processed is pulled from the preset first database Git01 according to the Code matching information Code _ match _ Info included in the Code processing Request information Request _ 1.
In an alternative embodiment, the code matching information includes a code identity; step S101, pulling the program file to be processed from the first database according to the code matching information included in the code processing request information, as shown in fig. 2, which may be implemented by the following steps:
s201, acquiring the code identity included in the code matching information.
Illustratively, assume the server is the server Host; the Code matching information Code _ match _ Info includes a Code identification Code _ ID, and the server Host may first obtain the Code identification Code _ ID included in the Code matching information Code _ match _ Info.
S202, retrieving the first database based on the code identity, and searching and pulling the program file to be processed corresponding to the code identity.
Illustratively, the server Host retrieves the first database Git01 based on the Code ID Code _ ID, and searches and pulls the Program file Program _01 to be processed corresponding to the Code ID Code _ ID.
In some embodiments of the application, the first database stores a to-be-processed program file submitted by a user; the code matching information also comprises the identity verification information of the user; before the code identity identifier included in the code matching information is acquired, the acquired identity verification information is sent to a first database, so that the first database returns a check result of the identity verification information; and if the checking result is that the code passes, acquiring the code identity included in the code matching information.
In an alternative embodiment, the first database stores the files of the program to be processed submitted by the user; the code matching information also comprises identity authentication information of the user; step S101, a process of pulling the program file to be processed from the first database according to the code matching information included in the code processing request information, as shown in fig. 3, may be implemented by the following steps:
s301, the acquired authentication information is sent to the first database, so that the first database returns a check result of the authentication information.
In an alternative embodiment, the authentication information includes username information and password information corresponding to the username information.
Illustratively, a first database Git01 stores a Program file Program _01 to be processed submitted by a User 01; the Code matching information Code _ match _ Info includes, in addition to the Code identification Code _ ID, the Identity authentication information Identity _ Inf of the User 01; in the process of pulling the program file to be processed from the first database according to the code matching information included in the code processing request information, the server first sends the acquired Identity authentication information Identity _ Inf to the first database Git01, so that the first database Git01 returns a Check _ result of the Identity authentication information Identity _ Inf.
And S302, if the check result is passed, acquiring a code identity included in the code matching information.
Optionally, the verification result may be that the user name information and the password information are matched by means of characterization.
Illustratively, if the Check _ result is pass, the Code identification Code _ ID included in the Code _ match _ Info of the Code matching information is obtained.
S303, based on the code identity, searching the first database, and searching and pulling the program file to be processed corresponding to the code identity.
In an alternative embodiment, step S101 is executed, and when the to-be-processed program file is pulled from the preset first database, the to-be-processed program file may also be cached in the preset first storage location. Wherein the first storage location may be a predetermined cache server.
And S102, processing the program file to be processed to obtain a program image file.
The program image file comprises an executable project file corresponding to the program file to be processed.
In particular implementations, the executable engineering files include, but are not limited to: an executable file with a suffix name of class, and an executable file with a suffix name of inf.
Illustratively, the server Host processes the Program file Program _01 to be processed, and obtains a Program image file Program _ mirr _01. The Program image file Program _ mirr _01 comprises an executable project file Program _ run _01 corresponding to the Program file Program _01 to be processed.
In an alternative embodiment, in step S102, the process of processing the program file to be processed to obtain the program image file, as shown in fig. 4, may be implemented by the following steps:
s401, compiling the program file to be processed through the target compiling tool to obtain an executable engineering file corresponding to the program file to be processed.
Exemplarily, the Program file Program _01 to be processed is compiled through the target compiling tool maven _01, so as to obtain the executable project file Program _ run _01 corresponding to the Program file Program _01 to be processed.
In an alternative embodiment, the code processing request information further includes code type information; in step S401, the process of performing compilation processing on the to-be-processed program file by using the target compilation tool, as shown in fig. 5, may be implemented by the following steps:
s501, determining a target compiling tool corresponding to the code type information according to a first mapping relation between a preset code type and the compiling tool.
Illustratively, the preset code types and compiling tools are shown in table 1.
TABLE 1
Code type Compiling tool
Type1 maven_01
Type2 maven_02
Taking table 1 as an example for explanation, the Code processing Request information Request _1 further includes Code Type information Code _ Type _ Info, which is assumed to have a specific value of "Type1"; when compiling the Program file Program _01 to be processed by the target compiling tool maven _01, the server Host determines the target compiling tool corresponding to the Code type information Code _ type _ Info according to the preset first mapping relationship between the Code type and the compiling tool shown in table 1. Since the specific value of the Code Type information Code _ Type _ Info included in the Code processing Request information Request _1 is "Type1", according to table 1, the compiling tool identified as maven _01 corresponding to the Code Type information "Type1" can be determined, and the target compiling tool maven _01 is obtained.
S502, sending a target compiling instruction to the target compiling tool so that the target compiling tool compiles the program file to be processed based on the target compiling instruction.
Illustratively, the server Host sends a target compiling instruction Tar _ Comp _ Instr to the target compiling tool maven _01, so that the target compiling tool maven _01 compiles the Program file Program _01 to be processed based on the target compiling instruction Tar _ Comp _ Instr.
S402, carrying out mirror image processing on the obtained executable project file to obtain a program mirror image file.
Illustratively, the obtained executable project file Program _ run _01 is subjected to mirroring, and a Program mirror file Program _ mirr _01 is obtained.
In an alternative embodiment, in step S402, the process of mirroring the obtained executable project file to obtain the program image file may be implemented by the following steps, as shown in fig. 6:
s601, determining a target basic mirror image corresponding to the code type information according to a second mapping relation between a preset code type and the basic mirror image.
In specific implementation, in the embodiment of the application, different basic images can be preset according to different code types, so that the running efficiency of the deployed program image file is improved.
For example, the second mapping relationship between the preset code type and the base image may be as shown in table 2.
TABLE 2
Code type Basic mirror image
Type1 Mirror_mode_01
Type2 Mirror_mode_02
Taking table 1 as an example for explanation, the Code processing Request information Request _1 further includes Code Type information Code _ Type _ Info, and it is assumed that a specific value thereof is "Type1"; when the server Host performs image processing on the obtained executable engineering file to obtain a program image file, a target basic image corresponding to the Code type information Code _ type _ Info is determined according to a second mapping relation between the preset Code type and the basic image shown in table 2. Since the specific value of the Code Type information Code _ Type _ Info included in the Code processing Request information Request _1 is "Type1", according to table 2, the base image identified as mirrormodmod _01 corresponding to the Code Type information "Type1" can be determined, and the target base image mirrormodode _01 is obtained.
S602, carrying out mirror image processing on the obtained executable engineering file based on the target basic mirror image to obtain a program mirror image file.
Illustratively, the obtained executable project file Program _ run _01 is subjected to mirroring based on the target base Mirror image Mirror _ mode _01, so as to obtain a Program Mirror image file Program _ mirr _01. The Program image file Program _ mirr _01 comprises an executable project file Program _ run _01 corresponding to the Program file Program _01 to be processed.
In an optional embodiment, the step S102 is executed to process the program file to be processed to obtain the program image file, which may specifically be to process the program file to be processed in the first storage location to obtain the program image file.
In an optional embodiment, when the program image file is obtained by processing the program file to be processed in the first storage location, the program file to be processed may also be cleared from the first storage location.
And S103, uploading the program image file to a preset image warehouse.
In some embodiments of the present application, the mirror warehouse may be a Docker warehouse.
Illustratively, assume that the preset mirror warehouse is mirror warehouse Docker _ a. And the server Host uploads the Program image file Program _ mirr _01 to a preset image warehouse Docker _ a.
In an alternative embodiment, in step S103, the process of uploading the program image file to the preset image repository is specifically to firstly clear the program file to be processed from the first storage location, and then upload the program image file to the preset image repository.
And S104, sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction.
In specific implementation, the code processing request information also comprises a target node identifier; after uploading the program image file to the preset image warehouse, the electronic device may send a deployment instruction to the target cluster corresponding to the target node identifier included in the code processing request information, so that the target cluster receiving the deployment instruction may deploy the program image file in the image warehouse on the target node of the target cluster based on the deployment instruction.
Illustratively, the server Host sends a deployment instruction to the target cluster Tar _ Kuber corresponding to the target node identification POT _ ID included in the code processing Request information Request _1, so that the target node POT of the target cluster Tar _ Kuber deploys the Program image file Program _ mirr _01 in the image warehouse Docker _ a based on the deployment instruction.
In the deployment method of the application program provided in the above embodiment, the received code processing request information may be responded to, and the to-be-processed program file may be pulled from the preset first database according to the code matching information included in the code processing request information; processing a program file to be processed to obtain a program mirror image file; the program image file comprises an executable engineering file corresponding to the program file to be processed; uploading the program image file to a preset image warehouse; and sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction. The method provides an automatic application program deployment mechanism, reduces manual misoperation, simplifies the deployment process of the application program, can realize more efficient iterative update of the application program, and effectively improves the efficiency of the deployment process of the application program.
Based on the same inventive concept, the embodiment of the application also provides a deployment device of the application program. Because the device is a device corresponding to the deployment method of the application program in the embodiment of the application, and the principle of the device for solving the problem is similar to that of the method, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Fig. 7 is a schematic structural diagram illustrating an application deployment apparatus according to an embodiment of the present application, where the application deployment apparatus, as shown in fig. 7, includes: a target file determining unit 701, a file processing unit 702, a file transfer unit 703, and a deployment control unit 704.
The target file determining unit 701 is configured to respond to received code processing request information, and pull a program file to be processed from a preset first database according to code matching information included in the code processing request information;
a file processing unit 702, configured to process a program file to be processed to obtain a program image file; the program mirror image file comprises an executable project file corresponding to the program file to be processed;
a file transfer unit 703, configured to upload a program image file to a preset image warehouse;
and the deployment control unit 704 is configured to send a deployment instruction to the target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image repository based on the deployment instruction.
In an alternative embodiment, the code matching information includes a code identity; the target file determining unit 701 is specifically configured to:
acquiring a code identity included in the code matching information;
and searching the first database based on the code identity, and searching and pulling the program file to be processed corresponding to the code identity.
In an alternative embodiment, the first database stores the files of the program to be processed submitted by the user; the code matching information also comprises identity authentication information of the user; the target file determining unit 701 is further configured to:
sending the acquired authentication information to a first database so that the first database returns a check result of the authentication information;
the target file determining unit 701 is specifically configured to:
and if the checking result is that the code passes, acquiring the code identity included in the code matching information.
In an alternative embodiment, the file processing unit 702 is specifically configured to:
compiling the program file to be processed through the target compiling tool to obtain an executable engineering file corresponding to the program file to be processed;
and carrying out mirror image processing on the obtained executable engineering file to obtain a program mirror image file.
In an alternative embodiment, the code processing request information further includes code type information; the file processing unit 702 is specifically configured to:
determining a target compiling tool corresponding to the code type information according to a first mapping relation between a preset code type and the compiling tool;
and sending a target compiling instruction to the target compiling tool so that the target compiling tool compiles the program file to be processed based on the target compiling instruction.
In an alternative embodiment, the file processing unit 702 is specifically configured to:
determining a target basic mirror image corresponding to the code type information according to a second mapping relation between the preset code type and the basic mirror image;
and carrying out mirror image processing on the obtained executable project file based on the target basic mirror image to obtain a program mirror image file.
The electronic equipment is based on the same inventive concept as the method embodiment, and the embodiment of the application also provides the electronic equipment. The electronic device may be used for deployment of an application. In one embodiment, the electronic device may be a server. In this embodiment, the electronic device may be configured as shown in fig. 8, and include a memory 801, a communication module 803, and one or more processors 802.
A memory 801 for storing computer programs executed by the processor 802. The memory 801 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, programs required for running an instant messaging function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 801 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 801 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or the memory 801 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Memory 801 may be a combination of the above.
The processor 802 may include one or more Central Processing Units (CPUs), or be a digital processing unit, etc. A processor 802 for implementing the deployment method of the application program when calling the computer program stored in the memory 801.
The communication module 803 is used for communicating with electronic devices and other terminals or servers.
The embodiment of the present application does not limit the specific connection medium among the memory 801, the communication module 803 and the processor 802. In the embodiment of the present application, the memory 801 and the processor 802 are connected by a bus 804 in fig. 8, the bus 804 is represented by a thick line in fig. 8, and the connection manner between other components is merely illustrative and is not limited. The bus 804 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
Embodiments of the present application further provide a computer storage medium, where computer-executable instructions are stored in the computer storage medium, and the computer-executable instructions are used to implement the deployment method of the application program described in any embodiment of the present application.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. When the processor of the computer device reads the computer instructions from the computer readable storage medium, the processor executes the computer instructions, so that the computer device executes the deployment method of the application program in any of the above embodiments.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (15)

1. A deployment method of an application program, the method comprising:
responding to the received code processing request information, and pulling a program file to be processed from a preset first database according to code matching information included in the code processing request information;
processing the program file to be processed to obtain a program image file; the program image file comprises an executable engineering file corresponding to the program file to be processed;
uploading the program image file to a preset image warehouse;
and sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information, so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction.
2. The method of claim 1, wherein the code matching information comprises a code identity; the pulling the program file to be processed from the first database according to the code matching information included in the code processing request information includes:
acquiring the code identity included in the code matching information;
and retrieving the first database based on the code identity, and searching and pulling the program file to be processed corresponding to the code identity.
3. The method of claim 2, wherein the first database stores the pending program files submitted by a user; the code matching information also comprises identity verification information of the user; before the obtaining of the code identity included in the code matching information, the method further includes:
sending the acquired authentication information to the first database so that the first database returns a check result of the authentication information;
the obtaining of the code identity included in the code matching information includes:
and if the checking result is that the code identity included in the code matching information passes, acquiring the code identity included in the code matching information.
4. The method according to claim 1, wherein the processing the program file to be processed to obtain a program image file comprises:
compiling the program file to be processed through a target compiling tool to obtain an executable engineering file corresponding to the program file to be processed;
and carrying out mirror image processing on the obtained executable engineering file to obtain a program mirror image file.
5. The method of claim 4, wherein the code handling request information further comprises code type information; the compiling the program file to be processed through the target compiling tool comprises the following steps:
determining a target compiling tool corresponding to the code type information according to a first mapping relation between a preset code type and the compiling tool;
and sending a target compiling instruction to the target compiling tool so that the target compiling tool compiles the program file to be processed based on the target compiling instruction.
6. The method of claim 5, wherein the mirroring the obtained executable project file to obtain a program image file comprises:
determining a target basic mirror image corresponding to the code type information according to a second mapping relation between a preset code type and the basic mirror image;
and carrying out mirror image processing on the obtained executable engineering file based on the target basic mirror image to obtain a program mirror image file.
7. An apparatus for deploying an application, the apparatus comprising:
the target file determining unit is used for responding to the received code processing request information, and pulling a program file to be processed from a preset first database according to code matching information included in the code processing request information;
the file processing unit is used for processing the program file to be processed to obtain a program mirror image file; the program image file comprises an executable engineering file corresponding to the program file to be processed;
the file transfer unit is used for uploading the program image file to a preset image warehouse;
and the deployment control unit is used for sending a deployment instruction to a target cluster corresponding to the target node identifier included in the code processing request information so that the target node of the target cluster deploys the program image file in the image warehouse based on the deployment instruction.
8. The apparatus of claim 7, wherein the code matching information comprises a code identity; the target file determining unit is specifically configured to:
acquiring the code identity included in the code matching information;
and retrieving the first database based on the code identity, and searching and pulling the program file to be processed corresponding to the code identity.
9. The apparatus of claim 8, wherein the first database stores the pending program files submitted by a user; the code matching information also comprises identity verification information of the user; the target file determining unit is further configured to:
sending the acquired authentication information to the first database so that the first database returns a check result of the authentication information;
the target file determining unit is specifically configured to:
and if the checking result is that the code identity included in the code matching information passes, acquiring the code identity included in the code matching information.
10. The apparatus according to claim 7, wherein the file processing unit is specifically configured to:
compiling the program file to be processed through a target compiling tool to obtain an executable engineering file corresponding to the program file to be processed;
and carrying out mirror image processing on the obtained executable engineering file to obtain a program mirror image file.
11. The apparatus of claim 10, wherein the code handling request information further comprises code type information; the file processing unit is specifically configured to:
determining a target compiling tool corresponding to the code type information according to a first mapping relation between a preset code type and the compiling tool;
and sending a target compiling instruction to the target compiling tool so that the target compiling tool compiles the program file to be processed based on the target compiling instruction.
12. The apparatus according to claim 11, wherein the file processing unit is specifically configured to:
determining a target basic mirror image corresponding to the code type information according to a second mapping relation between a preset code type and the basic mirror image;
and carrying out mirror image processing on the obtained executable engineering file based on the target basic mirror image to obtain a program mirror image file.
13. A computer-readable storage medium having a computer program stored therein, the computer program characterized by: the computer program, when executed by a processor, implements the method of any one of claims 1 to 6.
14. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, implementing the method of any of claims 1-6.
15. A computer program product comprising computer instructions, the computer instructions being stored in a computer readable storage medium; when the computer instructions are read from the computer-readable storage medium by a processor of a computer device, the processor executes the computer instructions, causing the computer device to perform the steps of the method of any of claims 1-6.
CN202211569895.1A 2022-12-08 2022-12-08 Deployment method and device of application program Pending CN115878128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211569895.1A CN115878128A (en) 2022-12-08 2022-12-08 Deployment method and device of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211569895.1A CN115878128A (en) 2022-12-08 2022-12-08 Deployment method and device of application program

Publications (1)

Publication Number Publication Date
CN115878128A true CN115878128A (en) 2023-03-31

Family

ID=85766458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211569895.1A Pending CN115878128A (en) 2022-12-08 2022-12-08 Deployment method and device of application program

Country Status (1)

Country Link
CN (1) CN115878128A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117873535A (en) * 2024-03-08 2024-04-12 之江实验室 Service route updating method and device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117873535A (en) * 2024-03-08 2024-04-12 之江实验室 Service route updating method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
TWI493465B (en) Method and system for distributed application stack deployment
US9268589B2 (en) Method and system for deploying multiple distributed application stacks on a target machine
CN106533753B (en) Role configuration method and device of distributed system
US10372463B1 (en) Provisioning a computerized device with an operating system
CN108959385B (en) Database deployment method, device, computer equipment and storage medium
CN109543462B (en) Equipment identification determination method, device, server and storage medium
CN102307210A (en) Data downloading system and data management and downloading method thereof
CN108134696A (en) A kind of micro services configuration update method and device
CN107566518B (en) Method and device for managing equipment information in file installation process
CN108563440A (en) The automatic adding method of List Controller code, device and readable storage medium storing program for executing
CN115878128A (en) Deployment method and device of application program
CN110809043A (en) Data processing method, device, equipment and storage medium based on Internet of things
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN109582487B (en) Method and apparatus for transmitting information
US10469473B2 (en) Network authentication system extensions
WO2021192318A1 (en) Verification device, verification system, verification method and computer readable medium
EP3211529A1 (en) Automatic software gathering device and method
CN111400243A (en) Research and development management system based on pipeline service and file storage method and device
CN116028444B (en) File fingerprint generation method, device and system, electronic equipment and storage medium
CN111552571B (en) Application feedback method, computer device and computer storage medium
CN113127419B (en) File detection method, device, computer equipment and storage medium
CN113094211B (en) Backup data processing method and device
JP7225322B2 (en) Terminal device, data transfer system, data transfer method, and program
US9672489B1 (en) Inventory validator with notification manager
CN112272221B (en) Batch deployment method and system for server cluster and computer readable storage medium

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