CN113407203A - Method and device for deploying application - Google Patents

Method and device for deploying application Download PDF

Info

Publication number
CN113407203A
CN113407203A CN202110769452.6A CN202110769452A CN113407203A CN 113407203 A CN113407203 A CN 113407203A CN 202110769452 A CN202110769452 A CN 202110769452A CN 113407203 A CN113407203 A CN 113407203A
Authority
CN
China
Prior art keywords
application
deployment
information
middleware
applications
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110769452.6A
Other languages
Chinese (zh)
Inventor
李坤然
王仲甫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110769452.6A priority Critical patent/CN113407203A/en
Publication of CN113407203A publication Critical patent/CN113407203A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for deploying applications, and relates to the technical field of computers. One embodiment of the method comprises: responding to the trigger deployment operation of the deployment strategy, acquiring an application list corresponding to the deployment strategy, and calculating an execution sequence among applications in the application list; determining a first application with a first sequence, and analyzing configuration information of the first application to obtain an identifier of a middleware which the first application depends on; acquiring middleware resource information corresponding to the identifier, and replacing placeholders in the configuration information with the middleware resource information to establish communication link configuration information with the first application; and repeating the process, establishing communication link configuration information between the application and each application in the application list, and further executing application deployment operation step by step according to the execution sequence. The implementation method can rapidly manage application configuration and resources, reduces manual operation when the application is installed, realizes POC (point of sale) deployment process automation, and greatly improves deployment efficiency.

Description

Method and device for deploying application
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for deploying an application.
Background
The application deployment refers to a process of deploying the packaged application resources to a specified server according to a series of scheduled task flows. In order to improve the speed and efficiency of application deployment, currently, when an enterprise performs external commercial enabling and relates to KA (key access, key customer) users, a POC (Proof of Concept verification) environment is usually set up first, a basic middleware is deployed to the POC environment, and then an application is deployed in the POC environment.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
1. the method needs to be deployed independently for each service in the application, firstly, related resources such as an account number and a password are applied from the middleware, and then, resource conversion is performed on the application configuration file manually, so that the configuration efficiency is extremely low, and the learning cost of the deployment mode is high.
2. The application execution sequence has strong dependency relationship, but in actual operation, the conditions of different service names and unregistered/non-existent service exist, so that some applications/services cannot be started, a large number of application configuration files need to be modified, and the overall deployment speed is influenced.
3. Some scenes use a script language to deploy applications, but middleware resource information which depends on the applications needs to be customized and developed, and if the script language is used for describing and compiling, the compiling period is long, so that the deployment efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for deploying an application, which can at least solve the problem of low deployment efficiency of existing applications.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for deploying an application, including:
responding to the trigger deployment operation of a deployment strategy, acquiring an application list corresponding to the deployment strategy, and calculating an execution sequence among applications in the application list;
determining a first application with a first sequence, and analyzing configuration information of the first application to obtain an identifier of a middleware which is depended on by the first application;
acquiring middleware resource information corresponding to the identifier, and replacing placeholders in the configuration information with the middleware resource information to establish communication link configuration information with the first application;
repeating the above process, establishing communication link configuration information between the application and each application in the application list, and further executing application deployment operation step by step according to the execution sequence.
Optionally, the calculating an execution sequence between applications in the application list includes:
acquiring an execution sequence between one application and other applications from description information of the application; the description information is used for describing execution dependency relations among the applications;
and connecting execution sequences among different applications in series to obtain an application execution sequence.
Optionally, the determining a first application with a first rank includes:
judging whether the application execution sequence is a closed loop or not, if so, selecting any one application from the closed loop as a first application for first execution; and
and taking another application which is positioned before any one application and is adjacent to the application as the application executed last.
Optionally, the obtaining of the middleware resource information corresponding to the middleware identifier includes:
acquiring the middleware description information corresponding to the identifier, analyzing the middleware description information to obtain middleware attribute information, and inquiring the middleware resource information corresponding to the middleware attribute information.
Optionally, the obtaining middleware resource information corresponding to the middleware identifier, and replacing the placeholder in the configuration information with the middleware resource information includes:
inquiring whether middleware resource information corresponding to the middleware attribute information exists or not;
if not, initializing the middleware corresponding to the middleware identifier to obtain middleware resource information;
and under the condition of obtaining the middleware resource information, replacing the placeholder in the first application configuration information with the middleware resource information.
Optionally, the step-by-step executing the application deployment operation according to the execution sequence includes:
calling a deployment push interface, acquiring a mirror image address from the information of each application and pushing the mirror image address to a deployment platform so as to trigger the deployment platform to load corresponding mirror image information based on the mirror image address;
acquiring a configuration file after resource information is replaced from the information of each application, and pushing the configuration file to the deployment platform;
and dynamically loading the configuration files of the applications when the deployment platform is used for starting the mirror image information of the applications in a mirror image manner so as to execute the deployment operation of the applications step by step according to the execution sequence.
Optionally, the method further includes: calling the deployment platform to create a deployment group, and creating a deployment system and a deployment file in the deployment group so as to respectively store the mirror image information and the configuration file of each application into different deployment files; wherein the deployment file is located in the deployment system.
Optionally, the deployment pushing interface is located at a deployment policy service provider, and the method further includes:
receiving description information and mirror image addresses input to each application at the deployment strategy service provider to obtain application information; the description information comprises configuration information and execution dependency relations with other applications; and
and deploying a concept verification environment at a deployment policy service application end to receive the application information pushed by the deployment policy service provider end under the concept verification environment.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for deploying an application, including:
the computing sequence module is used for responding to the triggering deployment operation of the deployment strategy, acquiring an application list corresponding to the deployment strategy, and computing the execution sequence among the applications in the application list;
the analysis configuration module is used for determining a first application in sequence, analyzing configuration information of the first application and obtaining an identifier of a middleware which is depended by the first application;
the replacing information module is used for acquiring middleware resource information corresponding to the identifier and replacing placeholders in the configuration information with the middleware resource information so as to establish communication link configuration information with the first application;
and the deployment application module is used for repeating the process, establishing communication link configuration information between the deployment application module and each application in the application list, and further executing application deployment operation step by step according to the execution sequence.
Optionally, the calculation order module is configured to: acquiring an execution sequence between one application and other applications from description information of the application; the description information is used for describing execution dependency relations among the applications;
and connecting execution sequences among different applications in series to obtain an application execution sequence.
Optionally, the parsing configuration module is configured to:
judging whether the application execution sequence is a closed loop or not, if so, selecting any one application from the closed loop as a first application for first execution; and
and taking another application which is positioned before any one application and is adjacent to the application as the application executed last.
Optionally, the replacement information module is configured to: acquiring the middleware description information corresponding to the identifier, analyzing the middleware description information to obtain middleware attribute information, and inquiring the middleware resource information corresponding to the middleware attribute information.
Optionally, the replacement information module is configured to:
inquiring whether middleware resource information corresponding to the middleware attribute information exists or not;
if not, initializing the middleware corresponding to the middleware identifier to obtain middleware resource information;
and under the condition of obtaining the middleware resource information, replacing the placeholder in the first application configuration information with the middleware resource information.
Optionally, the deployment application module is configured to:
calling a deployment push interface, acquiring a mirror image address from the information of each application and pushing the mirror image address to a deployment platform so as to trigger the deployment platform to load corresponding mirror image information based on the mirror image address;
acquiring a configuration file after resource information is replaced from the information of each application, and pushing the configuration file to the deployment platform;
and dynamically loading the configuration files of the applications when the deployment platform is used for starting the mirror image information of the applications in a mirror image manner so as to execute the deployment operation of the applications step by step according to the execution sequence.
Optionally, the deployment application module is further configured to:
calling the deployment platform to create a deployment group, and creating a deployment system and a deployment file in the deployment group so as to respectively store the mirror image information and the configuration file of each application into different deployment files; wherein the deployment file is located in the deployment system.
Optionally, the deployment pushing interface is located at a deployment policy service provider, and the apparatus further includes:
receiving description information and mirror image addresses input to each application at the deployment strategy service provider to obtain application information; the description information comprises configuration information and execution dependency relations with other applications; and
and deploying a concept verification environment at a deployment policy service application end to receive the application information pushed by the deployment policy service provider end under the concept verification environment.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic device for deploying an application.
The electronic device of the embodiment of the invention comprises: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement any of the above methods for deploying an application.
To achieve the above object, according to a further aspect of the embodiments of the present invention, there is provided a computer readable medium having a computer program stored thereon, the program, when executed by a processor, implementing any of the above methods for deploying applications.
According to the scheme provided by the invention, one embodiment of the invention has the following advantages or beneficial effects: the service provider rapidly manages the application information and maintains the application information to the system management platform in a mode of separating the mirror image information from the configuration information, and the service provider applies for the middleware resource information by analyzing the application configuration information so as to dynamically modify the application configuration information and further deploy the POC related applications according to the dependency relationship between the applications. The configuration and resources of the application can be managed quickly as a whole, manual operation is reduced when the application is installed, the automation of the POC deployment process is realized, and the deployment efficiency is greatly improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIGS. 1(a) and 1(b) are schematic diagrams of the technical architecture of the present solution;
FIG. 2 is a schematic flow chart diagram illustrating a method for deploying an application, in accordance with an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an alternative method for deploying an application, according to an embodiment of the invention;
FIG. 4 is a flowchart illustrating an alternative method for deploying an application according to an embodiment of the invention;
FIG. 5 is a schematic block diagram of an apparatus for deploying an application according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 7 is a schematic block diagram of a computer system suitable for use with a mobile device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1(a) and (B), the solution includes a deployment policy service provider and a deployment policy service application, for example, for a technical problem of enterprise B, enterprise a provides a solution for the technical problem, and converts the solution into a deployment policy and sends the deployment policy to enterprise B.
1. The deployment policy service provider comprises a management module and a storage module
1) Management module, including application management and deployment management
Firstly, application management, namely, an enterprise A inputs an application identifier, application information and the like used by a deployment strategy into a system management platform so as to generate an application list aiming at the deployment strategy;
i, mirror image address management is set by research and development personnel, a subsequent deployment platform can load application mirror image information according to the mirror image address, and the application mirror image information can contain other installation items preset by the research and development personnel besides an application installation package;
II describes information management, including dependency management and configuration information management
and a, managing a dependency relationship, recording the sequential execution relationship between the current application and other applications in the application list, and later using the sequential execution relationship for computing the application execution sequence, wherein the application list comprises X, Y, Z three applications, for example, the X application is started first, the Y application is started second, and the Z application is started last.
And b, managing configuration information, managing information such as the identifier of the middleware, the middleware resource information and the script which are depended by each application, and converting the middleware resource information into a preset template form. Taking the database as an example, the resource ID in { resource ID. mysql. name } indicates the unique ID of the application middleware resource, mysql indicates the type of the resource, and name indicates that the field meaning is the user name. For example, database server information 4c8g 100g hard disk, this information is used for server applications. The script information is used for script initialization, such as database resource initialization by using the script through the API after the database application is completed.
And secondly, deployment management, namely setting a deployment pushing interface, and pushing the mirror image address and the configuration information of the application to an application end deployment platform through the interface to perform resource initialization and deployment operation.
2) Memory module
1) The MYSQL server is used for storing the configuration information of the application;
2) and the OSS file server is used for storing the mirror image address, the mirror image information, the relied middleware resource information and the like of the application.
2. The deployment strategy service application end comprises a control end and a dependent environment
1) And the control terminal is used for information synchronization, such as application of middleware resource information, analysis of application configuration files, deployment of applications and the like.
The method comprises the steps of firstly, resource application, analyzing configuration information of application to obtain an identifier of a middleware depended by the application, calling a middleware API to apply the middleware resource information to a server, and executing script information to finish initialization of the middleware under the condition that the middleware resource information is not inquired.
And step two, configuration replacement, namely replacing placeholders in the application configuration information with middleware resource information. If the placeholders of the account and the password in the application X are replaced by the account and the password of the middleware resource information, the dynamic and automatic resource replacement of the application is realized.
And thirdly, obtaining an application list corresponding to the deployment strategy by relying on calculation, determining the sequence of execution between each application and other applications according to the description information of each application, and then connecting the sequence in series to obtain an application execution sequence for scheduling the application starting sequence during deployment.
And fourthly, batch deployment, wherein after the configuration files of the mirror image information and the replacement resource information of the application are obtained, the Kubernets execute application deployment operation according to the application execution sequence in sequence.
2) The dependency environment, including the middleware environment for operation and maintenance deployment and the kubernets environment, is usually privatized to the application side.
Referring to fig. 2, a main flowchart of a method for deploying an application according to an embodiment of the present invention is shown, which includes the following steps:
s201: responding to the trigger deployment operation of a deployment strategy, acquiring an application list corresponding to the deployment strategy, and calculating an execution sequence among applications in the application list;
s202: determining a first application with a first sequence, and analyzing configuration information of the first application to obtain an identifier of a middleware which is depended on by the first application;
s203: acquiring middleware resource information corresponding to the identifier, and replacing placeholders in the configuration information with the middleware resource information to establish communication link configuration information with the first application;
s204: repeating the above process, establishing communication link configuration information between the application and each application in the application list, and further executing application deployment operation step by step according to the execution sequence.
In the foregoing embodiment, for step S201, for the deployment policy service provider to provide the deployment policy service for the deployment policy service application, for example, for a technical problem of enterprise B, enterprise a provides a solution for the deployment policy service provider, and converts the solution into a deployment policy and sends the deployment policy to enterprise B.
POC environments are typically a product or supplier capability validation work performed by an enterprise prior to product selection or development of an externally implemented project. The enterprise B deploys the POC environment firstly, clicks a deployment option in a preset deployment application operation interface under the POC environment, and triggers the deployment operation of the deployment strategy. At present, deployment is triggered manually, and each deployment strategy is completed by a plurality of applications in an assisted manner, so that the acquired applications are generally in a list form, each piece of application information comprises a mirror image address and description information, and the description information comprises configuration information and dependency relationship information.
The execution of different applications has a sequence, for example, the commodity system is composed of three applications, namely, a commodity basic service, a commodity gateway and a commodity web, the commodity basic service is started firstly, then the commodity gateway is started, and finally the web is started. Generally, the execution dependency relationship between the application and other applications is maintained in the description information, if the description information does not exist, the application is indicated to be started independently, otherwise, the execution dependency relationship is executed in series in sequence, and the application execution sequence can be obtained.
For steps S202 and S203, a first application executed first is first determined. If the application execution sequence is in a non-closed loop form, the first application may be determined directly, but if closed, one application may be randomly selected as the first application and another application that precedes and is adjacent to the first application as the last application to execute. It should be noted that, in actual operation, a case of sequence interruption may occur (that is, the number of sequences is not 1), and at this time, a prompt message may be popped up, and manual patching or setting of the execution sequence may be performed. And in some cases, there is no execution dependency relationship between part of applications, for example, after the X application is executed, one of the Y application or the Z application is randomly started.
The configuration information of the first application is analyzed to obtain an identifier of the middleware depended on by the first application, such as MySQL database, and then middleware resource information, usually a login account and a password, is obtained from the MySQL, and then the configuration information in the first application is replaced by the middleware resource information. However, at this time, the solution is only the deployment phase, and is not yet started, so that the network http connection cannot be established, and therefore, only the communication link configuration information is established with the first application, which is convenient for the subsequent direct start.
In addition, referring to fig. 3, in order to specifically acquire the middleware resource information, the method includes:
s301: acquiring middleware description information corresponding to the middleware identification, and analyzing the middleware description information to obtain middleware attribute information;
s302: inquiring whether middleware resource information corresponding to the middleware attribute information exists or not;
s303: if not, initializing the middleware corresponding to the middleware identifier to obtain middleware resource information;
s304: and under the condition of obtaining the middleware resource information, replacing the placeholder in the first application configuration information with the middleware resource information.
The method comprises the steps of acquiring attribute information of the middleware according to the middleware description information, such as a table name and a library name, inquiring whether middleware resource information corresponding to the middleware attribute information, such as an account number and a password, exists, if the middleware resource information does not exist, calling a related interface to initialize, recording a configuration relation between the middleware resource information and first application configuration information, and finishing initialization of a first application configuration file (namely configuration information after resource replacement).
For step S204, after a communication link configuration relationship is established with each application in the deployment policy application list, a deployment pushing interface is called, a mirror address and a configuration file of each application are pushed to the deployment platform, and the applications are deployed step by using the deployment platform according to the application execution sequence.
Referring to FIG. 4:
s401: calling a deployment push interface of a deployment policy service provider, acquiring a mirror image address from information of each application and pushing the mirror image address to a deployment platform so as to trigger the deployment platform to load corresponding mirror image information based on the mirror image address;
s402: acquiring a configuration file after resource information is replaced from the information of each application, and pushing the configuration file to the deployment platform;
s403: and dynamically loading the configuration files of the applications when the deployment platform is used for starting the mirror image information of the applications in a mirror image manner so as to execute the deployment operation of the applications step by step according to the execution sequence.
The Kubernetes deployment platform loads application image information from an API (application programming interface) at a deployment policy service providing end based on an image address, and replaces a configuration file. The configuration file and the image information of each application are usually stored in the same position, so when the image information of one application is started by an image, the kubernets deployment platform loads the configuration file of the application from the position of the image information.
Further, a plurality of deployment policies may exist in the POC environment, and each policy is considered to be formed by combining a plurality of applications, and each application includes a plurality of services, so that a deployment group may be created in a deployment platform kubernets, and a deployment system is provided in the group, and includes a plurality of deployment files for separately storing the image information and the configuration file of each application.
In the method provided by the embodiment, the service provider quickly manages the application information and maintains the application information to the system management platform in a manner of separating the mirror image information from the configuration information, and the service provider applies for the middleware resource information by analyzing the application configuration information so as to dynamically modify the application configuration information, thereby deploying the POC related applications according to the dependency relationship between the applications. The configuration and resources of the application can be managed quickly as a whole, manual operation (such as application of middleware resources, modification of configuration information, manual mirror image moving and the like) is reduced when the application is installed, the automation of the POC deployment process is realized, and the deployment efficiency is greatly improved.
Referring to fig. 5, a schematic block diagram of an apparatus 500 for deploying an application according to an embodiment of the present invention is shown, including:
a calculation order module 501, configured to, in response to a deployment trigger operation on a deployment policy, obtain an application list corresponding to the deployment policy, and calculate an execution order between applications in the application list;
an analysis configuration module 502, configured to determine a first application ordered first, and analyze configuration information of the first application to obtain an identifier of a middleware on which the first application depends;
a replacement information module 503, configured to obtain middleware resource information corresponding to the identifier, and replace a placeholder in the configuration information with the middleware resource information to establish communication link configuration information with the first application;
the deployment application module 504 is configured to repeat the above process, establish communication link configuration information with each application in the application list, and further execute application deployment operations step by step according to the execution sequence.
In the apparatus for implementing the present invention, the calculating sequence module 501 is configured to:
acquiring an execution sequence between one application and other applications from description information of the application; the description information is used for describing execution dependency relations among the applications;
and connecting execution sequences among different applications in series to obtain an application execution sequence.
In the implementation apparatus of the present invention, the parsing and configuring module 502 is configured to:
judging whether the application execution sequence is a closed loop or not, if so, selecting any one application from the closed loop as a first application for first execution; and
and taking another application which is positioned before any one application and is adjacent to the application as the application executed last.
In the device for implementing the present invention, the replacement information module 503 is configured to:
acquiring the middleware description information corresponding to the identifier, analyzing the middleware description information to obtain middleware attribute information, and inquiring the middleware resource information corresponding to the middleware attribute information.
In the device for implementing the present invention, the replacement information module 503 is configured to:
inquiring whether middleware resource information corresponding to the middleware attribute information exists or not;
if not, initializing the middleware corresponding to the middleware identifier to obtain middleware resource information;
and under the condition of obtaining the middleware resource information, replacing the placeholder in the first application configuration information with the middleware resource information.
In the implementation apparatus of the present invention, the deployment application module 504 is configured to:
calling a deployment push interface, acquiring a mirror image address from the information of each application and pushing the mirror image address to a deployment platform so as to trigger the deployment platform to load corresponding mirror image information based on the mirror image address;
acquiring a configuration file after resource information is replaced from the information of each application, and pushing the configuration file to the deployment platform;
and dynamically loading the configuration files of the applications when the deployment platform is used for starting the mirror image information of the applications in a mirror image manner so as to execute the deployment operation of the applications step by step according to the execution sequence.
In the implementation apparatus of the present invention, the deployment application module 504 is further configured to:
calling the deployment platform to create a deployment group, and creating a deployment system and a deployment file in the deployment group so as to respectively store the mirror image information and the configuration file of each application into different deployment files; wherein the deployment file is located in the deployment system.
In the implementation apparatus of the present invention, the deployment push interface is located at a deployment policy service provider, and the apparatus further includes:
receiving description information and mirror image addresses input to each application at the deployment strategy service provider to obtain application information; the description information comprises configuration information and execution dependency relations with other applications; and
and deploying a concept verification environment at a deployment policy service application end to receive the application information pushed by the deployment policy service provider end under the concept verification environment.
In addition, the detailed implementation of the device in the embodiment of the present invention has been described in detail in the above method, so that the repeated description is not repeated here.
Fig. 6 shows an exemplary system architecture 600 in which embodiments of the invention may be applied, including terminal devices 601, 602, 603, a network 604 and a server 605 (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having display screens and supporting web browsing, and installed with various communication client applications, and users may interact with the server 605 through the network 604 using the terminal devices 601, 602, 603 to receive or transmit messages and the like.
The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The server 605 may be a server providing various services for performing operations of managing application configuration information, mirroring information, and managing application deployment on the service application side.
It should be noted that the method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. 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, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a compute order module, a parse configuration module, a replacement information module, and a deployment application module. The names of these modules do not in some cases constitute a limitation on the modules themselves, for example, a deployment application module may also be described as a "repeat operation and deployment application module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
responding to the trigger deployment operation of a deployment strategy, acquiring an application list corresponding to the deployment strategy, and calculating an execution sequence among applications in the application list;
determining a first application with a first sequence, and analyzing configuration information of the first application to obtain an identifier of a middleware which is depended on by the first application;
acquiring middleware resource information corresponding to the identifier, and replacing placeholders in the configuration information with the middleware resource information to establish communication link configuration information with the first application;
repeating the above process, establishing communication link configuration information between the application and each application in the application list, and further executing application deployment operation step by step according to the execution sequence.
According to the technical scheme of the embodiment of the invention, the application configuration and resources can be integrally and quickly managed, manual operation (such as application of middleware resources, modification of configuration information, manual mirror image relocation and the like) is reduced when the application is installed, the automation of the POC deployment process is realized, and the deployment efficiency is greatly improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method for deploying an application, comprising:
responding to the trigger deployment operation of a deployment strategy, acquiring an application list corresponding to the deployment strategy, and calculating an execution sequence among applications in the application list;
determining a first application with a first sequence, and analyzing configuration information of the first application to obtain an identifier of a middleware which is depended on by the first application;
acquiring middleware resource information corresponding to the identifier, and replacing placeholders in the configuration information with the middleware resource information to establish communication link configuration information with the first application;
repeating the above process, establishing communication link configuration information between the application and each application in the application list, and further executing application deployment operation step by step according to the execution sequence.
2. The method of claim 1, wherein the calculating the execution order among the applications in the application list comprises:
acquiring an execution sequence between one application and other applications from description information of the application; the description information is used for describing execution dependency relations among the applications;
and connecting execution sequences among different applications in series to obtain an application execution sequence.
3. The method of claim 2, wherein determining the first application ranked first comprises:
judging whether the application execution sequence is a closed loop or not, if so, selecting any one application from the closed loop as a first application for first execution; and
and taking another application which is positioned before any one application and is adjacent to the application as the application executed last.
4. The method of claim 1, wherein the obtaining middleware resource information corresponding to the middleware identifier comprises:
acquiring the middleware description information corresponding to the identifier, analyzing the middleware description information to obtain middleware attribute information, and inquiring the middleware resource information corresponding to the middleware attribute information.
5. The method of claim 4, wherein the obtaining middleware resource information corresponding to the middleware identifier and replacing placeholders in the configuration information with the middleware resource information comprises:
inquiring whether middleware resource information corresponding to the middleware attribute information exists or not;
if not, initializing the middleware corresponding to the middleware identifier to obtain middleware resource information;
and under the condition of obtaining the middleware resource information, replacing the placeholder in the first application configuration information with the middleware resource information.
6. The method of claim 1, wherein performing application deployment operations step-by-step in the execution order comprises:
calling a deployment push interface, acquiring a mirror image address from the information of each application and pushing the mirror image address to a deployment platform so as to trigger the deployment platform to load corresponding mirror image information based on the mirror image address;
acquiring a configuration file after resource information is replaced from the information of each application, and pushing the configuration file to the deployment platform;
and dynamically loading the configuration files of the applications when the deployment platform is used for starting the mirror image information of the applications in a mirror image manner so as to execute the deployment operation of the applications step by step according to the execution sequence.
7. The method of claim 6, further comprising:
calling the deployment platform to create a deployment group, and creating a deployment system and a deployment file in the deployment group so as to respectively store the mirror image information and the configuration file of each application into different deployment files; wherein the deployment file is located in the deployment system.
8. The method of claim 1, wherein the deployment push interface is located at a deployment policy service provider, and wherein the method further comprises:
receiving description information and mirror image addresses input to each application at the deployment strategy service provider to obtain application information; the description information comprises configuration information and execution dependency relations with other applications; and
and deploying a concept verification environment at a deployment policy service application end to receive the application information pushed by the deployment policy service provider end under the concept verification environment.
9. An apparatus for deploying an application, comprising:
the computing sequence module is used for responding to the triggering deployment operation of the deployment strategy, acquiring an application list corresponding to the deployment strategy, and computing the execution sequence among the applications in the application list;
the analysis configuration module is used for determining a first application in sequence, analyzing configuration information of the first application and obtaining an identifier of a middleware which is depended by the first application;
the replacing information module is used for acquiring middleware resource information corresponding to the identifier and replacing placeholders in the configuration information with the middleware resource information so as to establish communication link configuration information with the first application;
and the deployment application module is used for repeating the process, establishing communication link configuration information between the deployment application module and each application in the application list, and further executing application deployment operation step by step according to the execution sequence.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202110769452.6A 2021-07-07 2021-07-07 Method and device for deploying application Pending CN113407203A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110769452.6A CN113407203A (en) 2021-07-07 2021-07-07 Method and device for deploying application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110769452.6A CN113407203A (en) 2021-07-07 2021-07-07 Method and device for deploying application

Publications (1)

Publication Number Publication Date
CN113407203A true CN113407203A (en) 2021-09-17

Family

ID=77685440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110769452.6A Pending CN113407203A (en) 2021-07-07 2021-07-07 Method and device for deploying application

Country Status (1)

Country Link
CN (1) CN113407203A (en)

Similar Documents

Publication Publication Date Title
CN111090423B (en) Webhook framework system and method for realizing active calling and event triggering
US20150242200A1 (en) Re-configuration in cloud computing environments
CN111897541B (en) Software interaction platform and method for automatically deploying resources in cloud environment
US20160380920A1 (en) Dynamically generating solution stacks
CN110058894B (en) Method, apparatus and computer program product for executing applications in a hybrid cloud
US20220360504A1 (en) Adapting microservices to multi-platform deployments
CN110597564A (en) Installation package construction and service component loading method, device and terminal equipment
CN117112122A (en) Cluster deployment method and device
CN113535220B (en) Code packet management method and device
CN110795328A (en) Interface testing method and device
CN113296828A (en) Method, server and system for issuing application
CN111897565A (en) Data processing method, device and equipment based on Internet of things
CN113407203A (en) Method and device for deploying application
CN111124523A (en) Method and apparatus for initializing applications
CN112799797B (en) Task management method and device
CN115291928A (en) Task automatic integration method and device of multiple technology stacks and electronic equipment
US11010154B2 (en) System and method for implementing complex patching micro service automation
CN110727416B (en) Development framework generation method and related device
CN112564979A (en) Execution method and device for construction task, computer equipment and storage medium
CN111984275A (en) System deployment method, system, terminal and storage medium based on CPU architecture type
CN117112075B (en) Method and system for automatically converting timed task applications into serverless functions
CN112559001A (en) Method and device for updating application
CN112860447A (en) Interaction method and system between different applications
CN115955409B (en) Method and related device for changing arrangement
CN113760488B (en) Method, apparatus, device and computer readable medium for scheduling tasks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination