Distributed cluster management method and device, storage medium and electronic equipment

By introducing management nodes and agent processes in the distributed cluster and dynamically obtaining dependent files, the problems of frequent image modification and maintenance difficulties are solved, management efficiency is improved and maintenance costs are reduced.

CN114880276BActive Publication Date: 2025-10-21JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210325426.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-10-21
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

In the existing technology, there are problems such as frequent image modification and difficulty in maintenance when node dependencies change in distributed clusters.

Method used

Management nodes and agent processes are introduced. When the cluster starts, the working nodes query the management node for dependency files through the agent process and dynamically obtain dependency files when the cluster starts, avoiding writing dependencies into the image in advance.

Benefits of technology

It simplifies the image content, reduces the frequency of image changes, improves cluster management efficiency, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114880276B_ABST
    Figure CN114880276B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computers, in particular to a distributed cluster management method, a distributed cluster management device, a storage medium and an electronic device. The distributed cluster management method comprises: when it is monitored that a cluster is started, a worker node in the cluster executes an agent process to send a dependency file query request to a management node, the dependency file query request being used to request the management node to query a dependency file of the worker node; and receiving a dependency file returned by the management node to execute a business process based on the dependency file. The distributed cluster management method provided by the present disclosure can avoid problems such as frequent modification of images and maintenance difficulties when node dependencies change in a distributed cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a distributed cluster management method, a distributed cluster management device, a storage medium, and an electronic device. Background Art

[0002] A cluster is a group of independent computers connected through a high-speed network. They form a group and are managed as a single system. There are resource dependencies between multiple business units in the cluster environment.

[0003] In existing technology, it's necessary to build an image for each node type, place the corresponding dependencies in a directory within the image, and specify a startup command. Because different node types rely on different information, any modification to code, configuration files, or scripts requires building a new version of the image. This requires building and maintaining a large number of images, and frequent node image upgrades.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention

[0005] The present disclosure aims to provide a distributed cluster management method, a distributed cluster management device, a storage medium, and an electronic device, aiming to solve the problem of frequent image modification and maintenance difficulties when node dependencies change in a distributed cluster.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0007] According to one aspect of an embodiment of the present disclosure, a distributed cluster management method is provided, which is applied to a working node, including: when the cluster startup is monitored, the working node in the cluster executes an agent process to send a dependency file query request to the management node, and the dependency file query request is used to request the management node to query the dependency file of the working node; receiving the dependency file returned by the management node to execute a business process based on the dependency file.

[0008] According to some embodiments of the present disclosure, based on the aforementioned solution, after receiving the dependent file returned by the management node, the method further includes: performing an integrity check on the dependent file.

[0009] According to some embodiments of the present disclosure, based on the aforementioned solution, the method further includes: in response to receiving a service restart instruction, the agent process restarts the service process.

[0010] According to some embodiments of the present disclosure, based on the aforementioned solution, the method further includes: in response to receiving a dependency change instruction, the agent process changes the dependency file of the working node.

[0011] According to the second aspect of an embodiment of the present disclosure, a distributed cluster management method is provided, which is applied to a management node, including: receiving a dependency file query request sent by a working node in the cluster; querying the dependency file of the working node, and returning the dependency file to the working node, so that the working node executes a business process based on the dependency file.

[0012] According to some embodiments of the present disclosure, based on the aforementioned scheme, the querying of the dependent files of the working node includes: obtaining the node information of the working node from a shared database through query; downloading the dependent files of the working node from an object database based on the node information; wherein the dependent files include one or more of an operating environment, an executable file, a configuration file, and a startup script.

[0013] According to some embodiments of the present disclosure, based on the aforementioned solution, after querying the dependent files of the working node, the method further includes: compressing and integrating the dependent files.

[0014] According to the third aspect of an embodiment of the present disclosure, a distributed cluster management device is provided, including: a request module, which is used to, when monitoring the cluster startup, enable the working nodes in the cluster to execute an agent process to send a dependency file query request to the management node, and the dependency file query request is used to request the management node to query the dependency files of the working nodes; an execution module, which is used to receive the dependency files returned by the management node to execute a business process based on the dependency files.

[0015] According to the fourth aspect of an embodiment of the present disclosure, a distributed cluster management device is provided, comprising a receiving module for receiving a dependency file query request sent by a working node in a cluster; and a query module for querying the dependency file of the working node and returning the dependency file to the working node so that the working node executes a business process based on the dependency file.

[0016] According to a fifth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the distributed cluster management method in the above embodiments is implemented.

[0017] According to the sixth aspect of the embodiments of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the distributed cluster management method as in the above-mentioned embodiment.

[0018] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:

[0019] In the technical solutions provided by some embodiments of the present disclosure, a management node is introduced into a multi-role distributed cluster, and an agent process that can communicate with the management node is deployed for each working node, so that when the cluster starts, the working node can send a dependency file query request to the management node by executing the agent process, and the management node queries the dependency file and then returns it to the working node. The present disclosure provides a new distributed cluster management method. On the one hand, the granularity of version control is refined to files instead of images, so that the storage of dependencies is separated from the image; on the other hand, it is dynamically obtained when the cluster starts, avoiding the need to write all dependencies in the image in advance; on the other hand, the working node itself does not need the dependent image, but only contains the basic image of the agent process, which simplifies the image content. In summary, this distributed cluster management method can reduce the frequent changes of images when the node dependencies in the distributed cluster change in many aspects, thereby improving the management efficiency of the cluster and reducing maintenance costs.

[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0022] Figure 1 A distributed cluster management method in the prior art is schematically illustrated;

[0023] Figure 2 A schematic diagram schematically illustrates a flow chart of a distributed cluster management method in an exemplary embodiment of the present disclosure;

[0024] Figure 3 A schematic diagram illustrating the structure of a distributed cluster management system in an exemplary embodiment of the present disclosure is shown;

[0025] Figure 4A flowchart schematically illustrates a distributed cluster management method in an exemplary embodiment of the present disclosure;

[0026] Figure 5 A data interaction diagram of distributed cluster management in an exemplary embodiment of the present disclosure is schematically shown;

[0027] Figure 6 A schematic diagram schematically illustrates the composition of a distributed cluster management device in an exemplary embodiment of the present disclosure;

[0028] Figure 7 A schematic diagram schematically illustrates the composition of a distributed cluster management device in an exemplary embodiment of the present disclosure;

[0029] Figure 8 A schematic diagram schematically illustrates a computer-readable storage medium in an exemplary embodiment of the present disclosure;

[0030] Figure 9 The following schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.

[0032] In addition, the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present disclosure.

[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0034] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0035] In the prior art, before starting a distributed cluster composed of multiple types of nodes, it is necessary to build an image for each type of node, place the corresponding dependencies in a directory within the image, and specify a startup command.

[0036] Figure 1 A distributed cluster management method in the prior art is schematically shown. Figure 1 As shown, a distributed cluster 100 containing four nodes is shown in a normal containerized deployment, including type A node 101 1 and node 2 101 , type B node 3 103 and type C node 4 104 . The node container of each node contains one or more processes responsible for related business functions, such as p1 and p2. All dependencies of each type of node are packaged into their respective images, and containerized initialization is performed when the node is started.

[0037] However, different types of nodes rely on different information, and the same type of node itself has many versions of dependencies. Any modification means that a new version of the image needs to be built. Figure 1 This type of dependency management method requires building and maintaining a large number of images and frequently upgrading node images.

[0038] In response to the shortcomings of the existing technology, the present disclosure provides a distributed cluster management method, which adds an agent process on each node and a management node in the cluster, and then actively requests corresponding dependencies from the management node through the agent to reduce the frequent updates of images when node dependencies in the distributed cluster change.

[0039] The implementation details of the technical solution of the embodiment of the present disclosure are described in detail below.

[0040] Figure 2 The following schematically illustrates a flow chart of a distributed cluster management method in an exemplary embodiment of the present disclosure. Figure 2 As shown, the distributed cluster management method includes steps S201 and S202:

[0041] Step S201: When a cluster is detected to be started, a working node in the cluster executes an agent process to send a dependent file query request to a management node, wherein the dependent file query request is used to request the management node to query the dependent files of the working node;

[0042] Step S202: receiving the dependency file returned by the management node, and executing the business process based on the dependency file.

[0043] In the technical solutions provided by some embodiments of the present disclosure, a management node is introduced into a multi-role distributed cluster, and an agent process that can communicate with the management node is deployed for each working node, so that when the cluster starts, the working node can send a dependency file query request to the management node by executing the agent process, and the management node queries the dependency file and then returns it to the working node. The present disclosure provides a new distributed cluster management method. On the one hand, the granularity of version control is refined to files instead of images, so that the storage of dependencies is separated from the image; on the other hand, it is dynamically obtained when the cluster starts, avoiding the need to write all dependencies in the image in advance; on the other hand, the working node itself does not need the dependent image, but only contains the basic image of the agent process, which simplifies the image content. In summary, this distributed cluster management method can reduce the frequent changes of images when the node dependencies in the distributed cluster change in many aspects, thereby improving the management efficiency of the cluster and reducing maintenance costs.

[0044] The following describes in more detail the steps of the distributed cluster management method in this exemplary implementation with reference to the accompanying drawings and embodiments.

[0045] It should be noted that the distributed cluster management method provided by the present disclosure requires initial deployment when the cluster is started for the first time.

[0046] Figure 3 The following schematically illustrates a structural diagram of a distributed cluster management system in an exemplary embodiment of the present disclosure, which is used to execute the distributed cluster management method provided by the present disclosure. Figure 3 As shown, the distributed cluster 300 also includes four working nodes 301 to 304; each working node has at least two processes: a business process and an agent process; and a management node 305 (manager) is added to the cluster, which can interact with a shared database 306 and an object database 307 outside the cluster.

[0047] When the cluster is first started, the management node is deployed using the manager image, and all other worker nodes are deployed using the node image. After a node deployed using the node image is started, the node container of the node only contains the agent process, without the pre-written image file.

[0048] Figure 2 The execution entities of step S201 and step S202 shown in FIG are both working nodes in the cluster.

[0049] In step S201, when the cluster startup is detected, the working node in the cluster executes the agent process to send a dependent file query request to the management node, wherein the dependent file query request is used to request the management node to query the dependent files of the working node.

[0050] Specifically, when the cluster is started, the agent process of the working node in the cluster immediately sends a dependency file query request to the management node manager, that is, initiates the ' / how / to / bootstrap / myself' command to ask how to start the business process of this working node.

[0051] After receiving a dependency file query request, the management node will query the dependency file corresponding to the worker node and then return the dependency file to the worker node. The dependency file refers to the information that the worker node relies on to complete its business function.

[0052] In step S202, the dependent file returned by the management node is received to execute the business process based on the dependent file.

[0053] Specifically, after receiving the dependency file returned by the management node manager, the working node executes the startup script according to the dependency file, such as the bootstrap script, to initialize the business process p1 or p2 or even more processes to complete its own business functions.

[0054] In one embodiment of the present disclosure, after receiving the dependent file returned by the management node, the method further includes: performing an integrity check on the dependent file.

[0055] The dependency file refers to the information that the working node relies on when completing business functions, and can generally include one or more of the operating environment, executable files, configuration files, and startup scripts.

[0056] After receiving the dependency file returned by the manager, the worker node can perform an integrity check on the dependency file. If the integrity check passes, the startup script is executed according to the dependency file to complete the business process of the worker node.

[0057] Generally, the management node can compress and package the dependency information and then send it back, so the working node needs to decompress the returned dependency information and perform an integrity check to obtain the required dependency information.

[0058] It should be noted that the agent process exists throughout the life cycle of the working node and can be used to manage business processes and thus implement other management of dependent files.

[0059] In one embodiment of the present disclosure, the method further includes: in response to receiving a service restart instruction, the agent process restarts the service process. In other words, the agent process can receive external commands to control the restart of the service process.

[0060] In one embodiment of the present disclosure, the method further includes: in response to receiving a dependency change instruction, the agent process changes the dependency file of the working node, that is, the dependency file of the business process can be modified by the agent process.

[0061] Based on the above method, this dependency management model refines version control granularity to files rather than images. All dependencies are not hard-coded in the image, but are dynamically obtained when the cluster starts. The image of the working node itself becomes a simple basic image containing only the agent, avoiding frequent updates of image versions. In terms of dependency upgrades, the agent process can dynamically modify the dependency files in the container and restart a process in the container without having to build a new image for the new dependency and rebuild the entire container.

[0062] Figure 4 The following schematically shows a flow chart of a distributed cluster management method in an exemplary embodiment of the present disclosure. Figure 4 As shown, the distributed cluster management method includes steps S401 and S402:

[0063] Step S401: receiving a dependent file query request sent by a working node in the cluster;

[0064] Step S402 : querying the dependent files of the working node, and returning the dependent files to the working node, so that the working node executes the business process based on the dependent files.

[0065] Figure 4 The execution subjects of step S401 and step S402 shown in FIG are both management nodes in the cluster.

[0066] In step S401, a dependent file query request sent by a working node in the cluster is received.

[0067] Specifically, each worker node deploys an agent that can communicate with the manager node, and dependency management for all worker nodes is integrated into the manager node. Therefore, the manager node can receive dependency file query requests sent by nodes in the cluster, namely the ' / how / to / bootstrap / myself' command.

[0068] In step S402, the dependent files of the working node are queried, and the dependent files are returned to the working node, so that the working node executes the business process based on the dependent files.

[0069] Furthermore, the querying of the dependent files of the working node includes: querying and obtaining node information of the working node from a shared database; and downloading the dependent files of the working node from an object database based on the node information.

[0070] First, after receiving the dependent file query request, the management node manager will query the node information of the working node in the shared database.

[0071] The shared database can be the etcd database. etcd is commonly used for service discovery, which addresses one of the most common problems in distributed systems: how processes or services in the same distributed cluster can find each other and establish connections. The etcd database is a highly available distributed key-value database. It uses the Raft protocol as its consensus algorithm and is implemented in the Go language.

[0072] Then, the corresponding dependent files are downloaded from the object database according to the node information of the working node.

[0073] The object database can be object storage, or Object Storage Service (OSS). OSS provides massive, secure, low-cost, and highly reliable cloud storage services that can store and access any type of data in any application, at any time, and anywhere.

[0074] Therefore, you can download the required version of the operating environment, executable files, configuration files, startup scripts, and other information of the working node from Object Storage as dependency files.

[0075] In one embodiment of the present disclosure, after querying the dependent files of the working node, the method further includes: compressing and integrating the dependent files, that is, integrating the information downloaded from the object database, compressing and packaging it, and then sending it back to the working node.

[0076] Based on the above method, the above dependency management mode introduces a management node (manager) in a multi-role distributed cluster and deploys a client (agent) that can communicate with the management node for each working node, thereby consolidating dependency management to the management node. The working nodes in the cluster actively apply for the required dependencies to the management node through the agent. The management node obtains the required dependencies from third-party storage or independent services based on the information provided by the client and returns them to the agent node, separating the storage of dependencies from the image and cluster, further avoiding frequent modifications of the image.

[0077] Figure 5 A data interaction diagram of distributed cluster management in an exemplary embodiment of the present disclosure is schematically shown. Figure 5 As shown, the distributed cluster management method includes the following steps:

[0078] Step S501: The working node uses the agent to call the / how / to / bootstrap / myself interface to generate a dependency file query request and sends the dependency file query request to the management node manager;

[0079] Step S502: The management node manager sends a node information query request to the etcd database;

[0080] Step S503: The etcd database responds to the node information query request and queries the node information corresponding to the node;

[0081] Step S504, the etcd database returns the node information to the management node manager;

[0082] Step S505: The management node manager sends a dependent file query request to the object storage;

[0083] Step S506: Object storage determines the dependent file corresponding to the node in response to the dependent file query request;

[0084] Step S507: The management node manager downloads the dependent files from the object storage.

[0085] Step S508: The management node manager prepares the dependent files and compresses and packages them into a tarball.

[0086] Step S509: The management node manager returns the packaged dependency files to the node that sent the request;

[0087] Step S510: The node receives the dependent file, decompresses it, and performs an integrity check on its availability.

[0088] In step S511, the node calls the bootstap script to start the relevant process.

[0089] Figure 6 The following schematically shows a composition diagram of a distributed cluster management device in an exemplary embodiment of the present disclosure. Figure 6 As shown, the distributed cluster management device 600 may include a request module 601 and an execution module 602.

[0090] Request module 601, configured to, upon detecting cluster startup, cause a working node in the cluster to execute an agent process to send a dependency file query request to a management node, wherein the dependency file query request is configured to request the management node to query the dependent files of the working node;

[0091] The execution module 602 is configured to receive the dependency file returned by the management node, and execute the service process based on the dependency file.

[0092] According to an exemplary embodiment of the present disclosure, the distributed cluster management apparatus 600 may further include a checking module configured to perform an integrity check on the dependent file after receiving the dependent file returned by the management node.

[0093] According to an exemplary embodiment of the present disclosure, the distributed cluster management apparatus 600 may further include a restart module, configured to cause the agent process to restart the service process in response to receiving a service restart instruction.

[0094] According to an exemplary embodiment of the present disclosure, the distributed cluster management apparatus 600 may further include a change module, configured to cause the agent process to change the dependency file of the working node in response to receiving a dependency change instruction.

[0095] The specific details of each module in the above-mentioned distributed cluster management device 600 have been described in detail in the corresponding distributed cluster management method, and therefore will not be repeated here.

[0096] Figure 7 The following schematically shows a composition diagram of a distributed cluster management device in an exemplary embodiment of the present disclosure. Figure 7 As shown, the distributed cluster management device 700 may include a receiving module 701 and a query module 702.

[0097] Receiving module 701, used to receive a dependent file query request sent by a working node in the cluster;

[0098] The query module 702 is configured to query the dependent files of the working node and return the dependent files to the working node, so that the working node executes the service process based on the dependent files.

[0099] According to an exemplary embodiment of the present disclosure, the query module 702 is used to query and obtain the node information of the working node from a shared database; and download the dependent files of the working node from an object database based on the node information; wherein the dependent files include one or more of an operating environment, an executable file, a configuration file, and a startup script.

[0100] According to an exemplary embodiment of the present disclosure, the distributed cluster management apparatus 700 may further include a compression module, configured to compress and integrate the dependent files after querying the dependent files of the working nodes.

[0101] The specific details of each module in the above-mentioned distributed cluster management device 700 have been described in detail in the corresponding distributed cluster management method, and therefore will not be repeated here.

[0102] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0103] In an exemplary embodiment of the present disclosure, a storage medium capable of implementing the above method is also provided. Figure 8 A schematic diagram schematically illustrates a computer-readable storage medium in an exemplary embodiment of the present disclosure, as shown in FIG. Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present disclosure is described. The program product 800 may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0104] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. Figure 9 The following schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the present disclosure.

[0105] It should be noted that Figure 9The computer system 900 of the electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0106] like Figure 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903. Various programs and data required for system operation are also stored in the RAM 903. The CPU 901, ROM 902 and RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0107] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output section 907 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. Removable media 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, are installed in the drive 910 as needed, so that computer programs read therefrom can be installed into the storage section 908 as needed.

[0108] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, various functions defined in the system of the present disclosure are executed.

[0109] It should be noted that the computer-readable medium shown in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, and the units described may also be provided in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0112] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device implements the methods described in the above embodiments.

[0113] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0114] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0115] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein.

[0116] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A distributed cluster management method, characterized in that: Applied to a working node, the method includes: When monitoring the first startup of the cluster, deploy the worker node using the worker node image so that the node container of the worker node includes the agent process, and deploy the management node using the management node manager image; When the cluster is detected to be started, the working node in the cluster executes the agent process to send a dependent file query request to the management node, wherein the dependent file query request is used to request the management node to query the dependent files of the working node; Receive the dependency file returned by the management node to execute the business process based on the dependency file; wherein, the dependency file is the information that the working node node relies on when completing the business function, including one or more of the operating environment, executable file, configuration file and startup script.

2. The distributed cluster management method according to claim 1, wherein: After receiving the dependency file returned by the management node, the method further includes: Perform an integrity check on the dependent file.

3. The distributed cluster management method according to claim 1, wherein: The method further comprises: In response to receiving the service restart instruction, the agent process restarts the service process.

4. The distributed cluster management method according to claim 1, wherein: The method further comprises: In response to receiving the dependency change instruction, the agent process changes the dependency file of the working node.

5. A distributed cluster management method, characterized in that: Applied to a management node, the method includes: When monitoring the first startup of the cluster, deploy the worker node using the worker node image so that the node container of the worker node includes the agent process, and deploy the management node using the management node manager image; Receive dependency file query requests sent by working nodes in the cluster; Query the dependent files of the working node and return the dependent files to the working node so that the working node executes the business process based on the dependent files; wherein the dependent files are the information that the working node node relies on when completing the business function, including one or more of the operating environment, executable files, configuration files and startup scripts.

6. The distributed cluster management method according to claim 5, characterized in that: The querying of the dependent files of the working node includes: Obtaining node information of the working node from a shared database; Download the dependent files of the working node from the object database based on the node information; wherein the dependent files include one or more of a running environment, an executable file, a configuration file, and a startup script.

7. The distributed cluster management method according to claim 5, characterized in that: After querying the dependent files of the working node, the method further includes: The dependent files are compressed and integrated.

8. A distributed cluster management device, characterized in that: Applied to working nodes, including: The request module is configured to deploy the working node using the working node image when the cluster is detected to be started for the first time, so that the node container of the working node includes the agent process, and deploy the management node using the management node image; when the cluster is detected to be started, the working node in the cluster executes the agent process to send a dependency file query request to the management node, wherein the dependency file query request is used to request the management node to query the dependency files of the working node; An execution module is used to receive the dependency file returned by the management node to execute the business process based on the dependency file; wherein the dependency file is the information that the working node node relies on when completing the business function, including one or more of the operating environment, executable file, configuration file and startup script.

9. A distributed cluster management device, characterized in that: Applicable to management nodes, including: The receiving module is used to deploy the working node using the working node image when monitoring the first startup of the cluster, so that the node container of the working node includes the agent process, and deploy the management node using the management node image; receive the dependency file query request sent by the working node in the cluster; A query module is used to query the dependent files of the working node and return the dependent files to the working node so that the working node executes the business process based on the dependent files; wherein the dependent files are the information that the working node node relies on when completing the business function, including one or more of the operating environment, executable files, configuration files and startup scripts.

10. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the distributed cluster management method according to any one of claims 1 to 7 is implemented.

11. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the distributed cluster management method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cluster deployment method and device, terminal equipment and storage medium

    CN111782232A