Method, apparatus, electronic device, and storage medium for deploying an application

The method enables direct application deployment from a client endpoint using a service endpoint to manage deployment processes, addressing inefficiencies in existing platform-switching requirements and enhancing overall deployment efficiency.

CN113360160BActive Publication Date: 2025-07-15BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010148161.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-05
Publication Date
2025-07-15
Estimated Expiration
2040-03-05

AI Technical Summary

Technical Problem

In the prior art, application development requires switching between different platforms to achieve deployment, resulting in low efficiency.

Method used

By receiving application deployment instructions from the client, determine the target basic image information, build application images and publish application containers, and use the server to realize the complete deployment process of the application, including compilation, mirror construction and release.

Benefits of technology

After the client completes application development, the application deployment is directly implemented through the server, which improves the efficiency of application deployment and reduces the platform switching steps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113360160B_ABST
    Figure CN113360160B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, electronic device, and storage medium for deploying an application, relating to the field of computer technology. A specific embodiment of the method includes: receiving an application deployment instruction sent by a client, where the application deployment instruction includes an application identifier of the application to be deployed; determining target base image information from an image center according to the application identifier; receiving an operation instruction sent by the client, determining application code corresponding to the application identifier according to the operation instruction, constructing an application image according to the target base image information and the application code, constructing an application container according to the application image, and publishing the application container. This embodiment can solve the problem of low efficiency in that after application development, it is necessary to switch to different platforms to implement application deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method, apparatus, electronic device, and storage medium for deploying an application. Background Art

[0002] With the continuous development of Cloud Native, cloud services have occupied a very important position in the Internet market, and more and more users have deployed developed applications on the cloud. Taking kubernetes (abbreviated as K8s, which is an abbreviation formed by using 8 to replace 8 characters "ubernete") as an example, the process of application development and deployment is usually as follows: The application program is developed in the local development environment and uploaded to the management library. Subsequently, a mirror building template (Dockerfile) is designed on the web side, the application code is built into an application mirror according to the Dockerfile and uploaded to the mirror center, and the application is deployed according to the designed resource orchestration template.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] After the application is developed on the development platform, it is necessary to deploy the application through the web side. Thus, after the application is developed, it is necessary to switch to different platforms to implement the application deployment, and the efficiency is relatively low. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, apparatus, system, and storage medium for deploying an application, which can solve the problem that after the application is developed, it is necessary to switch to different platforms to implement the application deployment, and the efficiency is relatively low.

[0006] To achieve the above object, according to one aspect of the embodiments of the present invention, a method for deploying an application is provided.

[0007] A method for deploying an application according to an embodiment of the present invention includes: receiving an application deployment instruction sent by a client, where the application deployment instruction includes an application identifier of an application to be deployed; determining target base image information from a mirror center according to the application identifier; receiving an operation instruction sent by the client, determining application code corresponding to the application identifier according to the operation instruction, building an application mirror according to the target base image information and the application code, building an application container according to the application mirror, and publishing the application container.

[0008] In one embodiment, the operation instruction includes a compilation instruction, and the compilation instruction includes compilation information; the determining application code corresponding to the application identifier according to the operation instruction includes:

[0009] Determine the compilation type from the compilation information; if the compilation type is upload compilation, upload the application identifier and its corresponding application code to the object storage system; if the compilation type is control system compilation, obtain the original code from the code library according to the address information; by invoking the container management system, enable the container management system to obtain the target image from the image center to build a compilation container, and execute the compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system.

[0010] In another embodiment, if the compilation type is upload compilation, the compilation information includes an upload compilation type identifier and the application code corresponding to the application identifier; if the compilation type is control system compilation, the compilation information includes a control system compilation type identifier and the address information.

[0011] In another embodiment, the operation instruction includes an application image building instruction.

[0012] Building the application image corresponding to the application identifier according to the target base image information and the application code includes:

[0013] By invoking the container management system, enable the container management system to obtain the target base image from the object storage system according to the target base image information, obtain the application code from the object storage system according to the application identifier, and build the application image corresponding to the application identifier according to the target base image information and the application code.

[0014] In another embodiment, determining the target base image information from the image center according to the application identifier includes:

[0015] Obtain the list of base image information corresponding to the application identifier from the image center;

[0016] Send the list of base image information to the client;

[0017] Receive the target base image information sent by the client, where the target base image information is determined by the user from the list of base image information.

[0018] In another embodiment, before receiving the application deployment instruction sent by the client, it further includes:

[0019] Receive the application identifier acquisition instruction sent by the client;

[0020] According to the application identifier acquisition instruction, obtain the identifiers of each application from the business database;

[0021] Send the identifiers of the respective applications to the client.

[0022] In yet another embodiment, after publishing the application container, it further includes: receiving a log viewing instruction sent by the client, where the log viewing instruction includes the application identifier; obtaining the address of the container corresponding to the application identifier from the container management system, and sending the address of the container corresponding to the application identifier to the client; receiving the target address sent by the client; obtaining the list of log files of the container corresponding to the target address from the container repository, and sending the list of log files to the client.

[0023] In yet another embodiment, after publishing the application container, it further includes: receiving a maintenance instruction sent by the client, where the maintenance instruction includes the application identifier; obtaining the address of the container corresponding to the application identifier, and sending the address of the container corresponding to the application identifier to the client; receiving the target address sent by the client; invoking the bastion host service, so that the bastion host service creates a jump server container according to the target address through the container management system, and determines the information of the jump server container; sending the information of the jump server container to the client.

[0024] To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided another method for deploying an application.

[0025] Another method for deploying an application according to the embodiments of the present invention includes: receiving the application identifier of the application to be deployed input by the user; generating an application deployment instruction according to the application identifier; sending the application deployment instruction to the server, where the application deployment instruction includes the application identifier; receiving the operation instruction sent by the user; sending the operation instruction to the server, where the operation instruction includes a compilation instruction, an application image building instruction, and an application publishing instruction.

[0026] In one embodiment, sending the operation instruction to the server includes:

[0027] Sending the compilation instruction to the server;

[0028] Polling the server at a preset period to determine whether the server has completed compilation;

[0029] If so, sending the application image building instruction to the server;

[0030] Polling the server according to the preset period to determine whether the server has completed application image building;

[0031] If so, sending the application publishing instruction to the server.

[0032] In yet another embodiment, before sending the operation instruction to the server, it further includes:

[0033] Receiving and displaying a list of basic image information corresponding to the application identifier sent by the server;

[0034] Receiving target basic image information input by the user, where the target basic image information belongs to the list of basic image information;

[0035] Sending the target basic image information to the server.

[0036] In yet another embodiment, after sending the operation instruction to the server, it further includes: receiving a log viewing instruction input by the user, where the log viewing instruction includes the application identifier; sending the log viewing instruction to the server; receiving and displaying the address of the container corresponding to the application identifier sent by the server; receiving a target address input by the user, where the target address represents the address of the container for which the log is to be viewed; sending the target address to the server; receiving and displaying a list of log files of the container corresponding to the target address sent by the server; receiving a target log file input by the user; and obtaining and displaying the content of the target log file according to the target log file.

[0037] In yet another embodiment, after sending the operation instruction to the server, it further includes: receiving a maintenance instruction input by the user, where the maintenance instruction includes the application identifier; sending the maintenance instruction to the server; receiving and displaying the address of the container corresponding to the application identifier sent by the server; receiving a target address input by the user, where the target address represents the address of the container to be maintained; sending the target address to the server; receiving information about the jump server container sent by the server; and accessing the container corresponding to the target address through the information about the jump server container to perform maintenance on the container corresponding to the target address.

[0038] To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for deploying an application.

[0039] An apparatus for deploying an application according to an embodiment of the present invention is provided with a server and includes: a receiving unit for receiving an application deployment instruction sent by a client, where the application deployment instruction includes an application identifier of the application to be deployed; a determining unit for determining target basic image information from an image center according to the application identifier; and a processing unit for receiving an operation instruction sent by the client, determining application code corresponding to the application identifier according to the operation instruction, constructing an application image according to the target basic image information and the application code, constructing an application container according to the application image, and publishing the application container.

[0040] In one embodiment, the operation instruction includes a compilation instruction, and the compilation instruction includes compilation information; the processing unit is specifically configured to:

[0041] Determine the compilation type from the compilation information;

[0042] If the compilation type is upload compilation, upload the application identifier and its corresponding application code to the object storage system;

[0043] If the compilation type is control system compilation, obtain the original code from the code library according to the address information; by invoking the container management system, enable the container management system to obtain the target image from the image center to build a compilation container, and execute a compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system.

[0044] In another embodiment, if the compilation type is upload compilation, the compilation information includes an upload compilation type identifier and the application code corresponding to the application identifier;

[0045] If the compilation type is control system compilation, the compilation information includes a control system compilation type identifier and the address information.

[0046] In another embodiment, the operation instruction includes an application image building instruction; the processing unit is specifically configured to:

[0047] By invoking the container management system, enable the container management system to obtain the target base image from the object storage system according to the target base image information, obtain the application code from the object storage system according to the application identifier, and build the application image corresponding to the application identifier according to the target base image information and the application code.

[0048] In another embodiment, the determining unit is specifically configured to:

[0049] Obtain a list of base image information corresponding to the application identifier from the image center;

[0050] Send the list of base image information to the client;

[0051] Receive the target base image information sent by the client, where the target base image information is determined by the user from the list of base image information.

[0052] In another embodiment, the receiving unit is further configured to receive an application identifier acquisition instruction sent by the client;

[0053] The device further includes:

[0054] An acquisition unit, configured to acquire instructions according to the application identifier and acquire the identifiers of various applications from a service database;

[0055] A sending unit, configured to send the identifiers of the various applications to the client.

[0056] In another embodiment, the receiving unit is further configured to receive a log viewing instruction sent by the client, where the log viewing instruction includes the application identifier;

[0057] The apparatus further includes:

[0058] A sending unit, configured to acquire the address of the container corresponding to the application identifier from a container management system and send the address of the container corresponding to the application identifier to the client;

[0059] The receiving unit is further configured to receive a target address sent by the client;

[0060] The sending unit is further configured to acquire a list of log files of the container corresponding to the target address from a container repository and send the list of log files to the client.

[0061] In another embodiment, the receiving unit is further configured to receive a maintenance instruction sent by the client, where the maintenance instruction includes the application identifier;

[0062] The apparatus further includes:

[0063] A sending unit, configured to acquire the address of the container corresponding to the application identifier and send the address of the container corresponding to the application identifier to the client;

[0064] The receiving unit is further configured to receive a target address sent by the client;

[0065] A determination unit, further configured to call a bastion host service, so that the bastion host service creates a jump server container according to the target address through a container management system and determines the information of the jump server container;

[0066] The sending unit is further configured to send the information of the jump server container to the client.

[0067] To achieve the above object, according to another aspect of the embodiments of the present invention, another apparatus for deploying an application is provided.

[0068] Another device for deploying an application according to an embodiment of the present invention is provided on a client side and includes: a receiving unit, configured to receive an application identifier of an application to be deployed input by a user; a generating unit, configured to generate an application deployment instruction according to the application identifier; a sending unit, configured to send the application deployment instruction to a server, where the application deployment instruction includes the application identifier; the receiving unit is further configured to receive an operation instruction sent by the user; the sending unit is further configured to send the operation instruction to the server, where the operation instruction includes a compilation instruction, an application image building instruction, and an application publishing instruction.

[0069] In one embodiment, the sending unit is specifically configured to:

[0070] Send the compilation instruction to the server;

[0071] Poll the server at a preset period to determine whether the server has completed compilation;

[0072] If so, send the application image building instruction to the server;

[0073] Poll the server according to the preset period to determine whether the server has completed building the application image;

[0074] If so, send the application publishing instruction to the server.

[0075] In another embodiment, the receiving unit is further configured to receive and display a list of base image information corresponding to the application identifier sent by the server;

[0076] The receiving unit is further configured to receive target base image information input by the user, where the target base image information belongs to the list of base image information;

[0077] The sending unit is further configured to send the target base image information to the server.

[0078] In another embodiment, the receiving unit is further configured to receive a log viewing instruction input by the user, where the log viewing instruction includes the application identifier;

[0079] The sending unit is further configured to send the log viewing instruction to the server;

[0080] The receiving unit is further configured to receive and display an address of a container corresponding to the application identifier sent by the server;

[0081] The receiving unit is further configured to receive a target address input by the user, where the target address represents an address of a container for which logs are to be viewed;

[0082] The sending unit is further configured to send the target address to the server.

[0083] The receiving unit is further configured to receive and display a list of log files of the container corresponding to the target address sent by the server.

[0084] The receiving unit is further configured to receive a target log file input by a user.

[0085] It further includes:

[0086] A display unit, configured to obtain and display the content of the target log file according to the target log file.

[0087] In another embodiment, the receiving unit is further configured to receive a maintenance instruction input by a user, and the maintenance instruction includes the application identifier.

[0088] The sending unit is further configured to send the maintenance instruction to the server.

[0089] The receiving unit is further configured to receive and display the address of the container corresponding to the application identifier sent by the server.

[0090] The receiving unit is further configured to receive a target address input by a user, and the target address represents the address of the container to be maintained.

[0091] The sending unit is further configured to send the target address to the server.

[0092] The receiving unit is further configured to receive information of the jump server container sent by the server.

[0093] It further includes:

[0094] An access unit, configured to access the container corresponding to the target address through the information of the jump server container, so as to maintain the container corresponding to the target address.

[0095] To achieve the above object, according to another aspect of the embodiments of the present invention, an electronic device is provided.

[0096] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for deploying an application provided by the embodiments of the present invention.

[0097] To achieve the above object, according to another aspect of the embodiments of the present invention, a computer-readable medium is provided.

[0098] A computer-readable medium according to an embodiment of the present invention stores a computer program thereon, and when the program is executed by a processor, it implements the method for deploying an application provided by the embodiment of the present invention.

[0099] One embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, the client can implement application deployment through the server. Thus, after the application development is completed on the client, the application can be directly deployed through the server without the need to switch to other platforms for application deployment, improving the efficiency of application deployment.

[0100] The further effects of the above non-conventional optional methods will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] The drawings are used to better understand the present invention and do not constitute an improper limitation to the present invention. Among them:

[0102] Figure 1 is a schematic diagram of a system architecture of a method for deploying an application according to an embodiment of the present invention;

[0103] Figure 2 is a schematic diagram of a main process of a method for deploying an application according to an embodiment of the present invention;

[0104] Figure 3 is a schematic diagram of another main process of a method for deploying an application according to an embodiment of the present invention;

[0105] Figure 4 is a schematic diagram of another system architecture of a method for deploying an application according to an embodiment of the present invention;

[0106] Figure 5 is a schematic diagram of parameter configuration in an HTTP Proxy according to an embodiment of the present invention;

[0107] Figure 6 is a schematic diagram of another main process of a method for deploying an application according to an embodiment of the present invention;

[0108] Figure 7 is a schematic diagram of input of an application identifier of an application to be deployed according to an embodiment of the present invention;

[0109] Figure 8 is a schematic diagram of input of an operation instruction for one-key compilation according to an embodiment of the present invention;

[0110] Figure 9 is a schematic diagram of input of parameters in an upload compilation operation instruction according to an embodiment of the present invention;

[0111] Figure 10It is a schematic diagram of parameter input in Git compilation operation instructions according to an embodiment of the present invention;

[0112] Figure 11 It is a schematic diagram of displaying the application deployment progress according to an embodiment of the present invention;

[0113] Figure 12 It is a schematic diagram of the main process of the method for viewing logs according to an embodiment of the present invention;

[0114] Figure 13 It is a schematic diagram of the way of subscribing to logs according to an embodiment of the present invention;

[0115] Figure 14 It is a schematic diagram of displaying the content of the target log file according to an embodiment of the present invention;

[0116] Figure 15 It is a schematic diagram of the main process of the method for application maintenance according to an embodiment of the present invention;

[0117] Figure 16 It is a schematic diagram of accessing the container corresponding to the target address according to an embodiment of the present invention;

[0118] Figure 17 It is a schematic diagram of connecting to the container corresponding to the target address according to an embodiment of the present invention;

[0119] Figure 18 It is a schematic diagram of the main units of the device for deploying an application according to an embodiment of the present invention;

[0120] Figure 19 It is another schematic diagram of the main units of the device for deploying an application according to an embodiment of the present invention;

[0121] Figure 20 It is another exemplary system architecture diagram to which the embodiments of the present invention can be applied;

[0122] Figure 21 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present invention. Detailed implementation manners

[0123] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description below omits the description of well-known functions and structures.

[0124] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0125] The embodiment of the present invention provides a method for deploying an application, which can be used in the scenario of application deployment. Figure 1 Shown is a system architecture diagram applicable to the method for deploying an application in the embodiment of the present invention.

[0126] As Figure 1 Shown, the client can communicate with the server, and the server can communicate with the image center (Harbor Registry), object storage, business database, container management system, and container repository (Docker). Application code development can be implemented in the client. Specifically, a development system for application code development can be set in the client. An interface for interacting with the user can also be set in the client to implement functions such as receiving data input by the user and displaying data that the user needs to view for data interaction with the user. The development system can specifically be an IDE (Integrated Development Environment).

[0127] The server can specifically be a server, acting as a proxy server for the client to implement application deployment, and specifically can be an HTTP (HyperText Transfer Protocol) proxy server (HTTP Proxy). The server can set a unified interface to facilitate data transmission with different systems or services. Address information of each system communicating with it can be configured in the server to facilitate data transmission through the configured address information. Templates required for service orchestration and application deployment, such as templates of dockerfile, etc., can also be configured in the server for application deployment.

[0128] In the embodiment of the present invention, the server realizes the deployment of the application by performing data interaction with the image center, object storage, business database, container management system, and container repository.

[0129] The business database is used to store business data. The business can include multiple types, such as logistics, inventory, etc. Each business can include multiple systems, and each system can include multiple applications. The business data can specifically be parameters such as the identifiers of each application, the systems to which they belong, and the businesses to which they belong. It can also include the programming languages used when developing the original code corresponding to the application. The image center can be used for the management of image permissions and the mutual relationships between images, and can store data such as the access permissions of each user. Object management is used for the storage of images, program compilation packages, dockerfiles, etc., and it can serve as a storage medium for files such as images. The container management system can specifically be Kubernetes, which is used to manage containerized applications in the cloud platform. Through Kubernetes, the container repository can be accessed, and the data in the containers can be managed, viewed, maintained, etc. The container repository can be used to store each application container.

[0130] An embodiment of the present invention provides a method for deploying an application. This method can be executed by the server in the Figure 1 system architecture shown, as Figure 2 shown, and this method includes the following steps.

[0131] S201: Receive an application deployment instruction sent by the client.

[0132] Among them, the application deployment instruction includes the application identifier of the application to be deployed.

[0133] When the user needs to deploy an application, the user can send an application deployment instruction to the server through the client. The application identifier represents the identifier of the application to be deployed.

[0134] In an implementation manner of an embodiment of the present invention, before this step, it may further include: receiving an application identifier acquisition instruction sent by the client; according to the application identifier acquisition instruction, obtaining the identifiers of each application from the business database; and sending the identifiers of each application to the client.

[0135] In an embodiment of the present invention, the business identifiers can be stored in the business database. Therefore, the client can obtain the identifiers of each application through the server so that the user can select the application identifier of the application to be deployed. Therefore, after the server receives the application identifier acquisition instruction sent by the client, it can obtain the identifiers of each application from the business database and send them to the client so that the user can select the application identifier from each application identifier through the client. After determining the application identifier, the client executes step S201 and sends the application identifier to the server.

[0136] S202: Determine the target base image information from the image center according to the application identifier.

[0137] The mirror center stores information about each base image. In the embodiments of the present invention, containers are used for application deployment, so it is necessary to build an application image corresponding to the application. Since the application image needs to be built from the base image, in this step, the information of the target base image used to build the application image, that is, the target base image information, can be determined from the mirror center.

[0138] Specifically, this step can be executed as follows: Obtain a list of base image information corresponding to the application identifier from the mirror center; send the list of base image information to the client; receive the target base image information sent by the client, where the target base image information is determined by the user from the list of base image information.

[0139] The mirror center stores the base image information of the base images corresponding to each application. Each application can correspond to base images developed in different programming languages, used in different operating systems, and of different versions. Therefore, each application can correspond to the base image information of multiple base images. In the embodiments of the present invention, after receiving the application identifier, the server can obtain the list of base image information corresponding to the application identifier from the mirror center according to the application identifier, and then send the list of base image information corresponding to the application identifier to the client, so that the user can select the target base image information from the list of base image information, and then determine the target base image information of the target base image required for building the application image by receiving the target base image information sent by the client.

[0140] It should be noted that when the business database includes the programming language of the application code corresponding to the application, the server can determine the programming language of the application code corresponding to the application identifier through the business database. Since the programming language of the application code needs to be the same as the programming language of the base image to build the application image, when the server obtains the list of base image information corresponding to the application identifier from the mirror center, it can obtain the list of base image information corresponding to the application identifier and having the same programming language as the programming language of the application code corresponding to the application identifier.

[0141] S203: Receive the operation instruction sent by the client, determine the application code corresponding to the application identifier according to the operation instruction, build an application image according to the target base image information and the application code, build an application container according to the application image, and publish the application container.

[0142] Among them, after receiving the operation instruction sent by the client, the server can perform the operation corresponding to the operation execution. The process of realizing application deployment through containers is to build an application image according to the application code and the base image, then build an application container according to the application image, and publish the application container, so as to realize the deployment of the application.

[0143] In the embodiments of the present invention, the operation instruction may include a compilation instruction, an application image building instruction, and an application publishing instruction.

[0144] Compilation refers to the process of compiling the original code corresponding to an application to obtain the application code and uploading it for storage. Therefore, the compilation instruction is to direct the server to execute the compilation and upload process. In the embodiments of the present invention, compilation includes two types, namely upload compilation and control system (Git) compilation. In upload compilation, the original code has been compiled to obtain the application code, so the server only needs to upload and store the application code. Git compilation means that the original code is stored in the code repository, and the server needs to obtain the original code from the code repository, compile it to obtain the application code, and then upload and store it.

[0145] Therefore, in the embodiments of the present invention, the compilation instruction includes compilation information. The server can determine the compilation type based on the compilation information, and then perform different operations according to the compilation type. Specifically: if the compilation type is upload compilation, upload the application identifier and its corresponding application code to the object storage; if the compilation type is control system compilation, obtain the original code from the code repository according to the address information; by calling the container management system, enable the container management system to obtain the target image from the image center to build a compilation container, execute the compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage.

[0146] If the compilation type is upload compilation, it means that the application code corresponding to the application identifier already exists, and the server can upload the application identifier and its corresponding application code to the object storage. If the compilation type is Git compilation, it means that the server needs to compile the original code. Therefore, the server obtains the original code from the code repository according to the address information, and then by calling the container management system, enables the container management system to obtain the target image from the image center to build a compilation container, execute the compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system. The address information represents the address information where the original code is stored in the code repository, and the code repository can specifically be a Git code repository.

[0147] The server compiles the application code through the container management system, and the compilation needs to be executed in a container. Therefore, after the server calls the container management system, the container management system obtains the target image from the image center. The target image can be used to build a compilation container for compilation. Then, execute the compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system. The target image is pre-set.

[0148] It should be noted that if the compilation type is upload compilation, the compilation information includes the upload compilation type identifier and the application code corresponding to the application identifier, so that the server can determine the compilation type according to the upload compilation type identifier and obtain the application code corresponding to the application identifier. If the compilation type is code library compilation, the compilation information includes the control system compilation type identifier and the address information of the original code corresponding to the application identifier stored in the code library, so that the server can determine the compilation type according to the control system compilation type identifier and obtain the original code corresponding to the application identifier according to the address information. After the server uploads the application code to the object storage system, the compilation container can be deleted.

[0149] Application image building refers to the process of building an application image through a base image and application code. In the embodiments of the present invention, after receiving an application image building instruction, the server can call the container management system to enable the container management system to obtain a target base image from the object storage system according to the target base image information, obtain the application code from the object storage system according to the application identifier, and build an application image corresponding to the application identifier according to the target base image information and the application code.

[0150] The building of the application image needs to be executed in a container. Therefore, after the server calls the container management system, the container management system can obtain a target image from the image center to create a container for building the application image, and then execute the docker build command in the container for building the application image to generate an application image corresponding to the application identifier through the target base image information and the application code, and then upload the application image to the image center for storage and delete the container for building the application image. The target image is preset and can be different from the target image obtained during compilation.

[0151] Application publishing refers to the process of building an application container according to the application image and then publishing the application container. In the embodiments of the present invention, after receiving an application publishing instruction, the server can call the container management system to enable the container management system to obtain the application image corresponding to the application identifier from the image center, and then build an application container corresponding to the application identifier according to the application image and publish it.

[0152] It should be noted that in the embodiments of the present invention, multiple application containers can be built. The server can receive the number of builds sent by the client and then build the number of application containers to meet the user's needs.

[0153] In another implementation manner of the embodiment of the present invention, after step S203, the following steps are further included: receiving a log viewing instruction sent by a client, where the log viewing instruction includes an application identifier; obtaining the address of the container corresponding to the application identifier from a container management system, and sending the address of the container corresponding to the application identifier to the client; receiving a target address sent by the client; obtaining a list of log files of the container corresponding to the target address from a container repository, and sending the list of log files to the client.

[0154] After the application is deployed, the client can also view the logs of the deployed container through the server. It is necessary to first determine which container's which log to view. Therefore, after receiving the log viewing instruction, the server can obtain the address of the container corresponding to the application identifier from the container management system by calling the container management system, and send it to the client, so that the user can select the target address of the container whose logs are to be viewed through the client. Since there may be multiple containers corresponding to the application identifier, the addresses of the containers corresponding to the application identifier may also be multiple. Since there may also be multiple log files in one container, after determining the target address, the server can remotely connect to the container corresponding to the target address through SSH (Secure Shell), obtain the list of log files in the container through the Is command, and send it to the client, so that the user can select the log file to be viewed through the client.

[0155] In another implementation manner of the embodiment of the present invention, after step S203, the following steps are further included: receiving a maintenance instruction sent by a client, where the maintenance instruction includes an application identifier; obtaining the address of the container corresponding to the application identifier, and sending the address of the container corresponding to the application identifier to the client; receiving a target address sent by the client; calling a bastion host service, so that the bastion host service creates a jump server container according to the target address through the container management system, and determines the information of the jump server container; sending the information of the jump server container to the client.

[0156] After the application is deployed, the client can also maintain the deployed container through the server. It is necessary to first determine which container needs to be maintained. Therefore, after receiving the maintenance instruction, the server can obtain the address of the container corresponding to the application identifier from the container management system by calling the container management system, and send it to the client so that the user can select the target address of the container to be maintained through the client. Since there may be multiple containers corresponding to the application identifier, the addresses of the containers corresponding to the application identifier may also include multiple. After determining the target address, that is, determining the address of the container to be maintained, and accessing the container requires access to the container. The client can access the container to be maintained through the bastion host service. Therefore, the server can apply for the bastion host service according to the target address, and then call the bastion host service so that the bastion host service creates a jump server container according to the target address through the container management system, and determines the information of the created jump server container. The information of the jump server container can include the account and password. The server sends the information of the jump server container to the client, so that the client can access the container corresponding to the target address through the information of the jump server container.

[0157] It should be noted that before calling the bastion host service, the server can also verify the user to determine whether they have the maintenance permission. The verification method is usually to obtain the user's account information through the client and determine whether the account information has the access permission to the container corresponding to the application identifier. If the user has the access permission, the process of calling the bastion host service is executed; if the user does not have the access permission, the execution can be stopped and the user can be prompted through the client.

[0158] In the embodiment of the present invention, the client can implement application deployment through the server. In this way, after the application development is completed in the client, the application can be directly deployed through the server, without the need to switch to other platforms for application deployment, improving the efficiency of application deployment. At the same time, in the embodiment of the present invention, the client can also implement the maintenance and log viewing functions of the deployed application through the server, so that when maintaining and viewing the logs of the deployed application, there is no need to switch to other platforms for execution, improving the efficiency of application maintenance and log viewing.

[0159] The embodiment of the present invention provides a method for deploying an application, which can be executed by the Figure 1 client in the system architecture shown, as Figure 3 shown, the method includes the following steps.

[0160] S301: Receive the application identifier of the application to be deployed input by the user.

[0161] The client provides an interface that can interact with the user. Therefore, when the user needs application deployment, the user can input the application identifier of the application to be deployed in the client, so that the client can determine the target base image according to the application identifier of the application to be deployed.

[0162] It should be noted that, in order to simplify the way for users to input application identifiers, the client can display a list of application identifiers for each application to the user, so that the user can input the application identifier of the application to be deployed by selection. The specific method can be: receiving the application identifier acquisition instruction input by the user, and then sending the application identifier acquisition instruction to the server, so that the server can obtain the identifiers of each application. The client receives and displays the identifiers of each application sent by the server, so that the user can select the application identifier of the application to be deployed from the displayed identifiers, that is, execute this step to receive the application identifier of the application to be deployed input by the user.

[0163] S302: Generate an application deployment instruction according to the application identifier.

[0164] After receiving the application identifier of the application to be deployed, the client can generate an application deployment instruction to instruct the server to execute the application deployment process.

[0165] It should be noted that the application deployment instruction can specifically be data, a message, etc. in a fixed format, which is not limited in the embodiments of the present invention.

[0166] S303: Send the application deployment instruction to the server.

[0167] Among them, the application deployment instruction can include the application identifier.

[0168] S304: Receive the operation instruction sent by the user.

[0169] Among them, the operation instruction includes a compilation instruction, an application image building instruction, and an application release instruction. The specific operation process of application deployment is usually compilation, application image building, and application release. Therefore, after the user inputs the application identifier, the user can input the operation instruction, so that the client can execute the processes of compilation, application image building, and application release through the server.

[0170] S305: Send the operation instruction to the server.

[0171] After receiving the operation instruction of the user, the client can send the operation instruction to the server, so that the server can execute the processes of compilation, application image building, and application release.

[0172] It should be noted that the way for the user to input the operation instruction can be a single input, or the instructions included in the operation instruction can be input sequentially. The way for the client to send the operation instruction to the server can be a single send, or the instructions included in the operation instruction can be sent sequentially.

[0173] Specifically, the client can send a compilation instruction, an application image building instruction, and an application release instruction to the server respectively. The sending methods can be as follows: send a compilation instruction to the server; poll the server at a preset period to determine whether the server has completed the compilation process; if so, send an application image building instruction to the server; poll the server at a preset period to determine whether the server has completed the application image building process; if so, send an application release instruction to the server.

[0174] The client first sends a compilation instruction to the server. After receiving the compilation instruction, the server executes the compilation process. During this period, the client can poll the server at a preset period, that is, send an inquiry request to the server periodically to determine whether the server has completed the compilation. After the client determines that the server has completed the compilation, it then sends an application image building instruction to the server, and then can poll the server at a preset period, that is, send an inquiry request to the server periodically to determine whether the server has completed the application image building. After the client determines that the server has completed the application image building, it then sends an application release instruction to the server so that the server executes the application release process.

[0175] In an implementation manner of the embodiment of the present invention, after receiving the application deployment instruction sent by the client, the server needs to determine the target base image information for application deployment. Since there are many base images corresponding to the application identifier, the server can send the base image information corresponding to the application identifier to the client for display, and determine the target base image information through the user's selection. Therefore, before executing step S304, it further includes: receiving and displaying the list of base image information corresponding to the application identifier sent by the server; receiving the target base image information input by the user, where the target base image information belongs to the list of base image information; sending the target base image information to the server.

[0176] The server sends the list of base image information corresponding to the application identifier to the client, and the client displays the list of base image information so that the user can determine the target base image information therefrom. After the user inputs the determined target base image information to the client, the client can send the target base image information to the server so that the server can determine the target base image information.

[0177] In another implementation manner of the embodiment of the present invention, after the application deployment is implemented through the server by the client, the deployed application can also be viewed for logs. Therefore, after step S305, the following steps may further be included: receiving a log viewing instruction input by the user, where the log viewing instruction includes an application identifier; sending the log viewing instruction to the server; receiving and displaying the address of the container corresponding to the application identifier sent by the server; receiving a target address input by the user, where the target address represents the address of the container for which the logs are to be viewed; sending the target address to the server; receiving and displaying the list of log files of the container corresponding to the target address sent by the server; receiving a target log file input by the user; and obtaining and displaying the content of the target log file according to the target log file.

[0178] Since there may be multiple application containers deployed for each application, and there may be multiple log files in each application container, it is necessary to determine which container's which log file is to be viewed during log viewing. Therefore, after the client receives the log viewing instruction input by the user, it can send the log viewing instruction to the server. The server can obtain the address of the container corresponding to the application identifier according to the application identifier in the log viewing instruction and send it to the client. After receiving the address of the container corresponding to the application identifier, the client displays it so that the user can determine the address of the container for which the logs are to be viewed. The user determines the target address, that is, the address of the container for which the logs are to be viewed, according to the address displayed by the client. After receiving the target address input by the user, the client sends it to the server so that the server can obtain the list of log files of the container corresponding to the target address and send it to the client. After receiving the log files of the container corresponding to the target address, the client displays them so that the user can determine the target log file to be viewed and input it to the client. After the client receives the target log file input by the user, the client can obtain and display the content of the target log file. The client can remotely connect to the container corresponding to the target address through the SSH protocol and obtain the content of the target log file through the tail command and display it.

[0179] It should be noted that after the client displays the content of the target log file, it can poll the target log file regularly to display the updated content in the target log file in a timely manner.

[0180] In another implementation of the embodiment of the present invention, after the application is deployed through the server on the client, the deployed application can also be maintained. Therefore, after step S305, the following steps may further be included: receiving a maintenance instruction input by a user, where the maintenance instruction includes an application identifier; sending the maintenance instruction to the server; receiving and displaying the address of the container corresponding to the application identifier sent by the server; receiving a target address input by the user, where the target address represents the address of the container to be maintained; sending the target address to the server; receiving the information of the jump server container sent by the server; and accessing the container corresponding to the target address through the information of the jump server container to maintain the container corresponding to the target address.

[0181] Since each application deployment may include multiple application containers, and each application container may include multiple log files, it is necessary to first determine which container to maintain during maintenance.

[0182] Therefore, after receiving the maintenance instruction input by the user, the client can send the maintenance instruction to the server. The server can obtain the address of the container corresponding to the application identifier according to the application identifier in the maintenance instruction and send it to the client. After receiving the address of the container corresponding to the application identifier, the client displays it so that the user can determine the address of the container to be maintained from it. The user determines the target address, that is, the address of the container to be maintained, according to the address displayed by the client. To maintain the container, access to the container needs to be achieved. Access to the container can be realized through the jump server container created by the bastion host service. Therefore, after receiving the target address input by the user, the client sends it to the server so that the server can apply for the bastion host service, determine the information of the jump server container, and return it to the client. After receiving the information of the jump server container, the client can use the information of the jump server container to connect to the jump server container using the SSH protocol, and then access the container corresponding to the target address through the jump server container, thereby realizing the maintenance of the container corresponding to the target address.

[0183] In the embodiment of the present invention, the client can implement application deployment through the server. In this way, after the application development is completed on the client, the application can be directly deployed through the server without the need to switch to other platforms for application deployment, improving the efficiency of application deployment. At the same time, in the embodiment of the present invention, the client can also implement the functions of maintaining and viewing logs of the deployed application through the server, so that when maintaining and viewing logs of the deployed application, there is no need to switch to other platforms for execution, improving the efficiency of application maintenance and log viewing.

[0184] It should be noted that in the embodiment of the present invention, the address of the container may specifically be an IP address. Before the server applies for the bastion host service, user permission verification can also be performed. At this time, the client can be used to obtain the user's account information and send it to the server.

[0185] Combined with Figure 1For the system architecture shown, in the embodiments of the present invention, the development system with the IDE set as the client and the HTTP Proxy as the server can be taken as an example for illustration. Specifically, as Figure 4 shown, it is another system architecture diagram used in the embodiments of the present invention. As Figure 4 shown, Application represents the application data in the business database, Harbor Registry is the image center, Kubernetes is the container management system, and Docker is the container repository.

[0186] As Figure 4 shown, an IDE plugin can be set in the development system. The IDE plugin is developed by JAVA Swing (graphical interface) and can interact with users through direct clicks and inputs. The development system and the HTTP Proxy can perform data interaction through the HTTP protocol and in json format to obtain remote resource information and submit local information.

[0187] The HTTP Proxy can be developed by JAVA Web, which is equivalent to encapsulating a proxy layer. It provides an HTTP rest interface externally, that is, Figure 4 the unified interface shown, which is used to receive requests sent by the development system through the IDE plugin and perform data interaction with systems such as Kubernetes and Harbor Registry through the TCP / HTTP protocol, and finally transmit the data to the development system in json format. At the same time, the HTTP Proxy can call Kubernetes through the bastion host service to create a jump host docker, so that the development system can access the docker to be maintained through the jump host docker. In the embodiments of the present invention, the HTTP Proxy usually pre-configures relevant parameters of Application, Harbor Registry, Kubernetes, Docker, and object storage, such as address information, to facilitate communication between the HTTP Proxy and the above-mentioned systems. The specific configuration method can be as Figure 5 shown, Figure 5 which is a schematic diagram of a parameter configuration in the embodiments of the present invention.

[0188] Based on Figure 4 the system architecture shown, combined with Figure 1 and Figure 2 the embodiments shown, the method for deploying an application will be specifically described. As Figure 6 shown, it may include the following steps.

[0189] S601: After the development system receives the application identifier acquisition instruction input by the user, it sends the application identifier acquisition instruction to the HTTP Proxy.

[0190] When a user needs to deploy an application, the application identifier of the application to be deployed needs to be input. To facilitate user operation, the development system can display the identifiers of each application so that the user can select the identifier of the application to be deployed based on the displayed identifier, thereby simplifying the content input by the user.

[0191] Therefore, when a user needs to deploy an application, an application identifier acquisition instruction can be input to trigger the application deployment process. After receiving the application identifier acquisition instruction, the development system needs to obtain the identifiers of each application through the HTTP Proxy. Therefore, the development system sends the application identifier acquisition instruction to the HTTP Proxy.

[0192] It should be noted that the manner in which the user inputs the application identifier acquisition instruction is not limited. For example, it can be input by clicking (such as clicking the new menu in the IDE), inputting preset content, etc. as the application identifier acquisition instruction. The manner in which the development system sends the application identifier acquisition instruction to the HTTP Proxy is not limited. In the embodiments of the present invention, the format of the application identifier acquisition instruction can be preset, and then the preset application identifier acquisition instruction can be sent to the HTTP Proxy.

[0193] The identifier of the application can include various types, such as the application name, application number, the business system to which it belongs, the business type to which it belongs, and so on.

[0194] S602: The HTTP Proxy obtains the identifiers of each application from the business database and sends them to the development system.

[0195] After receiving the application identifier acquisition instruction sent by the development system, the HTTP Proxy can obtain the identifiers of each application from the business database. In the embodiments of the present invention, in order to facilitate user selection, all application identifiers can be obtained from the business database and sent to the development system.

[0196] After the HTTP Proxy obtains the identifiers of each application, it can be sent to the development system in the form of a list.

[0197] S603: The development system displays the identifiers of each application.

[0198] Among them, after the development system receives the identifiers of each application sent by the HTTP Proxy, it displays the identifiers of each application, thereby displaying each application to the user to facilitate the user to select the application identifier of the application to be deployed. In the embodiments of the present invention, the development system can display the identifiers of each application in the form of a list.

[0199] It should be noted that when the identifier of the application displayed in the development system does not include the identifier of the application to be deployed, the user can create a new application identifier through the development system, configure the parameters related to the new application identifier, and then send it to the HTTP Proxy through the development system, and then store it in the business database.

[0200] S604: The development system receives the application identifier of the application to be deployed input by the user.

[0201] In the embodiment of the present invention, the user can select the application identifier of the application to be deployed from the identifiers of the applications displayed in the development system, that is, the application identifier of the application to be deployed input. The way for the user to select the application identifier of the application to be deployed through the displayed application identifier and input it into the development system can be as Figure 7 shown.

[0202] S605: The development system generates an application deployment instruction according to the application identifier of the application to be deployed and sends it to the HTTP Proxy.

[0203] In the embodiment of the present invention, the application deployment instruction can be data in a preset format, which includes the application identifier of the application to be deployed. The application deployment instruction can also be the application identifier of the application to be deployed.

[0204] S606: After receiving the application deployment instruction, the HTTP Proxy obtains the basic image information corresponding to the application identifier from the image center according to the application identifier in the application deployment instruction.

[0205] Among them, the basic image information can include the version of the basic image, the storage address, the programming language, etc. For example, the basic image information can be: the basic image of CentOS6.6 with JDK (Java Development Kit), or the basic image of CentOS7.2 with python. JDK and python represent the programming languages of the basic image, and CentOS6.6 and CentOS7.2 represent the operating systems applicable to the basic image.

[0206] After receiving the application deployment instruction, the HTTP Proxy can determine the application identifier of the application to be deployed from it, then the HTTP Proxy can obtain the basic image information corresponding to the application identifier from the image center according to the application identifier.

[0207] Since different programming languages may be used when developing the basic image, and different versions of the basic image may be stored for the same application, there may be multiple basic images for one application identifier. Therefore, the HTTP Proxy obtains all the basic image information corresponding to the application identifier according to the application identifier.

[0208] Under normal circumstances, the business database stores the programming language used to develop each application for each application. When deploying this application, a base image developed using the same programming language needs to be used for deployment. Therefore, in this step, the HTTP Proxy can determine the programming language used in the development of the application based on the application identifier selected by the user, and then obtain the base image information corresponding to the application identifier and written in the programming language used in the development of the application from the image center.

[0209] S607: The HTTP Proxy sends the obtained base image information to the development system.

[0210] After obtaining the base image information, the HTTP Proxy can send it to the development system in the form of a list.

[0211] S608: The development system displays the base image information and receives the target base image information input by the user.

[0212] Among them, the target base image information belongs to the base image information. After receiving the base image information, the development system can display it, and the user inputs the target base image information to the development system by means of selection. The target base image information is the base image information of the base image required for application deployment.

[0213] S609: The development system sends the target base image information to the HTTP Proxy.

[0214] S610: The development system receives the operation instructions input by the user.

[0215] After the user determines the target base image information, the user can input operation instructions, and the operation instructions include a compilation instruction, an application image construction instruction, and an application release instruction. The user can input the development system by inputting the operation instructions at one time. In the embodiment of the present invention, it can be set that the user inputs the operation instructions through the operation of one-key compilation. The specific method can be as Figure 8 shown.

[0216] Specifically, the compilation instruction is used to indicate the compilation of the original code corresponding to the application identifier, and it includes two types: upload compilation and Git compilation. Therefore, the compilation type needs to be included in the operation instructions.

[0217] Upload compilation means that the original code corresponding to the application identifier has been compiled to obtain the application code. Therefore, the HTTPProxy only needs to upload and store the application code. At this time, the user needs to input the compiled application code to the development system so that the development system can send it to the HTTP Proxy for upload and storage. Specifically, when the compilation type is upload compilation, the parameter input method in the operation instructions can be as Figure 9 shown.

[0218] Git compilation means that the original code is stored in the code repository. The HTTP Proxy needs to obtain the original code from the code repository, compile it to obtain the application code, and upload and store it. At this time, the user needs to input the address information where the application code is stored in the code repository so that the HTTP Proxy can obtain the original code. Specifically, when the compilation type is Git compilation, the operation instruction input parameter method can be as Figure 10 shown.

[0219] It should be noted that the operation instruction can also include the number of applications that the user needs to deploy, so that the deployed applications can meet the user's needs.

[0220] S611: The development system sends a compilation instruction to the HTTP Proxy.

[0221] Among them, after receiving the operation instruction input by the user, the development system can sequentially send a compilation instruction, an application image building instruction, and an application release instruction to the HTTP Proxy. In this step, it is to send a compilation instruction.

[0222] The compilation instruction can include the identifier of the compilation type, such as the upload compilation type identifier and the Git compilation type identifier, so as to determine the compilation type. The compilation instruction can also include the parameters corresponding to each compilation type. For example, if the compilation type is upload compilation, the compilation parameters can include the application code. If the compilation type is Git compilation, the compilation parameters can include the address information where the original code is stored in the code repository.

[0223] S612: After receiving the compilation instruction, the HTTP Proxy executes the compilation process.

[0224] The compilation type can be determined through the compilation instruction.

[0225] If the compilation type is upload compilation, the HTTP Proxy can upload the application code to the object storage in the form of a software package, and at the same time upload the application identifier to the object storage so that the corresponding relationship between the application code and the application identifier is stored in the object storage.

[0226] If the compilation type is Git compilation, the HTTP Proxy can obtain the original code according to the address information stored in the code repository of the original code, then call Kubernetes, pull the Image from the Harbor Registry through Kubernetes to create a container, and execute the compilation command in the container to compile the original data. After the compilation is completed, the obtained application code is uploaded to the object storage in the form of a software package, and the container used for compilation is deleted. At the same time, the application identifier is uploaded to the object storage so that the corresponding relationship between the application code and the application identifier is stored in the object storage.

[0227] In the HTTP Proxy, a fixed template can be established in advance. The name of the Image to be pulled is specified in the fixed template. Therefore, in this step, the Image is pulled from the Harbor Registry by sending the fixed template.

[0228] S613: After the development system determines that the HTTP Proxy has completed compilation, it sends an application image building instruction.

[0229] After sending the compilation instruction, the development system can poll the HTTP Proxy at regular intervals to check if the compilation is completed. After determining that the HTTP Proxy has completed compilation, it sends an application image building instruction.

[0230] S614: The HTTP Proxy builds the application image according to the application image building instruction.

[0231] The HTTP Proxy can call Kubernetes to pull the Image from the Harbor Registry to create a container, obtain the target base image from the object storage according to the target base image information, and obtain the application code from the object storage according to the application identifier. Then, it executes the container creation (docker build) command in the created container to generate the application image, and then executes the upload (docker push) command to upload the generated application image to the Harbor Registry, and deletes the created container.

[0232] In the HTTP Proxy, a fixed template can be established in advance. The name of the Image to be pulled is specified in the fixed template. Therefore, in this step, the Image is pulled from the Harbor Registry by sending the fixed template.

[0233] S615: After the development system determines that the HTTP Proxy has completed building the application image, it sends an application publishing instruction.

[0234] After sending the application image building instruction, the development system can poll the HTTP Proxy at regular intervals to check if the application image building is completed. After determining that the HTTP Proxy has completed building the application image, it sends an application publishing instruction.

[0235] It should be noted that the application publishing instruction may include the number of applications to be deployed entered by the user.

[0236] S616: The HTTP Proxy publishes the application container according to the application publishing instruction.

[0237] After receiving the application release instruction, the HTTP Proxy can call Kubernetes. Kubernetes can pull the built application image from the Harbor Registry according to the application identifier, create application containers based on the application image, and then release the created application containers, thereby realizing application deployment.

[0238] It should be noted that when the number of application containers to be built is required in the application release instruction, the HTTP Proxy can determine the number of application containers to be built according to the required number, and then release the required number of application containers.

[0239] It should be noted that during the execution of steps S611 to S616, the development system queries the progress of application deployment in real time and displays it to prompt the user of the progress of application deployment. Specifically, the way to display the application deployment progress can be as Figure 11 shown.

[0240] In the embodiment of the present invention, the development system can implement application deployment through the HTTP Proxy. In this way, after the application development is completed in the development system, the application can be directly deployed through the HTTP Proxy without switching to other platforms for application deployment, improving the efficiency of application deployment.

[0241] Based on Figure 4 the system architecture shown, combined with Figure 1 and Figure 2 the embodiments shown, the method for viewing application logs will be specifically described. As Figure 12 shown, it may include the following steps.

[0242] S1201: The development system receives the log viewing instruction input by the user. The log viewing instruction includes the application identifier of the log to be viewed.

[0243] When it is necessary to view the log, the development system can receive the log viewing instruction input by the user. The viewing instruction may include the application identifier of the application to be viewed.

[0244] In the embodiment of the present invention, there is no limitation on the way for the user to input the log viewing instruction. For example, the user can input it by clicking "New" or the like.

[0245] In the embodiment of the present invention, when the user needs to view the log, the development system can obtain the identifiers of each application through the HTTP Proxy, and then display the identifiers of each application so that the user can input the application identifier of the log to be viewed by selection.

[0246] S1202: The development system sends the log viewing instruction to the HTTP Proxy.

[0247] Among them, the log viewing instruction includes the application identifier of the log to be viewed.

[0248] S1203: The HTTP Proxy obtains the IP addresses of all containers corresponding to the application identifier and sends them to the development system.

[0249] Among them, after receiving the log viewing instruction, the HTTP Proxy can obtain the application identifier of the log to be viewed. Then, by calling Kubernetes, it can obtain the IP addresses of all containers corresponding to the application identifier. Then, it sends the IP addresses of all containers corresponding to the application identifier to the development system so that the user can select the target address from the IP addresses, that is, the address of the container whose log is to be viewed.

[0250] S1204: The development system receives and displays the IP addresses of all containers corresponding to the application identifier.

[0251] S1205: The development system user inputs the target address and sends it to the HTTP Proxy.

[0252] Among them, the target address represents the address of the container whose log is to be viewed and is one of the IP addresses of all containers corresponding to the application identifier.

[0253] S1206: The HTTP Proxy obtains the list of log files of the container corresponding to the target address from Docker and sends it to the development system.

[0254] The HTTP Proxy can remotely access the container in Docker whose log needs to be viewed according to the target address through the SSH protocol, obtain the list of log files of the container whose log needs to be viewed through the Is command, and send it to the development system.

[0255] The list of log files can specifically be a list of the addresses, names, etc. of the log files.

[0256] S1207: The development system receives and displays the list of log files of the container corresponding to the target address.

[0257] S1208: The development system receives the target log file input by the user.

[0258] The user can select the target log file to be viewed from the displayed list of log files and input it into the development system.

[0259] The user can determine the target log file by setting a subscription. The specific subscription method can be as Figure 13 shown.

[0260] S1209: The development system obtains and displays the content of the target log file and polls to update the content of the target log file.

[0261] The development system can remotely access the container whose logs need to be viewed through the SSH protocol and obtain the content of the target log file through the tail command.

[0262] Specifically, the way for the development system to display the content of the target log file can be as Figure 14 shown.

[0263] In the embodiment of the present invention, the development system can also implement the function of viewing the logs of the deployed application through the HTTP Proxy, so that when viewing the logs of the deployed application, there is no need to switch to other platforms for execution, improving the efficiency of viewing application logs.

[0264] Based on Figure 4 the system architecture shown, combined with Figure 1 and Figure 2 the embodiments shown, the method for viewing application logs will be specifically described. As Figure 15 shown, it can include the following steps.

[0265] S1501: The development system receives the maintenance instruction input by the user.

[0266] Among them, the maintenance instruction includes the application identifier of the application to be maintained.

[0267] When application maintenance is required, the development system can receive the maintenance instruction input by the user, and the maintenance instruction can include the application identifier of the application to be maintained.

[0268] In the embodiment of the present invention, there is no limitation on the way for the user to input the maintenance instruction. For example, the user can input it by clicking New, etc.

[0269] In the embodiment of the present invention, when the user needs to maintain the application, the development system can obtain the identifiers of each application through the HTTP Proxy and then display the identifiers of each application so that the user can input the application identifier of the application to be maintained by means of selection.

[0270] S1502: The development system sends the maintenance instruction to the HTTP Proxy.

[0271] Among them, the maintenance instruction includes the application identifier of the application to be maintained.

[0272] S1503: The HTTP Proxy obtains the IP addresses of all containers corresponding to the application identifier and sends them to the development system.

[0273] Among them, after the HTTP Proxy receives the maintenance instruction, it can obtain the application identifier of the application to be maintained, and then by calling Kubernetes, it can obtain the IP addresses of all containers corresponding to the application identifier. Then, it sends the IP addresses of all containers corresponding to the application identifier to the development system so that the user can select the target address from the IP addresses, that is, the address of the container for which the log is to be viewed.

[0274] S1504: The development system receives and displays the IP addresses of all containers corresponding to the application identifier.

[0275] S1505: The development system receives the target address input by the user and sends it to the HTTP Proxy.

[0276] The development system sends the target address to the HTTP Proxy. Since a bastion host service needs to be applied for, the HTTP Proxy needs to apply for the bastion host service according to the target address.

[0277] S1506: The HTTP Proxy calls the bastion host service so that the bastion host service creates a jump server container according to the target address through Kubernetes and determines the information of the created jump server container.

[0278] The maintenance container needs to access the container. The development system can access the container to be maintained through the bastion host service. Therefore, the HTTP Proxy can apply for the bastion host service according to the target address, and then call the bastion host service so that the bastion host service creates a jump server container according to the target address through the container management system and determines the information of the created jump server container. The information of the jump server container can include the account and password.

[0279] Before calling the bastion host service, the HTTP Proxy can also verify the user to determine whether they have the maintenance permission. The verification method is usually to obtain the user's account information through the development system and determine whether the account information has the access permission to the containers corresponding to the application identifier. If the user has the access permission, the process of calling the bastion host service is executed; if the user does not have the access permission, the execution can be stopped and the user can be prompted through the development system.

[0280] S1507: Send the information of the jump server container to the development system.

[0281] The HTTP Proxy sends the information of the jump server container to the development system, enabling the development system to access the container corresponding to the target address through the information of the jump server container.

[0282] S1508: The development system connects to the jump server container through the information of the jump server container and accesses the container corresponding to the target address through the jump server container.

[0283] In this step, after the development system receives the information of the jump server container, it can use the SSH protocol to connect to the jump server container based on the information of the jump server container, and access the container corresponding to the target address through the jump server container. The method of accessing the container corresponding to the target address through the information of the jump server container can be as Figure 16 shown.

[0284] After the development system successfully accesses the container corresponding to the target address, it can display the content of the container corresponding to the target address, thereby realizing the maintenance of the container corresponding to the target address. Specifically, the method of connecting to the container corresponding to the target address can be as Figure 17 shown.

[0285] In the embodiment of the present invention, the development system can also implement the maintenance function of the deployed application through the HTTP Proxy, so that when maintaining the deployed application, it is not necessary to switch to other platforms for execution, improving the efficiency of application maintenance.

[0286] To solve the problems existing in the prior art, an apparatus 1800 for deploying an application is provided in an embodiment of the present invention, which is set on the server side, as Figure 18 shown. The apparatus 1800 includes:

[0287] A receiving unit 1801, configured to receive an application deployment instruction sent by a client, where the application deployment instruction includes an application identifier of an application to be deployed;

[0288] A determining unit 1802, configured to determine target base image information from an image center according to the application identifier;

[0289] A processing unit 1803, configured to receive an operation instruction sent by the client, determine application code corresponding to the application identifier according to the operation instruction, construct an application image according to the target base image information and the application code, construct an application container according to the application image, and publish the application container.

[0290] It should be understood that the implementation manner of the embodiment of the present invention is the same as that of the embodiment Figure 2 shown, and will not be described in detail here.

[0291] In an implementation manner of the embodiment of the present invention, the operation instruction includes a compilation instruction, and the compilation instruction includes compilation information; the processing unit 1803 is specifically configured to:

[0292] Determine a compilation type from the compilation information;

[0293] If the compilation type is upload compilation, upload the application identifier and its corresponding application code to an object storage system;

[0294] If the compilation type is control system compilation, obtain the original code from the code library according to the address information; by invoking the container management system, enable the container management system to obtain the target image from the image center to build a compilation container, and execute a compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system.

[0295] In another implementation manner of the embodiment of the present invention, if the compilation type is upload compilation, the compilation information includes an upload compilation type identifier and the application code corresponding to the application identifier; if the compilation type is control system compilation, the compilation information includes a control system compilation type identifier and the address information.

[0296] In another implementation manner of the embodiment of the present invention, the operation instruction includes an application image building instruction; the processing unit 1803 is specifically configured to:

[0297] By invoking the container management system, enable the container management system to obtain the target base image from the object storage system according to the target base image information, obtain the application code from the object storage system according to the application identifier, and build the application image corresponding to the application identifier according to the target base image information and the application code.

[0298] In another implementation manner of the embodiment of the present invention, the determining unit 1802 is specifically configured to:

[0299] Obtain a list of base image information corresponding to the application identifier from the image center;

[0300] Send the list of base image information to the client;

[0301] Receive the target base image information sent by the client, where the target base image information is determined by the user from the list of base image information.

[0302] In another implementation manner of the embodiment of the present invention, the receiving unit 1801 is further configured to receive an application identifier acquisition instruction sent by the client;

[0303] The device 1800 further includes:

[0304] An acquisition unit, configured to acquire the identifiers of each application from the service database according to the application identifier acquisition instruction;

[0305] A sending unit, configured to send the identifiers of each application to the client.

[0306] In another implementation manner of the embodiment of the present invention, the receiving unit 1801 is further configured to receive a log viewing instruction sent by the client, where the log viewing instruction includes the application identifier;

[0307] The device 1800 further includes:

[0308] A sending unit, configured to obtain the address of the container corresponding to the application identifier from the container management system, and send the address of the container corresponding to the application identifier to the client;

[0309] The receiving unit 1801 is further configured to receive a target address sent by the client;

[0310] The sending unit is further configured to obtain a list of log files of the container corresponding to the target address from the container repository, and send the list of log files to the client.

[0311] In another implementation manner of the embodiment of the present invention, the receiving unit 1801 is further configured to receive a maintenance instruction sent by the client, where the maintenance instruction includes the application identifier;

[0312] The device 1800 further includes:

[0313] A sending unit, configured to obtain the address of the container corresponding to the application identifier, and send the address of the container corresponding to the application identifier to the client;

[0314] The receiving unit 1801 is further configured to receive a target address sent by the client;

[0315] The determining unit 1802 is further configured to call the bastion host service, so that the bastion host service creates a jump server container according to the target address through the container management system, and determines the information of the jump server container;

[0316] The sending unit is further configured to send the information of the jump server container to the client.

[0317] It should be understood that the implementation manner of implementing the embodiment of the present invention is the same as the implementation manner of the embodiment shown in Figure 2 、 Figure 6 、 Figure 12 and Figure 15 shown, and will not be described in detail here.

[0318] In the embodiment of the present invention, the client in the embodiment of the present invention can implement application deployment through the server. In this way, after the application development is completed on the client, the application can be directly deployed through the server, without the need to switch to other platforms for application deployment, improving the efficiency of application deployment.

[0319] To solve the problems existing in the prior art, an embodiment of the present invention provides a device 1900 for deploying an application, which is arranged on a client side, such as Figure 19 As shown, the device 1900 includes:

[0320] A receiving unit 1901, configured to receive an application identifier of an application to be deployed input by a user;

[0321] A generating unit 1902, configured to generate an application deployment instruction according to the application identifier;

[0322] A sending unit 1903, configured to send the application deployment instruction to a server, where the application deployment instruction includes the application identifier;

[0323] The receiving unit 1901 is further configured to receive an operation instruction sent by the user;

[0324] The sending unit 1903 is further configured to send the operation instruction to the server, where the operation instruction includes a compilation instruction, an application image building instruction, and an application release instruction.

[0325] It should be understood that the implementation manner of the embodiment of the present invention is the same as that of the embodiment shown Figure 3 and will not be described in detail here.

[0326] In an implementation manner of the embodiment of the present invention, the sending unit 1903 is specifically configured to:

[0327] Send the compilation instruction to the server;

[0328] Poll the server at a preset period to determine whether the server has completed compilation;

[0329] If so, send the application image building instruction to the server;

[0330] Poll the server according to the preset period to determine whether the server has completed application image building;

[0331] If so, send the application release instruction to the server.

[0332] In another implementation manner of the embodiment of the present invention, the receiving unit 1901 is further configured to receive and display a list of base image information corresponding to the application identifier sent by the server;

[0333] The receiving unit 1901 is further configured to receive target base image information input by a user, where the target base image information belongs to the list of base image information;

[0334] The sending unit 1903 is further configured to send the target base image information to the server.

[0335] In another implementation manner of the embodiment of the present invention, the receiving unit 1901 is further configured to receive a log viewing instruction input by a user, and the log viewing instruction includes the application identifier;

[0336] The sending unit 1903 is further configured to send the log viewing instruction to the server;

[0337] The receiving unit 1901 is further configured to receive and display the address of the container corresponding to the application identifier sent by the server;

[0338] The receiving unit 1901 is further configured to receive a target address input by a user, and the target address represents the address of the container for which the log is to be viewed;

[0339] The sending unit 1903 is further configured to send the target address to the server;

[0340] The receiving unit 1901 is further configured to receive and display the list of log files of the container corresponding to the target address sent by the server;

[0341] The receiving unit 1901 is further configured to receive a target log file input by a user;

[0342] The device 1900 further includes:

[0343] A display unit, configured to obtain and display the content of the target log file according to the target log file.

[0344] In another implementation manner of the embodiment of the present invention, the receiving unit 1901 is further configured to receive a maintenance instruction input by a user, and the maintenance instruction includes the application identifier;

[0345] The sending unit 1903 is further configured to send the maintenance instruction to the server;

[0346] The receiving unit 1901 is further configured to receive and display the address of the container corresponding to the application identifier sent by the server;

[0347] The receiving unit 1901 is further configured to receive a target address input by a user, and the target address represents the address of the container to be maintained;

[0348] The sending unit 1903 is further configured to send the target address to the server;

[0349] The receiving unit 1901 is further configured to receive the information of the jump server container sent by the server;

[0350] The device 1900 further includes:

[0351] An access unit for accessing the container corresponding to the target address through the information of the jump server container to maintain the container corresponding to the target address.

[0352] It should be understood that the implementation manner of the embodiments of the present invention is the same as that of the Figure 3 , Figure 6 , Figure 12 and Figure 15 illustrated embodiments, and will not be elaborated herein.

[0353] In the embodiments of the present invention, the client can implement application deployment through the server. Thus, after the application is developed on the client, the application can be directly deployed through the server without the need to switch to other platforms for application deployment, improving the efficiency of application deployment.

[0354] According to an embodiment of the present invention, the present invention also provides an electronic device and a readable storage medium.

[0355] The electronic device of the present invention includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for deploying an application provided by the embodiments of the present invention.

[0356] Figure 20 Exemplary system architecture 2000 is shown which can apply the method for deploying an application or the device for deploying an application according to the embodiments of the present invention.

[0357] As Figure 20 shown, the system architecture 2000 may include terminal devices 2001, 2002, 2003, a network 2004, and a server 2005. The network 2004 is used to provide a medium for communication links between the terminal devices 2001, 2002, 2003 and the server 2005. The network 2004 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0358] Users can use the terminal devices 2001, 2002, 2003 to interact with the server 2005 through the network 2004 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 2001, 2002, 2003, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0359] The terminal devices 2001, 2002, and 2003 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0360] Server 2005 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using terminal devices 2001, 2002, and 2003. The backend management server may analyze and process received data such as product information query requests, and feed back processing results (such as product information - only an example) to the terminal device.

[0361] It should be noted that the method for deploying applications provided in the embodiment of the present invention is generally executed by the server 2005, and accordingly, the apparatus for deploying applications is generally set in the server 2005. The method for deploying applications provided in the embodiment of the present invention is generally executed by the terminal devices 2001, 2002, and 2003, and accordingly, the apparatus for deploying applications is generally set in the terminal devices 2001, 2002, and 2003.

[0362] It should be understood that Figure 20 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0363] Reference below Figure 21 , which shows a schematic diagram of the structure of a computer system 2100 suitable for implementing an embodiment of the present invention. Figure 21 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0364] like Figure 21 As shown, the computer system 2100 includes a central processing unit (CPU) 2101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 2102 or a program loaded from a storage part 2108 into a random access memory (RAM) 2103. In the RAM 2103, various programs and data required for the operation of the system 2100 are also stored. The CPU 2101, the ROM 2102, and the RAM 2103 are connected to each other via a bus 2104. An input / output (I / O) interface 2105 is also connected to the bus 2104.

[0365] The following components are connected to the I / O interface 2105: an input section 2106 including a keyboard, a mouse, etc.; an output section 2107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 2108 including a hard disk, etc.; and a communication section 2109 including a network interface card such as a LAN card, a modem, etc. The communication section 2109 performs communication processing via a network such as the Internet. A drive 2110 is also connected to the I / O interface 2105 as required. A removable medium 2111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 2110 as required so that a computer program read therefrom is installed into the storage section 2108 as required.

[0366] Specifically, according to the embodiments disclosed by the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed by the present invention include a computer program product which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 2109, and / or installed from the removable medium 2111. When the computer program is executed by a central processing unit (CPU) 2101, the above-described functions defined in the system of the present invention are performed.

[0367] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0368] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a unit, a program segment, or a part of code, and the above unit, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0369] The units involved in the embodiments of the present invention can be implemented in software or in hardware. The described units can also be provided in a processor. For example, it can be described as: a processor includes a receiving unit, a determining unit, and a processing unit. Among them, the names of these units do not constitute a limitation to the unit itself in some cases. For example, the receiving unit can also be described as "a unit for the function of the receiving unit".

[0370] On the other hand, the present invention also provides a computer-readable medium, which can be included in the device described in the above embodiments; or can exist alone without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the device is caused to execute the method for deploying an application provided by the present invention.

[0371] The above specific embodiments do not limit the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for deploying an application, characterized in that, Applied to the server side, including: Receiving an application deployment instruction sent by the client, where the application deployment instruction includes the application identifier of the application to be deployed; Determining target base image information from the image center according to the application identifier; Receiving a compilation instruction sent by the client, where the compilation instruction includes compilation information; Determining the compilation type from the compilation information; If the compilation type is upload compilation, uploading the application identifier and its corresponding application code to the object storage system; if the compilation type is control system compilation, obtaining the original code from the code library according to the address information, calling the container management system to obtain the target image, constructing a compilation container, and executing a compilation command on the original code in the compilation container to obtain the application code, and uploading the application code and the application identifier to the object storage system; Receiving an application image construction instruction sent by the client; Calling the container management system to obtain the target base image according to the target base image information, obtaining the application code from the object storage system according to the application identifier, and constructing the application image corresponding to the application identifier according to the target base image and the application code; Receiving an application release instruction sent by the client; Constructing an application container according to the application image and releasing the application container.

2. The method according to claim 1, wherein If the compilation type is upload compilation, the compilation information includes an upload compilation type identifier and the application code corresponding to the application identifier; If the compilation type is control system compilation, the compilation information includes a control system compilation type identifier and the address information shown.

3. The method according to claim 1, characterized in that, The determining target base image information from the image center according to the application identifier includes: Obtaining a list of base image information corresponding to the application identifier from the image center; Sending the list of base image information to the client; Receiving the target base image information sent by the client, where the target base image information is determined by the user from the list of base image information.

4. The method according to claim 1, wherein Before receiving the application deployment instruction sent by the client, it further includes: Receiving an application identifier acquisition instruction sent by the client; Obtaining the identifiers of each application from the business database according to the application identifier acquisition instruction; Sending the identifiers of each application to the client.

5. The method according to claim 1, wherein After releasing the application container, it further includes: Receiving a log viewing instruction sent by the client, where the log viewing instruction includes the application identifier; Obtaining the address of the container corresponding to the application identifier from the container management system and sending the address of the container corresponding to the application identifier to the client; Receiving the target address sent by the client; Obtaining a list of log files of the container corresponding to the target address from the container repository and sending the list of log files to the client.

6. The method according to claim 1, characterized in that After releasing the application container, it further includes: Receiving a maintenance instruction sent by the client, where the maintenance instruction includes the application identifier; Obtaining the address of the container corresponding to the application identifier and sending the address of the container corresponding to the application identifier to the client; Receiving the target address sent by the client; Invoke the bastion host service so that the bastion host service creates a jump server container according to the target address through the container management system and determines the information of the jump server container; Send the information of the jump server container to the client.

7. A method for deploying an application, characterized in that, Applied to the client, including: Receive the application identifier of the application to be deployed input by the user; Generate an application deployment instruction according to the application identifier; Send the application deployment instruction to the server, and the application deployment instruction includes the application identifier; Receive the operation instruction sent by the user; Send a compilation instruction to the server, and the compilation instruction includes compilation information so that the server determines the compilation type from the compilation information; if the compilation type is upload compilation, upload the application identifier and its corresponding application code to the object storage system; if the compilation type is control system compilation, obtain the original code from the code library according to the address information, obtain the target image by calling the container management system to build a compilation container, and execute a compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system; Poll the server at a preset period to determine whether the server has completed compilation; If so, send an application image building instruction to the server so that the server calls the container management system to obtain the target base image according to the target base image information, obtain the application code from the object storage system according to the application identifier, and build the application image corresponding to the application identifier according to the target base image and the application code; Poll the server at the preset period to determine whether the server has completed building the application image; If so, send an application release instruction to the server so that the server builds an application container according to the application image and releases the application container.

8. The method according to claim 7, wherein Before sending the operation instruction to the server, it further includes: Receive and display the list of base image information corresponding to the application identifier sent by the server; Receive the target base image information input by the user, and the target base image information belongs to the list of base image information; Send the target base image information to the server.

9. The method according to claim 7, wherein After sending the operation instruction to the server, it further includes: Receive the log viewing instruction input by the user, and the log viewing instruction includes the application identifier; Send the log viewing instruction to the server; Receive and display the address of the container corresponding to the application identifier sent by the server; Receive the target address input by the user, and the target address represents the address of the container for which the log is to be viewed; Send the target address to the server; Receive and display the list of log files of the container corresponding to the target address sent by the server; Receive the target log file input by the user; Obtain and display the content of the target log file according to the target log file.

10. The method according to claim 7, wherein After sending the operation instruction to the server, it further includes: Receive the maintenance instruction input by the user, and the maintenance instruction includes the application identifier; Send the maintenance instruction to the server; Receive and display the address of the container corresponding to the application identifier sent by the server; Receive the target address input by the user, where the target address represents the address of the container to be maintained; Send the target address to the server; Receive the information of the jump server container sent by the server; Access the container corresponding to the target address through the information of the jump server container to maintain the container corresponding to the target address.

11. A device for deploying an application, characterized in that, Set on the server, including: A receiving unit for receiving an application deployment instruction sent by the client, where the application deployment instruction includes the application identifier of the application to be deployed; A determining unit for determining target base image information from the image center according to the application identifier; A processing unit for receiving the operation instruction sent by the client, determining the application code corresponding to the application identifier according to the operation instruction, constructing an application image according to the target base image information and the application code, constructing an application container according to the application image, and publishing the application container; The processing unit is specifically used for: Receiving the compilation instruction sent by the client, where the compilation instruction includes compilation information; Determining the compilation type from the compilation information; If the compilation type is upload compilation, upload the application identifier and its corresponding application code to the object storage system; if the compilation type is control system compilation, obtain the original code from the code library according to the address information, call the container management system to obtain the target image to construct a compilation container, and execute the compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system; Receiving the application image construction instruction sent by the client; Calling the container management system to obtain the target base image according to the target base image information, obtaining the application code from the object storage system according to the application identifier, and constructing the application image corresponding to the application identifier according to the target base image and the application code; Receiving the application release instruction sent by the client; Constructing an application container according to the application image and publishing the application container.

12. A device for deploying an application, characterized in that, Set on the client, including: A receiving unit for receiving the application identifier of the application to be deployed input by the user; A generating unit for generating an application deployment instruction according to the application identifier; A sending unit for sending the application deployment instruction to the server, where the application deployment instruction includes the application identifier; The receiving unit is further used for receiving the operation instruction sent by the user; The sending unit is further used for sending an operation instruction to the server, where the operation instruction includes a compilation instruction, an application image construction instruction, and an application release instruction; The sending unit is specifically used for: Send a compilation instruction to the server, where the compilation instruction includes compilation information, so that the server determines the compilation type from the compilation information; if the compilation type is upload compilation, upload the application identifier and its corresponding application code to the object storage system; if the compilation type is control system compilation, obtain the original code from the code library according to the address information, obtain the target image by calling the container management system to build a compilation container, and execute a compilation command on the original code in the compilation container to obtain the application code, and upload the application code and the application identifier to the object storage system; Poll the server at a preset period to determine whether the server has completed compilation; If so, send an application image construction instruction to the server, so that the server calls the container management system to obtain the target base image according to the target base image information, obtain the application code from the object storage system according to the application identifier, and build the application image corresponding to the application identifier according to the target base image and the application code; Poll the server according to the preset period to determine whether the server has completed the application image construction; If so, send an application release instruction to the server, so that the server builds an application container according to the application image and publishes the application container.

13. An electronic device, characterized in that, Includes: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-10.

14. A computer-readable medium having a computer program stored thereon, characterized in that, The program, when executed by the processor, implements the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Container application deployment method and device, computer equipment and storage medium

    CN108958927A