[go: up one dir, main page]

CN116016227B - Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium - Google Patents

Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium Download PDF

Info

Publication number
CN116016227B
CN116016227B CN202211708279.XA CN202211708279A CN116016227B CN 116016227 B CN116016227 B CN 116016227B CN 202211708279 A CN202211708279 A CN 202211708279A CN 116016227 B CN116016227 B CN 116016227B
Authority
CN
China
Prior art keywords
micro
service
server
accessed
package
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.)
Active
Application number
CN202211708279.XA
Other languages
Chinese (zh)
Other versions
CN116016227A (en
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.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software 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 Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN202211708279.XA priority Critical patent/CN116016227B/en
Publication of CN116016227A publication Critical patent/CN116016227A/en
Application granted granted Critical
Publication of CN116016227B publication Critical patent/CN116016227B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a Docker Compose-based micro-service system arrangement visualization method, equipment and medium, which are used for solving the problem that the micro-service system can only be deployed by manually executing a command line in the prior art. Comprising the following steps: acquiring a pre-packaged offline mirror image compression packet and modifying configuration files corresponding to each microservice in the offline mirror image compression packet based on the IP address of the server to be accessed; determining a plurality of micro services of the server to be accessed according to the corresponding import requirements of the server to be accessed; importing the mirror image compression packets of the plurality of micro services offline to a server to be accessed and opening firewall ports of the plurality of micro services; starting a configuration service mirror image package and a basic service mirror image package based on a preset dependency relationship among a plurality of micro services and a starting sequence, and determining application services in the plurality of micro services; configuration files of the application service are configured through hyperlinks, and an application service mirror package is started to complete deployment of the micro service system, so that arrangement visualization of the micro service system is realized.

Description

Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium
Technical Field
The application relates to the technical field of computer application, in particular to a method, equipment and medium for visualizing arrangement of a micro-service system based on Docker Compose.
Background
Dock is an open-source application container engine that allows developers to package their applications and rely on packages into a portable container that is then published to any popular Linux machine, and can also implement virtualization, where the containers are completely sandboxed without any interface to each other. The micro service system based on the Spring Cloud framework comprises a routing gateway service gateway, a security authentication service security, a business application service wms, les, mes and the like, a front-end service nginx, a distributed log service plumelog, a distributed transaction service seata, a dependent configuration center service Nacos, a data caching service Redis, a Java running environment service evn and the like, wherein each service is put into a Docker container to run.
Docker Compose is an open source command line tool provided by Docker corporation, orchestration deployment tool that defines and runs multiple container (Docker) applications using YML files. Currently, when the prior art utilizes Docker Compose to arrange and deploy the micro-service system, the prior art can only be realized by manually inputting a plurality of command lines in an Xshell or FINALSHELL command window, and the prior art has no visual interface and is very inconvenient to operate. In addition, as the service development of the micro service system based on the Spring Cloud framework is wider, the number of micro service images is larger and larger, the mutual dependency relationship and starting sequence are also more and more complex, and the correct command sequence cannot be executed to ensure that the micro service system deployment is normal.
Disclosure of Invention
The embodiment of the application provides a method, equipment and medium for arranging and visualizing a micro-service system based on Docker Compose, which are used for solving the technical problems that the micro-service system can only be deployed and upgraded in a manual command line executing mode in the prior art, the command grasping degree of staff is high, and the command execution sequence cannot be ensured to be correct.
In one aspect, an embodiment of the present application provides a method for visualizing micro-service system orchestration based on Docker Compose, including:
acquiring an offline mirror image compression packet which is packaged in advance, and modifying configuration files corresponding to each microservice in the offline mirror image compression packet based on an IP address of a server to be accessed;
Receiving an import demand corresponding to the server to be accessed, and determining a plurality of micro services corresponding to the server to be accessed according to the import demand;
importing the offline mirror image compression packet of which the import demand corresponds to a plurality of micro services to the server to be accessed, and opening firewall ports of which the import demand corresponds to a plurality of micro services in the server to be accessed;
Starting a configuration service mirror package and a basic service mirror package based on a preset dependency relationship and a starting sequence among a plurality of micro services, and determining application services in the plurality of micro services;
And configuring the configuration file of the application service through hyperlinks, starting the application service mirror package corresponding to the application service according to the configuration file corresponding to the application service so as to complete the deployment of the micro service system and realize the arrangement visualization of the micro service system.
In one implementation of the present application, before the obtaining the pre-packaged offline mirror compressed packet, the method further includes:
Receiving an application program uploaded by a user, and submitting the application program to a Git database to trigger Jenkins to automatically construct a micro-service image corresponding to the application program;
and storing the micro-service image into a HARBOR warehouse, and packaging the micro-service image into an offline image compression package.
In one implementation manner of the present application, the obtaining the offline mirror image compressed packet after being packaged in advance specifically includes:
acquiring an offline mirror image compression packet from a HARBOR warehouse, and determining whether a server to be accessed is provided with a Docker and Docker Compose running environment;
And copying the offline mirror image compressed package to the server to be accessed under the condition that the server to be accessed is determined to have installed the Docker and Docker Compose running environments.
In one implementation manner of the present application, before the configuration service image package and the basic service image package are started based on the predetermined dependency relationship between the plurality of micro services and the starting sequence, the method further includes:
determining a plurality of micro services corresponding to all servers, and respectively determining a plurality of deployment conditions corresponding to the plurality of micro services;
and determining the dependency relationship among the plurality of micro services according to the deployment condition corresponding to each micro service, and determining the starting sequence corresponding to the plurality of servers according to the dependency relationship among the plurality of micro services.
In one implementation manner of the present application, the method for starting the configuration service image package and the basic service image package based on the predetermined dependency relationship among the plurality of micro services and the starting sequence specifically includes:
Based on the dependency relationship and the starting sequence among the preset micro services, nacos images in the configuration service image package are determined to depend on MySQL images, and the Nacos images and the MySQL images are arranged through Docker Compose;
And starting the MySQL mirror image through Docker Compose arrangement, and starting the Nacos mirror image after the MySQL mirror image is started.
In one implementation manner of the present application, the method for starting the configuration service image package and the basic service image package based on the predetermined dependency relationship among the plurality of micro services and the starting sequence specifically includes:
Determining that a Redis image in a basic service image package depends on an env image of a Java environment based on a preset dependency relationship among a plurality of micro services and a starting sequence, and arranging the Redis image and the env image through Docker Compose;
and starting the env image through Docker Compose arrangement, and starting the Redis image after the env image is started.
In one implementation manner of the present application, the modifying the configuration file corresponding to each micro-service in the offline mirror image compression packet based on the IP address of the server to be accessed specifically includes:
determining an IP address of a server to be accessed, and determining a micro-service in the offline mirror image compression packet and a configuration file corresponding to the micro-service;
and receiving the IP address of the server to be accessed through a visual interface, and modifying the address of the front end request rear end in the configuration file corresponding to the micro service so as to realize the access to the rear end of the server to be accessed.
In one implementation manner of the present application, after the modifying the address of the front end request back end in the configuration file corresponding to the micro service, the method further includes:
And mapping the configuration file corresponding to the micro service into a container through the shared data volume in the Docker so as to realize automatic modification of the configuration file.
In another aspect, an embodiment of the present application further provides a micro service system orchestration visualization device based on Docker Compose, where the device includes:
at least one processor;
and a memory communicatively coupled to the at least one processor;
Wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a Docker Compose-based microservice system orchestration visualization method as described above.
In another aspect, embodiments of the present application also provide a non-volatile computer storage medium storing computer-executable instructions configured to:
The micro-service system based Docker Compose orchestrates the visualization method as described above.
The embodiment of the application provides a Docker Compose-based micro-service system arrangement visualization method, equipment and medium, which at least comprise the following beneficial effects:
Modifying configuration files corresponding to each micro-service in the offline mirror image compression package obtained in advance through the IP address of the server to be accessed, so that the front end can access the back end server according to the modified IP address in the configuration files; the method comprises the steps that a plurality of micro services corresponding to a server to be accessed can be determined by receiving an import demand of the server to be accessed, so that offline mirror image compression packets corresponding to the micro services are imported into the server to be accessed, the micro services are accessed as required, and then corresponding firewall ports of the micro services in the server to be accessed are opened; after the firewall port is opened, based on the dependency relationship and the starting relationship among the preset micro services, firstly, a configuration service mirror image package and a basic service mirror image package are started, configuration files of application services in the micro services are configured through hyperlinks, and then the application service mirror image package is started, so that deployment of a micro service system is completed, and arrangement visualization of the micro service system is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a method for visualizing provisioning of a Docker Compose-based microservice system according to an embodiment of the present application;
fig. 2 is a schematic diagram of an internal structure of a micro service system orchestration visualization device based on Docker Compose according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application provides a method, equipment and medium for arranging and visualizing a micro-service system based on Docker Compose, which are used for modifying configuration files corresponding to each micro-service in an offline mirror image compression packet obtained in advance through an IP address of a server to be accessed so as to realize the access of a front end to a back end server according to the modified IP address in the configuration files; the method comprises the steps that a plurality of micro services corresponding to a server to be accessed can be determined by receiving an import demand of the server to be accessed, so that offline mirror image compression packets corresponding to the micro services are imported into the server to be accessed, the micro services are accessed as required, and then corresponding firewall ports of the micro services in the server to be accessed are opened; after the firewall port is opened, based on the dependency relationship and the starting relationship among the preset micro services, firstly, a configuration service mirror image package and a basic service mirror image package are started, configuration files of application services in the micro services are configured through hyperlinks, and then the application service mirror image package is started to complete deployment of the micro service system, so that arrangement visualization of the micro service system is realized. The technical problems that the prior art can only deploy and upgrade the micro-service system by manually executing the command line, has higher command grasping degree requirement on staff and cannot ensure correct command execution sequence are solved.
Fig. 1 is a flow chart of a method for visualizing provisioning of a micro-service system based on Docker Compose according to an embodiment of the present application. As shown in fig. 1, the method for visualizing the arrangement of the micro service system based on Docker Compose according to the embodiment of the present application may mainly include the following steps:
101. And acquiring the offline mirror image compression package which is packaged in advance, and modifying configuration files corresponding to each micro-service in the offline mirror image compression package based on the IP address of the server to be accessed.
The application provides a visual and intelligent micro-service system arranging and deploying tool, which enables a worker to click a button in a visual interface by providing a friendly man-machine interaction interface, thereby realizing operation service corresponding to the button and replacing the prior art for deploying the micro-service system by manually executing a command line. In addition, the application supports the deployment of the micro-service system under the condition that the staff goes offline on site, reduces the technical requirements on development, test and implementation staff, sets the dependency relationship and the starting sequence of the micro-service, and can improve the efficiency of system deployment while ensuring the robustness of system deployment.
The server firstly acquires the offline mirror image compression package which is packaged in advance, and the server also receives the IP address of the server to be accessed, which is input by a worker, through a visual interface, so that the configuration file corresponding to each micro-service in the offline mirror image compression package can be modified according to the IP address of the server to be accessed.
Specifically, when the server acquires the offline image compression packet which is packaged in advance, the server needs to acquire the offline image compression packet from the HARBOR warehouse, determine whether the server to be accessed installs the Docker and Docker Compose running environments, and copy the offline image compression packet to the server to be accessed under the condition that the server to be accessed is determined to have installed the Docker and Docker Compose running environments.
The server determines the IP address of the server to be accessed, determines the micro-service in the offline mirror image compression package and the configuration file corresponding to the micro-service, receives the IP address of the server to be accessed according to the content input by the staff in the visual interface, and modifies the address of the front end request rear end in the configuration file corresponding to the micro-service, thereby realizing the access to the rear end of the server to be accessed.
It should be noted that, in the embodiment of the present application, the server modifies the front-end request back-end address in the configuration file corresponding to the micro-service, for example: the configuration files of the micro services such as the configuration file registry, conf, the configuration file webconfig, json of the front end nginx of the distributed transaction seata are modified, so that the configuration files of the micro services can be prevented from being modified by a worker through a mode of manually inputting a command line.
In one embodiment of the application, after modifying the address of the front end request back end in the configuration file corresponding to the micro service, the server maps the configuration file corresponding to the micro service to the container through the shared data volume in the Docker, thereby realizing automatic modification of the configuration file.
In one embodiment of the application, before acquiring the pre-packaged offline image compression package, the server receives the application program uploaded by the user, submits the acquired application program to the Git database, thereby triggering Jenkins to automatically construct a micro-service image corresponding to the application program, then storing the micro-service image in the HARBOR warehouse, and packaging the micro-service image into the offline image compression package, so that staff can arrange the micro-service system for visual deployment under the offline condition.
102. And receiving the import requirement corresponding to the server to be accessed, and determining a plurality of micro services corresponding to the server to be accessed according to the import requirement.
When the mirror image is imported into the server to be accessed, the server receives the import requirement corresponding to the server to be accessed, which is uploaded by the user, so that a plurality of micro services required by the server to be accessed can be determined according to the import requirement corresponding to the server to be accessed.
103. And importing the offline mirror image compressed package with the import requirement corresponding to the plurality of micro services to the server to be accessed, and opening a firewall port with the import requirement corresponding to the plurality of micro services in the server to be accessed.
The server imports offline mirror image compression packets corresponding to the determined import requirements of the server to be accessed to the server to be accessed, and opens firewall ports corresponding to the import requirements of the server to be accessed to the micro services, so that subsequent operations can be conveniently executed. Therefore, the offline mirror image compression package can be imported according to the requirement, and the offline mirror image compression package is prevented from being imported in a mode of manually inputting and executing command lines in the prior art.
It should be noted that, in the embodiment of the present application, an offline image compression packet, for example, a base data image compression packet base. Tar. Gz, is imported by manually inputting an execution command line, and a command for importing corresponding Linux, which is executed by interface visualization, is gunzip-c/home/install_images/base. Tar. Gz|dock load.
In one embodiment of the application, the server can realize that all offline mirror image compression packages of the corresponding micro services of all servers can be imported by one key under the condition that the specific micro services needed by the server to be accessed cannot be determined, and in the case, the server to be accessed can call the imported corresponding mirror images according to the micro services needed by the server to be accessed.
In one embodiment of the present application, the server can also realize one-key opening of all firewall ports under the condition that the server cannot determine which micro services required by the server to be accessed are specific, and at this time, the server to be accessed can call the opened corresponding firewall ports according to the micro services required by the server to be accessed.
It should be noted that, the implementation of one-key opening of all firewall ports is implemented by executing the Shell script file firewall.
104. And starting the configuration service mirror package and the basic service mirror package based on the dependency relationship among the plurality of micro services and the starting sequence, and determining the application service in the plurality of micro services.
According to the application, the deployment steps of the micro services are set according to the dependency relationship among the predetermined micro services and the starting sequence, so that the technical problem that the micro service system based on the Spring Cloud framework depends on the service to be started first is solved.
Specifically, since the micro service system based on the Spring Cloud framework adopts the open source component Nacos as a configuration center and a registration center of the micro service, and the configuration information needs to be subjected to persistence processing and stored in the MySQL database, the server can determine that Nacos images in the configuration service image package depend on MySQL images based on a predetermined dependency relationship and starting sequence between a plurality of micro services, so that Nacos images and MySQL images are arranged through Docker Compose, mySQL images are firstly started through Docker Compose arrangement, and Nacos images are started after MySQL images are started.
It should be noted that, nacos mirror package nano.tar.gz in the embodiment of the present application includes compressed MySQL mirror and Nacos mirror.
Because the micro-service system based on the Spring Cloud framework needs to run in a Java environment, a Redis service cache is used for logging in some information such as Token and the like which are frequently requested, a server can determine that a Redis image in a basic service image package depends on Java environment env images based on a preset dependency relationship and a starting sequence among a plurality of micro-services, so that the Redis image and the env images are arranged through Docker Compose, the env images corresponding to the Java environment are firstly started through Docker Compose arrangement, the Java environment jre is compressed to 10.110.84.139:5000/base/env:latest images through the images, and the Redis images are mapped to the server through a sharing volume of the Docker when an env container is started and are started after the env images are started.
In one embodiment of the present application, before a server starts a configuration service image package and a basic service image package based on a predetermined dependency relationship and a starting sequence between a plurality of micro services, the server needs to determine a plurality of micro services corresponding to all the servers, determine a plurality of deployment conditions corresponding to the plurality of micro services respectively, determine the dependency relationship between the plurality of micro services according to the determined deployment conditions corresponding to each micro service, and determine the starting sequence corresponding to the plurality of servers according to the dependency relationship between the plurality of micro services.
105. And configuring the configuration file of the application service through the hyperlink, starting the application service mirror package corresponding to the application service according to the configuration file corresponding to the application service so as to complete the deployment of the micro service system and realize the arrangement visualization of the micro service system.
The server logs Nacos on to the service Web browser interface, configures configuration files for application services (wms, les, mes, etc.), such as the dream database connection information Datasource, the cache service connection information Redis, etc., through hyperlinks. And the server starts the application service mirror package corresponding to the application service according to the configuration file corresponding to the application service, thereby completing the deployment of the micro service system and realizing the arrangement visualization deployment of the micro service system.
In one embodiment of the present application, the server can also implement one-key start of all application service image packages under the condition that it is impossible to determine which application services required by the server to be accessed are specific, and at this time, the server to be accessed can call the corresponding application service image package according to the application services required by the server to be accessed.
The above is a method embodiment of the present application. Based on the same inventive concept, the embodiment of the application also provides Docker Compose-based micro-service system orchestration visualization equipment, and the structure of the micro-service system orchestration visualization equipment is shown in fig. 2.
Fig. 2 is a schematic diagram of an internal structure of a micro service system orchestration visualization device based on Docker Compose according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
at least one processor;
and a memory communicatively coupled to the at least one processor;
Wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to:
acquiring an offline mirror image compression packet which is packaged in advance, and modifying configuration files corresponding to each microservice in the offline mirror image compression packet based on the IP address of a server to be accessed;
Receiving an import demand corresponding to a server to be accessed, and determining a plurality of micro services corresponding to the server to be accessed according to the import demand;
the offline mirror image compression package with the import demand corresponding to the plurality of micro-services is imported to the server to be accessed, and firewall ports with the import demand corresponding to the plurality of micro-services in the server to be accessed are opened;
starting a configuration service mirror package and a basic service mirror package based on a preset dependency relationship among a plurality of micro services and a starting sequence, and determining application services in the plurality of micro services;
And configuring the configuration file of the application service through the hyperlink, starting the application service mirror package corresponding to the application service according to the configuration file corresponding to the application service so as to complete the deployment of the micro service system and realize the arrangement visualization of the micro service system.
The embodiment of the application also provides a nonvolatile computer storage medium, which stores computer executable instructions, wherein the computer executable instructions are configured to:
acquiring an offline mirror image compression packet which is packaged in advance, and modifying configuration files corresponding to each microservice in the offline mirror image compression packet based on the IP address of a server to be accessed;
Receiving an import demand corresponding to a server to be accessed, and determining a plurality of micro services corresponding to the server to be accessed according to the import demand;
the offline mirror image compression package with the import demand corresponding to the plurality of micro-services is imported to the server to be accessed, and firewall ports with the import demand corresponding to the plurality of micro-services in the server to be accessed are opened;
starting a configuration service mirror package and a basic service mirror package based on a preset dependency relationship among a plurality of micro services and a starting sequence, and determining application services in the plurality of micro services;
And configuring the configuration file of the application service through the hyperlink, starting the application service mirror package corresponding to the application service according to the configuration file corresponding to the application service so as to complete the deployment of the micro service system and realize the arrangement visualization of the micro service system.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable GATE ARRAY, FPGA)) is an integrated circuit whose logic functions are determined by user programming of the device. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented with "logic compiler (logic compiler)" software, which is similar to the software compiler used in program development and writing, and the original code before being compiled is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but HDL is not just one, but a plurality of 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), and VHDL (Very-High-SPEED INTEGRATED Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application SPECIFIC INTEGRATED Circuits (ASICs), programmable logic controllers, and embedded microcontrollers, 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 may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, 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.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that the present description may be provided as a method, system, or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description embodiments may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is merely one or more embodiments of the present description and is not intended to limit the present description. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present description, is intended to be included within the scope of the claims of the present description.

Claims (10)

1. Docker Compose-based micro-service system orchestration visualization method, characterized in that it comprises:
acquiring an offline mirror image compression packet which is packaged in advance, and modifying configuration files corresponding to each microservice in the offline mirror image compression packet based on an IP address of a server to be accessed;
Receiving an import demand corresponding to the server to be accessed, and determining a plurality of micro services corresponding to the server to be accessed according to the import demand;
importing the offline mirror image compression packet of which the import demand corresponds to a plurality of micro services to the server to be accessed, and opening firewall ports of which the import demand corresponds to a plurality of micro services in the server to be accessed;
Starting a configuration service mirror package and a basic service mirror package based on a preset dependency relationship and a starting sequence among a plurality of micro services, and determining application services in the plurality of micro services;
And configuring the configuration file of the application service through hyperlinks, starting the application service mirror package corresponding to the application service according to the configuration file corresponding to the application service so as to complete the deployment of the micro service system and realize the arrangement visualization of the micro service system.
2. The Docker Compose-based microservice system orchestration visualization method of claim 1, wherein prior to the obtaining the pre-packaged offline mirrored compressed package, the method further comprises:
Receiving an application program uploaded by a user, and submitting the application program to a Git database to trigger Jenkins to automatically construct a micro-service image corresponding to the application program;
and storing the micro-service image into a HARBOR warehouse, and packaging the micro-service image into an offline image compression package.
3. The method for visualizing orchestration of a micro-service system based on Docker Compose of claim 1, wherein said obtaining pre-packaged offline mirrored compressed packages comprises:
acquiring an offline mirror image compression packet from a HARBOR warehouse, and determining whether a server to be accessed is provided with a Docker and Docker Compose running environment;
And copying the offline mirror image compressed package to the server to be accessed under the condition that the server to be accessed is determined to have installed the Docker and Docker Compose running environments.
4. The Docker Compose-based micro-service system orchestration visualization method according to claim 1, wherein before the configuration service image package and the base service image package are started based on a predetermined dependency relationship between a plurality of micro-services and a start-up order, the method further comprises:
determining a plurality of micro services corresponding to all servers, and respectively determining a plurality of deployment conditions corresponding to the plurality of micro services;
And determining the dependency relationship among the plurality of micro services according to the deployment condition corresponding to each micro service, and determining the starting sequence corresponding to the plurality of micro services according to the dependency relationship among the plurality of micro services.
5. The method for visualizing orchestration of micro-service system based on Docker Compose of claim 1, wherein the launching of the configuration service image package and the base service image package based on a predetermined dependency relationship and a startup order between the plurality of micro-services specifically comprises:
Based on the dependency relationship and the starting sequence among the preset micro services, nacos images in the configuration service image package are determined to depend on MySQL images, and the Nacos images and the MySQL images are arranged through Docker Compose;
And starting the MySQL mirror image through Docker Compose arrangement, and starting the Nacos mirror image after the MySQL mirror image is started.
6. The method for visualizing orchestration of micro-service system based on Docker Compose of claim 1, wherein the launching of the configuration service image package and the base service image package based on a predetermined dependency relationship and a startup order between the plurality of micro-services specifically comprises:
Determining that a Redis image in a basic service image package depends on an env image of a Java environment based on a preset dependency relationship among a plurality of micro services and a starting sequence, and arranging the Redis image and the env image through Docker Compose;
and starting the env image through Docker Compose arrangement, and starting the Redis image after the env image is started.
7. The method for visualizing orchestration of micro-service systems based on Docker Compose of claim 1, wherein modifying the configuration file corresponding to each micro-service in the offline mirror-image compression packet based on the IP address of the server to be accessed specifically comprises:
determining an IP address of a server to be accessed, and determining a micro-service in the offline mirror image compression packet and a configuration file corresponding to the micro-service;
and receiving the IP address of the server to be accessed through a visual interface, and modifying the address of the front end request rear end in the configuration file corresponding to the micro service so as to realize the access to the rear end of the server to be accessed.
8. The Docker Compose-based micro service system orchestration visualization method of claim 7, wherein after modifying the address of the front end request backend in the micro service corresponding configuration file, the method further comprises:
And mapping the configuration file corresponding to the micro service into a container through the shared data volume in the Docker so as to realize automatic modification of the configuration file.
9. Docker Compose-based microservice system orchestration visualization device, characterized in that it comprises:
at least one processor;
and a memory communicatively coupled to the at least one processor;
Wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the Docker Compose-based microservice system orchestration visualization method of any one of claims 1-8.
10. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions configured to:
The Docker Compose-based microservice system orchestration visualization method of any one of claims 1-8.
CN202211708279.XA 2022-12-29 2022-12-29 Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium Active CN116016227B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211708279.XA CN116016227B (en) 2022-12-29 2022-12-29 Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211708279.XA CN116016227B (en) 2022-12-29 2022-12-29 Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium

Publications (2)

Publication Number Publication Date
CN116016227A CN116016227A (en) 2023-04-25
CN116016227B true CN116016227B (en) 2024-10-18

Family

ID=86031311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211708279.XA Active CN116016227B (en) 2022-12-29 2022-12-29 Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium

Country Status (1)

Country Link
CN (1) CN116016227B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117270886B (en) * 2023-11-17 2024-02-06 浪潮通用软件有限公司 Micro-service system development and deployment method, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
CN109408064A (en) * 2018-09-10 2019-03-01 杭州安恒信息技术股份有限公司 A kind of visual micro services system automation dispositions method of layout and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10601907B2 (en) * 2017-09-22 2020-03-24 Artiste QB Net Inc. System and method for platform to securely distribute compute workload to web capable devices
CN114721764B (en) * 2020-12-18 2025-01-24 中兴通讯股份有限公司 Business orchestration deployment method, system, network device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
CN109408064A (en) * 2018-09-10 2019-03-01 杭州安恒信息技术股份有限公司 A kind of visual micro services system automation dispositions method of layout and system

Also Published As

Publication number Publication date
CN116016227A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN110263546B (en) Method, device and equipment for carrying out security check on container mirror image
CN114125028B (en) Method, apparatus, device, storage medium and program product for operating micro-application
WO2022016848A1 (en) Method and apparatus for performing application deployment according to service role
CN108549562A (en) A kind of method and device of image load
CN113885849B (en) Application development method and device based on industrial internet platform and terminal equipment
CN111338655B (en) Installation package distribution method and system
CN111651169B (en) Block chain intelligent contract operation method and system based on web container
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN116016227B (en) Docker Compose-based micro-service system arrangement visualization method, docker Compose-based micro-service system arrangement visualization equipment and medium
CN110515850A (en) A kind of applied program testing method, mobile terminal and storage medium
CN114489927A (en) A container deployment method and system for decoupling dependent files
CN117762809A (en) Automatic test method, device and equipment
CN112181644B (en) Method, system and device for cross-domain machine learning component Jupitter
CN110427237B (en) Method and device for cross-application access to target page and electronic equipment
US7080387B2 (en) System and method for mediating communication between software applications
CN116382713A (en) Method, system, device and storage medium for constructing application mirror image
CN108345536A (en) A kind of dispositions method, device and the equipment of continuous integrating environment
CN114245890A (en) Method and apparatus for providing function as a service platform
CN117369777A (en) Multi-terminal application development system and method
CN110874322B (en) Test method and test server for application program
CN115840617B (en) Debugging method, system and related device
CN117785225A (en) Application publishing system and method based on Git warehouse
CN114579216B (en) A method, device and equipment for using mini program capabilities
CN114924754B (en) Cloud platform-based automatic deployment method for application stack and related equipment
CN115391185A (en) Applet pressure testing method, device and equipment

Legal Events

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