Application deployment method and related apparatus

By automatically parsing and processing the metadata of the application deployment package, generating target files, and deploying the application in the container, the inefficiency caused by manual configuration by operations and maintenance personnel is solved, and the success rate and efficiency of application deployment are improved.

CN115469884BActive Publication Date: 2026-04-14CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, the application deployment process requires operations and maintenance personnel to manually configure information, which leads to a high probability of configuration failure and low efficiency.

Method used

By parsing the application deployment package, metadata and deployment information are obtained, application-specific information in the preset file is automatically replaced, the target file is generated, and the application is deployed in the container.

Benefits of technology

It enables automated application deployment, improving deployment success rate and efficiency, and reducing manual configuration errors and time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115469884B_ABST
    Figure CN115469884B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an application deployment method and related apparatus, the method comprising: obtaining an application deployment package uploaded by a user; performing parsing processing on the application deployment package to obtain metadata information and first deployment information of the application; replacing application personalization information in a preset file according to the metadata information and the first deployment information to obtain a target file corresponding to the application; the preset file being a file matched with a container; and deploying and starting the application in a created container according to the target file. In this way, automatic deployment of the application is realized, and the efficiency of application deployment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an application deployment method and related apparatus. Background Technology

[0002] A low-code development platform (LCDP) is a platform that allows users to quickly create and deploy applications. LCDPs provide developers with a graphical user interface and front-end / back-end development capabilities, and also provide operations and maintenance personnel with the ability to configure and deploy resources and deploy created applications.

[0003] In some implementations, before deploying an application, operations and maintenance personnel need to debug the components used in the deployment process. During the deployment process, they need to manually configure the application based on its information, such as the application version, basic information, and dependent components. After the configuration is complete, the application is run to complete the deployment.

[0004] However, the above application deployment methods require operations and maintenance personnel to manually configure the configuration information, which makes the configuration more likely to fail and takes a lot of time, resulting in low application deployment efficiency. Summary of the Invention

[0005] This application provides an application deployment method and related apparatus, which realizes automated application deployment and improves the efficiency of application deployment.

[0006] In a first aspect, embodiments of this application provide an application deployment method, the application deployment method comprising:

[0007] Obtain the application deployment package uploaded by the user.

[0008] The application deployment package is parsed to obtain the application's metadata information and first deployment information.

[0009] The application personalization information in the preset file is replaced according to the metadata information and the first deployment information to obtain the target file corresponding to the application; the preset file is a file that matches the container.

[0010] Based on the target file, deploy and start the application in the created container.

[0011] In one possible implementation, deploying and starting the application in the created container based on the target file includes:

[0012] The metadata information is added to a preset configuration template to obtain the application's configuration file;

[0013] Based on the target file and the configuration file, deploy and start the application in the created container.

[0014] In one possible implementation, when starting the application in the created container, the following is also included:

[0015] When the application starts successfully, a third database is determined based on the application's identifier, and the third database includes the application's identifier.

[0016] The second deployment information, including the deployment status, is stored in the third database, where the deployment status is "deployment successful".

[0017] In one possible implementation, the parsing of the application deployment package to obtain the application's metadata information and first deployment information includes:

[0018] The application deployment package is parsed to obtain the metadata information.

[0019] The data information related to application deployment in the metadata information is processed into the first deployment information, and the first deployment information is stored in the second database, which is the database of the deployment engine.

[0020] One possible implementation also includes:

[0021] The metadata information is stored in a first database, which is a database for metadata services.

[0022] In one possible implementation, prior to obtaining the first deployment information, the process includes:

[0023] Based on the application's identifier, determine whether the application exists in the deployed applications.

[0024] If the application exists in the deployed applications, then determine whether the version of the deployed application is higher than the version of the deployed application.

[0025] If the version of the application is higher than the version of the deployed application, then the deployed application is deleted.

[0026] In one possible implementation, prior to obtaining the first deployment information, the process includes:

[0027] Integrity checks are performed on multiple first components to determine that the functions of the multiple first components are intact. The first components are components related to application deployment.

[0028] In one possible implementation, before obtaining the first deployment information, the method further includes:

[0029] Connectivity checks are performed on multiple second components to determine that all of the second components are in an available state. The second components are components related to application deployment.

[0030] Secondly, embodiments of this application provide an application deployment apparatus, the application deployment apparatus comprising:

[0031] The acquisition module is used to acquire the application deployment package uploaded by the user.

[0032] The processing module is used to parse the application deployment package to obtain the application's metadata information and first deployment information.

[0033] The processing module is further configured to replace the application personalization information in the preset file according to the metadata information and the first deployment information to obtain the target file corresponding to the application; the preset file is a file that matches the container.

[0034] The startup module is used to deploy and start the application in the created container based on the target file.

[0035] In one possible implementation, the startup module is specifically used to add the metadata information to a preset configuration template to obtain the application's configuration file; and to deploy and start the application in the created container based on the target file and the configuration file.

[0036] In one possible implementation, the startup module is further configured to, when the application starts successfully, determine a third database based on the application's identifier, the third database including the application's identifier; and store second deployment information including deployment status, the deployment status being "deployment successful," into the third database.

[0037] In one possible implementation, the processing module is specifically used to parse the application deployment package to obtain the metadata information; process the data information related to application deployment in the metadata information into the first deployment information; and store the first deployment information in a second database, wherein the second database is the database of the deployment engine.

[0038] In one possible implementation, the processing module is further configured to store the metadata information in a first database, wherein the first database is a database for metadata services.

[0039] In one possible implementation, the device further includes a verification module, which is used to determine whether the application exists in the deployed applications based on the application's identifier; if the application exists in the deployed applications, it is determined whether the version of the application is higher than the version of the deployed application; if the version of the application is higher than the version of the deployed application, the deployed application is deleted.

[0040] In one possible implementation, the verification module is further configured to perform integrity verification on the plurality of first components respectively, and determine that the functions of the plurality of first components are all intact, wherein the first components are components related to application deployment.

[0041] In one possible implementation, the verification module is further configured to perform connectivity verification on multiple second components respectively, and determine that all of the multiple second components are in an available state, wherein the second components are components related to application deployment.

[0042] Thirdly, embodiments of this application also provide an electronic device, which includes: a processor and a memory communicatively connected to the processor;

[0043] The memory stores computer-executed instructions;

[0044] The processor executes computer execution instructions stored in the memory to implement the method described in any possible implementation of the first aspect above.

[0045] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in any possible implementation of the first aspect.

[0046] Fifthly, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any possible implementation of the first aspect.

[0047] Therefore, this application provides an application deployment method and related apparatus. The method includes: acquiring an application deployment package uploaded by a user; parsing the application deployment package to obtain application metadata information and first deployment information; replacing application-specific information in a preset file according to the metadata information and first deployment information to obtain a target file corresponding to the application; the preset file is a file that matches a container; and deploying and starting the application in a created container according to the target file. In this way, by automatically parsing the application deployment package and using the parsed metadata information and first deployment information for automated application deployment, the probability of successful application deployment is increased. Furthermore, automated deployment saves application deployment time and improves application deployment efficiency. Attached Figure Description

[0048] Figure 1 A schematic diagram illustrating an application deployment scenario provided in an embodiment of this application;

[0049] Figure 2 A flowchart illustrating an application deployment method provided in an embodiment of this application;

[0050] Figure 3 A flowchart illustrating another application deployment method provided in an embodiment of this application;

[0051] Figure 4 This is a schematic diagram of the structure of an application deployment device provided in an embodiment of this application;

[0052] Figure 5 This is a schematic diagram of an electronic device structure provided in this application.

[0053] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0054] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:

[0055] 1. Container technology: This is a lightweight operating system-level virtualization that can divide the resources of a single operating system into isolated groups to better balance conflicting resource usage demands among these groups. In this embodiment, container technology allows applications and their dependencies to run in different containers. All components necessary for running the application are packaged into an image and can be reused. When the image is executed, it runs in an isolated environment and does not share the host machine's memory, CPU, or disk. This prevents processes within the container from monitoring any processes outside the container, reducing application resource overhead and improving the portability of the computing environment, thus enhancing the consistency between the test and production environments during application deployment. In this embodiment...

[0056] 2. Low-code development platform: This is a development platform that allows for the rapid generation of applications with little or no coding. It provides developers with a development environment for creating application software. Unlike traditional integrated development environments (IDEs) that require writing code, low-code development platforms offer a more user-friendly visual IDE. In this embodiment, technicians can create applications on the low-code platform and generate deployment packages for the applications through the low-code platform.

[0057] 3. Low-code applications: These are applications created by technical personnel on a low-code development platform through drag-and-drop operations.

[0058] 4. Metadata Service: This service enables simple data processing and management. In this embodiment, it can be used to parse and store information about applications created using a low-code development platform, as well as information about components that the application depends on during runtime. In this embodiment, the application's deployment package can be parsed using the metadata service to obtain the application's metadata information.

[0059] 5. Deployment Engine: This is the core component for application deployment. It can interface with container cloud platforms to achieve connectivity verification of basic services, version control of applications, and automated deployment of low-code applications.

[0060] 6. Application Deployment Package: Business applications created by developers using the graphical interface of a low-code development platform through drag-and-drop operations.

[0061] 7. Basic services: These refer to the public services that an application must rely on to run, such as databases, caches, message queues, registry centers, and configuration centers.

[0062] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0063] In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0064] The technical solutions provided in this application embodiment can be applied to application deployment scenarios.

[0065] In some implementations, during application deployment, operations personnel can upload the application package to a low-code development platform, enabling the deployment engine to obtain relevant application information. During deployment, operations personnel need to configure the virtual machine resources required for application deployment, such as manually configuring the application version, basic information, and dependent components. Once configuration is complete, the application is run to complete the deployment.

[0066] However, when using the above method to deploy applications, operations and maintenance personnel need to manually configure some information, which may lead to configuration errors that prevent the application from starting. Furthermore, manually configuring information takes a lot of time, resulting in low efficiency in application deployment.

[0067] Based on this, embodiments of this application provide an application deployment method that can automatically parse the application deployment package to obtain the application's metadata information and first deployment information. Then, based on the metadata information, the first deployment information, and a preset file matching the container, a target file is obtained, and the application is started in the created container according to the target file. This achieves automated application deployment, eliminating the need for manual configuration by operations and maintenance personnel and improving the efficiency of application deployment.

[0068] Figure 1 This is a schematic diagram of an application deployment scenario provided in an embodiment of this application.

[0069] For example, Figure 1 This includes terminal device 101 and cloud server 102. For example... Figure 1As shown, the interface displayed on terminal device 101 is the application deployment interface, where maintenance personnel can upload the application deployment package to cloud server 102. In... Figure 1 In the interface displayed on the terminal device 101, the maintenance personnel have completed the upload of application deployment package 1. When the terminal device receives the operation of the control to confirm deployment, it can send application deployment package 1 and deployment instructions for application deployment package 1 to the cloud server 102.

[0070] Furthermore, upon receiving the deployment instruction from the terminal device 101, the cloud server 102 can parse the application deployment package 1 in response to the instruction to obtain the application's metadata information and first deployment information. Based on the application's metadata information and first deployment information, the application in the preset template is personalized and replaced to obtain the target file corresponding to the application. The target file is a file that matches the container. Upon obtaining the target file, the cloud server can create a container, deploy and start the application within the container according to the target file, thereby completing the automated deployment of the application.

[0071] The application deployment method provided in this application will now be described in detail through specific embodiments. It is understood that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0072] Figure 2 This is a flowchart illustrating an application deployment method provided in an embodiment of this application. The application deployment method can be executed by software and / or hardware devices; for example, the hardware device can be an application deployment apparatus, which can be a server or a processing chip within a server. For example, please refer to [link to example]. Figure 2 As shown, the application deployment method may include:

[0073] S201. Obtain the application deployment package uploaded by the user.

[0074] In this embodiment, the application deployment package can be a compressed package of an application developed by the developer. The application deployment package may include application information and application version information. The application information may include application function information, application interface layout information, storage space occupied by the application, etc. This embodiment does not specifically limit the application information.

[0075] For example, the application deployment package can be uploaded by operations and maintenance personnel through their local terminal devices.

[0076] S202. Parse the application deployment package to obtain the application's metadata information and first deployment information.

[0077] For example, a cloud server can parse and process the application deployment package through a metadata service to obtain the application's metadata information and version information.

[0078] Furthermore, the cloud server can process the application deployment-related data in the metadata information through the deployment engine to obtain the first deployment information.

[0079] For example, a cloud server can process the format of data information related to application deployment through a deployment engine to obtain first deployment information in a preset format. This application embodiment does not limit the preset format in any way.

[0080] In this embodiment of the application, after obtaining the application deployment package, the application deployment package can be automatically parsed, eliminating the need for operation and maintenance personnel to configure the application deployment information based on the application information, saving a lot of time and making the obtained first deployment information more accurate.

[0081] For example, when obtaining application metadata information through a metadata service, the metadata information can be stored in a first database, where the first database is the database of the metadata service.

[0082] In this embodiment of the application, by storing metadata information in a first database, the metadata information of the application can be obtained from the first database when the application is upgraded or maintained, which facilitates the subsequent maintenance by the operation and maintenance personnel.

[0083] For example, when the first deployment information is obtained through the deployment engine, the first deployment information can be stored in the second database, which is the database of the deployment engine, so that it can be used for subsequent application upgrades.

[0084] S203. Replace the application-specific information in the preset file with the metadata information and the first deployment information to obtain the target file corresponding to the application.

[0085] For example, the preset file is a file that matches the container, meaning the preset file has a format allowed by the container. For instance, the preset file can be a YAML file. The target file has the same format as the preset file.

[0086] It is understood that the preset file includes application-specific information as well as general application information. The server can replace the application-specific information in the preset file using the deployment engine. For example, the application version information, application identifier, and other information in the preset file can be replaced with the application's information. This application embodiment does not limit the application-specific information.

[0087] S204. Deploy and start the application in the created container according to the target file.

[0088] Understandably, when the cloud server obtains the target file through the deployment engine, it can call the integrated container cloud platform to create the container corresponding to the application.

[0089] For example, the cloud server deploys and starts the application in a pre-created container based on the target file. Metadata information can be added to a preset configuration template to obtain the application's configuration file. Based on the target file and configuration file, the application is then deployed and started in the pre-created container.

[0090] It is understandable that during the application startup process, the cloud server can send the application's startup status to the user's terminal device in real time. The application's startup status can include starting, failing to start, or starting successfully.

[0091] In this embodiment, by adding metadata information to a preset configuration template, an application configuration file can be generated, eliminating the need for users to manually configure the configuration file, thus improving the accuracy of the configuration and further enhancing the efficiency of application deployment.

[0092] For example, when the application starts successfully, a third database can be determined based on the application's identifier, and the second deployment information, including the deployment status, can be stored in the third database, with the deployment status set to "deployment successful." The deployment status corresponds to the startup status; successful application startup indicates successful deployment.

[0093] Understandably, the third database includes the application's identifier. The third database may also include other information about the application, providing information for the deployment engine to deploy or upgrade the application next time.

[0094] In this embodiment of the application, the deployment status of the application is stored in a third database, which facilitates the management of the application based on its deployment status.

[0095] Therefore, the application deployment method provided in this application embodiment automatically parses the application deployment package and replaces the application-specific information in a preset file with the metadata information and first deployment information obtained after parsing. This allows for application deployment within a created container based on the replaced target file. This achieves automated application deployment, improves the success rate of application startup, and enhances the efficiency of application deployment.

[0096] In this embodiment of the application, the cloud server can detect the application deployment environment before deploying the application through the deployment engine, that is, before obtaining the first deployment information through the deployment engine.

[0097] In one possible implementation, the cloud server can perform application uniqueness verification. For example, the cloud server can determine whether the application exists in the deployed applications based on the application's identifier; if the application exists in the deployed applications, it can determine whether the version of the deployed application is higher than the version of the deployed application; if the version of the deployed application is higher than the version of the deployed application, the deployed application can be deleted.

[0098] For example, if the application to be deployed is application A, the cloud server can determine whether application A exists in the deployed applications. If application A exists, it can then determine the version of the deployed application. If the version of application A to be deployed is 3.0, and the version of the deployed application is 1.0, then it can be determined that the version of application A to be deployed is higher than the version of the deployed application A.

[0099] In this embodiment of the application, by verifying the deployed applications and their version information, the uniqueness of the same application or the same version of the application in the cloud server is ensured, thereby realizing the management of applications and their versions.

[0100] In one possible implementation, the cloud server can perform integrity checks on multiple first components separately to determine that the functions of multiple first components are intact. The first components are components related to application deployment.

[0101] In this embodiment, the first component can be a component or program that the application depends on at runtime. This embodiment does not limit the scope of the first component.

[0102] In this embodiment of the application, by determining that the functions of multiple first components are intact, the application can run in the created container, thereby completing the deployment of the application.

[0103] In one possible implementation, the cloud server can perform connectivity checks on multiple second components separately to determine that all second components are in an available state. The second components are components related to application deployment.

[0104] In this embodiment, the second component may include a database, a cache, a registry center, a configuration center, and a Kubernetes cluster, etc. The database may be one or more of the first, second, and third databases mentioned above. This embodiment does not specifically limit the second component.

[0105] In this embodiment of the application, by determining that multiple second components are all in an available state, the success rate of application deployment is improved.

[0106] In one possible implementation, the cloud server can also determine whether the deployment engine is available.

[0107] It is understood that the above verifications can be performed simultaneously or sequentially, and the embodiments of this application do not specifically limit the order of verification.

[0108] To facilitate understanding of the application deployment method provided in the embodiments of this application, the following will be conducted... Figure 3 The technical solutions provided in the embodiments of this application will be described in detail. Figure 3 This is a flowchart illustrating another application deployment method provided in an embodiment of this application.

[0109] The method for deploying this application may include the following steps:

[0110] S301. Obtain basic service information.

[0111] For example, the basic service information can be the information that the operators have pre-configured and maintained in the low-code platform for deploying applications. This basic service information may include database information, remote dictionary service information (remotedictionary server, Redis), Kubernetes, and other information.

[0112] S302. Obtain the application deployment package.

[0113] It is understandable that the application deployment package can be uploaded by operations and maintenance personnel via terminal devices; for details, please refer to [link / reference]. Figure 1 As shown, when a user uploads a deployment package, the user's terminal device interface displays controls corresponding to the basic service information, allowing operations and maintenance personnel to select the necessary basic service information.

[0114] For example, the metadata service can upload the application deployment package to the runtime file server so that the application deployment package can be used later.

[0115] S303. Parse the metadata information of the application deployment package.

[0116] For example, the obtained application deployment package can be parsed through a metadata service to obtain application metadata information and application version information from the application deployment package.

[0117] S304. Enter the metadata information into the metadata service.

[0118] For example, the obtained application metadata information can be written into the database corresponding to the metadata service through the metadata service, and the database corresponding to the metadata server is the first database mentioned above.

[0119] S305, Application uniqueness verification.

[0120] For example, pre-deployment verification can be a check of the application deployment environment. Application uniqueness verification can prevent the same version of the same application from being deployed multiple times, thus preventing confusion in application version management.

[0121] For application uniqueness verification, please refer to the above description; the embodiments in this application will not be repeated.

[0122] S306, Application Dependency Integrity Verification.

[0123] For example, since the development process may involve multiple applications working together to implement a function, dependency checks can be performed on the application during deployment to ensure the completeness of the function.

[0124] Application dependency integrity verification can be found in the above description, and will not be repeated in the embodiments of this application.

[0125] S307, Component connectivity verification.

[0126] Since applications developed on low-code platforms may rely on some common components during operation, such as databases, caches, registry centers, configuration centers, and Kubernetes, conducting connectivity tests on these services before application deployment can improve the success rate of application deployment.

[0127] For the connectivity verification of components, please refer to the above description, and it will not be repeated in the embodiments of this application.

[0128] S308, Deployment Engine Status Verification.

[0129] The deployment engine status verification can check whether the deployment engine is in an available state. When the deployment engine is in an available state, the verification is marked as successful.

[0130] S309. Save the deployment information to the deployment engine.

[0131] For example, when the deployment engine receives a deployment instruction, in response to the deployment instruction, it can request the application's metadata information from the metadata service and perform write-to-database processing on some of the metadata information used during the deployment process.

[0132] Among them, the write database processing can be used to process metadata information into deployment information and store the deployment information in the database of the deployment engine.

[0133] S310. Register the application's routing information in the gateway.

[0134] For example, due to the complexity of low-code platforms, a single codebase makes the platform difficult to maintain. Therefore, microservices can be used for service deployment, making the application, deployment engine, and metadata service relatively independent services. The application, deployment engine, and metadata service can invoke functions through a registry center and gateway. Therefore, before application deployment, its routing information needs to be registered with the gateway to ensure normal communication between the application, deployment engine, and metadata service, further improving the success rate of application deployment.

[0135] S311. Create an application database based on application information.

[0136] For example, before the application starts, the deployment engine can generate a database corresponding to the application based on the application's identification information. The application's identification information can be information such as an encoding or name; however, this embodiment does not specifically limit the application's identification information.

[0137] S312. Generate the application's configuration information and push the configuration file to the configuration center.

[0138] For example, based on the configuration template and the application's metadata information, a configuration file required when the application starts is generated, and the generated configuration file is pushed to a remote configuration center for unified management of the configuration file.

[0139] The configuration information for generating the application can be found above, and will not be repeated in this embodiment.

[0140] S313. Generate a YAML file, create a container in Kubernetes, and start the application.

[0141] For example, the cloud server can use the application's metadata and deployment information to replace the application's personalized information in the pre-built YAML template in the deployment engine, generate the corresponding YAML file for the application, call the integrated container cloud platform, create a container, and start the application in the container.

[0142] S314. Save application deployment information.

[0143] For example, after the application starts successfully, its deployment information can be written to the application's database. This facilitates the low-code platform's full lifecycle management of the application and provides information for the deployment engine to deploy or upgrade the application next time. This application deployment information is not entirely the same as the deployment information in S309 above; it may include the application's deployment status.

[0144] It is understandable that in the above steps, S301 is the preliminary work, S302 to S304 are the preparation steps before deployment, S305 to S308 are the verification steps before deployment, and S309 to S314 are the application deployment steps.

[0145] In summary, the application deployment method provided in this application provides a relatively standardized, standard, and highly operable low-code application deployment process; it reduces the cost for operations and maintenance personnel to deploy low-code applications and improves the success rate of application deployment.

[0146] Figure 4 This is a schematic diagram of the structure of an application deployment device 40 provided in an embodiment of this application. For example, please refer to [link to example diagram]. Figure 4 As shown, the application deployment device 40 may include:

[0147] Module 401 is used to obtain the application deployment package uploaded by the user.

[0148] The processing module 402 is used to parse and process the application deployment package to obtain the application's metadata information and first deployment information.

[0149] The processing module 402 is also used to replace the application-specific information in the preset file according to the metadata information and the first deployment information to obtain the target file corresponding to the application; the preset file is a file that matches the container.

[0150] Startup module 403 is used to deploy and start the application in the created container based on the target file.

[0151] Optionally, the startup module 403 is used to add metadata information to a preset configuration template to obtain the application's configuration file; and deploy and start the application in the created container based on the target file and the configuration file.

[0152] Optionally, the startup module 403 is also used to determine the third database based on the application's identifier when the application starts successfully; the third database includes the application's identifier; and to store the second deployment information, including the deployment status, into the third database, with the deployment status being "deployment successful".

[0153] Optionally, the processing module 402 is specifically used to parse and process the application deployment package to obtain metadata information; process the data information related to application deployment in the metadata information into first deployment information, and store the first deployment information in a second database, which is the database of the deployment engine.

[0154] Optionally, the processing module 402 is also used to store metadata information in a first database, which is a database for metadata services.

[0155] Optionally, the device also includes a verification module 404, which is used to determine whether an application exists in the deployed application based on the application's identifier; if an application exists in the deployed application, it determines whether the application's version is higher than the version of the deployed application; if the application's version is higher than the version of the deployed application, it deletes the deployed application.

[0156] Optionally, the verification module 404 is also used to perform integrity verification on multiple first components respectively, to determine that the functions of multiple first components are intact, and the first components are components related to application deployment.

[0157] Optionally, the verification module 404 is also used to perform connectivity verification on multiple second components respectively, and to determine that multiple second components are in an available state. The second components are components related to application deployment.

[0158] The application deployment apparatus provided in this application embodiment can execute the technical solution of the application deployment method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the application deployment method. Please refer to the implementation principle and beneficial effects of the application deployment method. It will not be repeated here.

[0159] Figure 5 This is a schematic diagram of an electronic device structure provided in this application. Figure 5 As shown, the electronic device 500 may include at least one processor 501 and a memory 502.

[0160] The memory 502 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions.

[0161] The memory 502 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0162] The processor 501 executes computer execution instructions stored in the memory 502 to implement the application deployment method described in the foregoing method embodiments. The processor 501 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. Specifically, when implementing the application deployment method described in the foregoing method embodiments, the electronic device may be, for example, a terminal, a server, or other electronic device with processing capabilities.

[0163] Optionally, the electronic device 500 may also include a communication interface 503. In specific implementations, if the communication interface 503, memory 502, and processor 501 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.

[0164] Optionally, in a specific implementation, if the communication interface 503, memory 502, and processor 501 are integrated on a single chip, then the communication interface 503, memory 502, and processor 501 can communicate through an internal interface.

[0165] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used in the methods described in the above embodiments.

[0166] This application also provides a program product including executable instructions stored in a readable storage medium. At least one processor of an electronic device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the electronic device to implement the application deployment methods provided in the various embodiments described above.

[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. An application deployment method, characterized in that, include: Obtain the application deployment package uploaded by the user; The application deployment package is parsed to obtain the application's metadata information and first deployment information; The application personalization information in the preset file is replaced according to the metadata information and the first deployment information to obtain the target file corresponding to the application; The preset file is a file that matches the container; Based on the target file, deploy and start the application in the created container; The step of deploying and starting the application in the created container according to the target file includes: The metadata information is added to a preset configuration template to obtain the application's configuration file; Based on the target file and the configuration file, deploy and start the application in the created container; When launching the application in the created container, the following is also included: When the application starts successfully, a third database is determined based on the application's identifier, and the third database includes the application's identifier; The second deployment information, including the deployment status, is stored in the third database, where the deployment status is "deployment successful". The step of parsing the application deployment package to obtain the application's metadata information and first deployment information includes: The application deployment package is parsed to obtain the metadata information; The data information related to application deployment in the metadata information is processed into the first deployment information, and the first deployment information is stored in the second database, which is the database of the deployment engine.

2. The method according to claim 1, characterized in that, Also includes: The metadata information is stored in a first database, which is a database for metadata services.

3. The method according to claim 1, characterized in that, Before obtaining the first deployment information, the process includes: Based on the application's identifier, determine whether the application exists in the deployed applications; If the application exists in the deployed application, then determine whether the version of the application is higher than the version of the deployed application; If the version of the application is higher than the version of the deployed application, then the deployed application is deleted.

4. The method according to claim 1, characterized in that, Before obtaining the first deployment information, the process includes: Integrity checks are performed on multiple first components to determine that the functions of the multiple first components are intact. The first components are components related to application deployment.

5. The method according to claim 1, characterized in that, Before obtaining the first deployment information, the process also includes: Connectivity checks are performed on multiple second components to determine that all of the second components are in an available state. The second components are components related to application deployment.

6. An application deployment device, characterized in that, include: The acquisition module is used to acquire the application deployment package uploaded by the user; The processing module is used to parse the application deployment package to obtain the application's metadata information and first deployment information; The processing module is further configured to replace the application personalization information in the preset file according to the metadata information and the first deployment information to obtain the target file corresponding to the application; The preset file is a file that matches the container; The startup module is used to deploy and start the application in the created container based on the target file; The startup module is specifically used to add the metadata information to a preset configuration template to obtain the application's configuration file; and to deploy and start the application in the created container based on the target file and the configuration file. The startup module is further configured to, when the application starts successfully, determine a third database based on the application's identifier, the third database including the application's identifier; and store second deployment information including deployment status into the third database, the deployment status being "deployment successful"; The processing module is specifically used to parse the application deployment package to obtain the metadata information; The data information related to application deployment in the metadata information is processed into the first deployment information, and the first deployment information is stored in the second database, which is the database of the deployment engine.

7. An electronic device, characterized in that, Includes memory and processor; among which, The memory is used to store computer programs; The processor is configured to read the computer program stored in the memory and execute the application deployment method according to any one of claims 1-5 based on the computer program in the memory.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by the processor, implement an application deployment method according to any one of claims 1-5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements an application deployment method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Application deployment method and device

    CN106874028A

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

    CN108958927A