Microservice system orchestration visualization method, equipment and medium based on Docker Compose
The microservice system orchestration visualization method based on Docker Compose solves the problems of lack of visual interface and complex dependencies in the existing technology, achieves efficient and visual deployment of the microservice system, and ensures the correctness of the deployment sequence.
Patent Information
- Application Number
- CN202211708279.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-12-29
AI Technical Summary
When using Docker Compose to orchestrate and deploy microservice systems, the existing technology lacks a visual interface, resulting in inconvenient operations. Moreover, there are a large number of microservice images and complex dependencies, making it difficult to ensure the correct order of command execution.
Provides a visual method for orchestrating microservice systems based on Docker Compose. By obtaining pre-packaged offline image compression packages, modifying configuration files, determining microservice dependencies and startup sequences, and using Docker Compose for orchestration, visual deployment of microservice systems can be achieved.
It reduces the technical requirements for staff, improves deployment efficiency, ensures the robustness of the microservice system, and avoids the complexity of manual command line operations.
Smart Images

Figure CN116016227B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a microservice system orchestration visualization method, device, and medium based on Docker Compose. Background Art
[0002] Docker is an open source application container engine that allows developers to package their applications and dependent packages into a portable container and then publish them to any popular Linux machine. It can also achieve virtualization. The container is completely sandboxed and there is no interface between them. The microservice system based on the Spring Cloud framework includes the routing gateway service gateway, the security authentication service security, the business application services wms, les, mes, etc., the front-end service nginx, the distributed log service plumelog, the distributed transaction service seata, and the dependent configuration center service Nacos, the data cache service Redis, the Java runtime environment service evn, etc. Each service is run in a Docker container.
[0003] Docker Compose is an open source command line tool provided by Docker. It uses YML files to define and run the orchestration and deployment tool of multi-container (Docker) applications. At present, when using Docker Compose to orchestrate and deploy microservice systems, the existing technology can only be implemented by manually entering command lines in the Xshell or FinalShell command window. There is no visual interface, and the operation is very inconvenient. In addition, as the business of microservice systems based on the Spring Cloud framework becomes more and more extensive, the number of microservice images is increasing, and the dependencies and startup sequences between them are becoming more and more complicated. It is impossible to execute the correct command sequence to ensure the normal deployment of the microservice system. Summary of the invention
[0004] The embodiments of the present application provide a microservice system orchestration visualization method, device and medium based on Docker Compose, which are used to solve the technical problems that the prior art can only deploy and upgrade the microservice system by manually executing command lines, which requires a high level of command mastery by the staff and cannot ensure the correct order of command execution.
[0005] On the one hand, the embodiment of the present application provides a microservice system orchestration visualization method based on Docker Compose, including:
[0006] Obtain a pre-packaged offline image compression package, and based on the IP address of the server to be accessed, modify the configuration files corresponding to each microservice in the offline image compression package;
[0007] Receive an import requirement corresponding to the server to be accessed, and determine a plurality of microservices corresponding to the server to be accessed according to the import requirement;
[0008] Importing the offline image compression packages of the multiple microservices corresponding to the import requirements into the server to be accessed, and opening the firewall ports of the multiple microservices corresponding to the import requirements in the server to be accessed;
[0009] Based on the pre-determined dependencies and startup sequence between multiple microservices, the configuration service image package and the basic service image package are started, and the application service among the multiple microservices is determined;
[0010] The configuration file of the application service is configured through a hyperlink, and the application service image package corresponding to the application service is started according to the configuration file corresponding to the application service, so as to complete the deployment of the microservice system and realize the visualization of the orchestration of the microservice system.
[0011] In one implementation of the present application, before obtaining the pre-packaged offline image compression package, the method further includes:
[0012] Receive applications uploaded by users and submit the applications to the Git database to trigger Jenkins to automatically build the microservice image corresponding to the application;
[0013] The microservice image is stored in the HARBOR warehouse, and the microservice image is packaged into an offline image compression package.
[0014] In one implementation of the present application, obtaining a pre-packaged offline image compression package specifically includes:
[0015] Get the offline image compression package from the HARBOR repository and check whether the server to be connected has the Docker and Docker Compose runtime environments installed.
[0016] When it is determined that the server to be accessed has installed Docker and Docker Compose operating environment, the offline image compression package is copied to the server to be accessed.
[0017] In one implementation of the present application, before starting the configuration service image package and the basic service image package based on the predetermined dependency relationship and startup sequence between the multiple microservices, the method further includes:
[0018] Determine multiple microservices corresponding to all servers, and respectively determine multiple deployment conditions corresponding to the multiple microservices;
[0019] According to the deployment conditions corresponding to each microservice, the dependency relationship between the multiple microservices is determined, and according to the dependency relationship between the multiple microservices, the startup order corresponding to the multiple servers is determined.
[0020] In one implementation of the present application, starting the configuration service image package and the basic service image package based on the predetermined dependency relationship and startup sequence between multiple microservices specifically includes:
[0021] Based on the pre-determined dependencies and startup order between multiple microservices, determine that the Nacos image in the configuration service image package depends on the MySQL image, and orchestrate the Nacos image and the MySQL image through Docker Compose;
[0022] The MySQL image is started through Docker Compose orchestration, and after the MySQL image is started, the Nacos image is started.
[0023] In one implementation of the present application, starting the configuration service image package and the basic service image package based on the predetermined dependency relationship and startup sequence between multiple microservices specifically includes:
[0024] Based on the pre-determined dependencies and startup order between multiple microservices, determine that the Redis image in the basic service image package depends on the Java environment env image, and orchestrate the Redis image and the env image through Docker Compose;
[0025] The env image is started through Docker Compose orchestration, and after the env image is started, the Redis image is started.
[0026] In one implementation of the present application, based on the IP address of the server to be accessed, modifying the configuration files corresponding to each microservice in the offline image compression package specifically includes:
[0027] Determine the IP address of the server to be accessed, and determine the microservice in the offline image compression package and the configuration file corresponding to the microservice;
[0028] The IP address of the server to be accessed is received through a visual interface, and the address of the front-end requesting the back-end in the configuration file corresponding to the microservice is modified to achieve access to the back-end of the server to be accessed.
[0029] In one implementation of the present application, after modifying the address of the front-end requesting the back-end in the configuration file corresponding to the microservice, the method further includes:
[0030] Through the shared data volume in Docker, the configuration file corresponding to the microservice is mapped to the container to realize automatic modification of the configuration file.
[0031] On the other hand, the embodiment of the present application also provides a microservice system orchestration visualization device based on Docker Compose, the device comprising:
[0032] at least one processor;
[0033] and, a memory communicatively coupled to the at least one processor;
[0034] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the microservice system orchestration visualization method based on Docker Compose as described above.
[0035] On the other hand, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0036] Such as the above-mentioned microservice system orchestration visualization method based on Docker Compose.
[0037] The embodiments of the present application provide a method, device, and medium for visualizing the orchestration of a microservice system based on Docker Compose, which at least have the following beneficial effects:
[0038] Through the IP address of the server to be accessed, the configuration file corresponding to each microservice in the pre-acquired offline image compression package is modified, so that the front-end can access the back-end server according to the modified IP address in the configuration file; by receiving the import demand of the server to be accessed, the multiple microservices corresponding to the server to be accessed can be determined, so that the offline image compression packages corresponding to the multiple microservices are imported into the server to be accessed, and the on-demand access of the microservices is realized, and then the firewall ports corresponding to the multiple microservices in the server to be accessed are opened; after opening the firewall port, based on the dependency relationship and startup relationship between the multiple microservices that have been determined in advance, the configuration service image package and the basic service image package are first started, and the configuration files of the application services in the multiple microservices are configured through hyperlinks, and then the application service image package is started to complete the deployment of the microservice system and realize the visualization of the orchestration of the microservice system. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0040] Figure 1 A flow chart of a visualization method for orchestrating a microservice system based on Docker Compose provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the internal structure of a microservice system orchestration visualization device based on Docker Compose provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0043] The embodiment of the present application provides a method, device and medium for visualizing the orchestration of a microservice system based on Docker Compose. The configuration file corresponding to each microservice in the pre-acquired offline image compression package is modified through the IP address of the server to be accessed, so as to realize the front-end access to the back-end server according to the modified IP address in the configuration file; by receiving the import demand of the server to be accessed, multiple microservices corresponding to the server to be accessed can be determined, so that the offline image compression packages corresponding to the multiple microservices are imported into the server to be accessed, and the on-demand access of the microservices is realized, and then the firewall ports corresponding to the multiple microservices in the server to be accessed are opened; after opening the firewall port, based on the dependency relationship and startup relationship between the multiple microservices determined in advance, the configuration service image package and the basic service image package are first started, and the configuration files of the application services in the multiple microservices are configured through hyperlinks, and then the application service image package is started to complete the deployment of the microservice system, thereby realizing the visualization of the orchestration of the microservice system. The technical problem that the prior art can only deploy and upgrade the microservice system by manually executing the command line, which requires a high degree of command mastery of the staff and cannot ensure the correct order of command execution is solved.
[0044] Figure 1 The following is a flow chart of a visualization method for orchestrating a microservice system based on Docker Compose provided in an embodiment of the present application. Figure 1 As shown, the microservice system orchestration visualization method based on Docker Compose provided in the embodiment of the present application can mainly include the following steps:
[0045] 101. Obtain a pre-packaged offline image compression package, and based on the IP address of the server to be accessed, modify the configuration files corresponding to each microservice in the offline image compression package.
[0046] This application provides a visual and intelligent microservice system orchestration and deployment tool. By providing a friendly human-computer interaction interface, the staff can click a button in the visual interface to implement the operation service corresponding to the button, replacing the existing technology of manually executing command lines to deploy the microservice system. In addition, this application supports staff to deploy microservice systems offline on site, reduces the technical requirements for development, testing and implementation staff, sets microservice dependencies and startup sequence, and can improve the efficiency of system deployment while ensuring the robustness of system deployment.
[0047] The server first obtains the pre-packaged offline image compression package, and also receives the IP address of the server to be accessed input by the staff through a visual interface, so that the configuration file corresponding to each microservice in the offline image compression package can be modified according to the IP address of the server to be accessed.
[0048] Specifically, when the server obtains the pre-packaged offline image compression package, it needs to obtain the offline image compression package from the HARBOR warehouse, and also determine whether the server to be connected has Docker and Docker Compose operating environment installed. Then, if it is determined that the server to be connected has Docker and Docker Compose operating environment installed, the offline image compression package is copied to the server to be connected.
[0049] The server determines the IP address of the server to be accessed, and determines the microservice in the offline image compression package and the configuration file corresponding to the microservice. Then, according to the content entered by the staff in the visual interface, it receives the IP address of the server to be accessed, and modifies the address of the front-end request to the back-end in the configuration file corresponding to the microservice, thereby realizing access to the back-end of the server to be accessed.
[0050] It should be noted that in the embodiment of the present application, the server modifies the front-end request to the back-end address in the configuration file corresponding to the microservice, for example: modifying the configuration file registry.conf of the distributed transaction seata, the front-end nginx configuration file webconfig.json and other microservice configuration files. This can avoid the staff from modifying the configuration file of the microservice by manually entering the command line.
[0051] In one embodiment of the present application, after the server modifies the address of the front-end requesting the back-end in the configuration file corresponding to the microservice, the server maps the configuration file corresponding to the microservice to the container through the shared data volume in Docker, thereby realizing automatic modification of the configuration file.
[0052] In one embodiment of the present application, before obtaining a pre-packaged offline image compression package, the server receives an application uploaded by the user and submits the obtained application to the Git database, thereby triggering Jenkins to automatically build a microservice image corresponding to the application, and then stores the microservice image in the HARBOR warehouse, and packages the microservice image into an offline image compression package, so that the staff can also orchestrate and visually deploy the microservice system when offline.
[0053] 102. Receive an import requirement corresponding to the server to be accessed, and determine multiple microservices corresponding to the server to be accessed according to the import requirement.
[0054] When importing an image to a server to be connected, the server receives an import requirement corresponding to the server to be connected uploaded by a user, so that multiple microservices required by the server to be connected can be determined according to the import requirement corresponding to the server to be connected.
[0055] 103. Import the offline image compression package of multiple microservices corresponding to the import requirements into the server to be connected, and open the firewall port of the multiple microservices corresponding to the import requirements in the server to be connected.
[0056] The server imports the offline image compressed packages of multiple microservices corresponding to the import requirements of the server to be connected to the server to be connected, and the server also opens the firewall ports of the multiple microservices corresponding to the import requirements in the server to be connected to facilitate subsequent operations. In this way, the offline image compressed packages can be imported on demand, avoiding the existing technology of importing offline image compressed packages by manually entering the execution command line.
[0057] It should be noted that the embodiment of the present application imports an offline image compression package by manually entering an execution command line, such as the basic data image compression package base.tar.gz. The Linux command corresponding to the import executed visually in the interface is gunzip-c / home / install_images / base.tar.gz|docker load.
[0058] In one embodiment of the present application, when the server is unable to determine the specific microservices required by the server to be accessed, it is possible to import all offline image compression packages corresponding to the microservices of all servers with one click. In this case, the server to be accessed can call the imported corresponding image according to the microservices it needs.
[0059] In one embodiment of the present application, when the server cannot determine the specific microservices required by the server to be accessed, it can also open all firewall ports with one click. At this time, the server to be accessed can call the corresponding firewall ports opened according to the microservices it needs.
[0060] It should be noted that the embodiment of the present application realizes opening all firewall ports with one click by executing the Shell script file firewallopen.sh.
[0061] 104. Based on the predetermined dependencies and startup sequence between multiple microservices, the configuration service image package and the basic service image package are started, and the application service among the multiple microservices is determined.
[0062] This application sets the deployment steps of multiple microservices according to the pre-determined dependencies and startup sequence between multiple microservices, thereby solving the technical problem of starting the services that the microservice system based on the Spring Cloud framework depends on first.
[0063] Specifically, since the microservice system based on the Spring Cloud framework uses the open source component Nacos as the configuration center and registration center of the microservice, and the configuration information needs to be persisted and stored in the MySQL database, the server can determine that the Nacos image in the configuration service image package depends on the MySQL image based on the predetermined dependencies and startup sequence between multiple microservices, and thus orchestrate the Nacos image and the MySQL image through Docker Compose. Through Docker Compose orchestration, the MySQL image is started first, and after the MySQL image is started, the Nacos image is started.
[0064] It should be noted that the Nacos image package nacos.tar.gz in the embodiment of the present application includes a compressed MySQL image and a Nacos image.
[0065] Since the microservice system based on the Spring Cloud framework needs to run in a Java environment and use the Redis service to cache frequently requested information such as login Tokens, the server can determine that the Redis image in the basic service image package depends on the Java environment env image based on the pre-determined dependencies and startup sequence between multiple microservices, so that the Redis image and the env image are orchestrated through Docker Compose. Through Docker Compose orchestration, the env image corresponding to the Java environment is first started, and the Java environment jre is compressed into the 10.110.84.139:5000 / base / env:latest image through the image. When the env container is started, it is mapped to the server through Docker's shared volume volume, and after the env image is started, the Redis image is started.
[0066] In one embodiment of the present application, before the server starts the configuration service image package and the basic service image package based on the predetermined dependencies and startup order between multiple microservices, it is necessary to determine the multiple microservices corresponding to all servers, and respectively determine the multiple deployment conditions corresponding to the multiple microservices, and then determine the dependencies between the multiple microservices based on the determined deployment conditions corresponding to each microservice, and determine the startup order corresponding to the multiple servers based on the dependencies between the multiple microservices.
[0067] 105. Configure the configuration file of the application service through the hyperlink, and start the application service image package corresponding to the application service according to the configuration file corresponding to the application service, so as to complete the deployment of the microservice system and realize the visualization of the orchestration of the microservice system.
[0068] The server logs in to the Nacos service Web browser interface through a hyperlink and configures the configuration files of the application services (wms, les, mes, etc.), such as the connection information Datasource with the DAMO database and the connection information Redis with the cache service. In addition, the server starts the application service image package corresponding to the application service according to the configuration file corresponding to the application service, thereby completing the deployment of the microservice system and realizing the visual deployment of the orchestration of the microservice system.
[0069] In one embodiment of the present application, when the server cannot determine the specific application services required by the server to be accessed, it can also start all application service mirror packages with one click. At this time, the server to be accessed can call the corresponding application service mirror package according to the application services it needs.
[0070] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides a microservice system orchestration visualization device based on Docker Compose, whose structure is as follows: Figure 2 shown.
[0071] Figure 2 This is a schematic diagram of the internal structure of a microservice system orchestration visualization device based on Docker Compose provided in an embodiment of the present application. Figure 2 As shown, the device includes:
[0072] at least one processor;
[0073] and, a memory communicatively coupled to the at least one processor;
[0074] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to:
[0075] Get the pre-packaged offline image compression package, and modify the configuration files corresponding to each microservice in the offline image compression package based on the IP address of the server to be accessed;
[0076] Receive an import requirement corresponding to the server to be connected, and determine multiple microservices corresponding to the server to be connected according to the import requirement;
[0077] Import the offline image compression packages of multiple microservices corresponding to the import requirements into the server to be connected, and open the firewall ports of multiple microservices corresponding to the import requirements in the server to be connected;
[0078] Based on the pre-determined dependencies and startup sequence between multiple microservices, the configuration service image package and the basic service image package are started, and the application services among the multiple microservices are determined;
[0079] Configure the configuration file of the application service through the hyperlink, and start the application service image package corresponding to the application service according to the configuration file corresponding to the application service to complete the deployment of the microservice system and realize the visualization of the orchestration of the microservice system.
[0080] The embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0081] Get the pre-packaged offline image compression package, and modify the configuration files corresponding to each microservice in the offline image compression package based on the IP address of the server to be accessed;
[0082] Receive an import requirement corresponding to the server to be connected, and determine multiple microservices corresponding to the server to be connected according to the import requirement;
[0083] Import the offline image compression packages of multiple microservices corresponding to the import requirements into the server to be connected, and open the firewall ports of multiple microservices corresponding to the import requirements in the server to be connected;
[0084] Based on the pre-determined dependencies and startup sequence between multiple microservices, the configuration service image package and the basic service image package are started, and the application services among the multiple microservices are determined;
[0085] Configure the configuration file of the application service through the hyperlink, and start the application service image package corresponding to the application service according to the configuration file corresponding to the application service to complete the deployment of the microservice system and realize the visualization of the orchestration of the microservice system.
[0086] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0087] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0088] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0089] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0090] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0091] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0092] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0094] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0095] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0096] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0097] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0098] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0099] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0100] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0101] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A visualization method for microservice system orchestration based on Docker Compose, characterized in that: The method comprises: Obtain a pre-packaged offline image compression package, and based on the IP address of the server to be accessed, modify the configuration files corresponding to each microservice in the offline image compression package; Receive an import requirement corresponding to the server to be accessed, and determine a plurality of microservices corresponding to the server to be accessed according to the import requirement; Importing the offline image compression packages of the multiple microservices corresponding to the import requirements into the server to be accessed, and opening the firewall ports of the multiple microservices corresponding to the import requirements in the server to be accessed; Based on the pre-determined dependencies and startup sequence between multiple microservices, the configuration service image package and the basic service image package are started, and the application service among the multiple microservices is determined; The configuration file of the application service is configured through a hyperlink, and the application service image package corresponding to the application service is started according to the configuration file corresponding to the application service, so as to complete the deployment of the microservice system and realize the visualization of the orchestration of the microservice system.
2. According to claim 1, the microservice system orchestration visualization method based on Docker Compose is characterized in that: Before obtaining the pre-packaged offline image compression package, the method further includes: Receive applications uploaded by users and submit the applications to the Git database to trigger Jenkins to automatically build the microservice image corresponding to the application; The microservice image is stored in the HARBOR warehouse, and the microservice image is packaged into an offline image compression package.
3. The microservice system orchestration visualization method based on Docker Compose according to claim 1, characterized in that: The obtaining of the pre-packaged offline image compression package specifically includes: Get the offline image compression package from the HARBOR repository and check whether the server to be connected has the Docker and Docker Compose runtime environments installed. When it is determined that the server to be accessed has installed Docker and Docker Compose operating environment, the offline image compression package is copied to the server to be accessed.
4. The microservice system orchestration visualization method based on Docker Compose according to claim 1, characterized in that: Before starting the configuration service image package and the basic service image package based on the predetermined dependency relationship and startup sequence between the multiple microservices, the method further includes: Determine multiple microservices corresponding to all servers, and respectively determine multiple deployment conditions corresponding to the multiple microservices; Dependencies between the multiple microservices are determined according to the deployment conditions corresponding to each microservice, and startup sequences corresponding to the multiple microservices are determined according to the dependencies between the multiple microservices.
5. The microservice system orchestration visualization method based on Docker Compose according to claim 1, characterized in that: The configuration service image package and the basic service image package are started based on the predetermined dependencies and startup sequence between multiple microservices, specifically including: Based on the pre-determined dependencies and startup order between multiple microservices, determine that the Nacos image in the configuration service image package depends on the MySQL image, and orchestrate the Nacos image and the MySQL image through Docker Compose; The MySQL image is started through Docker Compose orchestration, and after the MySQL image is started, the Nacos image is started.
6. The microservice system orchestration visualization method based on Docker Compose according to claim 1, characterized in that: The configuration service image package and the basic service image package are started based on the predetermined dependencies and startup sequence between multiple microservices, specifically including: Based on the pre-determined dependencies and startup order between multiple microservices, determine that the Redis image in the basic service image package depends on the Java environment env image, and orchestrate the Redis image and the env image through Docker Compose; The env image is started through Docker Compose orchestration, and after the env image is started, the Redis image is started.
7. The method for visualizing the orchestration of a microservice system based on Docker Compose according to claim 1, characterized in that: The step of modifying the configuration files corresponding to the microservices in the offline image compression package based on the IP address of the server to be accessed specifically includes: Determine the IP address of the server to be accessed, and determine the microservice in the offline image compression package and the configuration file corresponding to the microservice; The IP address of the server to be accessed is received through a visual interface, and the address of the front-end requesting the back-end in the configuration file corresponding to the microservice is modified to achieve access to the back-end of the server to be accessed.
8. The method for visualizing the orchestration of a microservice system based on Docker Compose according to claim 7, characterized in that: After modifying the address of the front-end requesting the back-end in the configuration file corresponding to the microservice, the method further includes: Through the shared data volume in Docker, the configuration file corresponding to the microservice is mapped to the container to realize automatic modification of the configuration file.
9. A microservice system orchestration visualization device based on Docker Compose, characterized by: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the microservice system orchestration visualization method based on Docker Compose as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: A microservice system orchestration visualization method based on Docker Compose as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Microservice application arrangement and deployment method and device and computer terminal
CN108762769A
An arrangement visible automated deployment method and system for microservice systems
CN109408064A
