CN112130866A - Application deployment method and related device - Google Patents

Application deployment method and related device Download PDF

Info

Publication number
CN112130866A
CN112130866A CN202011073499.0A CN202011073499A CN112130866A CN 112130866 A CN112130866 A CN 112130866A CN 202011073499 A CN202011073499 A CN 202011073499A CN 112130866 A CN112130866 A CN 112130866A
Authority
CN
China
Prior art keywords
application
connection
target
connection information
target application
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
CN202011073499.0A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011073499.0A priority Critical patent/CN112130866A/en
Publication of CN112130866A publication Critical patent/CN112130866A/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

Abstract

The embodiment of the application discloses an application deployment method and a related device, and at least relates to private cloud, public cloud, hybrid cloud, artificial intelligence service and the like in cloud technology. Because the connection item corresponding to the target application is recorded in the configuration template of the target application, when the target application needs to be deployed in any target environment, the connection information corresponding to the connection information type in the target environment can be automatically acquired based on the connection information type of the connection service middleware when the target application is operated and identified by the connection item, and the configuration template is combined to generate the configuration file of the target application deployed in the target environment, so that the target application is deployed in the target environment by using the generated configuration file, thereby realizing the automatic deployment of the target application in the target environment, avoiding the problems of connection information conflict, inconsistency with the connection information provided by the actual deployment environment and the like caused by configuring and deploying the configuration file required by the application in a manual static configuration mode, and improving the efficiency of application deployment.

Description

Application deployment method and related device
Technical Field
The present application relates to the field of data processing, and in particular, to an application deployment method and a related apparatus.
Background
The application deployment refers to deploying an application into a specified data processing environment, such as a private cloud, so that the application can run in the data processing environment and provide corresponding functions and services. The application may relate to various different fields, such as the internet of things field, the artificial intelligence field, the game field, and the like.
Since the application needs to be connected with the associated and dependent service at runtime, and the service as the middleware may include other applications, databases, etc., for example, when the application is deployed in the data processing environment, the connection information of the service needed to be connected at runtime of the application is determined by the configuration file, so that when the application is run, the service can be connected by the connection information recorded by the configuration file.
In the related art, the configuration files of the applications are mainly configured statically by manual work, and unstable situations often occur, such as mutual conflict between configured connection information and inconsistency with connection information provided by an actual data processing environment.
Disclosure of Invention
In order to solve the technical problem, the application deployment method and the related device are provided, so that the automatic deployment of the application is realized, and the problems of connection information conflict, inconsistency with connection information provided by an actual data processing environment and the like caused by manual static configuration are solved.
The embodiment of the application discloses the following technical scheme:
in one aspect, an embodiment of the present application provides an application deployment method, where the method includes:
acquiring a configuration template of a target application, wherein the target application is to be deployed in a target environment, the configuration template records a connection entry corresponding to the target application, and the connection entry is used for identifying a connection information type of a service middleware connected when the target application is operated;
acquiring connection information corresponding to the connection entries in the target environment;
generating a configuration file corresponding to the target application according to the connection information and the configuration template;
and deploying the target application in the target environment through the configuration file.
In another aspect, an embodiment of the present application provides an application deployment apparatus, where the apparatus includes an obtaining unit, a generating unit, and a deployment unit:
the obtaining unit is configured to obtain a configuration template of a target application, where the target application is to be deployed in a target environment, and the configuration template records a connection entry corresponding to the target application, where the connection entry is used to identify a connection information type of a service middleware connected when the target application is run;
the obtaining unit is further configured to obtain connection information corresponding to the connection entry in the target environment;
the generating unit is used for generating a configuration file corresponding to the target application according to the connection information and the configuration template;
the deployment unit is used for deploying the target application in the target environment through the configuration file.
In another aspect, an embodiment of the present application provides an apparatus for application deployment, where the apparatus includes a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the method of the above aspect according to instructions in the program code.
In another aspect, the present application provides a computer-readable storage medium for storing a computer program for executing the method of the above aspect.
In another aspect, embodiments of the present application provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method of the above aspect.
According to the technical scheme, the connection items corresponding to the target application are recorded in the configuration template of the target application, when the target application needs to be deployed in any target environment, the connection information corresponding to the connection information type in the target environment can be automatically acquired based on the connection information type of the connection service middleware when the target application is operated and identified by the connection items, the configuration template is combined to generate the configuration file of the target application deployed in the target environment, and therefore the target application is deployed in the target environment by using the generated configuration file, automatic deployment of the target application in the target environment is achieved, the configuration file required by manual static configuration application deployment is not needed, and application deployment efficiency is improved. The configuration file corresponding to the application is dynamically generated by automatically searching the connection information corresponding to the deployment environment according to the configuration template, so that the problems of connection information conflict, inconsistency with the connection information provided by the actual deployment environment of the application and the like caused when the configuration file required by the deployment of the application is configured in a manual static configuration mode are avoided, and the efficiency of application deployment is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart illustrating a process for manually and statically configuring configuration files required by a deployment application;
fig. 2 is a schematic view of an application scenario of an application deployment method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of an application deployment method according to an embodiment of the present application;
fig. 4 is an application scenario diagram of another application deployment method provided in the embodiment of the present application;
fig. 5 is a schematic flowchart of a method for implementing application deployment based on a cloud-native controller according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another method for implementing application deployment based on a cloud-native controller according to an embodiment of the present application;
FIG. 7 is a schematic flow chart illustrating a process for generating a configuration file by using a dynamic configuration controller according to an embodiment of the present application;
fig. 8 is a schematic flowchart of an application deployment method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an application deployment apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the accompanying drawings.
In the related art, the deployment of the application can be realized by manually and statically configuring the configuration file required by the application deployment. Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a process of deploying configuration files required by an application through manual static configuration in the related art.
As shown in fig. 1, the manual static configuration 101 is a configuration file corresponding to other server middleware depended by the manual static configuration application-103, such as: the static configuration file corresponding to the second application 104 includes the address of the second application 104, and the static configuration file corresponding to the database 105 includes the address, the user name and the password of the database 105.
Because the configuration file corresponding to the application is completed by manual static configuration, the problems of connection information conflict in the configuration file, inconsistency with the actual data processing environment of the application and the like are easy to occur, so that the application deployment is failed and the reconfiguration is needed.
In order to avoid the problems of conflict of connection information in configuration files, inconsistency with the actual data processing environment of the application and the like caused by manually and statically configuring the configuration files required by the application, the application deployment method and the related device are provided, the automatic deployment of the application is realized, and the application deployment efficiency is improved.
The application deployment method provided by the embodiment of the application relates to cloud application in a cloud technology, and mainly comprises private cloud, public cloud, hybrid cloud, artificial intelligent cloud service and the like.
Private Cloud (Private Cloud) is a method for creating Cloud infrastructure and software and hardware resources in a firewall so that each department in an organization or enterprise can share the resources in a data center. A private cloud is created, typically with cloud equipment as a Service (IaaS) software in addition to hardware resources.
The private cloud computing also comprises three layers of cloud hardware, a cloud platform and cloud service. In contrast, the cloud hardware is the user's own personal computer or server, not the cloud computing vendor's data center. Cloud computing vendors build data centers to provide public cloud services for millions of users, and therefore need to have tens of millions of servers. Private cloud computing serves only friends and relatives for an individual and the employees and customers and suppliers of the enterprise for the enterprise, so that the personal computer or server of the individual or enterprise is sufficient to provide cloud services.
Public Cloud (Public Cloud) generally refers to a Cloud that can be used and provided by a third-party provider for a user, the Public Cloud can be generally used through the Internet and can be free or low-cost, and the core attribute of the Public Cloud is a shared resource service. There are many instances of such a cloud that can provide services throughout the open public network today.
Hybrid Cloud (Hybrid Cloud) blends Public Cloud (Public Cloud) and Private Cloud (Private Cloud), which is the main mode and development direction of Cloud computing in recent years. The private cloud is mainly oriented to enterprise users, for safety, enterprises prefer to store data in the private cloud, but meanwhile hope to obtain computing resources of the public cloud, in the situation, the hybrid cloud is adopted more and more, the public cloud and the private cloud are mixed and matched to obtain the best effect, and the personalized solution achieves the purposes of saving money and being safe.
The application deployment method provided by the embodiment of the application can deploy the application in a private cloud, a public cloud or a hybrid cloud.
The so-called artificial intelligence cloud Service is also generally called AIaaS (AI as a Service, chinese). The method is a service mode of an artificial intelligence platform, and particularly, the AIaaS platform splits several types of common AI services and provides independent or packaged services at a cloud. This service model is similar to the one opened in an AI theme mall: all developers can access one or more artificial intelligence services provided by the platform through an API (application programming interface), and part of the qualified developers can also use an AI framework and an AI infrastructure provided by the platform to deploy and operate and maintain the self-dedicated cloud artificial intelligence services.
The application to be deployed in the application deployment method provided by the embodiment of the application can provide artificial intelligence cloud service in cloud technology and the like.
The application deployment method provided by the embodiment of the application can be applied to application deployment equipment with data processing capacity, such as terminal equipment and servers. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing services. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein. The following describes embodiments of the present application with a server as an application deployment device.
In order to facilitate understanding of the application deployment method provided in the embodiment of the present application, an application scenario of the application deployment method provided in the embodiment of the present application is described below with reference to fig. 2. In the scenario shown in fig. 2, a server 201 is included for deploying a target application in a target environment.
For a target application to be deployed in a target environment, the server 201 first obtains a configuration template 202 of the target application. The configuration template 202 records a connection entry corresponding to the target application, and the connection entry is used for identifying the connection information type of the service middleware connected when the target application is run. The service middleware refers to middleware connected when the target application is run, or refers to middleware on which the target application is associated, for example: applications, databases, etc.
As shown in fig. 2, the service middleware connected to run the target application includes a database, and a connection entry corresponding to the database includes a database address, a database user name, and a database password.
Based on the connection information type identified by the connection entry in the configuration template, the server 201 automatically obtains the connection information 203 of the corresponding connection entry from the target environment. In the scenario shown in fig. 2, the server 201 acquires connection information corresponding to a database address, a database user name, and a database password from the cloud environment 204 as a target environment. As shown in fig. 2, the connection information 203 includes: the database address is: database/A, database user name: a, a database password is as follows: 123456.
therefore, the server 201 may generate a configuration file 205 corresponding to the target application according to the configuration template 202 and the connection information 203, and deploy the target application in the cloud environment 204 through the configuration file 205.
The connection information of the connection information type included in the corresponding configuration template in the target environment is automatically acquired through the configuration template of the target application, and the configuration template is combined to generate the configuration file of the target application deployment and the target environment, so that the target application can be deployed in the target environment by using the configuration file, the automatic deployment of the application is realized, the problems of connection information conflict, inconsistency with the connection information provided by the actual deployment environment of the application and the like caused when the configuration file required by the deployment of the application is configured in a manual static configuration mode are avoided, and the efficiency of the application deployment is further improved.
The application deployment method provided by the embodiment of the present application is described below with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a schematic flowchart of an application deployment method according to an embodiment of the present application. As shown in fig. 3, the application deployment method includes the following steps:
s301: and acquiring a configuration template of the target application.
It can be understood that when running an application, service middleware is often required to provide certain services and functions to support the normal running of the application. In the embodiment of the application, the target application is connected with other associated and dependent service middleware through the configuration file. The target application refers to an application providing a specific service or function, such as a game application, a live application, a shopping application, and the like, and is not limited herein.
In view of the problems that the configuration files required by the manually and statically configured deployment application have conflict of connection information and are inconsistent with the connection provided by the actual deployment environment, the application deployment method provided by the embodiment of the application dynamically generates the configuration files required by the deployment of the target application based on the configuration template of the target application. In practical applications, the target application may be published through an application publishing package, where the application publishing package includes a configuration template and an application software package.
In the process of deploying an application in a target environment, a configuration template of the target application needs to be acquired first. In the embodiment of the present application, a connection entry corresponding to the target application is recorded in the configuration template, and the connection entry is used to identify a connection information type of a service middleware connected when the target application is running. That is, during the deployment of the target application, the target application provides the connection information identified by the connection entry through the configuration file, and establishes a connection with the service middleware. The service middleware refers to a middleware connected when the target application is run, or the service middleware refers to a middleware on which the target application is associated, for example: applications, databases, message queues, etc. The connection information refers to information for the target application to establish a connection with the service middleware in the target environment, and the connection information type refers to an information type for the target application to establish a connection with the service middleware, for example: address, username, password, etc.
In practical applications, the connection entry may be set according to a service middleware and a target environment connected when the target application is run, for example, the target application is a game application, the service middleware connected when the target application is run includes a game database, and if the target application can establish a connection with the game database through an address of the game database in the target environment, the configuration template includes a connection entry of a connection information type for identifying the address of the game database.
It can be understood that, when the application is actually put into use, according to different requirements of a plurality of application deployment projects or specific application running scenarios, automatic deployment of the target application needs to be realized in a plurality of different data processing environments. For example: the data processing environment for deploying the target application can be a privatized deployment environment, a public deployment environment and the like for providing cloud services and cloud applications.
In this embodiment of the application, the target environment to be deployed in the target application may be any one of a plurality of data processing environments, and may be determined specifically according to the actual application deployment project requirement and the application running scenario, which is not limited herein.
The application deployment method provided by the embodiment of the application deployment method is based on the configuration file dynamically generated by the configuration template, and does not depend on manual static configuration, so that when facing a plurality of data processing environments of a plurality of application deployment projects, the connection information of the corresponding connection item in the data processing environment is dynamically acquired based on the connection information type identified by the connection item in the configuration template, and the configuration file suitable for the data processing environment can be generated, so that the automatic deployment applied to the plurality of data processing environments is realized, and the universality of application deployment realized based on the configuration template is embodied.
It can be understood that, during the process of deploying the target application, the content of the configuration file needs to be dynamically changed according to the actual situation of the data processing environment in which the target application is deployed, and if different application versions are separately released for each project deployment target application, it is difficult to manage the application versions of the target application.
In view of this, the present embodiment provides a possible implementation manner, that is, a configuration template of a target application is set through an application version of the target application.
Because the configuration template is set based on the application version of the target application, when the target application is deployed facing multiple projects, the application version of the target application does not need to be adjusted and modified, and in the execution process of each project, the corresponding configuration file can be dynamically generated according to the configuration template of the target application, so that the automatic deployment of the target application in multiple data processing environments corresponding to the multiple projects can be realized, and the target application can be connected with the service middleware when running in the target environment.
S302: and acquiring connection information corresponding to the connection entries in the target environment.
In the application deployment process, the connection information of the corresponding connection entry in the target environment can be automatically acquired according to the connection information type identified by the connection entry in the configuration file. For example, for the game application, according to the configuration template corresponding to the game application, the game database address corresponding to the connection entry in the configuration template is automatically obtained from the target environment, such as: 192.168.1.10.
the connection information corresponding to the connection items in the target environment is automatically acquired based on the connection information types identified by the connection items in the configuration template, a data basis is provided for subsequently generating the configuration file according to the configuration template and the connection information, the problems that the connection information of the service middleware in the configuration file conflicts and the connection information does not conform to the data processing environment of the actually deployed target application due to manual static configuration are avoided, and the application deployment efficiency is improved.
It will be appreciated that establishing a connection with the service middleware upon which the target application is associated requires specifying the specific location of the service middleware within the target environment. In addition, considering that some service middleware is not public in the target environment, a certain authority is required for establishing connection with the service middleware, so that the safety management of the service middleware is improved.
In view of this, in one possible implementation, the connection information includes connection address information and connection authentication information. The connection address information is used for identifying the address of the service middleware connected when the target application is operated, and the connection authentication information is used for identifying the information for verifying the legality of the target application. The connection authentication information includes, but is not limited to: and in the target environment, the user name, the password and the like corresponding to the service middleware connected when the target application is operated. Thus, the connection entries in the configuration file of the target application include: a connection information type corresponding to the connection address information and a connection information type corresponding to the connection authentication information.
For example, for a game database connected when the game application is run, a connection is established with the game database in the target environment, and the identity of the game application needs to be verified legally, so that the connection entry in the configuration template further includes a database user name and a database password, so as to obtain the game database user name from the target environment according to the connection entry, such as: ABC game database, and game database passwords, such as: YX 123. Based on this, when the game application is deployed in the target environment, the validity of the target application can be verified according to the game database user name and the game database password included in the configuration file, and if the verification is passed, that is, the game database user name and the game database password are correct, the connection can be established with the game database according to the game database address, so that the game application can normally run in the target environment.
The connection information comprises the connection authentication information and the connection address information, so that when the configuration file is generated based on the connection information, the legality of the target application can be verified by using the connection authentication information in the configuration file, and when the authentication is passed, the connection is established by combining the connection address information and the service middleware, so that the safety management of the service middleware is ensured, and the safety of an application deployment environment is realized.
In the related art, for a target application, in a plurality of data processing environments corresponding to a plurality of application deployment projects, service middleware connected when the target application runs shares connection authentication information, so that the problem of unauthorized access exists, and the security of the service middleware is reduced.
In contrast, in the embodiment of the application, the connection authentication information of the service middleware can be dynamically generated based on the cloud native service, the authority for connecting the service middleware in a plurality of data processing environments is isolated, and the risk of unauthorized access is reduced.
It can be understood that a plurality of service middleware may be included in the target environment, and when the connection information of the corresponding connection entry is automatically obtained, it is required to explicitly obtain the connection information of which service middleware from the target environment, so as to establish a connection with the service middleware required to be connected when the target application runs according to the connection information.
In one possible implementation, the configuration template of the target application is obtained, and meanwhile, the declaration file of the target application is also obtained. Wherein the declaration file is used for indicating the middleware identification of the connected service middleware when the target application is operated. Therefore, when the connection information of the corresponding connection entry in the target environment is acquired, the connection information of the corresponding connection entry in the target environment can be acquired based on the middleware identifier indicated by the declaration file.
In practical applications, the middleware identifier may be the name of the service middleware, such as: the name and the number of the application X, the database Y, and the like may also be numbers of the service middleware, such as No.798, and the like, which are only two possible implementation manners of the middleware identifier provided in the present application.
The declaration file clearly indicates which service middleware connection information is specifically acquired, so that when the connection information corresponding to the service middleware is acquired, the correctness of the connection information is ensured, the accuracy of generating the configuration file by using the connection information and the configuration template is ensured, the possibility of application deployment failure caused by connection information error is reduced, and the success rate of application deployment is improved.
It will be appreciated that there may not be instances of service middleware in the target environment that are required by the target application. In view of this, the present application provides a possible implementation manner, that is, a service middleware may be created for a target application in a target environment, and corresponding connection information is determined according to the created service middleware. For example, for a live broadcast application to be deployed in a cloud environment, a corresponding video database is required to provide support for the live broadcast application, but the video database does not exist in the cloud environment, so that a video database can be created in the cloud environment, and corresponding connection information is determined according to the video database, so that a configuration file corresponding to the live broadcast application is generated according to the connection information and the configuration template, and the video database can be used when the live broadcast application runs in the cloud environment, so that normal running of the live broadcast application is guaranteed.
Because the service middleware can be created in the target environment according to the target application, the configuration file can be still dynamically generated based on the configuration template under the condition that the service middleware connected when the target application is operated does not exist, so that the automatic deployment of the application in the target environment is ensured, the automation degree of the application deployment is improved, and the possibility of the deployment of the application in a plurality of different data processing environments is also improved.
It can be understood that, when the target application is actually run, a situation that hardware such as a node, a switch, and the like is abnormal may exist in a target environment where the target application is deployed, and in this situation, the target application needs to be redeployed to ensure normal running of the target application. Therefore, it is necessary to reconfigure the configuration file of the deployed target application so that the service middleware can be normally connected when the target application is run. If the manual static configuration mode is adopted, the configuration file is generated statically and cannot be modified dynamically, so that the target application cannot acquire the updated connection information of the service middleware, and the target application cannot operate normally.
In view of this, the embodiment of the present application provides a possible implementation manner, that is, the service registration controller stores the connection information of the service middleware in the target environment based on the service registration entry, and if the service registration controller acquires the connection information update message of the target middleware, the service registration controller updates the service registration entry corresponding to the target middleware based on the connection information update message, so that in the process of deploying the application, the connection information in the service registration entry corresponding to the connection entry can be acquired, and it is ensured that the service middleware corresponding to the connection information can be normally connected and provides services. The service registration entry corresponds to a connection entry, and may include a database address, a database user name, a database password, an application address, and the like. May be determined according to specific application scenarios, and is not limited herein.
Therefore, when the connection information for deploying the target application is changed and the configuration file needs to be reconfigured, the service registration controller can dynamically sense and update the connection information corresponding to the service registration entry, so that the configuration file is dynamically updated to ensure the normal operation of the target application, and the automatic operation and maintenance capability of the application is improved.
S303: and generating a configuration file corresponding to the target application according to the connection information and the configuration template.
After the configuration template of the target application and the connection information of the connection entry in the corresponding configuration template are obtained based on the above S301 and S302, the configuration template may be rendered according to the connection information, and a configuration file corresponding to the target application is generated, so that the application is deployed by using the configuration file. The configuration file is a file including connection information for establishing connection between the target application and the service middleware, and when the application is run, the target application can establish connection with the service middleware through the connection information in the configuration file. Rendering refers to filling the connection information into the connection entry corresponding to the configuration template.
For example, the target application is a social application to be deployed in a cloud environment, the service middleware connected when the social application is run includes an image database and a video application, and the connection entry recorded in the configuration template corresponding to the social application includes: image database address, image database password, image database username, and video application address. According to the connection item, connection information (a graphic database address: 192.168.0.11, an image database password: abc &062, an image database user name: SJ image database, and a video application address: 192.168.0.12) of a graphic corresponding to the connection item is automatically acquired from the cloud environment. And generating a configuration file corresponding to the target application based on the configuration template and the connection information.
Because the configuration file comprises the connection information for connecting the service middleware, when the application is deployed, the connection can be established with the service middleware through the configuration file so that the application runs in the target environment, and therefore the automatic deployment of the application is realized.
It can be understood that, after the corresponding configuration file is generated according to the configuration template, the configuration file may be stored, so that the target application may be deployed in the target environment by using the configuration file later. In order to facilitate storing and searching the configuration file, the embodiment of the present application provides a possible implementation manner, that is, the configuration template of the target application may further include a storage address. The storage address is used to indicate the storage location of the configuration file. The storage address may be preset, or may be adjusted according to the target environment or the actual deployment scenario. For example, the storage address of the configuration file is preset as follows: conf is/home/software/conf/db. The method is specifically determined according to the actual application deployment scenario, and is not limited herein.
The configuration template is recorded with the storage address of the configuration file, so that the configuration file can be stored based on the storage address, and in the subsequent process of deploying the target application by using the configuration file, the configuration file can be searched according to the storage address, so that the application can be deployed according to the configuration file, the convenience of storing and searching the configuration file is improved, and the automation degree of application deployment is further improved.
It is understood that the configuration template may include a plurality of connection entries, and after the connection information of the corresponding connection entry is acquired through S302, each piece of connection information needs to be rendered into the corresponding connection entry, so as to generate a configuration file that can be used for deploying the target application.
In order to ensure the accuracy of the configuration file, the embodiment of the present application provides a possible implementation manner, that is, a placeholder is included in a connection entry of the configuration template. The placeholder is a template mark for identifying the connection item and is replaced with real connection information after identification. Placeholders may be in the form of numeric symbols, alphabetic symbols, special symbols, etc., such as: and { }, which is not limited in this application.
In practical applications, the placeholder generally includes a placeholder variable, and the process of rendering the configuration template by using the connection information is a process of replacing the placeholder by using the connection information. For example, the connection entry is: the database address $ { }, and the connection information is: 192.168.3.10, the configuration file generated by rendering the configuration template includes: the database address is 192.168.3.10.
Because the placeholder marks the specific position of the configuration file where the connection information corresponding to the connection information type is rendered, the configuration template can be accurately rendered into the configuration file corresponding to the service middleware by identifying the placeholder in the process of generating the configuration file, the generation accuracy of the configuration file is improved, and the automation degree of application deployment is further improved.
Based on the above, the configuration template records a connection entry and a storage address, where the connection entry includes a connection information type corresponding to the connection address information, a connection information type corresponding to the connection authentication information, and a placeholder. Therefore, the embodiment of the present application provides a configuration template of a target application for different data processing environments in which the target application runs, which is specifically as follows:
if the service middleware comprises a database, the configuration file comprises a connection entry and a storage address, wherein the connection entry comprises a database address, a database password, a database user name and a placeholder $ { { }, and the corresponding configuration template may be:
template:
database_addr=${{db.addr}}
database_passwd=${{db.passwd}}
database_user=${{db.user}}
targetPath:
/home/software/conf/db.conf
the method includes the following steps that template is used for identifying a configuration template, database _ addr is used for identifying a database address, database _ password is used for identifying a database password, database _ user is used for identifying a database user name, db user identification is used for identifying a database connected when a target application runs, and targetPath is used for identifying a storage address of a configuration file, and the method specifically includes the following steps: conf is/home/software/conf/db.
If the service middleware comprises an application, the configuration file comprises a connection entry and a storage address, wherein the connection entry comprises an application address, an application password, an application user name and a placeholder $ { }, and the corresponding configuration template may be:
template:
application_addr=${{app.addr}}
application_passwd=${{app.passwd}}
application_user=${{app.user}}
targetPath:
/home/application/conf/app.conf
the template is used for identifying a configuration template, the application _ addr is used for identifying an application address, the application _ password is used for identifying an application password, the application _ user is used for identifying an application user name, an app user identifies an application connected when a target application is operated, and the targetPath is used for identifying a storage address of a configuration file, and the method specifically comprises the following steps: conf/home/application/conf/app.
In practical application, the configuration template may include connection entries corresponding to the database and the application, and may also include connection entries corresponding to other service middleware. The determination is specifically determined according to the service middleware connected when the target application is running, and is not limited herein. In addition, the service middleware connected when the target application is executed may include a plurality of databases and a plurality of applications, and the type and number of the service middleware are not limited herein.
Taking the service middleware connected when the target application is running as a database as an example, according to the configuration template provided by the embodiment, the connection information obtained for the corresponding connection entry is respectively: based on the connection information, by identifying a placeholder in the configuration template, rendering the configuration template to generate a configuration file corresponding to the target application, the database address (192.168.0.10), the database password (apppassword), and the database user name (appuser) are specifically as follows:
configuration files: contf/home/software/conf/db
The content is as follows:
database_addr=192.168.0.10
database_passwd=appassword
database_user=appuser
the connection information of the connection information type included in the corresponding configuration template in the target environment is automatically acquired through the configuration template of the target application, and the configuration template is combined to generate the configuration file of the target application deployment and the target environment, so that the target application can be deployed in the target environment by using the configuration file, the automatic deployment of the application is realized, the problems of connection information conflict, inconsistency with the connection information provided by the actual deployment environment of the application and the like caused when the configuration file required by the deployment of the application is configured in a manual static configuration mode are avoided, and the efficiency of the application deployment is further improved.
S304: and deploying the target application in the target environment through the configuration file.
After the configuration file is generated based on the steps, the target application can be deployed in the target environment through the configuration file. Therefore, automatic deployment of the application is realized, the problems that connection information in the configuration file conflicts and is inconsistent with connection information of a data processing environment where the application is actually deployed due to manual static configuration are solved, and the efficiency of application deployment is improved.
As can be seen from the above description of the configuration file, the configuration template may include a storage address. If the configuration file does not need to be used immediately after being generated, the generated configuration file can be saved according to the storage address in the configuration template, and in the process of deploying the target application, the configuration file is obtained through the storage address so as to deploy the target application in the target environment according to the configuration file.
Because the configuration template comprises the storage address, the configuration file can be stored based on the storage address, and the configuration file can be searched according to the storage address, so that the target application can be deployed according to the configuration file, the automatic storage, acquisition and use of the configuration file are realized, and the automation degree of application deployment is further improved.
Based on the above steps, the present application only needs to provide one configuration template corresponding to the target application, and thus, configuration files corresponding to a plurality of data processing environments can be dynamically generated. As shown in fig. 4, for N application deployment projects, configuration files adapted to the data processing environments corresponding to the N application deployment projects may be dynamically generated according to the configuration template in the application deployment package 401 corresponding to the target application, as shown in 402 and 403 shown in fig. 4, thereby implementing automated deployment of applications in multiple data processing environments, and greatly reducing manual static configuration operations and application version copying work of the target application. The application publishing package comprises an application software package, an application version and a configuration template; the connection entries in the configuration file include: and when the target application is operated, the address of the first application, the address of the second application, the address of the database, the user name and the password are connected.
In the application deployment method provided in the above embodiment, because the configuration template of the target application records the connection entry corresponding to the target application, when the target application needs to be deployed in any target environment, the connection information corresponding to the connection information type in the target environment can be automatically obtained based on the connection information type of the connection service middleware when the target application is run, which is identified by the connection entry, and the configuration template is combined to generate the configuration file of the target application deployed in the target environment, so that the target application is deployed in the target environment by using the generated configuration file, thereby implementing automatic deployment of the target application in the target environment, eliminating the need for manually and statically configuring the configuration file required for application deployment, and improving application deployment efficiency. The configuration file corresponding to the application is dynamically generated by automatically searching the connection information corresponding to the deployment environment according to the configuration template, so that the problems of connection information conflict, inconsistency with the connection information provided by the actual deployment environment of the application and the like caused when the configuration file required by the deployment of the application is configured in a manual static configuration mode are avoided, and the efficiency of application deployment is further improved.
It should be noted that the application deployment method provided in the embodiment of the present application may be implemented by using a cloud native controller. The application deployment method provided by the embodiment of the present application implemented by using a cloud native controller is described below by taking a scenario in which an application is deployed in a privatized environment as an example.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating an implementation of an application deployment method based on a cloud native controller according to an embodiment of the present application.
As shown in fig. 5, it includes an application deployment controller 501, a network controller 502, a container controller 503, a middleware deployment controller 504, a service registration controller 505, and a dynamic configuration controller 510.
In practical applications, the application deployment controller 501 is used for arranging and deploying the whole functional content of the application. As shown in fig. 6, after the application publishing package 601 corresponding to the target application is published, the target application is deployed through the application deployment controller 604; the application publishing package 601 includes an application software package 602 and a configuration template 603, and the configuration template 603 is set according to an application version of the target application.
In the scenario shown in fig. 5, the network controller 502, the container controller 503 and the middleware deployment controller 504 belong to sub-controllers, and are responsible for deployment and query functions of respective domain objects. The network controller 502 is used for load balancing and assigning domain names 507. A container controller 503 for generating a container 514. The middleware deployment controller 504 is configured to create middleware 508 corresponding to the target application.
And the service registration controller 505 is configured to collect connection information in different data processing environments corresponding to respective applications, and store the connection information in the service registration center 506 based on the service registration entry. The service registry 506 is further configured to provide a domain name resolution service, which is used for querying a dynamic value of a service registration entry corresponding to each application.
And the configuration server 510 is configured to obtain connection information of a service registration entry corresponding to the connection entry in the configuration template by querying the service registration center 506 based on the configuration template corresponding to the application, and generate configuration files 511 and 513 for deploying the target application, so that the application can be deployed on the node 512 according to the configuration file 511, or configured on the container 514 according to the configuration file 513.
As shown in fig. 6, the dynamic configuration controller 606 processes and renders the configuration template 602 based on the connection information corresponding to the service middleware 605, and generates a configuration file 607, so that the application deployment controller 604 deploys the target application 608 in the target environment according to the configuration file 607.
Referring to fig. 7, fig. 7 is a schematic flowchart illustrating a process for generating a configuration file by using a dynamic configuration controller according to an embodiment of the present application. As shown in fig. 7, after acquiring the configuration template 701 from the application distribution package, the dynamic configuration controller 703 queries the connection information of the service registration entry corresponding to the connection entry in the configuration template 701 from the service registration center, renders the connection information into the corresponding connection entry by identifying the placeholder in the configuration template 701, generates a configuration file 704, and stores the configuration file 704 according to the storage address in the configuration template 701. The specific contents included in the configuration template 701, the connection information 702, and the configuration file 704 are shown in fig. 7, and are not described herein again.
According to the application deployment method based on the cloud native controller, automatic deployment of the application in a privatized environment is achieved, the configuration file required by application deployment does not need to be configured manually and statically, and application deployment efficiency is improved.
In order to better understand the application deployment method provided by the above embodiment, the overall process of application development, deployment and operation is described below with reference to fig. 8. Referring to fig. 8, fig. 8 is a schematic flowchart of an application deployment method according to an embodiment of the present application.
During the application development 806, an application publishing package 811 is created by the developer 801 according to actual requirements. The application publishing package 811 includes an application software package and a configuration template, and the configuration template is set according to the application version.
During application deployment 807, the application is deployed by deployment or operation and maintenance personnel 802 for different application deployment projects. In a specific deployment process, the deployment or operation and maintenance personnel 802 first create an application 812 in the application deployment environment according to the application release package.
Then, the application deployment controller 808 creates the service middleware 813 connected to the application runtime according to the application publishing package, and registers the service middleware instance 814 in the service registry through the service registration controller 810, that is, the connection information of the service middleware is stored based on the service registration entry, and after the registration is successful, the service registration controller 810 returns the registration success information to the application deployment controller 808, so that the application deployment controller 808 issues the configuration template 816 to the dynamic configuration controller 809.
The dynamic configuration controller 816 identifies placeholders for connection entries in the configuration template, looks up connection information 817 for corresponding connection entries in the service registry of the service registration controller 810, and obtains connection information 818 for corresponding connection entries. Based on the connection information, the dynamic configuration controller 808 performs rendering processing on the configuration template to generate a configuration file 819, and specifies a storage address of the configuration file based on the configuration template, and returns the storage address to the application deployment controller 808.
Application deployment controller 808 stores the configuration file in a storage address and deploys and runs application 821 in the application deployment environment according to the configuration file. The application deployment controller 808, the dynamic configuration controller 809 and the service registration controller 810 are all cloud native controllers, namely 803, 804 and 805 in fig. 8.
In the running process of the application, the application establishes connection with the service middleware in the data processing environment through the configuration file, and normal service is guaranteed to be provided.
The application deployment method provided by the embodiment can dynamically generate the configuration files corresponding to the multiple data processing environments based on the configuration template when multiple applications and multiple application deployment projects are faced, thereby realizing automatic deployment of the applications and greatly reducing manual static configuration operation and application version copying work. In addition, after the application deployment is finished, the service registration controller can be used for sensing the connection information updating message of the service middleware and dynamically modifying the configuration file, so that the automatic operation and maintenance capability of the application is greatly improved.
For the application deployment method provided by the above embodiment, an application deployment apparatus is also provided by the embodiment of the present application.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an application deployment apparatus according to an embodiment of the present application. As shown in fig. 9, the application deployment apparatus 900 includes an obtaining unit 901, a generating unit 902, and a deploying unit 903:
the obtaining unit 901 is configured to obtain a configuration template of a target application, where the target application is to be deployed in a target environment, and the configuration template records a connection entry corresponding to the target application, where the connection entry is used to identify a connection information type of a service middleware connected when the target application is run;
the obtaining unit 901 is further configured to obtain connection information corresponding to the connection entry in the target environment;
the generating unit 902 is configured to generate a configuration file corresponding to the target application according to the connection information and the configuration template;
the deployment unit 903 is configured to deploy the target application in the target environment through the configuration file.
In a possible implementation manner, the connection entry includes a placeholder, and the generating unit 902 is configured to replace the connection information with the placeholder of the corresponding connection entry in the configuration template, and generate the configuration file corresponding to the target application.
In a possible implementation manner, the configuration template further includes a storage address, and the apparatus further includes a saving unit:
the saving unit is used for saving the generated configuration file according to the storage address;
the deployment unit 903 is configured to obtain the configuration file through the storage address, and deploy the target application in the target environment according to the configuration file.
In a possible implementation manner, the connection information includes connection authentication information and connection address information, and the connection entry includes a connection information type corresponding to the connection authentication information and a connection information type corresponding to the connection address information.
In a possible implementation manner, the obtaining unit 901 is further configured to obtain a declaration file of the target application, where the declaration file is used to indicate a middleware identifier of a service middleware connected when the target application is running;
the obtaining unit 901 is configured to obtain connection information corresponding to the connection entry in the target environment based on the middleware identifier indicated by the declaration file.
In one possible implementation manner, the apparatus further includes a storage unit and an updating unit:
the storage unit is used for storing the connection information of the service middleware in the target environment based on the service registration entry through the service registration controller, wherein the target middleware is any one of the service middleware in the target environment;
the updating unit is used for updating the service registration entry corresponding to the target middleware based on the connection information updating message if the connection information updating message of the target middleware is acquired;
the obtaining unit 901 is configured to obtain the connection information in the service registration entry corresponding to the connection entry.
In one possible implementation, the target environment is any one of a plurality of data processing environments in which the target application is to be deployed.
In one possible implementation, the configuration template is set according to an application version of the target application.
In one possible implementation, the apparatus further includes a creating unit and a determining unit:
the creating unit is used for creating service middleware for the target application in the target environment;
the determining unit is used for determining corresponding connection information according to the created service middleware.
In the application deployment apparatus provided in the above embodiment, because the configuration template of the target application records the connection entry corresponding to the target application, when the target application needs to be deployed in any target environment, the connection information corresponding to the connection information type in the target environment can be automatically obtained based on the connection information type of the connection service middleware when the target application is run and identified by the connection entry, and the configuration template is combined to generate the configuration file of the target application deployed in the target environment, so that the target application is deployed in the target environment by using the generated configuration file, thereby implementing automatic deployment of the target application in the target environment, eliminating the need for manually and statically configuring the configuration file required for application deployment, and improving application deployment efficiency. The configuration file corresponding to the application is dynamically generated by automatically searching the connection information corresponding to the deployment environment according to the configuration template, so that the problems of connection information conflict, inconsistency with the connection information provided by the actual deployment environment of the application and the like caused when the configuration file required by the deployment of the application is configured in a manual static configuration mode are avoided, and the efficiency of application deployment is further improved.
The embodiment of the present application further provides an apparatus for application deployment, and the apparatus for application deployment provided in the embodiment of the present application will be described below from the perspective of hardware materialization.
Referring to fig. 10, fig. 10 is a schematic diagram of a server 1400 provided by an embodiment of the present application, where the server 1400 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1422 (e.g., one or more processors) and a memory 1432, one or more storage media 1430 (e.g., one or more mass storage devices) for storing applications 1442 or data 1444. Memory 1432 and storage media 1430, among other things, may be transient or persistent storage. The program stored on storage medium 1430 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a server. Still further, a central processor 1422 may be disposed in communication with storage medium 1430 for executing a series of instruction operations on storage medium 1430 on server 1400.
The server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input-output interfaces 1458, and/or one or more operating systems 1441, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The steps performed by the server in the above embodiment may be based on the server structure shown in fig. 10.
The CPU 1422 is configured to perform the following steps:
acquiring a configuration template of a target application, wherein the target application is to be deployed in a target environment, the configuration template records a connection entry corresponding to the target application, and the connection entry is used for identifying a connection information type of a service middleware connected when the target application is operated;
acquiring connection information corresponding to the connection entries in the target environment;
generating a configuration file corresponding to the target application according to the connection information and the configuration template;
and deploying the target application in the target environment through the configuration file.
Optionally, the CPU 1422 may further execute method steps of any specific implementation of the application deployment method in the embodiment of the present application.
For the application deployment method described above, an embodiment of the present application further provides a terminal device for application deployment, so that the application deployment method is implemented and applied in practice.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present application. For convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the specific technology are not disclosed. The terminal device may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA for short), and the like, taking the terminal device as the mobile phone as an example:
fig. 11 is a block diagram illustrating a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Referring to fig. 11, the mobile phone includes: a Radio Frequency (RF) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a wireless fidelity (WiFi) module 1570, a processor 1580, and a power supply 1590. Those skilled in the art will appreciate that the handset configuration shown in fig. 11 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 11:
the RF circuit 1510 may be configured to receive and transmit signals during information transmission and reception or during a call, and in particular, receive downlink information of a base station and then process the received downlink information to the processor 1580; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 1510 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1510 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The memory 1520 may be used to store software programs and modules, and the processor 1580 implements various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1520. The memory 1520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1520 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532. The touch panel 1531, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on or near the touch panel 1531 using any suitable object or accessory such as a finger or a stylus) and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1531 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1580, and can receive and execute commands sent by the processor 1580. In addition, the touch panel 1531 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 1530 may include other input devices 1532 in addition to the touch panel 1531. In particular, other input devices 1532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1540 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 1540 may include a Display panel 1541, and optionally, the Display panel 1541 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1531 may cover the display panel 1541, and when the touch panel 1531 detects a touch operation on or near the touch panel 1531, the touch operation is transmitted to the processor 1580 to determine the type of the touch event, and then the processor 1580 provides a corresponding visual output on the display panel 1541 according to the type of the touch event. Although in fig. 11, the touch panel 1531 and the display panel 1541 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1531 and the display panel 1541 may be integrated to implement the input and output functions of the mobile phone.
The handset can also include at least one sensor 1550, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 1541 according to the brightness of ambient light and a proximity sensor that turns off the display panel 1541 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 1560, speaker 1561, and microphone 1562 may provide an audio interface between a user and a cell phone. The audio circuit 1560 may transmit the electrical signal converted from the received audio data to the speaker 1561, and convert the electrical signal into an audio signal by the speaker 1561 and output the audio signal; on the other hand, the microphone 1562 converts collected sound signals into electrical signals, which are received by the audio circuit 1560 and converted into audio data, which are processed by the audio data output processor 1580 and then passed through the RF circuit 1510 for transmission to, for example, another cellular phone, or for output to the memory 1520 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through a WiFi module 1570, and provides wireless broadband internet access for the user. Although fig. 11 shows WiFi module 1570, it is understood that it does not belong to the essential components of the handset and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1580 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1520 and calling data stored in the memory 1520, thereby integrally monitoring the mobile phone. Optionally, the processor 1580 may include one or more processing units; preferably, the processor 1580 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, and the like, and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor may not be integrated into the processor 1580.
The handset also includes a power supply 1590 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1580 via a power management system to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In an embodiment of the present application, the handset includes a memory 1520 that can store program code and transmit the program code to the processor.
The processor 1580 included in the mobile phone may execute the application deployment method provided in the foregoing embodiment according to an instruction in the program code.
An embodiment of the present application further provides a computer-readable storage medium for storing a computer program, where the computer program is used to execute the application deployment method provided in the foregoing embodiment.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the application deployment method provided in the various alternative implementations of the above aspects.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium may be at least one of the following media: various media that can store program codes, such as read-only memory (ROM), RAM, magnetic disk, or optical disk.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. An application deployment method, the method comprising:
acquiring a configuration template of a target application, wherein the target application is to be deployed in a target environment, the configuration template records a connection entry corresponding to the target application, and the connection entry is used for identifying a connection information type of a service middleware connected when the target application is operated;
acquiring connection information corresponding to the connection entries in the target environment;
generating a configuration file corresponding to the target application according to the connection information and the configuration template;
and deploying the target application in the target environment through the configuration file.
2. The method according to claim 1, wherein the connection entry includes a placeholder, and the generating a configuration file corresponding to the target application according to the connection information and the configuration template includes:
and generating a configuration file corresponding to the target application by replacing the placeholder of the corresponding connection item in the configuration template with the connection information.
3. The method of claim 1, wherein the configuration template further comprises a memory address, the method further comprising:
saving the generated configuration file according to the storage address;
the deploying the target application in the target environment through the configuration file comprises:
and acquiring the configuration file through the storage address, and deploying the target application in the target environment according to the configuration file.
4. The method of claim 1, wherein the connection information comprises connection authentication information and connection address information, and wherein the connection entry comprises a connection information type corresponding to the connection authentication information and a connection information type corresponding to the connection address information.
5. The method according to any one of claims 1-4, further comprising:
acquiring a declaration file of the target application, wherein the declaration file is used for indicating a middleware identifier of a service middleware connected when the target application is operated;
the acquiring of the connection information corresponding to the connection entry in the target environment includes:
and acquiring the connection information corresponding to the connection entry in the target environment based on the middleware identification indicated by the declaration file.
6. The method according to any one of claims 1-4, further comprising:
storing, by a service registration controller, connection information of service middleware in the target environment based on a service registration entry, wherein the target middleware is any one of the service middleware in the target environment;
if the connection information updating message of the target middleware is obtained, updating the service registration item corresponding to the target middleware based on the connection information updating message;
the acquiring of the connection information corresponding to the connection entry in the target environment includes:
and acquiring the connection information in the service registration entry corresponding to the connection entry.
7. The method of claim 1, wherein the target environment is any one of a plurality of data processing environments in which the target application is to be deployed.
8. The method of claim 1, wherein the configuration template is set according to an application version of the target application.
9. The method of claim 1, further comprising:
creating service middleware for the target application in the target environment;
and determining corresponding connection information according to the created service middleware.
10. An application deployment apparatus, characterized in that the apparatus comprises an acquisition unit, a generation unit, and a deployment unit:
the obtaining unit is configured to obtain a configuration template of a target application, where the target application is to be deployed in a target environment, and the configuration template records a connection entry corresponding to the target application, where the connection entry is used to identify a connection information type of a service middleware connected when the target application is run;
the obtaining unit is further configured to obtain connection information corresponding to the connection entry in the target environment;
the generating unit is used for generating a configuration file corresponding to the target application according to the connection information and the configuration template;
the deployment unit is used for deploying the target application in the target environment through the configuration file.
11. The apparatus of claim 10, wherein the connection entry includes a placeholder, and the generating unit is configured to generate the configuration file corresponding to the target application by replacing the connection information with the placeholder of the corresponding connection entry in the configuration template.
12. The apparatus of claim 10, wherein the configuration template further comprises a storage address, wherein the apparatus further comprises a saving unit:
the saving unit is used for saving the generated configuration file according to the storage address;
the deployment unit is configured to obtain the configuration file through the storage address, and deploy the target application in the target environment according to the configuration file.
13. The apparatus of claim 10, wherein the connection information comprises connection authentication information and connection address information, and wherein the connection entry comprises a connection information type corresponding to the connection authentication information and a connection information type corresponding to the connection address information.
14. An apparatus for application deployment, the apparatus comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the method of any of claims 1-9 according to instructions in the program code.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program for performing the method of any of claims 1-9.
CN202011073499.0A 2020-10-09 2020-10-09 Application deployment method and related device Pending CN112130866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011073499.0A CN112130866A (en) 2020-10-09 2020-10-09 Application deployment method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011073499.0A CN112130866A (en) 2020-10-09 2020-10-09 Application deployment method and related device

Publications (1)

Publication Number Publication Date
CN112130866A true CN112130866A (en) 2020-12-25

Family

ID=73843986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011073499.0A Pending CN112130866A (en) 2020-10-09 2020-10-09 Application deployment method and related device

Country Status (1)

Country Link
CN (1) CN112130866A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804097A (en) * 2021-01-04 2021-05-14 北京金山云网络技术有限公司 Private cloud deployment method and device and server
CN113141405A (en) * 2021-04-23 2021-07-20 北京奇艺世纪科技有限公司 Service access method, middleware system, electronic device, and storage medium
CN113434251A (en) * 2021-06-25 2021-09-24 竹间智能科技(上海)有限公司 Service module cross-platform deployment method, device and equipment
WO2022267675A1 (en) * 2021-06-22 2022-12-29 康键信息技术(深圳)有限公司 Middleware deployment method and apparatus, and device and storage medium
CN116501339A (en) * 2023-06-26 2023-07-28 北京凌云雀科技有限公司 Application deployment method, device, electronic equipment and computer readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804097A (en) * 2021-01-04 2021-05-14 北京金山云网络技术有限公司 Private cloud deployment method and device and server
CN112804097B (en) * 2021-01-04 2023-06-27 北京金山云网络技术有限公司 Private cloud deployment method, device and server
CN113141405A (en) * 2021-04-23 2021-07-20 北京奇艺世纪科技有限公司 Service access method, middleware system, electronic device, and storage medium
CN113141405B (en) * 2021-04-23 2022-11-15 北京奇艺世纪科技有限公司 Service access method, middleware system, electronic device, and storage medium
WO2022267675A1 (en) * 2021-06-22 2022-12-29 康键信息技术(深圳)有限公司 Middleware deployment method and apparatus, and device and storage medium
CN113434251A (en) * 2021-06-25 2021-09-24 竹间智能科技(上海)有限公司 Service module cross-platform deployment method, device and equipment
CN116501339A (en) * 2023-06-26 2023-07-28 北京凌云雀科技有限公司 Application deployment method, device, electronic equipment and computer readable storage medium
CN116501339B (en) * 2023-06-26 2023-09-08 北京凌云雀科技有限公司 Application deployment method, device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN112130866A (en) Application deployment method and related device
US11669342B2 (en) Profile transmission method, related device, and storage medium
CN110032512B (en) Debugging method of small program, related equipment and terminal
US20170316781A1 (en) Remote electronic service requesting and processing method, server, and terminal
CN107204964B (en) Authority management method, device and system
US20210204337A1 (en) Application function implementation method and electronic device
WO2018077041A1 (en) Method and apparatus for running application
US11317276B2 (en) Methods and/or systems for activation and/or configuration of an electronic subscriber identity module (eSIM)
CN108287706B (en) Data processing method and device
KR101621637B1 (en) Method, apparatus device, client computer, server, mobile terminal, program and storage medium for processing mobile terminal resource
CN106713608A (en) Application function state modifying method and apparatus, and terminal
CN111078556B (en) Application testing method and device
CN113840292A (en) Base station opening system, method, device and equipment based on micro-service
CN108090345B (en) Linux system external command execution method and device
CN107465646B (en) A kind of application method for down loading, system and relevant device
CN107463395B (en) Component calling method and device
CN110196662B (en) Method, device, terminal and storage medium for displaying synchronization state
CN112769777B (en) Data integration method and device based on cloud platform and electronic equipment
CN116567133A (en) Resource playing method and related device
CN112732548A (en) Interface testing method and device
CN109002535A (en) A kind of data-updating method and device
CN113821276B (en) Custom service management method and related device
CN117376120A (en) Channel-configurable message pushing method, system, device and storage medium
CN117407013A (en) Method and device for updating service in cluster, electronic equipment and storage medium
CN116502196A (en) Workflow authority management method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40036266

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination