CN115580646A - Middleware configuration method, device, server, medium and product - Google Patents
Middleware configuration method, device, server, medium and product Download PDFInfo
- Publication number
- CN115580646A CN115580646A CN202211093076.4A CN202211093076A CN115580646A CN 115580646 A CN115580646 A CN 115580646A CN 202211093076 A CN202211093076 A CN 202211093076A CN 115580646 A CN115580646 A CN 115580646A
- Authority
- CN
- China
- Prior art keywords
- middleware
- configuration information
- cloud service
- parameter
- service
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 87
- 238000012545 processing Methods 0.000 claims abstract description 19
- 238000010276 construction Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
本发明属于数据处理技术领域,具体提供一种中间件配置方法、装置、服务器、介质及产品,该方法包括:获取与中间件配置相关的第一中间件配置信息;所述第一中间件配置信息包括中间件对应的参数变量;根据所述参数变量从中间件服务平台获取参数变量具体数据;根据所述参数变量具体数据对所述第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息;根据所述第二中间件配置信息构建中间件与云服务之间的关联关系。本发明的中间件配置方法,使云服务可以使用中间件服务,克服了难以使用中间件服务的问题。
The present invention belongs to the technical field of data processing, and specifically provides a middleware configuration method, device, server, medium and product. The method includes: obtaining first middleware configuration information related to middleware configuration; the first middleware configuration The information includes parameter variables corresponding to the middleware; according to the parameter variables, the specific data of the parameter variables are obtained from the middleware service platform; according to the specific data of the parameter variables, data replacement processing is performed on the configuration information of the first middleware to generate the second Middleware configuration information; constructing an association relationship between middleware and cloud services according to the second middleware configuration information. The middleware configuration method of the present invention enables the cloud service to use the middleware service, and overcomes the problem that it is difficult to use the middleware service.
Description
技术领域technical field
本发明涉及数据处理技术领域,尤其涉及一种中间件配置方法、装置、服务器、介质及产品。The invention relates to the technical field of data processing, in particular to a middleware configuration method, device, server, medium and product.
背景技术Background technique
随着网络技术的不断发展,云服务应用越来越广泛。云服务可以通过诸多工具辅助编排构建,以提升开发、部署、测试等阶段的效率。其中,服务编排引擎服务器中的服务编排引擎可以实现中间件服务拉起等功能。根据云服务编排文件,服务编排引擎可以自动一键将一个云服务从源码构建成镜像,然后将镜像部署到Kubernetes集群成为一个可用的云服务。With the continuous development of network technology, cloud services are more and more widely used. Cloud services can use many tools to assist in the orchestration and construction to improve the efficiency of development, deployment, testing and other stages. Wherein, the service orchestration engine in the service orchestration engine server can implement functions such as pulling up middleware services. According to the cloud service orchestration file, the service orchestration engine can automatically build a cloud service from source code into a mirror with one click, and then deploy the mirror to the Kubernetes cluster to become an available cloud service.
当这个云服务需要依赖其他中间件例如mysql数据库(关系型数据库)、Redis(英文全称为:Remote Dictionary Server,中文为:远程字典服务)缓存时,服务编排引擎在配置中间件的过程中,需要将中间件服务部署到云服务所在的Kubernetes集群中,通过Kubernetes集群的DNS(英文全称为:Domain Name System,中文为:域名系统)服务的机制来使用中间件的服务。When this cloud service needs to rely on other middleware such as mysql database (relational database), Redis (full English name: Remote Dictionary Server, Chinese: remote dictionary service) cache, the service orchestration engine needs to Deploy the middleware service to the Kubernetes cluster where the cloud service is located, and use the middleware service through the DNS (English full name: Domain Name System, Chinese: Domain Name System) service mechanism of the Kubernetes cluster.
然而,目前中间件一般由中间件服务平台提供,不会与云服务部署在同一Kubernetes集群中,导致难以使用中间件服务。因而,需要一种新的中间件配置方法,使云服务与中间件服务相关联,克服难以使用中间件服务的问题。However, currently middleware is generally provided by the middleware service platform and will not be deployed in the same Kubernetes cluster as cloud services, making it difficult to use middleware services. Therefore, a new middleware configuration method is needed to associate cloud services with middleware services and overcome the problem of difficulty in using middleware services.
发明内容Contents of the invention
本发明提供一种中间件配置方法、装置、服务器、介质及产品,用以解决目前中间件一般由中间件服务平台提供,不会与云服务部署在同一Kubernetes集群中,导致难以使用中间件服务的问题。The present invention provides a middleware configuration method, device, server, medium and product to solve the problem that the current middleware is generally provided by the middleware service platform and will not be deployed in the same Kubernetes cluster as the cloud service, which makes it difficult to use the middleware service The problem.
本发明第一方面提供一种中间件配置方法,应用于服务编排引擎服务器,所述方法包括:The first aspect of the present invention provides a middleware configuration method, which is applied to a service orchestration engine server, and the method includes:
获取与中间件配置相关的第一中间件配置信息;所述第一中间件配置信息包括中间件对应的参数变量;Obtaining first middleware configuration information related to middleware configuration; the first middleware configuration information includes parameter variables corresponding to the middleware;
根据所述参数变量从中间件服务平台获取参数变量具体数据;Acquiring the specific data of the parameter variable from the middleware service platform according to the parameter variable;
根据所述参数变量具体数据对所述第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息;performing data replacement processing on the first middleware configuration information according to the specific data of the parameter variable to generate second middleware configuration information;
根据所述第二中间件配置信息构建中间件与云服务之间的关联关系。An association relationship between the middleware and the cloud service is constructed according to the second middleware configuration information.
进一步地,如上所述的方法,所述获取与中间件配置相关的第一中间件配置信息,包括:Further, in the method as described above, the acquisition of the first middleware configuration information related to the middleware configuration includes:
从云服务构建平台获取对应云服务编排文件;Obtain the corresponding cloud service orchestration file from the cloud service construction platform;
采用SnakeYaml解析器解析所述云服务编排文件,以确定所述第一中间件配置信息。The cloud service orchestration file is parsed by using a SnakeYaml parser to determine the configuration information of the first middleware.
进一步地,如上所述的方法,所述根据所述参数变量从中间件服务平台获取参数变量具体数据,包括:Further, in the above-mentioned method, the obtaining specific data of parameter variables from the middleware service platform according to the parameter variables includes:
根据所述参数变量向中间件服务平台发送中间件创建申请;Send a middleware creation application to the middleware service platform according to the parameter variable;
接收中间件服务平台根据所述中间件创建申请返回的参数变量具体数据。Receiving the specific data of parameter variables returned by the middleware service platform according to the middleware creation application.
进一步地,如上所述的方法,所述第一中间件配置信息中参数变量的数据格式为占位符;所述参数变量具体数据包括:参数变量标识和参数变量具体数值;Further, in the above-mentioned method, the data format of the parameter variable in the first middleware configuration information is a placeholder; the specific data of the parameter variable includes: a parameter variable identifier and a specific value of the parameter variable;
所述根据所述参数变量具体数据对所述第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息,包括:The performing data replacement processing on the first middleware configuration information according to the specific data of the parameter variable to generate the second middleware configuration information includes:
根据所述参数变量标识确定所述第一中间件配置信息中对应参数变量的占位符;determining a placeholder for a corresponding parameter variable in the first middleware configuration information according to the parameter variable identifier;
将所述对应参数变量的占位符替换为对应所述参数变量标识和所述参数变量具体数值,以生成第二中间件配置信息。The placeholders corresponding to the parameter variables are replaced with the identifiers corresponding to the parameter variables and the specific values of the parameter variables, so as to generate second middleware configuration information.
进一步地,如上所述的方法,所述根据所述第二中间件配置信息构建中间件与云服务之间的关联关系,包括:Further, in the above-mentioned method, the construction of the association relationship between the middleware and the cloud service according to the second middleware configuration information includes:
将所述第二中间件配置信息转化为云服务对应的应用子文件;Converting the second middleware configuration information into an application sub-file corresponding to the cloud service;
将所述应用子文件编排在云服务编排文件的对应应用目录下;Arranging the application sub-files under the corresponding application directory of the cloud service arrangement file;
将所述应用子文件确定为云服务对应的启动子文件,以构建中间件与云服务之间的关联关系;所述启动子文件为执行云服务启动流程时所需执行的文件。The application sub-file is determined as the start-up sub-file corresponding to the cloud service, so as to build an association relationship between the middleware and the cloud service; the start-up sub-file is a file that needs to be executed when the cloud service startup process is executed.
进一步地,如上所述的方法,云服务编排文件包括云服务的环境变量信息;Further, in the above-mentioned method, the cloud service orchestration file includes the environment variable information of the cloud service;
所述根据所述第二中间件配置信息构建中间件与云服务之间的关联关系,包括:The constructing the association relationship between the middleware and the cloud service according to the configuration information of the second middleware includes:
将所述第二中间件配置信息转化为所述环境变量信息;converting the second middleware configuration information into the environment variable information;
将所述第二中间件配置信息对应的环境变量信息确定为云服务对应的启动参数,以构建中间件与云服务之间的关联关系;所述启动参数为执行云服务启动流程时所需执行的参数。Determining the environment variable information corresponding to the second middleware configuration information as the startup parameter corresponding to the cloud service, so as to build the association relationship between the middleware and the cloud service; the startup parameter is required to execute the cloud service startup process parameters.
进一步地,如上所述的方法,所述根据所述第二中间件配置信息构建中间件与云服务之间的关联关系,包括:Further, in the above-mentioned method, the construction of the association relationship between the middleware and the cloud service according to the second middleware configuration information includes:
将所述第二中间件配置信息存储入预设配置中心数据库,以构建中间件与云服务之间的关联关系;所述预设配置中心数据库用于存储执行云服务启动流程时所需执行的配置信息。The second middleware configuration information is stored in a preset configuration center database to build an association relationship between the middleware and the cloud service; the preset configuration center database is used to store the configuration information.
本发明第二方面提供一种中间件配置装置,位于服务编排引擎服务器,所述装置包括:The second aspect of the present invention provides a middleware configuration device located on a service orchestration engine server, the device comprising:
第一获取模块,用于获取与中间件配置相关的第一中间件配置信息;所述第一中间件配置信息包括中间件对应的参数变量;The first acquisition module is configured to acquire first middleware configuration information related to the middleware configuration; the first middleware configuration information includes parameter variables corresponding to the middleware;
第二获取模块,用于根据所述参数变量从中间件服务平台获取参数变量具体数据;The second obtaining module is used to obtain specific data of parameter variables from the middleware service platform according to the parameter variables;
生成模块,用于根据所述参数变量具体数据对所述第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息;A generating module, configured to perform data replacement processing on the first middleware configuration information according to the specific data of the parameter variable, so as to generate second middleware configuration information;
构建模块,用于根据所述第二中间件配置信息构建中间件与云服务之间的关联关系。A building module, configured to build an association relationship between the middleware and the cloud service according to the second middleware configuration information.
进一步地,如上所述的装置,所述第一获取模块具体用于:Further, in the device as described above, the first acquisition module is specifically used for:
从云服务构建平台获取对应云服务编排文件;采用SnakeYaml解析器解析所述云服务编排文件,以确定所述第一中间件配置信息。Obtain the corresponding cloud service orchestration file from the cloud service construction platform; use the SnakeYaml parser to parse the cloud service orchestration file to determine the configuration information of the first middleware.
进一步地,如上所述的装置,所述第二获取模块具体用于:Further, in the device as described above, the second acquiring module is specifically used for:
根据所述参数变量向中间件服务平台发送中间件创建申请;接收中间件服务平台根据所述中间件创建申请返回的参数变量具体数据。Sending a middleware creation application to the middleware service platform according to the parameter variable; receiving the parameter variable specific data returned by the middleware service platform according to the middleware creation application.
进一步地,如上所述的装置,所述第一中间件配置信息中参数变量的数据格式为占位符;所述参数变量具体数据包括:参数变量标识和参数变量具体数值;Further, in the above-mentioned device, the data format of the parameter variable in the first middleware configuration information is a placeholder; the specific data of the parameter variable includes: a parameter variable identifier and a specific value of the parameter variable;
所述生成模块,具体用于:The generating module is specifically used for:
根据所述参数变量标识确定所述第一中间件配置信息中对应参数变量的占位符;将所述对应参数变量的占位符替换为对应所述参数变量标识和所述参数变量具体数值,以生成第二中间件配置信息。Determine the placeholder of the corresponding parameter variable in the first middleware configuration information according to the parameter variable identifier; replace the placeholder of the corresponding parameter variable with the corresponding parameter variable identifier and the specific value of the parameter variable, to generate the second middleware configuration information.
进一步地,如上所述的装置,所述构建模块具体用于:Further, in the device as described above, the building blocks are specifically used for:
将所述第二中间件配置信息转化为云服务对应的应用子文件;将所述应用子文件编排在云服务编排文件的对应应用目录下;将所述应用子文件确定为云服务对应的启动子文件,以构建中间件与云服务之间的关联关系;所述启动子文件为执行云服务启动流程时所需执行的文件。Converting the second middleware configuration information into an application sub-file corresponding to the cloud service; arranging the application sub-file in the corresponding application directory of the cloud service arrangement file; determining the application sub-file as the startup corresponding to the cloud service The sub-file is used to construct the association relationship between the middleware and the cloud service; the startup sub-file is a file that needs to be executed when the cloud service startup process is executed.
进一步地,如上所述的装置,云服务编排文件包括云服务的环境变量信息;Further, in the above-mentioned device, the cloud service orchestration file includes the environment variable information of the cloud service;
所述构建模块具体用于:The building blocks are specifically for:
将所述第二中间件配置信息转化为所述环境变量信息;将所述第二中间件配置信息对应的环境变量信息确定为云服务对应的启动参数,以构建中间件与云服务之间的关联关系;所述启动参数为执行云服务启动流程时所需执行的参数。Converting the second middleware configuration information into the environment variable information; determining the environment variable information corresponding to the second middleware configuration information as the startup parameters corresponding to the cloud service, so as to construct a link between the middleware and the cloud service Association relationship; the startup parameters are the parameters that need to be executed when executing the cloud service startup process.
进一步地,如上所述的装置,所述构建模块具体用于:Further, in the device as described above, the building blocks are specifically used for:
将所述第二中间件配置信息存储入预设配置中心数据库,以构建中间件与云服务之间的关联关系;所述预设配置中心数据库用于存储执行云服务启动流程时所需执行的配置信息。The second middleware configuration information is stored in a preset configuration center database to build an association relationship between the middleware and the cloud service; the preset configuration center database is used to store the configuration information.
本发明第三方面提供一种服务编排引擎服务器,包括:处理器、存储器及收发器;The third aspect of the present invention provides a service orchestration engine server, including: a processor, a memory, and a transceiver;
所述处理器、所述存储器及所述收发器电路互连;the processor, the memory, and the transceiver circuitry are interconnected;
所述存储器存储计算机执行指令;所述收发器用于收发数据;The memory stores computer-executable instructions; the transceiver is used to send and receive data;
所述处理器执行所述存储器存储的计算机执行指令,以实现如第一方面任一项所述的中间件配置方法。The processor executes the computer-executed instructions stored in the memory, so as to implement the middleware configuration method according to any one of the first aspect.
本发明第四方面提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现第一方面任一项所述的中间件配置方法。A fourth aspect of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement any one of the first aspect when executed by a processor. Middleware configuration method.
本发明第五方面提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现第一方面任一项所述的中间件配置方法。A fifth aspect of the present invention provides a computer program product, including a computer program, which implements the middleware configuration method described in any one of the first aspect when the computer program is executed by a processor.
本发明提供的一种中间件配置方法、装置、服务器、介质及产品,该方法包括:获取与中间件配置相关的第一中间件配置信息;所述第一中间件配置信息包括中间件对应的参数变量;根据所述参数变量从中间件服务平台获取参数变量具体数据;根据所述参数变量具体数据对所述第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息;根据所述第二中间件配置信息构建中间件与云服务之间的关联关系。本发明的中间件配置方法,通过第一中间件配置信息的参数变量从中间件服务平台获取参数变量具体数据,并根据参数变量具体数据对所述第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息。由于第二中间件配置信息来源于中间件服务平台,从而可以根据所述第二中间件配置信息构建中间件与云服务之间的关联关系,使云服务可以使用中间件服务,克服了难以使用中间件服务的问题。A middleware configuration method, device, server, medium and product provided by the present invention, the method includes: obtaining first middleware configuration information related to middleware configuration; the first middleware configuration information includes middleware corresponding parameter variable; according to the parameter variable, the specific data of the parameter variable is obtained from the middleware service platform; according to the specific data of the parameter variable, data replacement processing is performed on the first middleware configuration information to generate the second middleware configuration information; according to The second middleware configuration information establishes an association relationship between the middleware and the cloud service. In the middleware configuration method of the present invention, the specific data of the parameter variable is obtained from the middleware service platform through the parameter variable of the first middleware configuration information, and data replacement processing is performed on the first middleware configuration information according to the specific data of the parameter variable, so as to Generate second middleware configuration information. Since the second middleware configuration information comes from the middleware service platform, the association relationship between the middleware and the cloud service can be constructed according to the second middleware configuration information, so that the cloud service can use the middleware service, which overcomes the difficulty of using Problems with middleware services.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
图1为可以实现本发明实施例的中间件配置方法的场景图;Fig. 1 is the scene diagram that can realize the middleware configuration method of the embodiment of the present invention;
图2为本发明提供的中间件配置方法的流程示意图一;Fig. 2 is a schematic flow diagram 1 of the middleware configuration method provided by the present invention;
图3为本发明提供的中间件配置方法的流程示意图二;FIG. 3 is a second schematic flow diagram of the middleware configuration method provided by the present invention;
图4为本发明提供的中间件配置方法的整体流程示意图;FIG. 4 is a schematic diagram of the overall flow of the middleware configuration method provided by the present invention;
图5为本发明提供的中间件配置装置的结构示意图;5 is a schematic structural diagram of a middleware configuration device provided by the present invention;
图6为本发明提供的服务编排引擎服务器的结构示意图。FIG. 6 is a schematic structural diagram of a service orchestration engine server provided by the present invention.
通过上述附图,已示出本发明明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本发明构思的范围,而是通过参考特定实施例为本领域技术人员说明本发明的概念。By way of the above drawings, specific embodiments of the invention have been shown and will be described in more detail hereinafter. These drawings and written descriptions are not intended to limit the scope of the inventive concept in any way, but to illustrate the inventive concept for those skilled in the art by referring to specific embodiments.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.
本发明实施例的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solutions of the embodiments of the present invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved are all in compliance with relevant laws and regulations, and do not violate public order and good customs.
下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本发明的实施例进行描述。The technical solution of the present invention will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
为了清楚理解本申请的技术方案,首先对现有技术的方案进行详细介绍。目前服务编排引擎在配置中间件时,会将中间件服务部署到云服务所在的Kubernetes集群的命名空间下,并使用云服务编排文件中指定的中间件服务的名称命名。云服务启动时使用Kubernetes集群的DNS服务的机制,使云服务可以正确的使用中间件服务。当中间件服务和云服务部署在同一个Kubernetes集群而在不同的部署空间时,只要知道部署空间的名称也可以使用上述类似的方法实现。In order to clearly understand the technical solutions of the present application, the solutions of the prior art are first introduced in detail. Currently, when the service orchestration engine configures middleware, it will deploy the middleware service to the namespace of the Kubernetes cluster where the cloud service is located, and use the name of the middleware service specified in the cloud service orchestration file. The DNS service mechanism of the Kubernetes cluster is used when the cloud service starts, so that the cloud service can use the middleware service correctly. When the middleware service and the cloud service are deployed in the same Kubernetes cluster but in different deployment spaces, as long as you know the name of the deployment space, you can also use a method similar to the above.
然而,目前中间件一般由中间件服务平台提供,不会与云服务部署在同一Kubernetes集群中,导致难以使用中间件服务。However, currently middleware is generally provided by the middleware service platform and will not be deployed in the same Kubernetes cluster as cloud services, making it difficult to use middleware services.
所以针对现有技术中中间件一般由中间件服务平台提供,不会与云服务部署在同一Kubernetes集群中,导致难以使用中间件服务的问题,发明人在研究中发现,为了解决该问题,可以通过将调用中间件的配置信息与云服务构建关联,从而使云服务可以使用中间件服务。Therefore, the middleware in the prior art is generally provided by the middleware service platform, and will not be deployed in the same Kubernetes cluster as the cloud service, resulting in the problem that it is difficult to use the middleware service. The inventor found in the research that in order to solve this problem, you can The cloud service can use the middleware service by associating the configuration information of invoking the middleware with the cloud service construction.
具体的,首先通过与中间件配置相关的第一中间件配置信息的参数变量从中间件服务平台获取参数变量具体数据,并根据参数变量具体数据对第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息。由于第二中间件配置信息来源于中间件服务平台,从而可以根据第二中间件配置信息构建中间件与云服务之间的关联关系,在构建完成后使云服务可以使用中间件服务,克服了难以使用中间件服务的问题。Specifically, first obtain the specific data of the parameter variable from the middleware service platform through the parameter variable of the first middleware configuration information related to the middleware configuration, and perform data replacement processing on the first middleware configuration information according to the specific data of the parameter variable, so as to Generate second middleware configuration information. Since the second middleware configuration information comes from the middleware service platform, the association relationship between the middleware and the cloud service can be constructed according to the second middleware configuration information. After the construction is completed, the cloud service can use the middleware service, which overcomes the Difficulty using middleware services.
发明人基于上述的创造性发现,提出了本申请的技术方案。The inventor proposes the technical solution of the present application based on the above-mentioned inventive discoveries.
下面对本发明实施例提供的中间件配置方法的应用场景进行介绍。如图1所示,其中,1为服务编排引擎服务器,2为电子设备,3为中间件服务平台。本发明实施例提供的中间件配置方法对应的应用场景的网络架构中包括:服务编排引擎服务器1、电子设备2和中间件服务平台3。其中,服务编排引擎服务器1中设有服务编排引擎,可以用于构建中间件与云服务的关联。电子设备2存储有与中间件配置相关的第一中间件配置信息,第一中间件配置信息包括参数变量、参数变量格式等。中间件服务平台3存储有中间件相关的数据,如参数变量具体数据。本实施例的中间件可以采用mysql数据库、Redis缓存等。The application scenarios of the middleware configuration method provided by the embodiment of the present invention are introduced below. As shown in FIG. 1 , 1 is a service orchestration engine server, 2 is an electronic device, and 3 is a middleware service platform. The network architecture of the application scenario corresponding to the middleware configuration method provided by the embodiment of the present invention includes: a service orchestration engine server 1 , an
当需要进行中间件配置以及中间件与云服务之间的关联时,服务编排引擎服务器1从电子设备2处获取与中间件配置相关的第一中间件配置信息,其中,第一中间件配置信息包括中间件对应的参数变量。同时,服务编排引擎服务器1根据参数变量从中间件服务平台3获取参数变量具体数据,具体方式可以是由中间件服务平台3发送参数变量具体数据至服务编排引擎服务器1。之后,服务编排引擎服务器1根据参数变量具体数据对第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息。并且,根据第二中间件配置信息构建中间件与云服务之间的关联关系。在构建中间件与云服务之间的关联关系后,云服务可以使用中间件服务。When middleware configuration and association between middleware and cloud service are required, service orchestration engine server 1 acquires first middleware configuration information related to middleware configuration from
下面结合说明书附图对本发明实施例进行介绍。Embodiments of the present invention will be described below in conjunction with the accompanying drawings.
图2为本发明提供的中间件配置方法的流程示意图一,如图2所示,本发明实施例的执行主体为中间件配置装置,该中间件配置装置可以集成在服务编排引擎服务器中,也可以设置在其他的电子设备中,以调用服务编排引擎的方式来执行流程。则本实施例提供的中间件配置方法包括以下几个步骤:Fig. 2 is a schematic flow diagram of the middleware configuration method provided by the present invention. As shown in Fig. 2, the execution body of the embodiment of the present invention is a middleware configuration device, and the middleware configuration device can be integrated in the service orchestration engine server, or It can be set in other electronic devices to execute the process by calling the service orchestration engine. Then the middleware configuration method provided by this embodiment includes the following steps:
步骤S101,获取与中间件配置相关的第一中间件配置信息。第一中间件配置信息包括中间件对应的参数变量。Step S101, acquiring first middleware configuration information related to middleware configuration. The first middleware configuration information includes parameter variables corresponding to the middleware.
本实施例中,获取的方式可以是从存储有第一中间件配置信息的数据库中获取,也可以是从云服务编排文件中获取。云服务编排文件中一般包括云服务构建的所有相关数据,如中间件配置相关的第一中间件配置信息,代码仓库地址、云服务流程数据等。In this embodiment, the manner of obtaining may be from a database storing the configuration information of the first middleware, or from a cloud service orchestration file. The cloud service orchestration file generally includes all relevant data for cloud service construction, such as first middleware configuration information related to middleware configuration, code warehouse address, cloud service process data, etc.
第一中间件配置信息可以包括参数变量(以占位符形式放在字符串中)、参数变量名称、关键字字符等。The first middleware configuration information may include parameter variables (put in a character string in the form of placeholders), parameter variable names, keyword characters, and the like.
本实施例中的服务编排引擎是云原生服务的自动化引擎,对一个云服务自动完成持续集成、持续部署、中间件服务拉起等功能的自动化引擎。服务编排引擎服务器中设有服务编排引擎。The service orchestration engine in this embodiment is an automation engine for cloud-native services, an automation engine that automatically completes functions such as continuous integration, continuous deployment, and middleware service pull-up for a cloud service. The service orchestration engine server is provided with a service orchestration engine.
步骤S102,根据参数变量从中间件服务平台获取参数变量具体数据。Step S102, obtaining specific data of parameter variables from the middleware service platform according to the parameter variables.
本实施例中,参数变量可以包括中间件用户名称、中间件用户密码、互联网协议地址、端口等。中间件服务平台可以为任意企业的中间件服务平台,用于提供中间件服务。In this embodiment, the parameter variable may include a middleware user name, a middleware user password, an Internet protocol address, a port, and the like. The middleware service platform may be a middleware service platform of any enterprise, and is used to provide middleware services.
获取的参数变量具体数据与参数变量相对应,比如中间件用户名称可以为具体的名称,互联网协议地址为可以调用中间件数据的地址。The acquired specific data of the parameter variable corresponds to the parameter variable. For example, the middleware user name may be a specific name, and the Internet protocol address may be an address that can call the middleware data.
步骤S103,根据参数变量具体数据对第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息。Step S103, performing data replacement processing on the first middleware configuration information according to the specific data of the parameter variable, so as to generate the second middleware configuration information.
本实施例中,参数变量具体数据可以替换第一中间件配置信息中参数变量对应位置,从而完善第一中间件配置信息,生成具有参数变量具体数据的第二中间件配置信息。In this embodiment, the specific data of the parameter variable can replace the corresponding position of the parameter variable in the first middleware configuration information, thereby improving the first middleware configuration information and generating the second middleware configuration information with the specific data of the parameter variable.
步骤S104,根据第二中间件配置信息构建中间件与云服务之间的关联关系。Step S104, constructing an association relationship between the middleware and the cloud service according to the second middleware configuration information.
第二中间件配置信息可以作为调用中间件服务的配置信息与云服务进行关联,从而使云服务可以使用中间件服务。构建中间件与云服务之间的关联关系的方式有多种,比如可以根据第二中间件配置信息生成应用文件,并挂在云服务编排文件的相应目录下,在Java项目启动命令中指定以该配置文件启动,从而实现中间件与云服务之间的关联。也可以将第二中间件配置信息上传至服务编排引擎对应的预设配置中心数据库中,同时,设置云服务从预设配置中心数据库中获取配置信息,并基于此进行启动,从而实现中间件与云服务之间的关联。构建中间件与云服务之间的关联关系的方式还可以有其他的方式,本实施例对此不作限定。The second middleware configuration information may be associated with the cloud service as configuration information for invoking the middleware service, so that the cloud service can use the middleware service. There are many ways to build the relationship between middleware and cloud services. For example, the application file can be generated according to the configuration information of the second middleware, and hung in the corresponding directory of the cloud service orchestration file. Specify the following in the Java project startup command: This configuration file starts, enabling the association between the middleware and the cloud service. It is also possible to upload the second middleware configuration information to the default configuration center database corresponding to the service orchestration engine. Association between cloud services. There may be other manners for constructing the association relationship between the middleware and the cloud service, which is not limited in this embodiment.
本发明实施例提供的一种中间件配置方法,该方法包括:获取与中间件配置相关的第一中间件配置信息。第一中间件配置信息包括中间件对应的参数变量。根据参数变量从中间件服务平台获取参数变量具体数据。根据参数变量具体数据对第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息。根据第二中间件配置信息构建中间件与云服务之间的关联关系。A middleware configuration method provided by an embodiment of the present invention includes: acquiring first middleware configuration information related to middleware configuration. The first middleware configuration information includes parameter variables corresponding to the middleware. According to the parameter variable, the specific data of the parameter variable is obtained from the middleware service platform. Perform data replacement processing on the first middleware configuration information according to the specific data of the parameter variable, so as to generate the second middleware configuration information. An association relationship between the middleware and the cloud service is constructed according to the second middleware configuration information.
本发明的中间件配置方法,通过第一中间件配置信息的参数变量从中间件服务平台获取参数变量具体数据,并根据参数变量具体数据对第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息。由于第二中间件配置信息来源于中间件服务平台,从而可以根据第二中间件配置信息构建中间件与云服务之间的关联关系,使云服务可以使用中间件服务,克服了难以使用中间件服务的问题。The middleware configuration method of the present invention obtains the specific data of the parameter variable from the middleware service platform through the parameter variable of the first middleware configuration information, and performs data replacement processing on the first middleware configuration information according to the specific data of the parameter variable to generate the second Second, middleware configuration information. Since the second middleware configuration information comes from the middleware service platform, the association relationship between middleware and cloud services can be constructed according to the second middleware configuration information, so that cloud services can use middleware services, overcoming difficulties in using middleware service problem.
图3为本发明提供的中间件配置方法的流程示意图二,如图3所示,本实施例提供的中间件配置方法,是在本发明上一实施例提供的中间件配置方法的基础上,进行了进一步的细化。则本实施例提供的中间件配置方法包括以下步骤。Fig. 3 is the second schematic flow diagram of the middleware configuration method provided by the present invention. As shown in Fig. 3, the middleware configuration method provided by this embodiment is based on the middleware configuration method provided by the previous embodiment of the present invention. Further refinements were made. Then the middleware configuration method provided by this embodiment includes the following steps.
步骤S201,从云服务构建平台获取对应云服务编排文件。Step S201, obtaining the corresponding cloud service orchestration file from the cloud service construction platform.
本实施例中,云服务构建平台可以用于对云服务进行开发、测试等,也可以生成构建云服务对应的云服务编排文件。云服务编排文件包括云服务整个流程的相关数据。通过云服务构建平台可以预先确定本次预构建的云服务的所有数据,比如需要使用的中间件类型、云服务类型、应用种类等。In this embodiment, the cloud service construction platform can be used to develop and test the cloud service, and can also generate a cloud service orchestration file corresponding to the construction of the cloud service. Cloud service orchestration files include data related to the entire process of cloud services. Through the cloud service construction platform, all the data of the pre-built cloud service can be pre-determined, such as the type of middleware to be used, the type of cloud service, and the type of application.
步骤S202,采用SnakeYaml解析器解析云服务编排文件,以确定第一中间件配置信息。Step S202, using the SnakeYaml parser to parse the cloud service orchestration file to determine the configuration information of the first middleware.
本实施例中,SnakeYaml解析器是一种解析用于解析Yaml(英文全称为:YAML Ain'ta Markup Language)文件的解析工具,云服务编排文件可以采用Yaml文件。采用SnakeYaml解析器,可以提高对云服务编排文件的解析效果和解析效率,从而更效率的确定云服务编排文件中的第一中间件配置信息。In this embodiment, the SnakeYaml parser is a parsing tool for parsing a Yaml (English full name: YAML Ain'ta Markup Language) file, and the cloud service orchestration file may use a Yaml file. Using the SnakeYaml parser can improve the parsing effect and efficiency of the cloud service orchestration file, thereby more efficiently determining the first middleware configuration information in the cloud service orchestration file.
步骤S203,根据参数变量向中间件服务平台发送中间件创建申请。Step S203, sending a middleware creation application to the middleware service platform according to the parameter variable.
本实施例中,根据参数变量可以向中间件服务平台发送中间件创建申请,该创建申请与参数变量相对应。比如若需求中间件类型为mysql数据库,参数变量为mysql数据库对应的变量,从而生成mysql数据库对应的中间件创建申请。In this embodiment, a middleware creation application can be sent to the middleware service platform according to the parameter variable, and the creation application corresponds to the parameter variable. For example, if the required middleware type is a mysql database, the parameter variable is a variable corresponding to the mysql database, thereby generating a middleware creation application corresponding to the mysql database.
进行中间件创建申请可以通过restful远程调用技术实现自动向中间件服务平台申请创建中间件服务,其中,restful是一种网络应用程序的设计风格和开发方式。同时,也提高中间件创建申请的效率。在进行申请后,服务编排引擎服务器可以不断确定中间件服务的创建状态,以更快的接收中间件服务平台根据中间件创建申请返回的参数变量具体数据,提高中间件配置的整体效率。Applying for middleware creation can automatically apply to the middleware service platform to create middleware services through the restful remote call technology, wherein restful is a design style and development method of a network application. At the same time, the efficiency of middleware creation application is also improved. After the application is made, the service orchestration engine server can continuously determine the creation status of the middleware service, so as to receive the specific data of the parameter variables returned by the middleware service platform according to the middleware creation application faster, and improve the overall efficiency of middleware configuration.
步骤S204,接收中间件服务平台根据中间件创建申请返回的参数变量具体数据。Step S204, receiving the specific data of parameter variables returned by the middleware service platform according to the middleware creation application.
本实施例中,当中间件服务平台接收到中间件创建申请时,比如接收到mysql数据库对应的中间件创建申请,则会对中间件创建申请进行解析,以确定需创建的中间件服务类型。当确定中间件服务类型为mysql数据库时,则会进行mysql数据库中间件服务的创建,并在创建完成后向服务编排引擎服务器发送mysql数据库对应的参数变量具体数据,如IP地址(英文全称为:Internet Protocol Address,中文为互联网协议地址)、端口信息,为后续进行中间件与云服务的关联提供基础。In this embodiment, when the middleware service platform receives a middleware creation application, such as a middleware creation application corresponding to a mysql database, it will analyze the middleware creation application to determine the middleware service type to be created. When it is determined that the middleware service type is the mysql database, the mysql database middleware service will be created, and after the creation is completed, the specific data of the parameter variables corresponding to the mysql database will be sent to the service arrangement engine server, such as the IP address (English full name: Internet Protocol Address (Internet Protocol Address in Chinese) and port information provide the basis for the subsequent association of middleware and cloud services.
需要说明的是,第一中间件配置信息中参数变量的数据格式为占位符。It should be noted that the data format of the parameter variable in the configuration information of the first middleware is a placeholder.
步骤S205,根据参数变量标识确定第一中间件配置信息中对应参数变量的占位符。参数变量具体数据包括:参数变量标识和参数变量具体数值。Step S205, determine the placeholder corresponding to the parameter variable in the first middleware configuration information according to the parameter variable identifier. The specific data of the parameter variable includes: the parameter variable identifier and the specific value of the parameter variable.
本实施例中,第一中间件配置信息中参数变量以占位符的形式放在字符串中,此时的参数变量虽然占据字符串的位置,然而仅具有定义作用,并不具有实际功能。根据参数变量标识可以确定对应参数变量的占位符位置,从而为后续进行参数变量具体数据的替换流程提供基础。In this embodiment, the parameter variable in the configuration information of the first middleware is placed in the character string in the form of a placeholder. Although the parameter variable occupies the position of the character string at this time, it only has a definition function and has no actual function. The placeholder position of the corresponding parameter variable can be determined according to the parameter variable identifier, so as to provide a basis for the subsequent replacement process of the specific data of the parameter variable.
步骤S206,将对应参数变量的占位符替换为对应参数变量标识和参数变量具体数值,以生成第二中间件配置信息。Step S206, replacing the placeholder corresponding to the parameter variable with the corresponding parameter variable identifier and the specific value of the parameter variable, so as to generate second middleware configuration information.
本实施例中,通过第二中间件配置信息可以确定中间件服务的相关信息,从而可以在建立与云服务之间的关联关系后,使云服务可以使用中间件服务。In this embodiment, relevant information of the middleware service can be determined through the second middleware configuration information, so that the cloud service can use the middleware service after an association relationship with the cloud service is established.
步骤S207,根据第二中间件配置信息构建中间件与云服务之间的关联关系。Step S207, constructing an association relationship between the middleware and the cloud service according to the second middleware configuration information.
步骤207的实现方式与本发明上一实施例中的步骤104的实现方式类似,在此不再一一赘述。The implementation of step 207 is similar to the implementation of step 104 in the previous embodiment of the present invention, and will not be repeated here.
根据第二中间件配置信息构建中间件与云服务之间的关联关系的具体方式可以有多种,本实施例通过以下三种方式进行举例说明:There are many specific ways to construct the association relationship between the middleware and the cloud service according to the configuration information of the second middleware, and this embodiment uses the following three ways to illustrate:
可选的,第一种方式为:Optionally, the first method is:
将第二中间件配置信息转化为云服务对应的应用子文件。The second middleware configuration information is converted into an application sub-file corresponding to the cloud service.
将应用子文件编排在云服务编排文件的对应应用目录下。Arrange the application sub-files under the corresponding application directory of the cloud service orchestration file.
将应用子文件确定为云服务对应的启动子文件,以构建中间件与云服务之间的关联关系。启动子文件为执行云服务启动流程时所需执行的文件。The application sub-file is determined as the startup sub-file corresponding to the cloud service, so as to build an association relationship between the middleware and the cloud service. The startup sub-file is the file that needs to be executed when executing the cloud service startup process.
第一种方式将第二中间件配置信息编排在云服务编排文件的对应应用目录下,并成为云服务对应的启动子文件,使第二中间件配置信息与云服务的启动紧密关联。当云服务启动时,会执行该第二中间件配置信息对应的启动子文件,从而可以通过启动子文件调用中间件服务。若编写语言为Java语言,则还可以在java项目启动命令中指定以该启动子文件启动,使云服务在启动可以使用该中间件服务。In the first way, the second middleware configuration information is arranged in the corresponding application directory of the cloud service arrangement file, and becomes the startup sub-file corresponding to the cloud service, so that the second middleware configuration information is closely related to the startup of the cloud service. When the cloud service is started, the startup sub-file corresponding to the second middleware configuration information will be executed, so that the middleware service can be invoked through the startup sub-file. If the writing language is Java language, you can also specify to start with the startup sub-file in the java project startup command, so that the cloud service can use the middleware service at startup.
可选的,第二种方式为利用云服务编排文件中包括的云服务的环境变量信息。Optionally, the second way is to use the environment variable information of the cloud service included in the cloud service orchestration file.
第二种方式为:The second way is:
将第二中间件配置信息转化为环境变量信息。Convert the second middleware configuration information into environment variable information.
将第二中间件配置信息对应的环境变量信息确定为云服务对应的启动参数,以构建中间件与云服务之间的关联关系。启动参数为执行云服务启动流程时所需执行的参数。The environment variable information corresponding to the second middleware configuration information is determined as the startup parameter corresponding to the cloud service, so as to build an association relationship between the middleware and the cloud service. The startup parameters are the parameters that need to be executed when executing the cloud service startup process.
第二种方式将第二中间件配置信息转化为环境变量信息,存入云服务的环境变量信息中,并以该环境变量为云服务的启动参数。环境变量信息为云服务需执行的信息,当云服务启动时,将执行该启动参数。若编写语言为Java语言,则将第二中间件配置信息对应的环境变量信息确定为云服务对应的启动参数的流程还可以为通过java项目启动命令中指定该环境变量作为启动参数。The second method converts the configuration information of the second middleware into environment variable information, stores it in the environment variable information of the cloud service, and uses the environment variable as the startup parameter of the cloud service. The environment variable information is the information that the cloud service needs to execute. When the cloud service starts, the startup parameter will be executed. If the writing language is Java language, the process of determining the environment variable information corresponding to the second middleware configuration information as the startup parameter corresponding to the cloud service may also be to specify the environment variable as the startup parameter in the java project startup command.
第二种方式将第二中间件配置信息存储入环境变量信息,由于环境变量信息是云服务原本就具有的信息,因而,可以在不影响云服务数据布局的情况下实现云服务对中间件服务的使用。The second way is to store the configuration information of the second middleware into the environment variable information. Since the environment variable information is the information that the cloud service originally has, it is possible to implement the cloud service to the middleware service without affecting the cloud service data layout. usage of.
可选的,第三种方式可以采用预设配置中心数据库来管理全部的配置数据。Optionally, in the third manner, a preset configuration central database may be used to manage all configuration data.
第三种方式为:The third way is:
将第二中间件配置信息存储入预设配置中心数据库,以构建中间件与云服务之间的关联关系。预设配置中心数据库用于存储执行云服务启动流程时所需执行的配置信息。The configuration information of the second middleware is stored in the preset configuration center database, so as to construct the association relationship between the middleware and the cloud service. The preset configuration center database is used to store the configuration information required to execute the cloud service startup process.
由于预设配置中心数据库存储有云服务启动流程时所需执行的配置信息,当将第二中间件配置信息存储入预设配置中心数据库后,云服务在启动时,都会从预设配置中心数据库获取配置信息,以进行启动。从而使云服务可以通过预设配置中心数据库中的第二中间件配置信息使用中间件服务。相比前两种方式,第三种方式方便对配置信息进行管理,同时,也方便对配置信息进行更新升级。Since the default configuration center database stores the configuration information that needs to be executed during the cloud service startup process, after the second middleware configuration information is stored in the default configuration center database, when the cloud service starts, all Get configuration information for startup. Therefore, the cloud service can use the middleware service through the second middleware configuration information in the preset configuration center database. Compared with the first two methods, the third method facilitates management of configuration information, and at the same time, facilitates updating and upgrading of configuration information.
为了更容易理解本发明实施例的中间件配置方法,下面将结合图4进行说明。如图4所示,本实施例的中间件配置方法,服务编排引擎服务器首先对云服务编排文件进行解析,得到第一中间配置信息以及其包含的参数变量。服务编排引擎服务器根据参数变量向中间件服务平台申请创建中间件,在中间件服务平台完成创建后,接收中间件服务平台返回的参数变量具体数据。然后服务编排引擎服务器根据参数变量具体数据和第一中间件配置信息中记录参数变量的占位符进行数据替换,生成第二中间件配置信息。最后根据第二中间件配置信息与云服务进行关联,从而使云服务可以使用中间件服务。In order to understand the middleware configuration method of the embodiment of the present invention more easily, it will be described below with reference to FIG. 4 . As shown in FIG. 4 , in the middleware configuration method of this embodiment, the service orchestration engine server first parses the cloud service orchestration file to obtain the first intermediate configuration information and the parameter variables contained therein. The service orchestration engine server applies to the middleware service platform to create middleware according to the parameter variables, and receives the specific data of the parameter variables returned by the middleware service platform after the middleware service platform is created. Then, the service orchestration engine server performs data replacement according to the specific data of the parameter variable and the placeholder for recording the parameter variable in the first middleware configuration information, and generates the second middleware configuration information. Finally, the cloud service is associated with the cloud service according to the second middleware configuration information, so that the cloud service can use the middleware service.
图5为本发明提供的中间件配置装置的结构示意图,如图5所示,本实施例中,该中间件配置装置300可以设置在服务编排引擎服务器中,中间件配置装置300包括:FIG. 5 is a schematic structural diagram of a middleware configuration device provided by the present invention. As shown in FIG. 5, in this embodiment, the
第一获取模块301,用于获取与中间件配置相关的第一中间件配置信息。第一中间件配置信息包括中间件对应的参数变量。The first acquiring
第二获取模块302,用于根据参数变量从中间件服务平台获取参数变量具体数据。The second obtaining
生成模块303,用于根据参数变量具体数据对第一中间件配置信息进行数据替换处理,以生成第二中间件配置信息。The
构建模块304,用于根据第二中间件配置信息构建中间件与云服务之间的关联关系。A
本实施例提供的中间件配置装置可以执行图2所示方法实施例的技术方案,其实现原理和技术效果与图2所示方法实施例类似,在此不再一一赘述。The middleware configuration device provided in this embodiment can execute the technical solution of the method embodiment shown in FIG. 2 , and its implementation principle and technical effect are similar to those of the method embodiment shown in FIG. 2 , and will not be repeated here.
本发明提供的中间件配置装置在上一实施例提供的中间件配置装置的基础上,对中间件配置装置进行了进一步的细化,具体如下。Based on the middleware configuration device provided in the previous embodiment, the middleware configuration device provided by the present invention further refines the middleware configuration device, as follows.
可选的,本实施例中,第一获取模块301具体用于:Optionally, in this embodiment, the first obtaining
从云服务构建平台获取对应云服务编排文件。采用SnakeYaml解析器解析云服务编排文件,以确定第一中间件配置信息。Obtain the corresponding cloud service orchestration file from the cloud service construction platform. The SnakeYaml parser is used to parse the cloud service orchestration file to determine the configuration information of the first middleware.
可选的,本实施例中,第二获取模块302具体用于:Optionally, in this embodiment, the second acquiring
根据参数变量向中间件服务平台发送中间件创建申请。接收中间件服务平台根据中间件创建申请返回的参数变量具体数据。Send a middleware creation application to the middleware service platform according to the parameter variable. Receive the specific data of parameter variables returned by the middleware service platform according to the middleware creation application.
可选的,本实施例中,第一中间件配置信息中参数变量的数据格式为占位符。参数变量具体数据包括:参数变量标识和参数变量具体数值。Optionally, in this embodiment, the data format of the parameter variable in the first middleware configuration information is a placeholder. The specific data of the parameter variable includes: the parameter variable identifier and the specific value of the parameter variable.
生成模块303具体用于:The
根据参数变量标识确定第一中间件配置信息中对应参数变量的占位符。将对应参数变量的占位符替换为对应参数变量标识和参数变量具体数值,以生成第二中间件配置信息。A placeholder corresponding to a parameter variable in the first middleware configuration information is determined according to the parameter variable identifier. The placeholder of the corresponding parameter variable is replaced with the corresponding parameter variable identifier and the specific value of the parameter variable, so as to generate the second middleware configuration information.
可选的,本实施例中,构建模块304具体用于:Optionally, in this embodiment, the
将第二中间件配置信息转化为云服务对应的应用子文件。将应用子文件编排在云服务编排文件的对应应用目录下。将应用子文件确定为云服务对应的启动子文件,以构建中间件与云服务之间的关联关系。启动子文件为执行云服务启动流程时所需执行的文件。The second middleware configuration information is converted into an application sub-file corresponding to the cloud service. Arrange the application sub-files under the corresponding application directory of the cloud service orchestration file. The application sub-file is determined as the startup sub-file corresponding to the cloud service, so as to build an association relationship between the middleware and the cloud service. The startup sub-file is the file that needs to be executed when executing the cloud service startup process.
可选的,本实施例中,云服务编排文件包括云服务的环境变量信息。Optionally, in this embodiment, the cloud service orchestration file includes environment variable information of the cloud service.
构建模块304具体用于:The
将第二中间件配置信息转化为环境变量信息。将第二中间件配置信息对应的环境变量信息确定为云服务对应的启动参数,以构建中间件与云服务之间的关联关系。启动参数为执行云服务启动流程时所需执行的参数。Convert the second middleware configuration information into environment variable information. The environment variable information corresponding to the second middleware configuration information is determined as the startup parameter corresponding to the cloud service, so as to build an association relationship between the middleware and the cloud service. The startup parameters are the parameters that need to be executed when executing the cloud service startup process.
可选的,本实施例中,构建模块304具体用于:Optionally, in this embodiment, the
将第二中间件配置信息存储入预设配置中心数据库,以构建中间件与云服务之间的关联关系。预设配置中心数据库用于存储执行云服务启动流程时所需执行的配置信息。The configuration information of the second middleware is stored in the preset configuration center database, so as to construct the association relationship between the middleware and the cloud service. The preset configuration center database is used to store the configuration information required to execute the cloud service startup process.
本实施例提供的中间件配置装置可以执行图2-图4所示方法实施例的技术方案,其实现原理和技术效果与图2-图4所示方法实施例类似,在此不再一一赘述。The middleware configuration device provided in this embodiment can implement the technical solution of the method embodiment shown in Figure 2-Figure 4, and its realization principle and technical effect are similar to those of the method embodiment shown in Figure 2-Figure 4, and will not be repeated here repeat.
根据本发明的实施例,本发明还提供了一种电子设备、一种计算机可读存储介质和一种计算机程序产品。According to the embodiments of the present invention, the present invention also provides an electronic device, a computer-readable storage medium, and a computer program product.
如图6所示,图6是本发明提供的服务编排引擎服务器的结构示意图。服务编排引擎服务器旨在各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、刀片式服务器、大型计算机、和其它适合的计算机。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明的实现。As shown in FIG. 6, FIG. 6 is a schematic structural diagram of the service orchestration engine server provided by the present invention. The service orchestration engine server is intended for various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, blade servers, mainframes, and other suitable computers. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the inventions described and/or claimed herein.
如图6所示,该服务编排引擎服务器包括:处理器401、存储器402以及收发器403。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理。收发器403用于接收或发送数据,如参数模板、参数、参数填充策略等数据。As shown in FIG. 6 , the service orchestration engine server includes: a
存储器402即为本发明所提供的非瞬时计算机可读存储介质。其中,存储器存储有可由至少一个处理器执行的指令,以使至少一个处理器执行本发明所提供的中间件配置方法。本发明的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本发明所提供的中间件配置方法。The
存储器402作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本发明实施例中的中间件配置方法对应的程序指令/模块(例如,附图5所示的第一获取模块301、第二获取模块302、生成模块303和构建模块304)。处理器401通过运行存储在存储器402中的非瞬时软件程序、指令以及模块,从而执行电子设备的各种功能应用以及数据处理,即实现上述方法实施例中的中间件配置方法。The
同时,本实施例还提供一种计算机产品,当该计算机产品中的指令由电子设备的处理器执行时,使得电子设备能够执行上述实施例的中间件配置方法。At the same time, this embodiment also provides a computer product, when the instructions in the computer product are executed by the processor of the electronic device, the electronic device can execute the middleware configuration method of the above embodiment.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明实施例的其它实施方案。本发明旨在涵盖本发明实施例的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明实施例的一般性原理并包括本发明实施例未公开的本技术领域中的公知常识或惯用技术手段。Other implementations of the embodiments of the invention will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present invention is intended to cover any modification, use or adaptation of the embodiments of the present invention, these modifications, uses or adaptations follow the general principles of the embodiments of the present invention and include those in the technical field not disclosed by the embodiments of the present invention Common knowledge or common technical means.
应当理解的是,本发明实施例并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明实施例的范围仅由所附的权利要求书来限制。It should be understood that the embodiments of the present invention are not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of embodiments of the present invention is limited only by the appended claims.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211093076.4A CN115580646B (en) | 2022-09-08 | 2022-09-08 | Middleware configuration method, device, server, medium and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211093076.4A CN115580646B (en) | 2022-09-08 | 2022-09-08 | Middleware configuration method, device, server, medium and product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115580646A true CN115580646A (en) | 2023-01-06 |
CN115580646B CN115580646B (en) | 2024-12-20 |
Family
ID=84582052
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211093076.4A Active CN115580646B (en) | 2022-09-08 | 2022-09-08 | Middleware configuration method, device, server, medium and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115580646B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107463418A (en) * | 2017-09-12 | 2017-12-12 | 北京宝兰德软件股份有限公司 | The configuration file generation method and device of a kind of server middleware |
CN112804097A (en) * | 2021-01-04 | 2021-05-14 | 北京金山云网络技术有限公司 | Private cloud deployment method and device and server |
CN113419747A (en) * | 2021-06-22 | 2021-09-21 | 康键信息技术(深圳)有限公司 | Middleware deployment method, device, equipment and storage medium |
CN114217887A (en) * | 2021-12-20 | 2022-03-22 | 平安付科技服务有限公司 | Microservice orchestration method, execution method, device and server |
CN115185550A (en) * | 2022-07-12 | 2022-10-14 | 平安资产管理有限责任公司 | Service deployment method, device, computer equipment and storage medium |
-
2022
- 2022-09-08 CN CN202211093076.4A patent/CN115580646B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107463418A (en) * | 2017-09-12 | 2017-12-12 | 北京宝兰德软件股份有限公司 | The configuration file generation method and device of a kind of server middleware |
CN112804097A (en) * | 2021-01-04 | 2021-05-14 | 北京金山云网络技术有限公司 | Private cloud deployment method and device and server |
CN113419747A (en) * | 2021-06-22 | 2021-09-21 | 康键信息技术(深圳)有限公司 | Middleware deployment method, device, equipment and storage medium |
CN114217887A (en) * | 2021-12-20 | 2022-03-22 | 平安付科技服务有限公司 | Microservice orchestration method, execution method, device and server |
CN115185550A (en) * | 2022-07-12 | 2022-10-14 | 平安资产管理有限责任公司 | Service deployment method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115580646B (en) | 2024-12-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108037961B (en) | Application configuration method, device, server and storage medium | |
JP5420139B2 (en) | Dynamic service surrogate | |
EP1701261A1 (en) | Dynamic service generation for legacy components | |
CN110187902B (en) | Project transformation method, device, equipment and storage medium based on spring boot | |
CN107526806A (en) | The conversion method and device of data | |
CN102566984B (en) | Method and device for configuring parameters | |
CN110580174B (en) | Application component generation method, server and terminal | |
CN113515278A (en) | Low code model processing method, system, electronic device and storage medium | |
CN112286628A (en) | System for unifying nanotube Kubernetes heterogeneous applications and operation method | |
CN114490889A (en) | Configuration information processing method, device, equipment, medium and program product | |
CN111818175A (en) | Enterprise service bus configuration file generation method, apparatus, device and storage medium | |
CN116301951B (en) | Micro-service application installation upgrading method and device based on kubernetes | |
WO2022099913A1 (en) | Interface configuration method and apparatus, and device and medium | |
WO2009033424A1 (en) | A method and system for obtaining information of user's commands and device for registering user's commands | |
CN112988409B (en) | Interface calling method and device, computer equipment and storage medium | |
US9996344B2 (en) | Customized runtime environment | |
CN110825373B (en) | A mobile terminal dynamic method and device | |
CN114647422A (en) | A vehicle electronic control unit flashing method, device, equipment and medium | |
WO2024041035A1 (en) | Machine learning model management method and device, model management platform, and storage medium | |
CN115580646A (en) | Middleware configuration method, device, server, medium and product | |
CN113742385A (en) | Data query method and device | |
CN111949309A (en) | Method and device for pulling IDL file, computer equipment and storage medium | |
US12124890B2 (en) | Event provisioning for high-level programing language platform | |
US12210852B2 (en) | Event consumption for high-level programing language platform | |
CN114675867B (en) | A data processing method, device, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |