CN110392080A - A kind of dispositions method based on distributed system, device and distributed system - Google Patents

A kind of dispositions method based on distributed system, device and distributed system Download PDF

Info

Publication number
CN110392080A
CN110392080A CN201810360212.9A CN201810360212A CN110392080A CN 110392080 A CN110392080 A CN 110392080A CN 201810360212 A CN201810360212 A CN 201810360212A CN 110392080 A CN110392080 A CN 110392080A
Authority
CN
China
Prior art keywords
management node
node
deployment file
file
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810360212.9A
Other languages
Chinese (zh)
Other versions
CN110392080B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201810360212.9A priority Critical patent/CN110392080B/en
Publication of CN110392080A publication Critical patent/CN110392080A/en
Application granted granted Critical
Publication of CN110392080B publication Critical patent/CN110392080B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a kind of dispositions method based on distributed system, device and distributed systems, in the present solution, carrying out the deployment operation of distributed system by the first management node: the first management node obtains management node deployment file and memory node deployment file from server;First management node installs management node deployment file to behind, restarts to itself;By restarting self-starting service, after detecting itself restarting, memory node deployment file is sent to the memory node in distributed system by the first management node, and controls memory node installation memory node deployment file;As it can be seen that compared to manual operation, reducing error rate in the present solution, realize the automatic deployment of distributed system.

Description

A kind of dispositions method based on distributed system, device and distributed system
Technical field
The present invention relates to distributed technical fields, more particularly to a kind of dispositions method based on distributed system, device And distributed system.
Background technique
Including multiple devices in distributed system, which cooperates, and common externally offer data store or it His business function.Distributed system is there are many type, such as cloud storage system, and server, pipe are generally comprised in cloud storage system Manage the equipment such as node, memory node.
Deployment based on cloud storage system is generally realized by manual operation: deployment file is obtained from server, the portion It affixes one's name in file comprising management node deployment file, memory node deployment file etc.;Management node deployment file is copied to management In node, and the file of copy is installed in management node, restarts management node after installation;It will storage Node deployment file copy installs the file of copy into memory node, and in memory node, and deployment is completed.
Above-mentioned deployment scheme is realized that step is more by manual operation, and error rate is higher.
Summary of the invention
The embodiment of the present invention be designed to provide a kind of dispositions method based on distributed system, device, equipment and point Cloth system, to reduce the error rate during deployment.
In order to achieve the above objectives, the embodiment of the invention provides a kind of dispositions method based on distributed system, it is applied to First management node of distributed system, which comprises
According to the address for the server for including in the configuration file obtained in advance, management node deployment is obtained from server File and memory node deployment file;
The management node deployment file is installed to first management node;
First management node is restarted;
By restarting self-starting service, after detecting the first management node restarting, by the memory node portion Administration's file is sent to the memory node in the distributed system;
The memory node in the distributed system is controlled after getting the memory node deployment file, described in installation Memory node deployment file.
Optionally, the address for the server for including in the configuration file that the basis obtains in advance, obtains from server Management node deployment file and memory node deployment file, comprising:
In the configuration file obtained in advance, reads and be stored with management node deployment file and memory node deployment file The address of server, the identity information and deployment file version information for accessing the server;
The address of the server is accessed, and utilizes the identity information, obtains the corresponding management section of the version information Point deployment file and memory node deployment file.
Optionally, it installs by the management node deployment file to first management node, can also include:
The management node deployment file is sent in the distributed system in addition to first management node In management node;
The management node in the distributed system is controlled after getting the management node deployment file, described in installation Management node deployment file and the restarting for carrying out management node.
Optionally, described that the management node deployment file is sent in the distributed system except first management In management node except node, comprising:
Safety shell protocol is called, instruction is transmitted using the file in the safety shell protocol, by the management node Deployment file is sent to the management node in the distributed system in addition to first management node.
It is optionally, described to install the management node deployment file to first management node, comprising:
Unload the former deployment file installed in first management node;
After the completion of detecting unloading, first management node is restarted;
By restarting self-starting service, after detecting the first management node restarting, called by python Shell-command installs the management node deployment file to first management node.
Optionally, described that the memory node deployment file is sent to the memory node in the distributed system, packet It includes:
The web program in the memory node in https agreement, with the distributed system is called to establish connection;
The https agreement is called, by the web program, the memory node deployment file is sent to described point Memory node in cloth system;
The memory node in the distributed system is being controlled after getting the memory node deployment file, institute is installed After stating memory node deployment file, further includes:
By the web program, configuration operation is carried out to the memory node in the distributed system.
Optionally, after controlling the memory node in the distributed system and the memory node deployment file is installed, Can also include:
According to the configuration information in the configuration file, in the distributed system between management node and memory node Administrative relationships configured.
Optionally, the memory node deployment file is being got in the memory node controlled in the distributed system Afterwards, after the memory node deployment file is installed, can also include:
It controls the management node in the distributed system and deletes the management node deployment file stored in management node;
It controls the memory node in the distributed system and deletes the memory node deployment file stored in management node.
In order to achieve the above objectives, the embodiment of the invention also provides a kind of the deployment device based on distributed system, application In the first management node of distributed system, described device includes:
Module is obtained, for the address according to the server for including in the configuration file obtained in advance, is obtained from server Take management node deployment file and memory node deployment file;
Module is installed, for installing the management node deployment file to first management node;
Module is restarted, for restarting to first management node;
First sending module, after by restarting self-starting service, detecting the first management node restarting, The memory node memory node deployment file being sent in the distributed system;
First control module is getting the memory node portion for controlling the memory node in the distributed system After affixing one's name to file, the memory node deployment file is installed.
Optionally, the acquisition module, specifically can be used for:
In the configuration file obtained in advance, reads and be stored with management node deployment file and memory node deployment file The address of server, the identity information and deployment file version information for accessing the server;
The address of the server is accessed, and utilizes the identity information, obtains the corresponding management section of the version information Point deployment file and memory node deployment file.
Optionally, described device can also include:
Second sending module, for the management node deployment file to be sent in the distributed system except described the In management node except one management node;
Second control module is getting the management node portion for controlling the management node in the distributed system After affixing one's name to file, the management node deployment file is installed and carries out the restarting of management node.
Optionally, second sending module, specifically can be used for:
Safety shell protocol is called, instruction is transmitted using the file in the safety shell protocol, by the management node Deployment file is sent to the management node in the distributed system in addition to first management node.
Optionally, the installation module, specifically can be used for:
Unload the former deployment file installed in first management node;
After the completion of detecting unloading, first management node is restarted;
By restarting self-starting service, after detecting the first management node restarting, called by python Shell-command installs the management node deployment file to first management node.
Optionally, first sending module, specifically can be used for:
The web program in the memory node in https agreement, with the distributed system is called to establish connection;
The https agreement is called, by the web program, the memory node deployment file is sent to described point Memory node in cloth system;
Described device further include:
First configuration module, for being configured to the memory node in the distributed system by the web program Operation.
Optionally, described device can also include:
Second configuration module, for controlling the installation of the memory node in the distributed system in first control module After the memory node deployment file, according to the configuration information in the configuration file, to being managed in the distributed system Administrative relationships between node and memory node are configured.
Optionally, described device can also include:
Third control module deletes the pipe stored in management node for controlling the management node in the distributed system Manage node deployment file;It controls the memory node in the distributed system and deletes the memory node deployment stored in management node File.
In order to achieve the above objectives, the embodiment of the invention also provides a kind of electronic equipment, including processor and memory;
Memory, for storing computer program;
Processor, when for executing the program stored on memory, any of the above-described kind of realization is based on distributed system Dispositions method.
In order to achieve the above objectives, the embodiment of the invention also provides be stored with calculating in the computer readable storage medium Machine program, the computer program realize any of the above-described kind of dispositions method based on distributed system when being executed by processor.
In order to achieve the above objectives, the embodiment of the invention also provides a kind of distributed systems, comprising: the first management node, Server and memory node, wherein
First management node, for the address according to the server for including in the configuration file obtained in advance, from clothes It is engaged in obtaining management node deployment file and memory node deployment file in device;The management node deployment file is installed to described First management node;First management node is restarted;By restarting self-starting service, described first is detected After management node restarting, the memory node that the memory node deployment file is sent in the distributed system;Control The memory node in the distributed system is made after getting the memory node deployment file, the memory node portion is installed Affix one's name to file;
The server, for providing management node deployment file and memory node deployment text to first management node Part;
The memory node, for obtaining the memory node deployment file, and in the control of first management node Under, the memory node deployment file is installed.
It optionally, further include one or more management node in addition to first management node in the system, wherein
First management node is also used to for the management node deployment file being sent in the distributed system and remove In management node except first management node;The management node controlled in the distributed system is getting the pipe After managing node deployment file, the management node deployment file is installed and carries out the restarting of management node;
One or more described management node, for obtaining the management node deployment file, and in first management Under the control of node, the management node deployment file is installed and is restarted.
Using the embodiment of the present invention, the deployment operation of distributed system: the first management node is carried out by the first management node Management node deployment file and memory node deployment file are obtained from server;Management node is disposed text by the first management node Part is installed to behind, is restarted to itself;By restarting self-starting service, after detecting itself restarting, the Memory node deployment file is sent to the memory node in distributed system by one management node, and is controlled memory node installation and deposited Store up node deployment file;As it can be seen that compared to manual operation, reducing in the present solution, realize the automatic deployment of distributed system Error rate.
Certainly, implement any of the products of the present invention or method it is not absolutely required at the same reach all the above excellent Point.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the first flow diagram of the dispositions method provided in an embodiment of the present invention based on distributed system;
Fig. 2 is second of flow diagram of the dispositions method provided in an embodiment of the present invention based on distributed system;
Fig. 3 is a kind of application scenarios schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of deployment device based on distributed system provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of distributed system provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In order to solve the above-mentioned technical problem, the embodiment of the invention provides a kind of dispositions method based on distributed system, Device, equipment and distributed system.This method and device can be applied to any management node in distributed system, for side Just describe, the management node of application this method or device be known as the first management node, the first management node can have one or Person more.
A kind of dispositions method based on distributed system provided in an embodiment of the present invention is described in detail first below.
Fig. 1 is the first flow diagram of the dispositions method provided in an embodiment of the present invention based on distributed system, packet It includes:
S101: according to the configuration file obtained in advance include in server address, from server obtain management section Point deployment file and memory node deployment file.
Deployment program can be set in first management node, the embodiment of the present invention is executed by deployment program.Deployment program can Think a software, a tool etc., specifically without limitation.Deployment program first can be added to restarting for the first management node In self-starting service, in this way, after the restarting of the first management node, meeting automatic running deployment program continues to execute deployment Operation.
For example, if the operating system in the first management node is centOS7, deployment program can be added to In systemd service, if the operating system in the first management node is suse, deployment program can be added to to/etc/ In init.d/boot/.local script.
For example, configuration file can be previously stored in the first management node, for example the first management node can be from Configuration file is obtained in user equipment, and the first configuration file is stored.
As an implementation, S101 may include: in the configuration file obtained in advance, and reading is stored with management section The address of the server of point deployment file and memory node deployment file, the identity information of the access server and deployment text Part version information;The address of the server is accessed, and utilizes the identity information, obtains the corresponding management of the version information Node deployment file and memory node deployment file.
In the present embodiment, server refers to the service for being stored with management node deployment file and memory node deployment file Device;Server (or can be FTP for the server based on FTP (File Transfer Protocol, File Transfer Protocol) Server);Or server may be to provide svn (Subversion, software project version control management system) to service Server (or be svn server), etc., the type of server is specifically without limitation.
For example, the IP address of server, configuration text be may include in the configuration file stored in the first management node It also include the user name needed when accessing file in the identity information of the server, such as access server, encrypted message in part Deng;It can also include the version information etc. of equal deployment files in configuration file;It can lead between first management node and server It crosses Telnet agreement to be communicated, in this way, can also include the use under Telnet protocol port, Telnet agreement in configuration file Name in an account book, password etc..
The IP address of the first management node (deployment program in the first management node in other words) accessible server, and By accessing the identity information of server, the deployment file of the respective version stored in download server.It is wrapped in the deployment file Deployment file containing management node and memory node deployment file.
For example, after the IP address for including in reading configuration file, it can use a kind of python (object-oriented Explanation type computer programming language) ftplib module in public library access the IP address, that is, access the IP The corresponding server in address.
S102: the management node deployment file is installed to the first management node.
As an implementation, the former deployment file installed in the first management node can first be unloaded;Detect unloading After the completion, first management node is restarted;By restarting self-starting service, the first management section is detected After point restarting, shell-command is called by python, the management node deployment file is installed to first management Node.
It is appreciated that if being equipped with deployment file in the first management node, first by mounted deployment file into After row unloading, then the management node deployment file obtained in S102 is installed;If non-installation and deployment file in the first management node, Then it is mounted directly the management node deployment file obtained in S102.It, here will be mounted in management node in order to distinguish description Deployment file is known as former deployment file.
After former deployment file is unloaded, the first management node can be restarted.As described above, by deployment program It is added to restarting in self-starting service for the first management node, in this way, deployment program is automatic after the restarting of the first management node Operation, and shell-command is called by python, the management node deployment file is installed to first management node.
S103: first management node is restarted.
Management node deployment file is installed to the first management node, the first management node is restarted.? That is needing to carry out two to the first management node if being equipped with deployment file in the first management node before S102 Secondary restarting, once after unloading former deployment file, once after installing the management node deployment file.
As described above, by deployment program be added to the first management node restart self-starting service in, in this way, first management After node reboot, deployment program automatic running continues to execute residue and maps out the work, that is, the subsequent step of the present embodiment Suddenly.
If in distributed system in addition to the first management node, there is also other management nodes, then after S102 or After S102 or after S103, the management node deployment file is sent in the distributed system except first pipe It manages in the management node except node;The management node controlled in the distributed system is getting the management node deployment After file, the management node deployment file is installed and carries out the restarting of management node.
That is, " the step of management node deployment file is installed to first management node ", " will be described Management node deployment file is sent to the step of other management nodes " sequencing without limitation;Alternatively, can be in the first pipe After managing node reboot, the management node deployment file is sent to other management nodes, and controls other management sections Point is installed the management node deployment file, is restarted;Alternatively, first the management node deployment file can be sent To other management nodes, and controls other management nodes and the management node deployment file is installed, is restarted, then, It controls the first management node again to be restarted, this is also possible.
Specifically, the first management node (deployment program in the first management node in other words) can call Secure Shell to assist It discusses (SSH, Secure Shell Protocol), instruction is transmitted using the file in the safety shell protocol, by the management Node deployment file is sent to the management node in the distributed system in addition to first management node.
First management node (deployment program in the first management node in other words) controls described in the installation of other management nodes The process of management node deployment file is similar with S102, it is assumed that in distributed system in addition to the first management node, there are one Management node B is illustrated so that deployment program is to the control of management node B as an example:
Deployment program can first control the former deployment file installed in unloading management node B;Deployment program detects unloading After the completion, management node B is restarted;After deployment program detects management node B restarting, pass through python tune With shell-command, the management node deployment file is installed to management node B.
It is appreciated that first mounted deployment file is unloaded if being equipped with deployment file in management node B After load, then the management node deployment file obtained in S102 is installed;If non-installation and deployment file in the first management node, directly Connect the management node deployment file obtained in installation S102.In order to distinguish description, here by deployment mounted in management node File is known as former deployment file.
After former deployment file is unloaded, deployment program can control management node B and be restarted.Deployment program detection To after management node B restarting, shell-command can be called by python, the management node deployment file is installed To management node B.
Management node deployment file is installed to management node B, then management node B is restarted.Namely It says, if being equipped with deployment file in management node B, needs to restart management node B twice, once unload After carrying former deployment file, once after the management node deployment file is installed.
S104: by restarting self-starting service, after detecting the restarting of the first management node, which is disposed File is sent to the memory node in distributed system.
After being respectively mounted management node deployment file in the management node of distributed system, then memory node deployment file pacified The memory node being filled in distributed system.If it is appreciated that in distributed system that there is only a management nodes, that is, First management node directly executes S104 in this case after S103;If there is only more management in distributed system Node then after every management node is respectively mounted the management node deployment file, then the memory node deployment file is sent to Memory node in distributed system.
As an implementation, the first management node (deployment program in the first management node in other words) can be called Web program in memory node in https agreement, with the distributed system establishes connection;The https agreement is called, By the web program, the memory node memory node deployment file being sent in the distributed system.
In present embodiment, web program can be run in each memory node in distributed system, memory node passes through Web program provides web services.
The memory node in distributed system can be disposed by web program, the first management node (in other words Deployment program in one management node) https agreement can be called, it is attached with the web program in memory node.The company of foundation After connecing, the memory node deployment file obtained in S102 can be sent to each storage and be saved by deployment program by the https agreement Point.
S105: the memory node in control distributed system is installed this and is deposited after getting the memory node deployment file Store up node deployment file.
It is appreciated that after memory node installs memory node deployment file, restarted under some cases, In the case of other, after memory node installs memory node deployment file, do not need to be restarted.It for example, can be with The information of " whether being restarted after memory node installation memory node deployment file " is added in configuration file, In this way, deployment program can control memory node according to the configuration file.
Assuming that including memory node A in distributed system, said so that deployment program is to the control of memory node A as an example It is bright:
Deployment program can first control the former memory node deployment file installed in unloading memory node A;Deployment program inspection After the completion of measuring unloading, memory node A is restarted;After deployment program detects memory node A restarting, pass through Python calls shell-command, and the memory node deployment file is installed to memory node A.
It is appreciated that first mounted deployment file is unloaded if being equipped with deployment file in memory node A After load, then the memory node deployment file obtained in S102 is installed;If non-installation and deployment file in the first memory node, directly Connect the memory node deployment file obtained in installation S102.In order to distinguish description, here by deployment mounted in memory node File is known as former memory node deployment file.
After former memory node deployment file is unloaded, deployment program can control memory node A and be restarted.Deployment After Programmable detection is restarted to memory node A, shell-command can be called by python, the memory node is disposed File is installed to memory node A.
Memory node deployment file is installed to memory node A assuming that deployment program is determined according to configuration file, is needed Memory node A is restarted.That is, needing if being equipped with deployment file in memory node A to storage Node A is restarted twice, once after unloading former memory node deployment file, is once installing memory node deployment After file.
After deployment program control memory node A is restarted, deployment program can be by the web program, to depositing Storage node A carries out configuration operation, configuration operation may include System Formatted, disk formatting, component Configuration or other Initialization operation etc., specifically without limitation.
If deployment program according to configuration file determine memory node A installation memory node deployment file after, do not need into Row restarting, then after deployment program control memory node A installation memory node deployment file, deployment program can be by described Web program carries out configuration operation to memory node A, and configuration operation may include System Formatted, disk formatting, component Configuration or other initialization operations etc., specifically without limitation.
After S105, it can be saved according to the configuration information in the configuration file to being managed in the distributed system Administrative relationships between point and memory node are configured.
For example, after the first management node setting deployment program, it can star the web program of the first management node, the One management node passes through the web program of itself, can close to the management in distributed system between management node and memory node System is configured.
It, can be by each memory node in distributed system if only existing a management node in distributed system The information such as information, such as IP address, storage content, are all sent to the management node, and by the information of the management node, such as IP Address or other information are sent to each memory node.
If there are more management nodes in distributed system, it is assumed that include management node and memory node in configuration file Between administrative relationships are as follows: management node 1 manage memory node 1-3, management node 2 manage memory node 4-6;It can will then deposit The information such as information, such as IP address, storage content for storing up node 1-3, are all sent to management node 1, and by the letter of management node 1 Breath, such as IP address or other information, are sent to memory node 1-3, similar, by the information of memory node 4-6, such as IP The information such as address, storage content, are all sent to management node 2, and by the information of management node 2, for example, IP address or other Information is sent to memory node 4-6.In this way, the deployment for distributed system is completed.
As an implementation, can be after the completion of deployment, the management node controlled in the distributed system is deleted The management node deployment file stored in management node;The memory node controlled in the distributed system is deleted in management node The memory node deployment file of storage;The deployment program is deleted from restarting in self-starting service for first management node It removes, and stops the operation of the deployment program.
It should be noted that is deleted in present embodiment is the management node deployment file stored in management node, and It is not the management node deployment file installed in management node, what is deleted in present embodiment is the storage stored in memory node Node deployment file is not the memory node deployment file installed in memory node.
It is appreciated that for by taking management node as an example, after management node gets management node deployment file, to the deployment File is stored, which is installed into management node, can be by the deployment file of storage after installing successfully It deletes.In this way, memory space can be saved.
In addition, after the completion of deployment, deployment program can be deleted itself from restarting in self-starting service, and out of service, In this way, memory headroom can be saved.
Using embodiment illustrated in fig. 1 of the present invention, deployment program is set in the first management node of distributed system, by portion Affix one's name to program carry out deployment operation, deployment program by itself be added to the first management node restart self-starting service in, in this way, In After first management node is restarted, deployment program can continue deployment operation, it is seen then that in the present solution, realizing distributed system The automatic deployment of system reduces error rate compared to manual operation.In addition, operation interface is more complex during artificial deployment, than Such as svn interface, FTP interface, shell interface, and in the present solution, realize automatic deployment by deployment program, simplify operation.
In existing some schemes, when being disposed based on cloud storage system, it usually needs the intervention of third party device, than Such as, when cloud storage system deployment file is installed in a management node, it usually needs third party device is from server downloading portion File is affixed one's name to, and downloaded file is installed in management node by the third party device.Compared to this scheme, this implementation Example does not need the intervention of third party device, more convenient operation.
The embodiment of the present invention also provides the flow diagram of another dispositions method based on distributed system, such as Fig. 2 institute Show, the application scenarios of Fig. 2 embodiment can be as shown in Figure 3: comprising a ftp server, two pipes in the distributed system of Fig. 3 Manage node and several memory nodes (memory node 1, memory node 2 ... memory node N);The ftp server is Fig. 2 Described server in embodiment;It is provided with deployment program in one management node, this management node is in Fig. 2 embodiment The first described management node;Every memory node, which is run, web program.
Fig. 2 is second of flow diagram of the dispositions method provided in an embodiment of the present invention based on distributed system, packet It includes:
S201: by deployment program be added to the first management node restart self-starting service in.After the deployment program executes Continuous step.
S202: in the configuration file obtained in advance, reading is stored with management node deployment file and memory node deployment The address of the server of file, the identity information for accessing the server and deployment file version information.
S203: the address of the server is accessed, and utilizes the identity information, obtains the corresponding management node of the version information Deployment file and memory node deployment file.
S204: the management node deployment file is installed to the first management node;And the first management node is carried out again Starting.
S205: restarting self-starting service by this, after detecting the restarting of the first management node, calls Secure Shell association View transmits instruction using the file in the safety shell protocol, which is sent in distributed system In management node in addition to the first management node.
S206: the management node in control distributed system installs the pipe after getting the management node deployment file Reason node deployment file and the restarting for carrying out management node.
As an implementation, which is installed to management node (including the first management node And other management nodes) process may include:
The former deployment file installed in unloading management node;
After the completion of detecting unloading, management node is restarted;
After detecting management node restarting, shell-command is called by python, management node deployment file is pacified It is filled to management node.
S207: the web program in https agreement, with the memory node in distributed system is called to establish connection.
S208: calling the https agreement, and by the web program, which is sent to distributed system Memory node in system.
S209: the memory node in control distributed system is installed this and is deposited after getting the memory node deployment file Store up node deployment file.
S210: by the web program, configuration operation is carried out to the memory node in distributed system.
Configuration operation may include System Formatted, disk formatting, component Configuration or other initialization operations etc., Specifically without limitation.
S211: according to the configuration information in the configuration file, in distributed system between management node and memory node Administrative relationships configured.
It, can be by each memory node in distributed system if only existing a management node in distributed system The information such as information, such as IP address, storage content, are all sent to the management node, and by the information of the management node, such as IP Address or other information are sent to each memory node.
If there are more management nodes in distributed system, it is assumed that include management node and memory node in configuration file Between administrative relationships are as follows: management node 1 manage memory node 1-3, management node 2 manage memory node 4-6;It can will then deposit The information such as information, such as IP address, storage content for storing up node 1-3, are all sent to management node 1, and by the letter of management node 1 Breath, such as IP address or other information, are sent to memory node 1-3, similar, by the information of memory node 4-6, such as IP The information such as address, storage content, are all sent to management node 2, and by the information of management node 2, for example, IP address or other Information is sent to memory node 4-6.In this way, the deployment for distributed system is completed.
S212: the management node in control distributed system deletes the management node deployment file stored in management node; Memory node in control distributed system deletes the memory node deployment file stored in management node;By the deployment program from Restarting for first management node is deleted in self-starting service, and stops the operation of deployment program.
It is appreciated that for by taking management node as an example, after management node gets management node deployment file, to the deployment File is stored, which is installed into management node, can be by the deployment file of storage after installing successfully It deletes.In this way, memory space can be saved.
In addition, after the completion of deployment, deployment program can be deleted itself from restarting in self-starting service, and out of service, In this way, memory headroom can be saved.
The embodiment of the present invention also provides a kind of deployment device based on distributed system, as shown in figure 4, described device packet It includes:
Module 401 is obtained, for the address according to the server for including in the configuration file obtained in advance, from server Obtain management node deployment file and memory node deployment file;
Module 402 is installed, for installing the management node deployment file to first management node;
Module 403 is restarted, for restarting to first management node;
First sending module 404, for detecting the first management node restarting by restarting self-starting service Afterwards, the memory node memory node deployment file being sent in the distributed system;
First control module 405 is getting the storage section for controlling the memory node in the distributed system After point deployment file, the memory node deployment file is installed.
As an implementation, module 401 is obtained, specifically can be used for:
In the configuration file obtained in advance, reads and be stored with management node deployment file and memory node deployment file The address of server, the identity information and deployment file version information for accessing the server;
The address of the server is accessed, and utilizes the identity information, obtains the corresponding management section of the version information Point deployment file and memory node deployment file.
As an implementation, described device can also include: the second sending module and the second control module (in figure not Show), wherein
Second sending module, for the management node deployment file to be sent in the distributed system except described the In management node except one management node;
Second control module is getting the management node portion for controlling the management node in the distributed system After affixing one's name to file, the management node deployment file is installed and carries out the restarting of management node.
As an implementation, second sending module, specifically can be used for:
Safety shell protocol is called, instruction is transmitted using the file in the safety shell protocol, by the management node Deployment file is sent to the management node in the distributed system in addition to first management node.
As an implementation, module 402 is installed, specifically can be used for:
Unload the former deployment file installed in first management node;
After the completion of detecting unloading, first management node is restarted;
By restarting self-starting service, after detecting the first management node restarting, called by python Shell-command installs the management node deployment file to first management node.
As an implementation, the first sending module 404, specifically can be used for:
The web program in the memory node in https agreement, with the distributed system is called to establish connection;
The https agreement is called, by the web program, the memory node deployment file is sent to described point Memory node in cloth system;
Described device can also include:
First configuration module (not shown) is used for by the web program, to the storage in the distributed system Node carries out configuration operation.
As an implementation, described device can also include:
Second configuration module (not shown), for being controlled in the distributed system in first control module After memory node installs the memory node deployment file, according to the configuration information in the configuration file, to the distribution Administrative relationships in formula system between management node and memory node are configured.
As an implementation, described device can also include:
Third control module (not shown) deletes management section for controlling the management node in the distributed system The management node deployment file stored in point;It controls memory node in the distributed system and deletes and store in management node Memory node deployment file.
Using embodiment illustrated in fig. 4 of the present invention, the deployment operation of distributed system: the first pipe is carried out by the first management node Reason node obtains management node deployment file and memory node deployment file from server;First management node is by management node Deployment file is installed to behind, is restarted to itself;By restarting self-starting service, detect that itself is restarted Afterwards, memory node deployment file is sent to the memory node in distributed system by the first management node, and controls memory node Memory node deployment file is installed;As it can be seen that in the present solution, realize the automatic deployment of distributed system, compared to manual operation, Reduce error rate.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 5, including processor 501 and memory 502,
Memory 502, for storing computer program;
Processor 501 when for executing the program stored on memory 502, realizes that any of the above-described kind is based on distribution The dispositions method of system.
The memory that above-mentioned electronic equipment is mentioned may include random access memory (Random Access Memory, It RAM), also may include nonvolatile memory (Non-Volatile Memory, NVM), for example, at least a disk storage Device.Optionally, memory can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
The embodiment of the present invention also provides a kind of computer readable storage medium, storage in the computer readable storage medium There is computer program, the computer program realizes any of the above-described kind of deployment side based on distributed system when being executed by processor Method.
The embodiment of the present invention also provides a kind of distributed system, comprising: the first management node, server and memory node, Wherein,
First management node, for the address according to the server for including in the configuration file obtained in advance, from clothes It is engaged in obtaining management node deployment file and memory node deployment file in device;The management node deployment file is installed to described First management node;First management node is restarted;By restarting self-starting service, described first is detected After management node restarting, the memory node that the memory node deployment file is sent in the distributed system;Control The memory node in the distributed system is made after getting the memory node deployment file, the memory node portion is installed Affix one's name to file;
The server, for providing management node deployment file and memory node deployment text to first management node Part;
The memory node, for obtaining the memory node deployment file, and in the control of first management node Under, the memory node deployment file is installed.
For example, distributed system can be as shown in fig. 6, be arranged deployment program in the first management node, by deployment journey Sequence executes deployment operation.Firstly, deployment program can first by itself be added to the first management node restart self-starting service in, In this way, after the restarting of the first management node, meeting automatic running deployment program continues to execute deployment operation.
It as an implementation, further include one or more management section in addition to first management node in the system Point, wherein
First management node is also used to for the management node deployment file being sent in the distributed system and remove In management node except first management node;The management node controlled in the distributed system is getting the pipe After managing node deployment file, the management node deployment file is installed and carries out the restarting of management node;
One or more described management node, for obtaining the management node deployment file, and in first management Under the control of node, the management node deployment file is installed and is restarted.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for Fig. 4 institute The deployment Installation practice based on distributed system, the electronic equipment embodiment shown in fig. 5, above-mentioned computer-readable storage shown For media embodiment and distributed system embodiment shown in fig. 6, it is based on since it is substantially similar to shown in Fig. 1-2 The dispositions method embodiment of distributed system, so be described relatively simple, related place referring to shown in Fig. 1-2 based on distribution The part of the dispositions method embodiment of formula system illustrates.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (15)

1. a kind of dispositions method based on distributed system, which is characterized in that applied to the first management node of distributed system, The described method includes:
According to the address for the server for including in the configuration file obtained in advance, management node deployment file is obtained from server With memory node deployment file;
The management node deployment file is installed to first management node;
First management node is restarted;
By restarting self-starting service, after detecting the first management node restarting, the memory node is disposed into text Part is sent to the memory node in the distributed system;
The memory node in the distributed system is controlled after getting the memory node deployment file, the storage is installed Node deployment file.
2. the method according to claim 1, wherein the clothes for including in the configuration file that the basis obtains in advance The address of business device, obtains management node deployment file and memory node deployment file from server, comprising:
In the configuration file obtained in advance, the service for being stored with management node deployment file and memory node deployment file is read The address of device, the identity information and deployment file version information for accessing the server;
The address of the server is accessed, and utilizes the identity information, obtains the corresponding management node portion of the version information Affix one's name to file and memory node deployment file.
3. the method according to claim 1, wherein installing by the management node deployment file to described After one management node, further includes:
The management node deployment file is sent to the management in the distributed system in addition to first management node In node;
The management node in the distributed system is controlled after getting the management node deployment file, the management is installed Node deployment file and the restarting for carrying out management node.
4. according to the method described in claim 3, it is characterized in that, it is described the management node deployment file is sent to it is described In management node in distributed system in addition to first management node, comprising:
Safety shell protocol is called, instruction is transmitted using the file in the safety shell protocol, the management node is disposed File is sent to the management node in the distributed system in addition to first management node.
5. the method according to claim 1, wherein described install the management node deployment file to described First management node, comprising:
Unload the former deployment file installed in first management node;
After the completion of detecting unloading, first management node is restarted;
By restarting self-starting service, after detecting the first management node restarting, shell life is called by python It enables, the management node deployment file is installed to first management node.
6. the method according to claim 1, wherein it is described the memory node deployment file is sent to it is described Memory node in distributed system, comprising:
The web program in the memory node in https agreement, with the distributed system is called to establish connection;
The https agreement is called, by the web program, the memory node deployment file is sent to the distribution Memory node in system;
The memory node in the distributed system is being controlled after getting the memory node deployment file, is being deposited described in installation After storage node deployment file, further includes:
By the web program, configuration operation is carried out to the memory node in the distributed system.
7. the method according to claim 1, wherein controlling the memory node installation in the distributed system After the memory node deployment file, further includes:
According to the configuration information in the configuration file, to the pipe in the distributed system between management node and memory node Reason relationship is configured.
8. the method according to claim 1, wherein being obtained in the memory node controlled in the distributed system After getting the memory node deployment file, after the memory node deployment file is installed, further includes:
It controls the management node in the distributed system and deletes the management node deployment file stored in management node;
It controls the memory node in the distributed system and deletes the memory node deployment file stored in management node.
9. a kind of deployment device based on distributed system, which is characterized in that applied to the first management node of distributed system, Described device includes:
Module is obtained, for the address according to the server for including in the configuration file obtained in advance, pipe is obtained from server Manage node deployment file and memory node deployment file;
Module is installed, for installing the management node deployment file to first management node;
Module is restarted, for restarting to first management node;
First sending module, after by restarting self-starting service, detecting the first management node restarting, by institute State the memory node that memory node deployment file is sent in the distributed system;
First control module is getting the memory node deployment text for controlling the memory node in the distributed system After part, the memory node deployment file is installed.
10. device according to claim 9, which is characterized in that the acquisition module is specifically used for:
In the configuration file obtained in advance, the service for being stored with management node deployment file and memory node deployment file is read The address of device, the identity information and deployment file version information for accessing the server;The address of the server is accessed, and Using the identity information, the corresponding management node deployment file of the version information and memory node deployment file are obtained.
11. device according to claim 9, which is characterized in that described device further include:
Second sending module, for the management node deployment file to be sent in the distributed system except first pipe It manages in the management node except node;
Second control module is getting the management node deployment text for controlling the management node in the distributed system After part, the management node deployment file is installed and carries out the restarting of management node.
12. device according to claim 11, which is characterized in that second sending module is specifically used for: calling safety Shell protocol transmits instruction using the file in the safety shell protocol, the management node deployment file is sent to institute State the management node in distributed system in addition to first management node.
13. device according to claim 9, which is characterized in that the installation module is specifically used for:
Unload the former deployment file installed in first management node;
After the completion of detecting unloading, first management node is restarted;
By restarting self-starting service, after detecting the first management node restarting, shell life is called by python It enables, the management node deployment file is installed to first management node.
14. a kind of distributed system characterized by comprising the first management node, server and memory node, wherein
First management node, for the address according to the server for including in the configuration file obtained in advance, from server Middle acquisition management node deployment file and memory node deployment file;The management node deployment file is installed to described first Management node;First management node is restarted;By restarting self-starting service, first management is detected After node reboot, the memory node that the memory node deployment file is sent in the distributed system;Control institute The memory node in distributed system is stated after getting the memory node deployment file, the memory node deployment text is installed Part;
The server, for providing management node deployment file and memory node deployment file to first management node;
The memory node, for obtaining the memory node deployment file, and under the control of first management node, peace Fill the memory node deployment file.
15. system according to claim 14, which is characterized in that also wrapped in addition to first management node in the system Include one or more management node, wherein
First management node is also used to for the management node deployment file being sent in the distributed system except described In management node except first management node;The management node controlled in the distributed system is getting the management section After point deployment file, the management node deployment file is installed and carries out the restarting of management node;
One or more described management node, for obtaining the management node deployment file, and in first management node Control under, the management node deployment file is installed and is restarted.
CN201810360212.9A 2018-04-20 2018-04-20 Deployment method and device based on distributed system and distributed system Active CN110392080B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810360212.9A CN110392080B (en) 2018-04-20 2018-04-20 Deployment method and device based on distributed system and distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810360212.9A CN110392080B (en) 2018-04-20 2018-04-20 Deployment method and device based on distributed system and distributed system

Publications (2)

Publication Number Publication Date
CN110392080A true CN110392080A (en) 2019-10-29
CN110392080B CN110392080B (en) 2023-06-06

Family

ID=68282715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810360212.9A Active CN110392080B (en) 2018-04-20 2018-04-20 Deployment method and device based on distributed system and distributed system

Country Status (1)

Country Link
CN (1) CN110392080B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113067869A (en) * 2021-03-18 2021-07-02 北京字跳网络技术有限公司 Node control method and device, node management method and device and distributed system
CN113835642A (en) * 2021-09-29 2021-12-24 浪潮卓数大数据产业发展有限公司 Distributed storage network construction method based on IPFS and distributed storage network
CN114666348A (en) * 2022-05-25 2022-06-24 广东睿江云计算股份有限公司 Method for quickly constructing distributed system based on python language

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731738A (en) * 2005-08-30 2006-02-08 西安交通大学 Automated quick deployment method for large-scale computer cluster node
US20100094981A1 (en) * 2005-07-07 2010-04-15 Cordray Christopher G Dynamically Deployable Self Configuring Distributed Network Management System
CN104219329A (en) * 2014-09-28 2014-12-17 浪潮软件集团有限公司 Method for deploying service through content distribution in cluster server
CN104219099A (en) * 2014-09-25 2014-12-17 浪潮(北京)电子信息产业有限公司 Automatic server cluster deploying method and device
CN104978191A (en) * 2015-06-24 2015-10-14 小米科技有限责任公司 Application deployment method and server
CN105306237A (en) * 2014-06-26 2016-02-03 中兴通讯股份有限公司 Distributed management method and device for network management
CN105791362A (en) * 2014-12-24 2016-07-20 联想(北京)有限公司 Server operating system deployment method and server
US20170344354A1 (en) * 2016-05-26 2017-11-30 At&T Intellectual Property I, Lp Autonomous server installation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100094981A1 (en) * 2005-07-07 2010-04-15 Cordray Christopher G Dynamically Deployable Self Configuring Distributed Network Management System
CN1731738A (en) * 2005-08-30 2006-02-08 西安交通大学 Automated quick deployment method for large-scale computer cluster node
CN105306237A (en) * 2014-06-26 2016-02-03 中兴通讯股份有限公司 Distributed management method and device for network management
CN104219099A (en) * 2014-09-25 2014-12-17 浪潮(北京)电子信息产业有限公司 Automatic server cluster deploying method and device
CN104219329A (en) * 2014-09-28 2014-12-17 浪潮软件集团有限公司 Method for deploying service through content distribution in cluster server
CN105791362A (en) * 2014-12-24 2016-07-20 联想(北京)有限公司 Server operating system deployment method and server
CN104978191A (en) * 2015-06-24 2015-10-14 小米科技有限责任公司 Application deployment method and server
US20170344354A1 (en) * 2016-05-26 2017-11-30 At&T Intellectual Property I, Lp Autonomous server installation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KURT L. KEVILLE等: ""Towards Fault-Tolerant Energy-Efficient High Performance Computing in the Cloud"", 《2012 IEEE INTERNATIONAL CONFERENCE ON CLUSTER COMPUTING》 *
刘思尧: ""基于Linux平台的高可用集群管理系统的研究与实现"", 《中国优秀硕士学位论文全文数据库》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113067869A (en) * 2021-03-18 2021-07-02 北京字跳网络技术有限公司 Node control method and device, node management method and device and distributed system
CN113067869B (en) * 2021-03-18 2022-12-27 北京字跳网络技术有限公司 Node control method and device, node management method and device and distributed system
CN113835642A (en) * 2021-09-29 2021-12-24 浪潮卓数大数据产业发展有限公司 Distributed storage network construction method based on IPFS and distributed storage network
CN114666348A (en) * 2022-05-25 2022-06-24 广东睿江云计算股份有限公司 Method for quickly constructing distributed system based on python language
CN114666348B (en) * 2022-05-25 2022-11-11 广东睿江云计算股份有限公司 Method for quickly constructing distributed system based on python language

Also Published As

Publication number Publication date
CN110392080B (en) 2023-06-06

Similar Documents

Publication Publication Date Title
CN107911421B (en) Method, apparatus, and computer storage medium for configuring cross-network communications in a blockchain
CN106537338B (en) Self-expanding clouds
CN109445869B (en) Cross-cloud-adaptive micro-service management method and device and storage medium
US9485134B2 (en) Managing configurations of system management agents in a distributed environment
CN107038085B (en) Method, device and system for repairing client application
CN110392080A (en) A kind of dispositions method based on distributed system, device and distributed system
CN108595333B (en) Health examination method and device for application process in PaaS platform
CN108769124B (en) Application deployment method, device, server and storage medium of PaaS platform
CN112035216B (en) Communication method for Kubernetes cluster network and OpenStack network
CN110138577B (en) Cluster creation method, first server and readable storage medium
US8768884B2 (en) Synchronization of dissimilar databases
WO2017035737A1 (en) Method and device for onboarding network service descriptor
CN103384263A (en) Timestamp management method for data synchronization and terminal therefor
US20140379800A1 (en) Systems and methods for sharing digital information between mobile devices of friends and family by loading application components onto embedded devices
US8538931B2 (en) Protecting the integrity of dependent multi-tiered transactions
EP4050850A1 (en) Service upgrading method, device and system
US20140376452A1 (en) Systems and methods for sharing digital information between mobile devices of friends and family using embedded devices
CN114168179B (en) Micro-service management method, micro-service management device, computer equipment and storage medium
CN104793998B (en) Terminal system resource management method and device
CN110602234A (en) Block chain network node management method, device, equipment and storage medium
CN113961179A (en) Service access method, system, electronic device and storage medium of SOAR platform
CN114422358B (en) API gateway configuration updating method and equipment
CN116233155A (en) Hybrid cloud data synchronization method and device, electronic equipment and storage medium
CN108829455A (en) A kind of device identification acquisition methods, device and equipment
CN112698840B (en) Architecture system for realizing service for bank cloud platform

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