Application deployment methods, devices and electronic equipment

By acquiring business information and data packets to generate a business image, pushing it to the target server and starting the container, the problem of low deployment efficiency in existing technologies is solved, and flexible and efficient application deployment is achieved.

CN115167873BActive Publication Date: 2026-03-06INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210968312.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2026-03-06
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

The deployment process in existing technologies is cumbersome and complex, resulting in low deployment efficiency and difficulty in customizing deployments according to business needs, with a low degree of customization.

Method used

By acquiring the business information and data packets of the application to be deployed, a business image is generated and pushed to the target server. A business container corresponding to the business image is generated, and the business container is started to run the source code. Combined with the image repository building and verification process, personalized and customized application deployment can be achieved.

Benefits of technology

It improves the flexibility and efficiency of application deployment, simplifies deployment steps, and enables the rapid customization of business images and flexible deployment of containers based on complex business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115167873B_ABST
    Figure CN115167873B_ABST
Patent Text Reader

Abstract

This invention discloses an application deployment method, apparatus, and electronic device, relating to the field of cloud computing technology. The method includes: acquiring business information and data packets of the application to be deployed, wherein the business information includes at least attribute information, address information, and verification information, and the data packets consist of the source code of the application to be deployed; generating a business image based on the business information and data packets, wherein the business image represents an image containing the source code; and pushing the business image to a target server, wherein the target server is used to run the business image, generate a business container corresponding to the business image, and start the business container to run the source code. This invention solves the technical problem of low efficiency in deploying new applications in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing technology, and more specifically, to an application deployment method, apparatus, and electronic device. Background Technology

[0002] With the continuous development of internet technology, application deployment is becoming increasingly frequent. Currently, open-source management platforms, such as Kubernetes, are commonly used for containerized application deployment. However, existing deployment methods suffer from cumbersome and complex processes, leading to low deployment efficiency. Furthermore, they are relatively weak in executing simple commands and lack customization based on business needs, resulting in a low degree of customization.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides an application deployment method, apparatus, and electronic device to at least solve the technical problem of low efficiency in deploying new applications in the prior art.

[0005] According to one aspect of the present invention, an application deployment method is provided, comprising: acquiring business information and data packets of an application to be deployed, wherein the business information includes at least attribute information, address information and verification information, and the data packets consist of source code of the application to be deployed; generating a business image based on the business information and data packets, wherein the business image represents an image containing source code; and pushing the business image to a target server, wherein the target server is used to run the business image, generate a business container corresponding to the business image, and start the business container to run the source code.

[0006] Furthermore, the application deployment method also includes: building a first sub-repository and a second sub-repository in the image repository, wherein the image repository is used to store multiple images; obtaining a first image and storing the first image in the first sub-repository, wherein the first image represents a blank base image that does not contain program code; generating a business image based on the first image, business information and data packets, and storing the business image in the second sub-repository.

[0007] Furthermore, the application deployment method also includes: determining the target server from multiple servers based on address information; pulling the business image from the second sub-repository and pushing the business image to the target server.

[0008] Furthermore, the application deployment method also includes: the target server is also used to generate an execution command to run the business image based on the business information, generate a business container corresponding to the business image based on the execution command, and start the business container to run the source code.

[0009] Furthermore, the application deployment method also includes: performing availability verification on the business container and obtaining the verification result, wherein the verification result characterizes whether the business container is running normally.

[0010] Furthermore, the application deployment method also includes: determining whether the business container has started normally based on the verification information to obtain a first judgment result; determining whether the configuration information of the port of the business container is abnormal based on the verification information to obtain a second judgment result; determining whether the target terminal can access the application to be deployed normally based on the verification information to obtain a third judgment result; and determining whether the business container is running normally based on the first judgment result, the second judgment result, and the third judgment result to obtain a verification result.

[0011] Furthermore, the application deployment method also includes: if the business container starts normally, the configuration information of the business container's port is in a normal state, and the target terminal can access the application to be deployed normally, then the application to be deployed is determined to be deployed successfully; if the business container fails to start, or the configuration information of the business container's port is abnormal, or the target terminal cannot access the application to be deployed, then the application to be deployed is determined to be deployed unsuccessfully.

[0012] According to another aspect of the present invention, an application deployment apparatus is also provided, comprising: an acquisition module, configured to acquire business information and data packets of an application to be deployed, wherein the business information includes at least attribute information, address information and verification information, and the data packets consist of source code of the application to be deployed; a processing module, configured to generate a business image based on the business information and data packets, wherein the business image represents an image containing source code; and a push module, configured to push the business image to a target server, wherein the target server is configured to run the business image, generate a business container corresponding to the business image, and start the business container to run the source code.

[0013] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described application deployment method at runtime.

[0014] According to another aspect of the present invention, an electronic device is also provided, the electronic device including one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are configured to run the programs, wherein the programs are configured to execute the above-described application deployment method at runtime.

[0015] In this embodiment of the invention, a method of customizing the construction of business images and deployment containers according to business needs is adopted. First, the business information and data packets of the application to be deployed are obtained. Then, based on the business information and data packets, a business image is generated, and the business image is pushed to the target server. The business information includes at least attribute information, address information, and verification information. The data packets consist of the source code of the application to be deployed. The business image represents an image containing the source code. The target server is used to run the business image, generate a business container corresponding to the business image, and start the business container to run the source code.

[0016] In the above process, by acquiring the business information and data packets of the application to be deployed, a data foundation is provided for the subsequent generation of the business image; by generating the business image, personalized customization of the business image according to business needs is realized, improving the flexibility of application deployment; by pushing the business image to the target server, the target server can run the business image, thereby generating a business container corresponding to the business image, and by starting the business container to run the source code, the deployment of the application to be deployed is realized, simplifying the application deployment steps and thus improving the application deployment efficiency.

[0017] Therefore, the technical solution of this invention achieves the goal of quickly customizing business images according to complex business needs and flexibly deploying containers, thereby improving the technical efficiency of deploying new applications and solving the technical problem of low efficiency in deploying new applications in the prior art. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0019] Figure 1 This is a flowchart of an optional application deployment method according to an embodiment of the present invention;

[0020] Figure 2 This is a schematic diagram of an optional application deployment system according to an embodiment of the present invention;

[0021] Figure 3 This is a schematic diagram of the operation of an optional application deployment system according to an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of an optional application deployment device according to an embodiment of the present invention;

[0023] Figure 5 This is a schematic diagram of an optional electronic device according to an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] It should be noted that all relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this invention are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with the relevant user or organization. Before obtaining relevant information, it needs to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent from the aforementioned user or organization.

[0027] Example 1

[0028] According to an embodiment of the present invention, an embodiment of an application deployment method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] Figure 1 This is a flowchart of an optional application deployment method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0030] Step S101: Obtain the business information and data packet of the application to be deployed. The business information includes at least attribute information, address information and verification information. The data packet consists of the source code of the application to be deployed.

[0031] In the above steps, business information and data packets of the application to be deployed can be obtained through devices such as application systems, processors, and electronic devices. In this embodiment, this is achieved through methods such as... Figure 2 The application deployment system shown obtains the business information and data packets of the application to be deployed. For example... Figure 2 As shown, the application deployment system includes: a microservice business image creation device D201, an image storage warehouse device D202, an automated container batch deployment device D203, and a container deployment result information and feedback device D204.

[0032] Optionally, the application to be deployed can be an application that needs to be deployed on the web according to business requirements. For example, it can be deployed on a web server using Docker and Java technologies. Business information can refer to the relevant configuration information of the application to be deployed, such as image name, container name, and other attribute information; the server IP address for deploying the container, the port information to be mapped, the host machine path information, the server information for uploading the code, and verification information such as access links and verification information for other API services. The data package can be a WAR file formed by packaging the source code corresponding to the application to be deployed.

[0033] It should be noted that, in the above process, by obtaining the business information and data packets of the application to be deployed, an accurate data foundation can be provided for the subsequent generation of the business image, and at the same time, an information foundation can be provided for the subsequent container deployment verification.

[0034] Step S102: Based on business information and data packets, generate a business image, wherein the business image represents an image containing source code.

[0035] In the above steps, by means of Figure 2 The application deployment system shown generates a business image. Optionally, operations and maintenance personnel can create customized Docker business images according to business needs. For example, when creating a backend environment for accessing a browser, operations and maintenance personnel need to configure a Java environment. They can deploy the Java environment in a container by creating a customized Docker image of the Java environment, thereby achieving the deployment of the Java environment.

[0036] It should be noted that in the above process, by generating business images, personalized customization of the business images can be achieved according to business needs. This high degree of customization improves the flexibility of application deployment, provides strong scalability, and can meet diverse business scenarios. Furthermore, secondary development can be performed according to different business requirements. For example, by adding base images, the expansion needs arising from the increase in the business infrastructure environment of the project or system can be met, and the application can be horizontally scaled according to the increased business requirements.

[0037] Step S103: Push the business image to the target server, whereby the target server is used to run the business image, generate a business container corresponding to the business image, and start the business container to run the source code.

[0038] In the above steps, the target server can be a server corresponding to the server IP of the container deployment server contained in the business information obtained in the aforementioned process. Optionally, the target server can run the business image according to the port information to be mapped, container name and other information contained in the business information, generate a business container corresponding to the business image, and run the source code by starting the business container.

[0039] It should be noted that by starting the business container to run the source code, the application to be deployed is deployed, which simplifies the application deployment steps and thus improves the application deployment efficiency.

[0040] Based on the scheme defined in steps S101 to S103 above, it can be understood that in this embodiment of the invention, a method of customizing the construction of a business image and deployment container according to business needs is adopted. First, the business information and data packets of the application to be deployed are obtained. Then, based on the business information and data packets, a business image is generated, and then the business image is pushed to the target server. The business information includes at least attribute information, address information, and verification information. The data packets consist of the source code of the application to be deployed. The business image represents an image containing the source code. The target server is used to run the business image, generate a business container corresponding to the business image, and start the business container to run the source code.

[0041] It is noteworthy that, in the above process, by acquiring the business information and data packets of the application to be deployed, a data foundation is provided for the subsequent generation of the business image; by generating the business image, personalized customization of the business image according to business needs is realized, improving the flexibility of application deployment; by pushing the business image to the target server, the target server can run the business image, thereby generating a business container corresponding to the business image, and by starting the business container to run the source code, the deployment of the application to be deployed is realized, simplifying the application deployment steps and thus improving the application deployment efficiency.

[0042] Therefore, the technical solution of this invention achieves the goal of quickly customizing business images according to complex business needs and flexibly deploying containers, thereby improving the technical efficiency of deploying new applications and solving the technical problem of low efficiency in deploying new applications in the prior art.

[0043] In one optional embodiment, during the process of generating a business image based on business information and data packets, a first sub-repository and a second sub-repository are first built in the image repository. Then, a first image is obtained and stored in the first sub-repository. Next, based on the first image, business information, and data packets, a business image is generated and stored in the second sub-repository. The image repository is used to store multiple images, and the first image represents a blank base image that does not contain program code.

[0044] Optional, Figure 3 This is a schematic diagram of an optional application deployment system according to an embodiment of the present invention, such as... Figure 3 As shown, the system includes a microservice customized image storage device S301, a microservice business deployment information storage device S302, a microservice business code upload device S303, a microservice customized image creation device S304, a business image batch upload server device S305, a business container customized batch deployment device S306, and a processing result notification and feedback device S307. Operations personnel can create and store customized Docker base images according to business needs. Specifically, a first sub-repository and a second sub-repository are first built in the image repository, dividing the images into two categories: clean base images without program code and business images containing packaged program code. Optionally, the image repository can be a private image repository. Optionally, a base environment image (i.e., the first image) can be created based on the official Dockerfile image and uploaded to the first sub-repository in the private image repository. The base environment image can be a CentOS version of Tomcat or a Python web environment base image, or it can be a downloaded official Docker base environment image.

[0045] Furthermore, based on the first image (base image), business information, and data packages, a business image is generated and stored in the second sub-repository. Specifically, the business information is entered into... Figure 3 The microservice business deployment information storage device shown in the diagram is used to package the source code of the application to be deployed into a WAR package and upload it to the server path corresponding to the code upload in the business information through the upload device. Then, based on the first image (base image), business information, and data package (WAR package), a new Docker file is generated and a business image (new microservice business image) is created. The business image is then stored in the second sub-repository.

[0046] It should be noted that by building the first and second sub-repositories in the image repository, image categories are established within the image repository, thereby storing the base image and the business image in different branches, which facilitates image maintenance and updates and can improve deployment efficiency.

[0047] In one alternative embodiment, during the process of pushing the business image to the target server, the target server is first determined from multiple servers based on the address information, and then the business image is pulled from the second sub-repository and pushed to the target server.

[0048] Optionally, after generating the business image, by means of... Figure 3 The illustrated business image batch upload server device uploads business images to the corresponding servers. Specifically, using the address information entered in the aforementioned process, i.e., the IP address of the server where the container is deployed, the target server can be determined from multiple servers. Then, the business image is pulled from the second sub-repository and pushed to the target server.

[0049] It should be noted that the target server is determined from multiple servers based on the address information, so that the business image can be accurately pushed to the target server.

[0050] In an optional embodiment, the target server is further configured to generate an execution command for running the business image based on the business information, generate a business container corresponding to the business image based on the execution command, and start the business container to run the source code.

[0051] Optionally, the execution command can refer to the `docker run` command. Specifically, after the business image is pushed to the target server, the information related to container deployment, such as the container name and the port information to be mapped, is entered in the aforementioned process to generate a `docker run` command corresponding to the business image. This command is then executed on the server where the application needs to be deployed to start the corresponding business containers in batches.

[0052] It should be noted that by executing commands to generate business containers corresponding to the business image, the automated deployment of containers is achieved, saving time and improving application deployment efficiency; by starting the business containers, the deployment of the application to be deployed is realized.

[0053] In one optional embodiment, after starting the service container, availability verification is performed on the service container to obtain a verification result, wherein the verification result indicates whether the service container is running normally. Optionally, after automatically deploying and starting the service container, the started service containers can be batch verified to ensure they meet expected requirements using corresponding verification tools. For example, when operations and maintenance personnel create a backend environment for accessing a browser, they need to configure a Java environment. After deploying the Java environment in a container, they can use Java environment-related verification tools to verify whether the service container is running normally, thereby determining whether the Java environment has been successfully deployed.

[0054] In one optional embodiment, during the availability verification of the business container and the obtaining of the verification result, the process first determines whether the business container has started normally based on the verification information, obtaining a first judgment result. Then, based on the verification information, it determines whether the configuration information of the business container's port is abnormal, obtaining a second judgment result. Next, based on the verification information, it determines whether the target terminal can normally access the application to be deployed, obtaining a third judgment result. Finally, based on the first, second, and third judgment results, it is determined whether the business container is running normally, obtaining the verification result. Optionally, the verification information can be the access link of a microservice, verification information of other API services, etc., and the target terminal can be a terminal device that accesses the application after the application deployment is completed. Specifically, the availability verification of the business container is achieved by judging whether the business container has started normally, whether the configuration information of the business container's port is abnormal, and whether the target terminal can normally access the application to be deployed. For example, the configuration information of the business container's port can be checked, that is, the port information to be mapped entered in the aforementioned process can be checked to see if it is correct, thereby achieving the availability verification of the business container.

[0055] In an optional embodiment, during the process of determining whether the business container is running normally based on the first judgment result, the second judgment result, and the third judgment result, and obtaining the verification result, if the business container starts normally, the configuration information of the port of the business container is in a normal state, and the target terminal accesses the application to be deployed normally, it is determined that the application to be deployed is deployed successfully. If the business container cannot start, or the configuration information of the port of the business container is abnormal, or the target terminal accesses the application to be deployed abnormally, it is determined that the application to be deployed fails to deploy.

[0056] Specifically, the configuration information of the business container's ports being in a normal state can mean that the port information to be mapped entered in the aforementioned process has been checked and confirmed to be correct; the target terminal being able to access the application to be deployed normally can mean that the target terminal can successfully access the application to be deployed through the access link entered in the aforementioned process. Optionally, when the business container can start normally, the configuration information of the business container's ports is in a normal state, and the target terminal can access the application to be deployed normally, it can be determined that the application to be deployed has been successfully deployed; when the business container cannot start, or the configuration information of the business container's ports is abnormal, or the target terminal cannot access the application to be deployed, it can be determined that the application to be deployed has failed to deploy.

[0057] It should be noted that by performing availability verification on the business container, verification results can be obtained, which can then be fed back to the operations and maintenance personnel. This allows the operations and maintenance personnel to take appropriate actions based on the verification results. For example, if the verification result indicates that the business container cannot start, the operations and maintenance personnel will take actions such as error investigation on the relevant data in the aforementioned process.

[0058] Therefore, the technical solution of this invention achieves the goal of quickly customizing business images according to complex business needs and flexibly deploying containers, thereby improving the technical efficiency of deploying new applications and solving the technical problem of low efficiency in deploying new applications in the prior art.

[0059] Example 2

[0060] According to an embodiment of the present invention, an embodiment of an application deployment apparatus is provided, wherein, Figure 4 This is a schematic diagram of an optional application deployment apparatus according to an embodiment of the present invention, such as... Figure 4 As shown, the device includes: an acquisition module 401, used to acquire business information and data packets of the application to be deployed, wherein the business information includes at least attribute information, address information and verification information, and the data packets consist of the source code of the application to be deployed; a processing module 402, used to generate a business image based on the business information and data packets, wherein the business image represents an image containing the source code; and a push module 403, used to push the business image to a target server, wherein the target server is used to run the business image, generate a business container corresponding to the business image, and start the business container to run the source code.

[0061] It should be noted that the above-mentioned acquisition module 401, processing module 402 and push module 403 correspond to steps S101 to S103 in the above embodiments. The examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiment 1.

[0062] Optionally, the processing module includes: a building module for building a first sub-repository and a second sub-repository in the image repository, wherein the image repository is used to store multiple images; a first storage module for obtaining a first image and storing the first image in the first sub-repository, wherein the first image represents a blank base image that does not contain program code; and a second storage module for generating a business image based on the first image, business information, and data packets, and storing the business image in the second sub-repository.

[0063] Optionally, the push module includes: a determination module for determining the target server from multiple servers based on address information; and a first acquisition module for pulling the business image from the second sub-repository and pushing the business image to the target server.

[0064] Optionally, the target server is also used to generate an execution command to run the business image based on the business information, generate a business container corresponding to the business image based on the execution command, and start the business container to run the source code.

[0065] Optionally, the application deployment apparatus further includes: a verification module for performing availability verification on the business container and obtaining verification results, wherein the verification results characterize whether the business container is running normally.

[0066] Optionally, the verification module includes: a first judgment module, used to determine whether the business container has started normally based on the verification information, and obtain a first judgment result; a second judgment module, used to determine whether the configuration information of the port of the business container is abnormal based on the verification information, and obtain a second judgment result; a third judgment module, used to determine whether the target terminal can access the application to be deployed normally based on the verification information, and obtain a third judgment result; and a first determination module, used to determine whether the business container is running normally based on the first judgment result, the second judgment result, and the third judgment result, and obtain a verification result.

[0067] Optionally, the first determining module includes: a second determining module, used to determine that the application to be deployed is successfully deployed when the business container starts normally, the configuration information of the port of the business container is in a normal state, and the target terminal accesses the application to be deployed normally; and a third determining module, used to determine that the application to be deployed fails to deploy when the business container fails to start, or the configuration information of the port of the business container is abnormal, or the target terminal accesses the application to be deployed abnormally.

[0068] Example 3

[0069] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described application deployment method at runtime.

[0070] Example 4

[0071] According to another aspect of the present invention, an electronic device is also provided, wherein, Figure 5 This is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as... Figure 5 As shown, the electronic device includes one or more processors; and a memory for storing one or more programs, which, when executed by one or more processors, enable the one or more processors to run the programs, wherein the programs are configured to execute the application deployment method described above during runtime.

[0072] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0073] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0074] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0075] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0076] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0077] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0078] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An application deployment method characterized by comprising: The method comprises: obtaining business information and a data packet of an application to be deployed, wherein the business information at least comprises attribute information, address information and verification information, and the data packet is composed of source program code of the application to be deployed; generating a business image based on the business information and the data packet, wherein the business image represents an image containing the source program code; pushing the business image to a target server, wherein the target server is used to run the business image, generate a business container corresponding to the business image, and start the business container to run the source program code; wherein generating a business image based on the business information and the data packet comprises: constructing a first sub-repository and a second sub-repository in an image repository, wherein the image repository is used to store a plurality of images; obtaining a first image and storing the first image in the first sub-repository, wherein the first image represents a blank base image that does not contain program code; generating the business image based on the first image, the business information and the data packet, and storing the business image in the second sub-repository; wherein pushing the business image to the target server comprises: determining the target server from a plurality of servers based on the address information; pulling the business image from the second sub-repository and pushing the business image to the target server.

2. The method of claim 1, wherein, The target server is also used to generate an execution command for running the business image based on the business information, generate a business container corresponding to the business image based on the execution command, and start the business container to run the source program code.

3. The method of claim 2, wherein, After starting the business container, the method further comprises: verifying the availability of the business container to obtain a verification result, wherein the verification result represents whether the business container is running normally.

4. The method of claim 3, wherein, Verifying the availability of the business container to obtain a verification result comprises: determining whether the business container is started normally based on the verification information to obtain a first determination result; determining whether the configuration information of the port of the business container is abnormal based on the verification information to obtain a second determination result; determining whether a target terminal normally accesses the application to be deployed based on the verification information to obtain a third determination result; determining whether the business container is running normally according to the first determination result, the second determination result and the third determination result to obtain the verification result.

5. The method of claim 4, wherein, Determining whether the business container is running normally according to the first determination result, the second determination result and the third determination result to obtain the verification result comprises: in the case that the business container is started normally, the configuration information of the port of the business container is in a normal state, and the target terminal normally accesses the application to be deployed, it is determined that the application to be deployed is deployed successfully; in the case that the business container cannot be started, or the configuration information of the port of the business container is abnormal, or the target terminal accesses the application to be deployed abnormally, it is determined that the application to be deployed is deployed unsuccessfully.

6. An application deployment apparatus characterized by comprising: The method comprises: An acquisition module is configured to acquire service information and a data packet of an application to be deployed, wherein the service information at least includes attribute information, address information and verification information, and the data packet is composed of source program code of the application to be deployed; A processing module is configured to generate a service image based on the service information and the data packet, wherein the service image represents a mirror image containing the source program code; A pushing module is configured to push the service image to a target server, wherein the target server is configured to run the service image, generate a service container corresponding to the service image, and start the service container to run the source program code. The processing module includes a construction module configured to construct a first sub-repository and a second sub-repository in an image repository, wherein the image repository is configured to store a plurality of mirror images; a first storage module configured to acquire a first mirror image and store the first mirror image in the first sub-repository, wherein the first mirror image represents a blank base image containing no program code; and a second storage module configured to generate a service image based on the first mirror image, the service information and the data packet, and store the service image in the second sub-repository. The pushing module includes a determination module configured to determine the target server from a plurality of servers based on the address information; and a first acquisition module configured to pull the service image from the second sub-repository and push the service image to the target server.

7. A computer readable storage medium characterized by The computer readable storage medium stores a computer program, wherein the computer program is configured to execute the application deployment method as claimed in any one of claims 1 to 5 when running.

8. An electronic device, comprising: The electronic device includes one or more processors; A memory is configured to store one or more programs, which make the one or more processors implement a program running method when executed by the one or more processors, wherein the program is configured to execute the application deployment method as claimed in any one of claims 1 to 5 when running.

Citation Information

Patent Citations

  • Electronic evidence storage system and method based on containerization rapid deployment

    CN114077435A

  • Model deployment method and device, electronic equipment and storage medium

    CN114546425A