CN115048112A - Micro-service deployment method, device, electronic equipment and storage medium - Google Patents

Micro-service deployment method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115048112A
CN115048112A CN202110215128.XA CN202110215128A CN115048112A CN 115048112 A CN115048112 A CN 115048112A CN 202110215128 A CN202110215128 A CN 202110215128A CN 115048112 A CN115048112 A CN 115048112A
Authority
CN
China
Prior art keywords
service
micro
file
application
microservice
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
CN202110215128.XA
Other languages
Chinese (zh)
Inventor
周然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tongbang Zhuoyi Technology Co ltd
Original Assignee
Beijing Tongbang Zhuoyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tongbang Zhuoyi Technology Co ltd filed Critical Beijing Tongbang Zhuoyi Technology Co ltd
Priority to CN202110215128.XA priority Critical patent/CN115048112A/en
Publication of CN115048112A publication Critical patent/CN115048112A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Abstract

The disclosure provides a micro-service deployment method, a micro-service deployment device, electronic equipment and a computer-readable storage medium, and relates to the technical field of the Internet. The micro-service deployment method comprises the following steps: configuring dependency information based on the microservice application; creating an aggregated service based on the microservice development framework; and introducing the micro service applications into the aggregation service based on the dependency information, and generating an aggregation service file so as to deploy at least one micro service application in the same server based on the aggregation service file deployment. According to the technical scheme, the aggregation deployment mode based on the dependency information has high flexibility, and the cost of micro-service deployment is reduced while the mode and the advantages of micro-service design are kept, so that the problem of high deployment cost is avoided during system design.

Description

Micro-service deployment method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for deploying a micro service, an electronic device, and a computer-readable storage medium.
Background
A Micro service Architecture (Micro service Architecture) is an Architecture mode that a solution is decoupled by decomposing functions into discrete services, JAR files of Micro services need to be separately deployed on a server when the Micro service Architecture is deployed, and containers such as tomcat and the like need to be supported during running.
With the increase of the splitting granularity of the micro-service, the deployment cost of this method increases, for example, one service is split into 10 micro-services, and under the condition that factors such as security and stability are not considered, 10 servers are required to deploy the micro-service, and the deployment method has higher deployment cost, and if the deployment method is not executed, subsequent upgrade and expansion are difficult.
It is noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure and therefore may include information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a method, an apparatus, an electronic device and a computer-readable storage medium for deploying micro-services, which can improve the problem of high deployment cost of micro-services caused by the manner in the related art at least to some extent.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a micro service deployment method, including: configuring dependency information based on the microservice application; creating an aggregated service based on the micro-service development framework; and introducing the micro service applications into the aggregation service based on the dependency information, and generating an aggregation service file so as to deploy at least one micro service application in the same server based on the aggregation service file deployment.
In one embodiment, the microservice-based application configuration dependency information comprises: generating project coordinates of the micro service application based on an organization domain name to which the micro service application belongs, a project name of the micro service application and a project version of the micro service application; configuring the microservice application as a dependent JAR file based on the project coordinates to represent the dependent information based on the dependent JAR file.
In one embodiment, the introducing the microservice application to the aggregated service based on the dependency information and generating an aggregated service file comprises: adding the project coordinates to a configuration file of the aggregation service; packaging the dependent JAR file into the aggregation service based on a configuration plug-in and the project coordinate to generate a file to be compiled; compiling the file to be compiled into an executable JAR file so as to determine the executable JAR file as the aggregation service file.
In one embodiment, the compiling the file to be compiled into an executable JAR file includes: loading at least one dependent JAR file into a container of a webpage server; and compiling the container of the webpage server into the executable JAR file.
In one embodiment, further comprising: responding to a splitting instruction of the micro service application, and splitting a dependent JAR file of the micro service application into a plurality of splitting processing files; and updating the compiling result of the executable JAR file based on the splitting processing file.
In one embodiment, the splitting, in response to the splitting instruction of the microservice application, the dependent JAR file of the microservice application into a plurality of split processing files comprises: and compiling the dependent JAR file into an executable JAR file of a built-in container in response to the splitting instruction.
In one embodiment, the creating an aggregated service based on a microservice development framework comprises: acquiring a background service framework built based on the micro-service development framework; creating the aggregated service based on the background service framework.
According to a second aspect of the present disclosure, there is provided a microservice deployment apparatus comprising: a configuration module for configuring the dependency information based on the microservice application; the creating module is used for creating the aggregation service based on the micro-service development framework; and the deployment module is used for introducing the micro service applications into the aggregation service based on the dependency information, generating an aggregation service file, and deploying at least one micro service application in the same server based on the aggregation service file.
According to a third aspect of the present disclosure, there is provided an electronic apparatus comprising: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform any one of the above-described micro-service deployment methods via execution of executable instructions.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the micro-service deployment method of any one of the above.
According to the micro-service deployment scheme provided by the embodiment of the disclosure, the micro-service application is enabled to become a dependency file of the aggregated service by configuring the dependency information based on the micro-service application, namely the aggregated service file is generated by depending on the micro-service application, the aggregated service file generated based on the method only needs to be deployed by using one server, on one hand, the cost of the micro-service deployment is reduced while the mode and the advantages of the micro-service design are kept, so that the problem of high deployment cost is avoided during system design, on the other hand, the aggregated deployment method based on the dependency information has high flexibility, and can be combined according to various dimensions, and aggregated deployment is performed on services which are not consumed by resources, so that system resources are fully utilized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a schematic diagram illustrating a micro-service deployment system architecture in an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a method for deploying micro-services in an embodiment of the present disclosure;
fig. 3 shows a flow chart of another method of microservice deployment in an embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a method for deploying microservice in accordance with yet another exemplary embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating a microservice deployment scenario in an embodiment of the present disclosure;
FIG. 6 illustrates a flow diagram of another microservice deployment scenario of an embodiment of the present disclosure;
fig. 7 shows a flow chart of yet another method of micro-service deployment in an embodiment of the present disclosure;
FIG. 8 is a flow chart illustrating a method for deploying a microservice in an embodiment of the present disclosure;
fig. 9 shows a schematic diagram of a microservice deployment apparatus in an embodiment of the present disclosure;
fig. 10 shows a schematic diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
According to the scheme provided by the application, on one hand, the mode and the advantages of micro-service design are kept, and meanwhile the cost of micro-service deployment is reduced, so that the problem of high deployment cost is avoided during system design, on the other hand, the aggregation deployment mode based on the dependency information has high flexibility, combination can be carried out according to various dimensions, aggregation deployment is carried out on services which are not consumed by resources, and system resources are fully utilized.
To facilitate understanding, the following first explains several terms referred to in the present application.
Micro-services: also known as microservice architecture, is a cloud-native architecture approach in which a single application is composed of many loosely-coupled and independently deployable smaller components or services. These services typically have their own stack, including databases and data models; through the REST API, a combination of event streams and message brokers communicate with each other; in addition, they are organized by business capabilities, the lines separating the services are often referred to as bounded contexts.
Spring Boot is a completely new framework provided by the Pivotal team, and is designed to simplify the initial set-up and development processes of new Spring applications. The framework uses a specific way to configure, thereby eliminating the need for developers to define a templated configuration.
Maven is a Project Management tool that contains a Project Object Model (Project Object Model), a set of criteria, a Project Lifecycle (Project Lifecycle), a Dependency Management System (Dependency Management System), and logic to run plug-in objects (treals) that define the Lifecycle phases (phase). When using Maven, a well-defined project object model is used to describe the project, and then Maven can apply the transection logic from a set of shared (or custom) plug-ins.
The scheme provided by the embodiment of the application relates to technologies such as face recognition and machine learning, and is specifically explained by the following embodiment.
Fig. 1 shows a schematic structural diagram of a microservice deployment system in an embodiment of the present disclosure, which includes a plurality of terminals 120 and a server cluster 140.
The terminal 120 may be a mobile terminal such as a mobile phone, a game console, a tablet Computer, an e-book reader, smart glasses, an MP4(Moving Picture Experts Group Audio Layer IV) player, an intelligent home device, an AR (Augmented Reality) device, a VR (Virtual Reality) device, or a Personal Computer (PC), such as a laptop Computer and a desktop Computer.
Among them, the terminal 120 may have an application program installed therein for providing microservice deployment.
The terminals 120 are connected to the server cluster 140 through a communication network. Optionally, the communication network is a wired network or a wireless network.
The server cluster 140 is a server, or is composed of a plurality of servers, or is a virtualization platform, or is a cloud computing service center. The server cluster 140 is used to provide background services for providing the microservice deployment application. Optionally, the server cluster 140 undertakes primary computational work and the terminal 120 undertakes secondary computational work; alternatively, the server cluster 140 undertakes the secondary computing work and the terminal 120 undertakes the primary computing work; alternatively, the terminal 120 and the server cluster 140 perform cooperative computing by using a distributed computing architecture.
In some alternative embodiments, server cluster 140 is used to store microservice deployment models and the like.
Alternatively, the clients of the applications installed in different terminals 120 are the same, or the clients of the applications installed on two terminals 120 are clients of the same type of application of different control system platforms. The specific form of the client of the application program may also be different based on different terminal platforms, for example, the client of the application program may be a mobile phone client, a PC client, or a World Wide Web (Web) client.
Those skilled in the art will appreciate that the number of terminals 120 described above may be greater or fewer. For example, the number of the terminals may be only one, or several tens or hundreds of the terminals, or more. The number of terminals and the type of the device are not limited in the embodiments of the present application.
Optionally, the system may further include a management device (not shown in fig. 1), and the management device is connected to the server cluster 140 through a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireline or wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
Hereinafter, each step in the micro service deployment method according to the present exemplary embodiment will be described in more detail with reference to the drawings and examples.
Fig. 2 shows a flowchart of a microservice deployment method in an embodiment of the present disclosure. The method provided by the embodiment of the present disclosure may be performed by any electronic device with computing processing capability, for example, the terminal 120 and/or the server cluster 140 in fig. 1. In the following description, the terminal 120 is taken as an execution subject for illustration.
As shown in fig. 2, the terminal 120 executes a micro service deployment method, which includes the following steps:
step S202, the dependency information is configured based on the micro-service application.
The dependency information is used for representing a dependency relationship, the dependency relationship among the items is the most common relationship, when the item A uses a JAR formed by the item B, the item A represents that the item A forms a dependency on the item B, in the disclosure, the item A can be regarded as an aggregation service file, and the item B can be regarded as a microservice application.
The dependency package can be compiled based on the configuration file of the micro-service to obtain the dependency information, and the aggregated service can generate the JAR file depending on the micro-service application by generating the dependency information.
Step S204, an aggregation service is created based on the micro service development framework spring boot.
The Java micro-service administration framework is a Spring Cloud which is a set of a series of frameworks based on Spring boots, and tools commonly used for building a distributed system and micro-services, such as configuration management, service discovery, service fault tolerance, service routing and the like, are provided.
The micro-service development framework is a rapid development framework, an aggregation service which does not contain a business code is created through the spring boot, specifically, the micro-service development framework is a service framework which can aggregate a plurality of micro-service applications, and the micro-service applications can be deployed based on the same server based on the aggregation service.
And step S206, introducing the micro-service application into the aggregation service based on the dependency information, generating an aggregation service file, and deploying at least one micro-service application in the same server based on the deployment of the aggregation service file.
The method includes that a micro-service application JAR file is introduced into an aggregation service based on dependency information, namely, the micro-service application JAR file is introduced into the aggregation service in a mode of POM (project object model) dependency.
In particular, it will be understood by those skilled in the art that if an aggregated service needs to be installed, the aggregated service depends on a microservice, and the microservice contains an environment file in which this software is to be run, i.e. there is a dependency relationship between the aggregated service and the microservice.
In this embodiment, dependency information is configured based on the microservice application, so that the microservice application becomes a dependency file of an aggregated service, that is, the aggregated service file is generated by relying on the microservice application, the aggregated service file generated based on this method does not need to change the architecture mode of the microservice, only needs to be compiled into a dependency package mode when compiling the microservice, the aggregated service does not need to include a service code, and only needs to be packaged into an operable Spring boot aggregated service file, which only needs to be deployed by using one server, on one hand, while the mode and advantages of the microservice design are retained, the cost of deploying the microservice is reduced, thereby avoiding the problem of high cost of deploying when designing a system, on the other hand, the aggregated deployment mode based on the dependency information has high flexibility, and can be combined according to various dimensions, and performing aggregation deployment on the services which are not consumed by the resources so as to fully utilize the system resources.
As shown in fig. 3, in an embodiment, the step S202, based on a specific implementation manner of the microservice application configuration dependency information, includes:
step S302, generating project coordinates of the micro service application based on the organization domain name of the micro service application, the project name of the micro service application and the project version of the micro service application.
With the continuous development of development ecological environment, dependency management is realized by using a dependency management tool maven, and based on maven, when micro-service application is introduced into aggregation service, only project coordinates of the micro-service application are introduced into pom.
Specifically, the project coordinates include three attributes of groupId, artifactId and version, and may further include scope and system path attributes, which respectively specify the path where the Jar package originates from the local file and the local file.
The three fields groupId, artifactId, version are similar to the three axes of the xyz coordinate system.
Generally, projects of an organization (company, foundation, etc.) generally use the same groupId, so generally speaking, a groupId is a domain name owned by the organization.
The artifactId is typically the name of a known item (or item module) and together with the groupId constitutes the location of an item (or item module) that distinguishes it from other items (or item modules).
version represents the version of the item (or item module).
groupId, artifactId, version together locate the only place for the publishing packet of a microservice application.
And step S304, configuring the microservice application into a dependency JAR file based on the maven plug-in and the project coordinate, so as to express dependency information based on the dependency JAR file.
And describing the project by the maven through the pom file, and defining the project attribute and the construction process in the pom file, so that the maven can automatically construct the project and generate the site.
In the embodiment, by using the dependency management characteristic of maven and configuring the dependency information of the micro service application based on the project coordinate of the micro service application, after the aggregation service is generated, the micro service application maintaining the original architecture is added into the framework of the aggregation service based on the dependency information to obtain the corresponding aggregation service file, and then the deployment of the aggregation service on one server can be ensured.
As shown in fig. 4, in one embodiment, step S206, a solid way of introducing the micro service application into the aggregation service based on the dependency information and generating the aggregation service file includes:
step S402, add item coordinates to the configuration file of the aggregated service.
Wherein the item content is read based on the item coordinates by adding the item coordinates.
And S404, packaging the dependent JAR file into the aggregation service based on the configuration plug-in and the project coordinate, and generating a file to be compiled.
The configuration file is integrated into the file of the aggregation service, only the related configuration files in the micro service to be aggregated need to be arranged into the same configuration file, then the common JAR file of the micro service is introduced into the aggregation project in a Maven-dependent mode, and finally the aggregation service is compiled into an executable JAR file by using Maven to be executed.
Step S406, compiling the file to be compiled into an executable JAR file based on a maven compiling tool so as to determine the executable JAR file as an aggregation service file.
In the embodiment, by acquiring project coordinates, a dependency JAR file is generated based on the project coordinates, a coordinate positioning system formed by maven through groupId, artifactId and version can accurately position each component (artifact), and all required micro services can be introduced by listing coordinates of the dependent micro services in a pot file.
In one embodiment, compiling the file to be compiled into an executable JAR file based on the maven compiling tool comprises: loading at least one dependent JAR file into a webpage server Tomcat container; the Tomcat container is compiled into an executable JAR file based on the maven compilation tool.
As shown in fig. 5, the micro service applications include a plurality of micro service applications, specifically, a micro service application 508A, micro service applications 508B and … …, a micro service application 508N, and the like.
The plurality of microservice applications are supported by the Tomcat container 506 in the form of aggregated service files to enable deployment of the plurality of microservice applications in the server 504 on a Spring boot basis, resulting in the complete system 502.
In one embodiment, further comprising: and responding to a splitting instruction of the micro service application, and splitting a dependent JAR file of the micro service application into a plurality of splitting processing files.
As shown in fig. 6, in an embodiment, a specific implementation manner of splitting a dependent JAR file of a micro service application into a plurality of split processing files in response to a split instruction of the micro service application includes:
step S602, in response to the splitting instruction, compiling the dependent JAR file into an executable JAR file of a built-in Tomcat container based on a maven compiling tool.
Updating the compiling result of the executable JAR file based on the split processing file specifically comprises the following steps:
in step S604, the compilation result is updated based on the executable JAR file.
In this embodiment, when the micro-service is split and deployed, the original micro-service needs to be directly compiled into an executable Jar file with a tomcat built in through a maven. When the POM is split, only the compiling result of the POM file identification in the micro-service needs to be changed, and when the splitting deployment appeal exists, the splitting deployment can be rapidly carried out due to the fact that the strong dependence limitation of the deployment does not exist among the services, so that the constantly changing service appeal is met.
Specifically, each micro-service that depends on the aggregated service can be directly deployed and operated after being compiled according to the above method, and the original aggregated service does not need to be reserved. The splitting and the deployment of the micro-service can be completed through the steps.
In one embodiment, creating an aggregated service based on a microservice development framework Spring boot includes: acquiring a background service framework built based on a micro-service development framework spring boot; an aggregated service is created based on the background service framework.
In the embodiment, a JAR file of the aggregation service, which can be packaged into an operable Spring boot, is created to realize that a plurality of micro service applications are deployed in the same server.
As shown in fig. 7, a microservice application deployment method according to one embodiment of the present disclosure includes:
step S702, performing Maven compilation on the codes of the multiple micro-service applications respectively to obtain corresponding dependent JAR files.
Step S704, introducing the JAR-dependent files of the micro-services into a framework of the aggregation service to obtain a file to be compiled.
Step S706, carrying out Maven compilation on the file to be compiled to obtain a Spring Boot package.
Step S708, running the dependent microservice application when the aggregated service is started.
As shown in fig. 8, a microservice application deployment method according to one embodiment of the present disclosure includes:
step S802, carrying out Maven compilation on codes of the multiple microservice applications respectively to obtain corresponding dependence JAR files.
Step S804, the dependent JAR files of the micro services are introduced into the framework of the aggregation service.
Another implementation of step 706 in fig. 7 includes:
step S806, the configuration files yml of the microservices are combined, and an executable JAR file is generated by Maven compilation.
It is to be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
A microservice deployment apparatus 900 according to this embodiment of the invention is described below with reference to fig. 9. The microservice deployment apparatus 900 shown in fig. 9 is merely an example and should not impose any limitations on the functionality or scope of use of embodiments of the present invention.
Microservice deployment device 900 is represented in the form of a hardware module. The components of microservice deployment device 900 may include, but are not limited to: a configuration module 902 for configuring dependency information based on the microservice application; a creating module 904 for creating an aggregated service based on the micro-service development framework; a deployment module 906, configured to introduce the microservice application into the aggregated service based on the dependency information, and generate an aggregated service file, so as to deploy at least one microservice application in the same server based on the aggregated service file deployment.
In one embodiment, the configuration module 902 is further configured to: generating project coordinates of the micro service application based on an organization domain name to which the micro service application belongs, a project name of the micro service application and a project version of the micro service application; configuring the microservice application as a dependent JAR file based on the project coordinates to represent the dependent information based on the dependent JAR file.
In one embodiment, the deployment module 906 is further to: adding the item coordinates to a configuration file of the aggregated service; packaging the dependent JAR file into the aggregation service based on a configuration plug-in and the project coordinate to generate a file to be compiled; compiling the file to be compiled into an executable JAR file so as to determine the executable JAR file as the aggregation service file.
In one embodiment, further comprising: a compiling module 908, configured to load at least one dependent JAR file into a container of the web server; and compiling the container of the webpage server into the executable JAR file.
In one embodiment, the compiling module 908 is further configured to: creating a Docker data container; creating at least one virtual operating environment on the same server based on the Docker data container; and correspondingly loading the at least one dependent JAR file in at least one virtual operating environment one by one based on the maven compiling tool to generate the executable JAR file.
In one embodiment, further comprising: a splitting module 910, configured to split, in response to a splitting instruction of the microservice application, a dependent JAR file of the microservice application into multiple split processing files; and updating the compiling result of the executable JAR file based on the splitting processing file.
In one embodiment, the creation module 904 is further for: acquiring a background service framework built based on the micro-service development framework; creating the aggregated service based on the background service framework.
An electronic device 1000 according to this embodiment of the invention is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, and a bus 1030 that couples various system components including the memory unit 1020 and the processing unit 1010.
Where the storage unit stores program code that may be executed by the processing unit 1010 to cause the processing unit 1010 to perform the steps according to various exemplary embodiments of the present invention described in the "exemplary methods" section above in this specification. For example, the processing unit 1010 may perform steps S202 to S206 as shown in fig. 2, and other steps defined in the micro-service deployment method of the present disclosure.
The storage unit 1020 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)10201 and/or a cache memory unit 10202, and may further include a read-only memory unit (ROM) 10203.
The memory unit 1020 may also include a program/utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
Bus 1030 may be any one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, and a local bus using any of a variety of bus architectures.
The electronic device 1000 may also communicate with one or more external devices 1060 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interfaces 1050. Also, the electronic device 1000 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 1050. As shown, the network adapter 1050 communicates with the other modules of the electronic device 1000 via a bus 1030. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when the program product is run on the terminal device.
According to the program product for realizing the method, the portable compact disc read only memory (CD-ROM) can be adopted, the program code is included, and the program product can be operated on terminal equipment, such as a personal computer. However, the program product of the present invention is not limited in this respect, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for deploying micro-service applications is characterized by comprising the following steps:
configuring dependency information based on the microservice application;
creating an aggregated service based on the micro-service development framework;
and introducing the micro service applications into the aggregation service based on the dependency information, and generating an aggregation service file so as to deploy at least one micro service application in the same server based on the aggregation service file deployment.
2. The microservice application deployment method of claim 1, wherein the microservice application-based configuration dependency information comprises:
generating project coordinates of the micro service application based on an organization domain name to which the micro service application belongs, a project name of the micro service application and a project version of the micro service application;
configuring the microservice application as a dependent JAR file based on the project coordinates to represent the dependent information based on the dependent JAR file.
3. The microservice application deployment method of claim 2, wherein the importing the microservice application into the aggregated service based on the dependency information and generating an aggregated service file comprises:
adding the item coordinates to a configuration file of the aggregated service;
packing the dependent JAR file into the aggregation service based on a configuration plug-in and the project coordinate to generate a file to be compiled;
compiling the file to be compiled into an executable JAR file so as to determine the executable JAR file as the aggregation service file.
4. The microservice application deployment method of claim 3, wherein the compiling the file to be compiled into an executable JAR file comprises:
loading at least one dependent JAR file into a container of a webpage server;
and compiling the container of the webpage server into the executable JAR file.
5. The microservice application deployment method of claim 3, further comprising:
responding to a splitting instruction of the micro service application, and splitting a dependent JAR file of the micro service application into a plurality of splitting processing files;
and updating the compiling result of the executable JAR file based on the splitting processing file.
6. The microservice application deployment method of claim 5, wherein the splitting the dependent JAR file of the microservice application into a plurality of split process files in response to the split instruction of the microservice application comprises:
and compiling the dependent JAR file into an executable JAR file of a built-in container in response to the splitting instruction.
7. The microservice application deployment method of any of claims 1 to 6, wherein the creating of the aggregated service based on a microservice development framework comprises:
acquiring a background service framework built based on the micro-service development framework;
creating the aggregated service based on the background service framework.
8. A microservice application deployment apparatus, comprising:
a configuration module for configuring the dependency information based on the microservice application;
the creating module is used for creating the aggregation service based on the micro-service development framework;
and the deployment module is used for introducing the micro service applications into the aggregation service based on the dependency information, generating an aggregation service file, and deploying at least one micro service application in the same server based on the aggregation service file.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the microservice application deployment method of any of claims 1-7 via execution of the executable instructions.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the microservice application deployment method of any one of claims 1 to 7.
CN202110215128.XA 2021-02-25 2021-02-25 Micro-service deployment method, device, electronic equipment and storage medium Pending CN115048112A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110215128.XA CN115048112A (en) 2021-02-25 2021-02-25 Micro-service deployment method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110215128.XA CN115048112A (en) 2021-02-25 2021-02-25 Micro-service deployment method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115048112A true CN115048112A (en) 2022-09-13

Family

ID=83156267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110215128.XA Pending CN115048112A (en) 2021-02-25 2021-02-25 Micro-service deployment method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115048112A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604344A (en) * 2022-10-18 2023-01-13 中电金信软件(上海)有限公司(Cn) Micro-service current limiting method and device
CN116136756A (en) * 2023-04-18 2023-05-19 浪潮通用软件有限公司 Layered structure-based microservice assembly method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604344A (en) * 2022-10-18 2023-01-13 中电金信软件(上海)有限公司(Cn) Micro-service current limiting method and device
CN116136756A (en) * 2023-04-18 2023-05-19 浪潮通用软件有限公司 Layered structure-based microservice assembly method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US11429442B2 (en) Parallel and distributed computing using multiple virtual machines
US10862979B2 (en) Techniques for supporting remote micro-services as native functions in spreadsheet applications
US20200065763A1 (en) Smart contract interpreter
CN106462407B (en) Code services for language independent scheduling
US9229759B2 (en) Virtual machine provisioning using replicated containers
CN113312037B (en) Data processing method, device, equipment and storage medium applied to micro-service
CN105637478B (en) Computer-assisted development of native mobile application code
US20200409665A1 (en) Systems and Methods for Seamlessly Integrating Multiple Products by Using a Common Visual Modeler
CN109144482B (en) Method and device for building rapid development environment based on webpack
CN115048112A (en) Micro-service deployment method, device, electronic equipment and storage medium
CN103092599A (en) Software develop kit
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
US8938712B2 (en) Cross-platform virtual machine and method
CN113419710B (en) Development method and device of applet, electronic equipment and medium
US20230222014A1 (en) Systems and methods for providing a hybrid mobile application
US9606775B2 (en) Developing rich internet application
CN112667441A (en) Service module scheduling method, system and storage medium based on fault-tolerant function
CN106663007B (en) Method for operating tool in working environment and machine using the method
CN108076067B (en) Method and system for authorized crawler configuration simulation login
US20220365762A1 (en) Neural network model conversion method server, and storage medium
CN112100187A (en) Student learning data storage method and device based on VueJS
CN111158684A (en) System creation method, device, electronic equipment and readable storage medium
CN114615521B (en) Video processing method and device, computer readable storage medium and electronic equipment
CN106796512B (en) Method for projecting working space and system applying same
US11157341B1 (en) Data contracts

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