A method and device for deploying an application

By calculating the application execution order and parsing configuration information, dynamically loading images and configuration files, it solves the problem of low application deployment efficiency in existing technologies and realizes a fast and automated POC deployment process.

CN113407203BActive Publication Date: 2025-09-16BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110769452.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-07
Publication Date
2025-09-16
Estimated Expiration
2041-07-07

AI Technical Summary

Technical Problem

The existing technology has low application deployment efficiency, requires separate deployment for each service, has low configuration efficiency, high learning cost, deployment failure due to different service names or unregistered services, and complex descriptions using scripting languages, with a long writing cycle.

Method used

By obtaining the application list, calculating the execution order, parsing the configuration information, establishing the communication link configuration, and gradually executing the application deployment, the application information can be dynamically loaded by separating the image address and the configuration file, thus reducing manual operations.

Benefits of technology

It enables rapid management of application information, reduces manual operations, improves the automation efficiency of the POC deployment process, and simplifies the middleware resource application and configuration modification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113407203B_ABST
    Figure CN113407203B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for deploying applications, which relate to the field of computer technology. A specific implementation of the method includes: in response to a deployment operation triggered by a deployment strategy, obtaining an application list corresponding to the deployment strategy, and calculating the execution order between the applications in the application list; determining the first application ranked first, parsing the configuration information of the first application, and obtaining the identifier of the middleware that the first application depends on; obtaining the middleware resource information corresponding to the identifier, replacing the placeholder in the configuration information with the middleware resource information, so as to establish the communication link configuration information with the first application; repeating the above process, establishing the communication link configuration information with each application in the application list, and then gradually executing the application deployment operation according to the execution order. This implementation method can quickly manage application configuration and resources, reduce manual operations when installing applications, realize the automation of the POC deployment process, and greatly improve deployment efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for deploying applications. Background Art

[0002] Application deployment refers to the process of deploying packaged application resources to a designated server according to a series of orchestrated task flows. To improve the speed and efficiency of application deployment, companies currently typically build a Proof of Concept (POC) environment before deploying basic middleware and deploying applications in this environment when providing external commercial capabilities and engaging with key account (KA) users.

[0003] In the process of implementing the present invention, the inventors discovered that the prior art has at least the following problems:

[0004] 1. Each service in the application needs to be deployed separately. First, relevant resources such as account numbers and passwords must be requested from the middleware. Then, the application configuration files must be manually converted. This results in extremely low configuration efficiency and a high learning cost for this deployment method.

[0005] 2. The order of application execution has a strong dependency, but in actual operation, there may be situations where service names are different, services are not registered, or do not exist. This may cause some applications / services to fail to start, requiring the modification of a large number of application configuration files, affecting the overall deployment speed.

[0006] 3. In some scenarios, scripting languages ​​are used for application deployment. However, the middleware resource information that the application depends on needs to be customized and developed. If scripting languages ​​are used to describe and write information, the writing process is more complicated and the writing cycle is longer, resulting in low deployment efficiency. Summary of the Invention

[0007] In view of this, embodiments of the present invention provide a method and apparatus for deploying applications, which can at least solve the problem of low efficiency in existing application deployment.

[0008] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for deploying an application is provided, comprising:

[0009] In response to a triggering deployment operation on a deployment policy, obtaining an application list corresponding to the deployment policy, and calculating an execution order between the applications in the application list;

[0010] Determine a first application ranked first, parse configuration information of the first application, and obtain an identifier of a middleware that the first application depends on;

[0011] Acquire middleware resource information corresponding to the identifier, and replace the placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application;

[0012] Repeat the above process to establish communication link configuration information with each application in the application list, and then gradually perform application deployment operations according to the execution order.

[0013] Optionally, calculating the execution order of the applications in the application list includes:

[0014] Obtaining, from description information of an application, an execution order between the application and other applications; wherein the description information is used to describe the execution dependency relationship between the applications;

[0015] The execution orders of different applications are connected in series to obtain the application execution sequence.

[0016] Optionally, determining the first application ranked first includes:

[0017] determining whether the application execution sequence is a closed loop, and if so, selecting any one application from the closed loop as a first application to be executed first; and

[0018] Another application located before and adjacent to any one of the applications is used as the last application to be executed.

[0019] Optionally, the acquiring of middleware resource information corresponding to the middleware identifier includes:

[0020] The middleware description information corresponding to the identifier is acquired, the middleware description information is parsed to obtain middleware attribute information, and middleware resource information corresponding to the middleware attribute information is searched.

[0021] Optionally, the acquiring middleware resource information corresponding to the middleware identifier and replacing the placeholder in the configuration information with the middleware resource information includes:

[0022] Query whether there is middleware resource information corresponding to the middleware attribute information;

[0023] If it does not exist, initialize the middleware corresponding to the middleware identifier and obtain the middleware resource information;

[0024] When the middleware resource information is obtained, the placeholder in the first application configuration information is replaced with the middleware resource information.

[0025] Optionally, the step of gradually executing the application deployment operation in the execution order includes:

[0026] Call the deployment push interface, obtain the image address from the information of each application and push it to the deployment platform to trigger the deployment platform to load the corresponding image information based on the image address;

[0027] Obtaining a configuration file after replacing resource information from the information of each application, and pushing the configuration file to the deployment platform;

[0028] The deployment platform is used to dynamically load the configuration files of each application when mirroring and starting the mirror information of each application, so as to gradually execute the application deployment operation according to the execution order.

[0029] Optionally, it also includes: calling the deployment platform to create a deployment group, creating a deployment system and deployment files in the deployment group, so as to store the image information and configuration files of each application in different deployment files respectively; wherein the deployment files are located in the deployment system.

[0030] Optionally, the deployment push interface is located at a deployment policy service provider, and the method further includes:

[0031] At the deployment policy service provider, receiving description information and mirror address input for each application, and obtaining application information; wherein the description information includes configuration information and execution dependency relationships with other applications; and

[0032] On the deployment policy service application side, a concept verification environment is deployed to receive application information pushed by the deployment policy service provider side in the concept verification environment.

[0033] To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a device for deploying an application, comprising:

[0034] A calculation order module is used to obtain an application list corresponding to the deployment policy in response to a triggering deployment operation on the deployment policy, and calculate the execution order between the applications in the application list;

[0035] a configuration parsing module, configured to determine a first application ranked first, parse configuration information of the first application, and obtain an identifier of a middleware on which the first application depends;

[0036] an information replacement module, configured to obtain middleware resource information corresponding to the identifier, and replace the placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application;

[0037] The application deployment module is used to repeat the above process, establish communication link configuration information with each application in the application list, and then gradually perform application deployment operations according to the execution order.

[0038] Optionally, the calculation sequence module is configured to: obtain, from description information of an application, an execution sequence between the application and other applications; wherein the description information is used to describe the execution dependency relationship between the applications;

[0039] The execution orders of different applications are connected in series to obtain the application execution sequence.

[0040] Optionally, the parsing configuration module is used to:

[0041] determining whether the application execution sequence is a closed loop, and if so, selecting any one application from the closed loop as a first application to be executed first; and

[0042] Another application located before and adjacent to any one of the applications is used as the last application to be executed.

[0043] Optionally, the information replacement module is configured to: obtain middleware description information corresponding to the identifier, parse the middleware description information to obtain middleware attribute information, and query middleware resource information corresponding to the middleware attribute information.

[0044] Optionally, the replacement information module is used to:

[0045] Query whether there is middleware resource information corresponding to the middleware attribute information;

[0046] If it does not exist, initialize the middleware corresponding to the middleware identifier and obtain the middleware resource information;

[0047] When the middleware resource information is obtained, the placeholder in the first application configuration information is replaced with the middleware resource information.

[0048] Optionally, the deployment application module is used to:

[0049] Call the deployment push interface, obtain the image address from the information of each application and push it to the deployment platform to trigger the deployment platform to load the corresponding image information based on the image address;

[0050] Obtaining a configuration file after replacing resource information from the information of each application, and pushing the configuration file to the deployment platform;

[0051] The deployment platform is used to dynamically load the configuration files of each application when mirroring and starting the mirror information of each application, so as to gradually execute the application deployment operation according to the execution order.

[0052] Optionally, the deployment application module is further used to:

[0053] The deployment platform is called to create a deployment group, and a deployment system and a deployment file are created in the deployment group to store the image information and configuration files of each application in different deployment files respectively; wherein the deployment file is located in the deployment system.

[0054] Optionally, the deployment push interface is located at a deployment policy service provider, and the device further includes:

[0055] At the deployment policy service provider, receiving description information and mirror address input for each application, and obtaining application information; wherein the description information includes configuration information and execution dependency relationships with other applications; and

[0056] On the deployment policy service application side, a concept verification environment is deployed to receive application information pushed by the deployment policy service provider side in the concept verification environment.

[0057] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for deploying applications is provided.

[0058] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-described methods for deploying applications.

[0059] To achieve the above objectives, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, any of the above-mentioned methods for deploying applications is implemented.

[0060] According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the service provider quickly manages application information and maintains it on the system management platform by separating image information and configuration information. The service application provider parses the application configuration information to request middleware resource information, dynamically modifying the application configuration information and then deploying POC-related applications based on the dependencies between applications. The overall system can quickly manage application configuration and resources, reduce manual operations during application installation, automate the POC deployment process, and significantly improve deployment efficiency.

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

[0062] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.

[0063] Figure 1(a) and 1(b)This is a diagram of the technical architecture of this solution;

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

[0065] Figure 3 is a flowchart of an optional method for deploying an application according to an embodiment of the present invention;

[0066] Figure 4 is a flowchart of another optional method for deploying an application according to an embodiment of the present invention;

[0067] Figure 5 is a schematic diagram of main modules of a device for deploying applications according to an embodiment of the present invention;

[0068] Figure 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;

[0069] Figure 7 It is a schematic diagram of the structure of a computer system of a mobile device or server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0070] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0071] As shown in Figures 1(a) and (b), this solution includes a deployment policy service provider and a deployment policy service application. For example, in response to a technical problem faced by enterprise B, enterprise A provides a solution and converts the solution into a deployment policy and sends it to enterprise B.

[0072] 1. Deployment of policy service provider, including management module and storage module

[0073] 1) Management module, including application management and deployment management

[0074] ① Application management: Enterprise A enters the application identifiers and application information used in the deployment strategy into the system management platform to generate an application list for the deployment strategy;

[0075] I Image address management, set by the R&D personnel, the subsequent deployment platform can load the application image information based on the image address. The application image information here includes not only the application installation package, but also other installation items preset by the R&D personnel;

[0076] II describes information management, including dependency management and configuration information management

[0077] a Dependency management: record the execution order of the current application and other applications in the application list. This is later used to calculate the application execution sequence. For example, if the application list contains three applications, X, Y, and Z, application X will be started first, application Y will be started second, and application Z will be started last.

[0078] b. Configuration information management: This involves managing the identifiers, middleware resources, and scripts of each application's dependent middleware. This information is then converted into pre-set templates. For example, in the database, the resource ID in {resource ID.mysql.name} represents the unique ID for the requested middleware resource, mysql represents the resource type, and name represents the username. For example, database server information such as 4c8g and a 100g hard drive is used for server applications. Script information is used for script initialization. For example, after a database application is completed, a script can be used to initialize database resources through the API.

[0079] ② Deployment management: set up a deployment push interface, through which the application's image address and configuration information are pushed to the application-side deployment platform for resource initialization and deployment operations.

[0080] 2) Storage Module

[0081] 1) MYSQL server, used to store application configuration information;

[0082] 2) OSS file server, used to store the application's image address, image information, and dependent middleware resource information.

[0083] 2. Deployment strategy service application side, including control side and dependent environment

[0084] 1) The control side is used for information synchronization, such as applying for middleware resource information, parsing application configuration files, and deploying applications.

[0085] ① Resource application: parse the application configuration information to obtain the identifier of the middleware that the application depends on, call the middleware API to apply for middleware resource information from the server, and if no middleware resource information is found, execute the script information to complete the initialization of the middleware.

[0086] ② Configuration replacement: Replace the placeholders in the application configuration information with the middleware resource information. For example, replace the placeholders for the account and password in application X with the account and password in the middleware resource information, thereby achieving dynamic and automatic resource replacement for the application.

[0087] ③Dependency calculation, obtain the application list corresponding to the deployment strategy, determine the execution order between each application and other applications based on the description information of each application, and then concatenate the application execution sequence to schedule the application startup order during deployment.

[0088] ④ Batch deployment: After obtaining the application image information and the configuration file that replaces the resource information, Kubernetes executes the application deployment operations in sequence according to the application execution order.

[0089] 2) Dependent environments, including the middleware environment and Kubernetes environment used for operation and maintenance deployment, which are usually privatized on the application side.

[0090] See also Figure 2 , which shows a main flow chart of a method for deploying an application provided by an embodiment of the present invention, including the following steps:

[0091] S201: In response to a deployment triggering operation on a deployment policy, obtaining an application list corresponding to the deployment policy, and calculating an execution order between applications in the application list;

[0092] S202: Determine a first application ranked first, parse configuration information of the first application, and obtain an identifier of a middleware on which the first application depends;

[0093] S203: Acquire middleware resource information corresponding to the identifier, and replace the placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application;

[0094] S204: Repeat the above process to establish communication link configuration information with each application in the application list, and then gradually perform application deployment operations according to the execution order.

[0095] In the above implementation, for step S201, the deployment policy service provider is used to provide deployment policy services to the deployment policy service application. For example, for a technical problem of enterprise B, enterprise A provides a solution and converts the solution into a deployment policy and sends it to enterprise B.

[0096] A proof-of-concept (POC) environment is typically used by companies to verify product or supplier capabilities before selecting products or launching external implementation projects. Company B first deploys a POC environment and then clicks the Deploy option in the pre-set deployment application interface to trigger the deployment of the deployment policy. Currently, deployments are manually triggered, and each deployment policy is supported by multiple applications. Therefore, the applications retrieved are generally presented as a list. Each application includes an image address and a description, which in turn includes configuration information and dependency information.

[0097] Applications execute sequentially. For example, if a product system consists of three applications: the product basic service, the product gateway, and the product web, the product basic service starts first, followed by the product gateway, and finally the web. The execution dependencies between applications are typically maintained in their descriptions. If no description exists, the application is started independently. Otherwise, the application execution sequence is determined by sequentially linking the execution dependencies.

[0098] For steps S202 and S203, the first application to be executed is first determined. If the application execution sequence is not a closed loop, the first application can be directly determined. However, if it is a closed loop, an application can be randomly selected as the first application, and another application that is located before and adjacent to the first application can be selected as the last application to be executed. It should be noted that in actual operation, the sequence may be interrupted (i.e., the number of sequences is not 1). In this case, a prompt message will pop up, and the user can manually repair it or set the execution order. In some cases, there is no execution dependency between some applications. For example, after application X is executed, one of application Y or application Z is randomly started.

[0099] The first application's configuration information is parsed to obtain the identifier of the middleware it relies on, such as the MySQL database. The middleware resource information, typically the login account and password, is then retrieved from MySQL. The configuration information in the first application is then replaced with the middleware resource information. However, at this point, the solution is only in the deployment phase and has not yet been started, so a network HTTP connection cannot be established. Therefore, only the communication link configuration information is established with the first application to facilitate subsequent direct startup.

[0100] Also, see Figure 3 As shown in the figure, the specific method for obtaining middleware resource information is:

[0101] S301: Acquire middleware description information corresponding to the middleware identifier, and parse the middleware description information to obtain middleware attribute information;

[0102] S302: Query whether there is middleware resource information corresponding to the middleware attribute information;

[0103] S303: If it does not exist, initialize the middleware corresponding to the middleware identifier and obtain middleware resource information;

[0104] S304: When the middleware resource information is obtained, the placeholder in the first application configuration information is replaced with the middleware resource information.

[0105] According to the middleware description information, the attribute information of the middleware can be obtained, such as the table name and library name, and whether there is middleware resource information corresponding to the middleware attribute information, such as account number and password, is queried. If not, it is necessary to call the relevant interface to initialize it and record the configuration relationship between the middleware resource information and the first application configuration information. At this time, the initialization of the first application configuration file (that is, the configuration information after replacing the resource) is completed.

[0106] For step S204, after establishing a communication link configuration relationship with each application in the deployment strategy application list, the deployment push interface is called to push the image address and configuration file of each application to the deployment platform, and the deployment platform is used to gradually deploy the applications according to the application execution order.

[0107] See also Figure 4 As shown:

[0108] S401: calling the deployment push interface of the deployment policy service provider, obtaining the image address from the information of each application and pushing it to the deployment platform, so as to trigger the deployment platform to load the corresponding image information based on the image address;

[0109] S402: Obtain a configuration file after replacing resource information from the information of each application, and push the configuration file to the deployment platform;

[0110] S403: Utilizing the deployment platform to dynamically load the configuration files of each application when mirroring and starting the mirror information of each application, so as to gradually execute the application deployment operation according to the execution order.

[0111] Based on the image address, the Kubernetes deployment platform loads the application image information from the API provided by the deployment policy service, replacing the configuration file. Each application's configuration file and image information are typically stored in the same location. Therefore, when the Kubernetes deployment platform starts an application image, it loads the application configuration file from the image's location.

[0112] Furthermore, there may be multiple deployment strategies in the POC environment. Considering that each strategy is composed of multiple applications and each application contains multiple services, deployment groups can also be created in the deployment platform Kubernetes. A deployment system is set up in the group, and the deployment system contains multiple deployment files for separately storing the image information and configuration files of each application.

[0113] In the method provided by the above embodiment, the service provider quickly manages application information and maintains it on the system management platform by separating image information and configuration information. The service application provider parses the application configuration information to apply for middleware resource information, dynamically modifying the application configuration information and then deploying POC-related applications based on the dependencies between applications. This allows for rapid management of application configuration and resources, reducing manual operations during application installation (such as applying for middleware resources, modifying configuration information, and manually relocating images), automating the POC deployment process, and significantly improving deployment efficiency.

[0114] See also Figure 5 , which shows a schematic diagram of the main modules of an apparatus 500 for deploying an application provided by an embodiment of the present invention, including:

[0115] A calculation order module 501 is configured to obtain an application list corresponding to a deployment policy in response to a triggering deployment operation on the deployment policy, and calculate an execution order between the applications in the application list;

[0116] The configuration parsing module 502 is configured to determine the first application ranked first, parse the configuration information of the first application, and obtain an identifier of a middleware on which the first application depends;

[0117] An information replacement module 503 is configured to obtain middleware resource information corresponding to the identifier, and replace the placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application;

[0118] The application deployment module 504 is configured to repeat the above process, establish communication link configuration information with each application in the application list, and then gradually execute application deployment operations according to the execution order.

[0119] In the implementation device of the present invention, the calculation sequence module 501 is used to:

[0120] Obtaining, from description information of an application, an execution order between the application and other applications; wherein the description information is used to describe the execution dependency relationship between the applications;

[0121] The execution orders of different applications are connected in series to obtain the application execution sequence.

[0122] In the implementation device of the present invention, the parsing configuration module 502 is used to:

[0123] determining whether the application execution sequence is a closed loop, and if so, selecting any one application from the closed loop as a first application to be executed first; and

[0124] Another application located before and adjacent to any one of the applications is used as the last application to be executed.

[0125] In the implementation device of the present invention, the replacement information module 503 is used to:

[0126] The middleware description information corresponding to the identifier is acquired, the middleware description information is parsed to obtain middleware attribute information, and middleware resource information corresponding to the middleware attribute information is searched.

[0127] In the implementation device of the present invention, the replacement information module 503 is used to:

[0128] Query whether there is middleware resource information corresponding to the middleware attribute information;

[0129] If it does not exist, initialize the middleware corresponding to the middleware identifier and obtain the middleware resource information;

[0130] When the middleware resource information is obtained, the placeholder in the first application configuration information is replaced with the middleware resource information.

[0131] In the implementation device of the present invention, the deployment application module 504 is used to:

[0132] Call the deployment push interface, obtain the image address from the information of each application and push it to the deployment platform to trigger the deployment platform to load the corresponding image information based on the image address;

[0133] Obtaining a configuration file after replacing resource information from the information of each application, and pushing the configuration file to the deployment platform;

[0134] The deployment platform is used to dynamically load the configuration files of each application when mirroring and starting the mirror information of each application, so as to gradually execute the application deployment operation according to the execution order.

[0135] In the implementation device of the present invention, the deployment application module 504 is further used to:

[0136] The deployment platform is called to create a deployment group, and a deployment system and a deployment file are created in the deployment group to store the image information and configuration files of each application in different deployment files respectively; wherein the deployment file is located in the deployment system.

[0137] In the implementation device of the present invention, the deployment push interface is located at the deployment policy service provider, and the device further includes:

[0138] At the deployment policy service provider, receiving description information and mirror address input for each application, and obtaining application information; wherein the description information includes configuration information and execution dependency relationships with other applications; and

[0139] On the deployment policy service application side, a concept verification environment is deployed to receive application information pushed by the deployment policy service provider side in the concept verification environment.

[0140] In addition, the specific implementation content of the device in the embodiment of the present invention has been described in detail in the above method, so the repeated content will not be described again here.

[0141] Figure 6 An exemplary system architecture 600 to which embodiments of the present invention may be applied is shown, including terminal devices 601 , 602 , 603 , a network 604 and a server 605 (only an example).

[0142] Terminal devices 601, 602, and 603 can be various electronic devices with display screens and support web browsing, and are installed with various communication client applications. Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc.

[0143] The network 604 is used to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0144] The server 605 may be a server that provides various services, and is used to manage application configuration information, image information, and manage the operation of deploying applications by service application parties.

[0145] It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device is generally set in the server 605 .

[0146] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0147] Reference below Figure 7 , which shows a schematic structural diagram of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0148] like Figure 7As shown, computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of system 700 are also stored in RAM 703. CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to bus 704.

[0149] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output section 707 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or a modem. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 710 as needed, so that computer programs read therefrom can be installed into the storage section 708 as needed.

[0150] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0151] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0153] The modules described in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as comprising a calculation sequence module, a configuration parsing module, a replacement information module, and a deployment application module. The names of these modules do not, in some cases, limit the modules themselves. For example, a deployment application module may also be described as a "repeated operation and deployment application module."

[0154] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiments, or may exist independently without being incorporated into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device includes:

[0155] In response to a triggering deployment operation on a deployment policy, obtaining an application list corresponding to the deployment policy, and calculating an execution order between the applications in the application list;

[0156] Determine a first application ranked first, parse configuration information of the first application, and obtain an identifier of a middleware that the first application depends on;

[0157] Acquire middleware resource information corresponding to the identifier, and replace the placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application;

[0158] Repeat the above process to establish communication link configuration information with each application in the application list, and then gradually perform application deployment operations according to the execution order.

[0159] According to the technical solution of the embodiment of the present invention, the overall application configuration and resources can be quickly managed, reducing manual operations when installing applications (such as applying for middleware resources, modifying configuration information, manually migrating images, etc.), realizing the automation of the POC deployment process, and greatly improving deployment efficiency.

[0160] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for deploying an application, characterized in that: include: In response to a deployment operation triggered by a deployment policy, obtaining an application list corresponding to the deployment policy, and calculating an execution order between applications in the application list, including: obtaining an execution order between an application and other applications from description information of the application; wherein the description information is used to describe the execution dependency relationship between the applications; and concatenating the execution orders of different applications to obtain an application execution sequence; Determine a first application ranked first, parse configuration information of the first application, and obtain an identifier of a middleware that the first application depends on; Acquire middleware resource information corresponding to the identifier, and replace the placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application; Repeating the above process to establish communication link configuration information with each application in the application list, and then gradually executing the application deployment operation according to the execution order; wherein, the gradually executing the application deployment operation according to the execution order includes: calling a deployment push interface, obtaining an image address from the information of each application and pushing it to the deployment platform, thereby triggering the deployment platform to load the corresponding image information based on the image address; obtaining a configuration file after replacing resource information from the information of each application, and pushing the configuration file to the deployment platform; using the deployment platform to dynamically load the configuration file of each application when the image information of each application is started by the mirror, so as to gradually execute the application deployment operation according to the execution order; the image information includes the application installation package and other preset installation items; The deployment push interface is located at the deployment policy service provider, and receives the description information and mirror address of each application input at the deployment policy service provider to obtain application information; wherein the description information includes configuration information and execution dependency relationships with other applications; On the deployment policy service application side, a concept verification environment is deployed to receive application information pushed by the deployment policy service provider side in the concept verification environment.

2. The method according to claim 1, characterized in that Determining the first application ranked first includes: determining whether the application execution sequence is a closed loop, and if so, selecting any one application from the closed loop as a first application to be executed first; and Another application located before and adjacent to any one of the applications is used as the last application to be executed.

3. The method according to claim 1, characterized in that The acquiring of middleware resource information corresponding to the middleware identifier includes: The middleware description information corresponding to the identifier is acquired, the middleware description information is parsed to obtain middleware attribute information, and middleware resource information corresponding to the middleware attribute information is searched.

4. The method according to claim 3, characterized in that The acquiring of middleware resource information corresponding to the middleware identifier and replacing the placeholder in the configuration information with the middleware resource information includes: Query whether there is middleware resource information corresponding to the middleware attribute information; If it does not exist, initialize the middleware corresponding to the middleware identifier and obtain the middleware resource information; When the middleware resource information is obtained, the placeholder in the first application configuration information is replaced with the middleware resource information.

5. The method according to claim 1, wherein Also includes: The deployment platform is called to create a deployment group, and a deployment system and a deployment file are created in the deployment group to store the image information and configuration files of each application in different deployment files respectively; wherein the deployment file is located in the deployment system.

6. A device for deploying an application, characterized in that: include: A calculation sequence module is configured to, in response to a deployment operation triggered by a deployment policy, obtain an application list corresponding to the deployment policy and calculate an execution sequence between applications in the application list, including: obtaining an execution sequence between an application and other applications from description information of the application; wherein the description information is used to describe the execution dependency relationship between the applications; and concatenating the execution sequences of different applications to obtain an application execution sequence; a configuration parsing module, configured to determine a first application ranked first, parse configuration information of the first application, and obtain an identifier of a middleware on which the first application depends; an information replacement module, configured to obtain middleware resource information corresponding to the identifier, and replace the placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application; The application deployment module is configured to repeat the above process, establish communication link configuration information with each application in the application list, and then gradually execute application deployment operations according to the execution order; wherein, the stepwise execution of application deployment operations according to the execution order includes: calling a deployment push interface, obtaining an image address from the information of each application and pushing it to the deployment platform, thereby triggering the deployment platform to load the corresponding image information based on the image address; obtaining a configuration file after replacing resource information from the information of each application, and pushing the configuration file to the deployment platform; utilizing the deployment platform to dynamically load the configuration file of each application when the image information of each application is started by the mirror, thereby gradually executing application deployment operations according to the execution order; the image information includes the application installation package and other preset installation items; The deployment push interface is located at the deployment policy service provider, and receives the description information and mirror address of each application input at the deployment policy service provider to obtain application information; wherein the description information includes configuration information and execution dependency relationships with other applications; On the deployment policy service application side, a concept verification environment is deployed to receive application information pushed by the deployment policy service provider side in the concept verification environment.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Microservice application arrangement and deployment method and device and computer terminal

    CN108762769A

  • Application deployment method and related device

    CN112130866A