CN106603316B - A kind of dispositions method of cluster, first server and second server - Google Patents
A kind of dispositions method of cluster, first server and second server Download PDFInfo
- Publication number
- CN106603316B CN106603316B CN201710069382.7A CN201710069382A CN106603316B CN 106603316 B CN106603316 B CN 106603316B CN 201710069382 A CN201710069382 A CN 201710069382A CN 106603316 B CN106603316 B CN 106603316B
- Authority
- CN
- China
- Prior art keywords
- server
- slave
- task
- host server
- host
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Small-Scale Networks (AREA)
Abstract
This application provides a kind of method of clustered deploy(ment), first server and second servers, when disposing the host server of cluster, host server needs the software disposed to dispose in advance, only need when the first network interface card is connected to external equipment, start the software of deployment, it no longer needs in the deployment of cluster, then is host server disposition software.When disposing the slave server of cluster, slave server needs the software disposed to dispose in advance, only need when the second network interface card is connected to host server and the first network interface card is not attached to external equipment, start the software of deployment, it no longer needs in the deployment of cluster, it is again slave server disposition software, the deployment process of cluster is made to become simple.
Description
Technical field
The present invention relates to the communications fields, more specifically, being related to a kind of dispositions method of cluster, first server and second
Server.
Background technique
With the arrival of Internet era, computer data volume to be treated is increasing, uses group system at present
Go the data of processing magnanimity.Group system is the service entities of one group of collaborative work, provide speed faster, responding ability it is higher
Service, while having the characteristics that scalability, availability, and group system can match in excellence or beauty the processing capacity of large server, preferably
Solves the problems, such as mass data processing.
In the deployment scheme of existing distributed type assemblies, each cluster includes host server and slave server, host
For server as cluster server, slave server provides basic function service, due to host server and slave server
Function is different, needs to distinguish deployment software for host server and slave server, and then networking can normally form cluster,
Wherein, start the software of each server disposition, it will be able to start the corresponding service of the software.Due to needing for host server
Deployment software is distinguished with slave server, so that the deployment process of cluster is more complex, needs the engineering staff of profession come the portion of progress
Administration.
Therefore, a kind of in the deployment of cluster, deployment process simpler method is needed.
Summary of the invention
In view of this, the present invention provides dispositions method, first server and the second server of a kind of cluster, it is existing to solve
The problem for having the deployment of cluster in technology more complex.
In order to solve the above technical problems, present invention employs following technical solutions:
A kind of dispositions method of cluster is applied to first server, and the first server is previously stored with to be taken with host
The business relevant service of device and the service relevant with slave server, the dispositions method include:
Judge whether pre-set first network interface card is connected to external equipment;
When judging that pre-set first network interface card is connected to the external equipment, starting is described and host server
Relevant service;
Judge whether pre-set second network interface card is connected to one or more slave servers;
When judging that pre-set second network interface card is connected to one or more slave servers, judge whether
It receives and is connected to the dynamic host configuration protocol DHCP request that each slave server of the host server is sent;
It is every when the DHCP request for judging to receive each slave server for being connected to host server transmission
The Protocol IP address interconnected between a slave server distribution network.
Preferably, after distributing IP address for each slave server, further includes:
Receive the machine configuration information that each slave server is sent in database;
Generate multiple tasks;
The multiple task is stored in the message server;
Receive the task processing result that each slave server is sent in database;
Receive the Mission Success processing message that each slave server is sent.
Preferably, after the distribution IP address for each slave server, further includes:
It detects whether to receive the instruction for unloading wherein one or more the slave servers for being connected to itself;
When detection receives described instruction, judge whether each slave server in the slave server being unloaded has not
Being successfully processed for task;
It, will when thering are one or more slave servers to have handling not successfully for task in the slave server being unloaded
It is being unloaded, have handling not successfully for the task of the slave server of handling not successfully for task distribute to be connected to itself,
The one or more slave servers not being unloaded;
Send the slave server that shutdown message is unloaded described in;
In the database, the machine configuration information for the slave server being unloaded described in deletion.
A kind of dispositions method of cluster is applied to second server, and the second server is previously stored with to be taken with host
The business relevant service of device and the service relevant with slave server, the dispositions method include:
Judge whether pre-set second network interface card is connected to the host server and judges pre-set first
Whether network interface card is connected to external equipment;
When judging that pre-set second network interface card is connected to the host server and pre-set described
First network interface card is not attached to the external equipment, the starting service relevant with slave server;
DHCP request is sent to the host server;
The IP address that the host server is sent is received, and is connected to the message server sum number of the host server
According to library.
Preferably, after the message server and database for being connected to the host server, further includes:
The machine configuration information is sent to the database;
In the message server, task to be treated is got, and by the sequence number in the machine configuration information
Label is in the task to be treated;
Handle the task;
After the task is disposed, task processing result is saved to the database;
It sends Mission Success and handles message to the host server.
Preferably, after the message server and database for being connected to the host server, further includes:
Receive the shutdown message that the host server is sent;
The machine configuration information of itself stored in the database is saved in local data base.
A kind of first server, the first server be previously stored with the service relevant with host server with
And the service relevant with slave server, the first server include:
First judging unit, for judging whether pre-set first network interface card is connected to external equipment;
Host services start unit, for judging that pre-set first network interface card connects when first judging unit
It is connected to the external equipment, the starting service relevant with host server;
Second judgment unit, for judging whether pre-set second network interface card is connected to one or more slave clothes
Business device;
Third judging unit, for judging that pre-set second network interface card is connected to when the second judgment unit
One or more slave servers judge whether to receive each slave server for being connected to host server hair
The DHCP request sent;
Allocation unit, for being connected to the host server when the third judging unit is judged to receive
The DHCP request that each slave server is sent distributes IP address for each slave server.
Preferably, further includes:
First receiving unit is to receive every after each slave server distributes IP address for the allocation unit
A slave server is sent to the machine configuration information in database;
Generation unit, for generating multiple tasks;
Storage unit, for the multiple task to be stored in the message server;
Second receiving unit, the task processing result being sent in database for receiving each slave server;
Third receiving unit handles message for receiving the Mission Success that each slave server is sent.
Preferably, further includes:
Detection unit is after each slave server distributes IP address, to detect whether to connect for the allocation unit
Receive the instruction that unloading is connected to wherein one or more the slave servers of itself;
4th judging unit judges that the slave being unloaded takes for receiving described instruction when detection unit detection
Whether each slave server in business device has handling not successfully for task;
Task allocation unit has one or more slave servers to have not for working as in the slave server being unloaded
Being successfully processed for task, by handling not successfully for the task of slave server being unloaded, having handling not successfully for task point
One or more slave servers that dispensing is connected to itself, not being unloaded;
First transmission unit, the slave server being unloaded described in for sending shutdown message;
Unit is deleted, is used in the database, the machine configuration information for the slave server being unloaded described in deletion.
Preferably, further includes:
5th judging unit, for judge pre-set second network interface card whether be connected to the host server and
Judge whether pre-set first network interface card is connected to external equipment;
Slave services start unit, for judging that pre-set second network interface card connects when the 5th judging unit
Be connected to the host server and pre-set first network interface card be not attached to the external equipment, starting it is described with from
The relevant service of machine server;
Second transmission unit, for sending DHCP request to the host server;
4th receiving unit, the IP address sent for receiving the host server;
Connection unit, for being connected to the message server and database of the host server.
Preferably, further includes:
Third transmission unit is connected to the message server and database of the host server for the connection unit
Afterwards, the machine configuration information is sent to the database;
Unit is got, for getting task to be treated in the message server;
Marking unit, for by the sequence labelled notation in the machine configuration information in the task to be treated;
Processing unit, for handling the task;
First storage unit, for after the task is disposed, task processing result to be saved to the database;
4th transmission unit handles message to the host server for sending Mission Success.
Preferably, further includes:
5th receiving unit is connected to the message server and database of the host server for the connection unit
Afterwards, the shutdown message that the host server is sent is received;
Second storage unit, for the machine configuration information of itself stored in the database to be saved in local data
Library.
A kind of second server, the second server be previously stored with the service relevant with host server with
And the service relevant with slave server, the second server include:
First judgment module, for judge pre-set second network interface card whether be connected to the host server and
Judge whether pre-set first network interface card is connected to external equipment;
Starting module is serviced, for judging that pre-set second network interface card is connected to when the first judgment module
The host server and pre-set first network interface card are not attached to the external equipment, and starting is described to be taken with slave
The relevant service of business device;
First sending module, for sending DHCP request to the host server;
First receiving module, the IP address sent for receiving the host server;
Link block, for being connected to the message server and database of the host server.
Preferably, further includes:
Second sending module is connected to the message server and database of the host server for the link block
Afterwards, the machine configuration information is sent to the database;
Module is got, for getting task to be treated in the message server;
Mark module, for by the sequence labelled notation in the machine configuration information in the task to be treated;
Processing module, for handling the task;
First preserving module, for after the task is disposed, task processing result to be saved to the database;
Third sending module handles message to the host server for sending Mission Success.
Preferably, further includes:
Second receiving module is connected to the message server and database of the host server for the link block
Afterwards, the shutdown message that the host server is sent is received;
Second preserving module, for the machine configuration information of itself stored in the database to be saved in local data
Library.
Compared to the prior art, the invention has the following advantages:
The present invention provides a kind of method of clustered deploy(ment), first server and second server, when judging the first net
Card is connected to external equipment, starts the service relevant with host server, that is, starts pass relevant with host server
The server of the service of system is host server, when pre-set second network interface card is connected to one or more slave servers,
And receive and be connected to the DHCP request that each slave server of host server is sent, IP is distributed for each slave server
Address can guarantee that the host server in cluster can be disposed normally, due to dispose cluster host server when, host
Server needs the software disposed to dispose in advance, it is only necessary to when the first network interface card is connected to external equipment, starting deployment
Software, it is no longer necessary in the deployment of cluster, then be host server disposition software, become the deployment process of cluster
Simply.
When judging that pre-set second network interface card is connected to host server and pre-set first network interface card does not connect
It is connected to external equipment, starts the service relevant with slave server, that is, is started relevant with slave server
The server of service is slave server, hereafter, sends the IP that DHCP request is sent to host server, receiving host server
Address, and it is connected to the message server and database of host server, it can guarantee that the slave server in cluster can be just
Often deployment, since when disposing the slave server of cluster, slave server needs the software disposed to dispose in advance, only
Need to start when the second network interface card is connected to host server and the first network interface card is not attached to external equipment the software of deployment i.e.
It can, it is no longer necessary in the deployment of cluster, then be slave server disposition software, the deployment process of cluster is made to become simple.
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
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of method flow diagram of the dispositions method of the cluster applied to first server provided by the invention;
Fig. 2 is the method flow diagram of the dispositions method of another cluster for being applied to first server provided by the invention;
Fig. 3 is a kind of method flow diagram of the dispositions method of the cluster applied to second server provided by the invention;
Fig. 4 is the method flow diagram of the dispositions method of another cluster for being applied to second server provided by the invention;
Fig. 5 is a kind of structural schematic diagram of first server provided by the invention;
Fig. 6 is the structural schematic diagram of another first server provided by the invention;
Fig. 7 is the structural schematic diagram of the third first server provided by the invention;
Fig. 8 is a kind of structural schematic diagram of second server provided by the invention;
Fig. 9 is the structural schematic diagram of another second server provided by the 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.
The embodiment of the invention provides a kind of dispositions methods of cluster, are applied to first server, and first server is preparatory
It is stored with the service relevant with host server and the service relevant with slave server, referring to Fig.1, portion
Arranging method includes:
S101, judge whether pre-set first network interface card is connected to external equipment;
Wherein, the first network interface card may be coupled to external equipment, when the first network interface card of first server is connected to external equipment
When, external device can remotely manage first server, and the first network interface card is properly termed as management mouth again.Wherein, external equipment includes
Notebook, computer or mobile phone etc..
It should be noted that the first network interface card is connected to external equipment, to be technical staff connected the first network interface card by cable
Onto external equipment.When the first network interface card is successfully connected to external equipment, the corresponding display lamp of the first network interface card can be lighted, when
When one network interface card is unsuccessfully connected to external equipment, the corresponding display lamp of the first network interface card will not be lighted.
S102, the starting service relevant with host server;
Judge that pre-set first network interface card is connected to external equipment specifically, working as, starts related with host server
The service of connection relationship.
The service relevant with host server include cluster management service, messaging service, database purchase service,
IP address distribution service and global wide area network web services etc..
It should be noted that the service that starting is relevant with host server, that is, start corresponding with these services
Software.These softwares have shifted to an earlier date to be set in first server.When the starting clothes relevant with host server
When business, the server for starting the service relevant with host server is host server, i.e. starting and host server
The server of relevant service undertakes the task of host server.
S103, judge whether pre-set second network interface card is connected to one or more slave servers;
Wherein, the second network interface card of first server is for being communicated with internal server.Work as first server
When for host server, the second network interface card of first server is for being led to the slave server for being connected to first server
Letter.When second network interface card is connect with one or more slave servers, the second network interface card and one or more slaves can both be taken
Business device is directly connected to, and the second network interface card and one or more slave servers can also be connected respectively to the same interchanger.
It should be noted that each slave server be also previously stored with the service relevant with host server with
And the service relevant with slave server.
In addition, the second network interface card is connected to one or more slave servers and technical staff by cable for second
Network interface card is connected to one or more slave servers.When the second network interface card is successfully connected to one or more slave servers, second
The corresponding display lamp of network interface card can be lighted, when the second network interface card is unsuccessfully connected to one or more slave servers, the second network interface card pair
The display lamp answered will not be lighted.
S104, judge whether to receive the DHCP request of each slave server for being connected to host server transmission;
Specifically, judging whether when judging that pre-set second network interface card is connected to one or more slave servers
It receives and is connected to the DHCP request that each slave server of host server is sent.
S105, the Protocol IP address interconnected between network is distributed for each slave server.
Specifically, work as the DHCP request for judging to receive each slave server for being connected to host server transmission,
IP address is distributed for each slave server.
It should be noted that after first server is that each slave server distributes IP address, each slave server
The service being just able to access that in host server.
The dispositions method for present embodiments providing a kind of cluster starts when judging that the first network interface card is connected to external equipment
The service relevant with host server, that is, the server for starting the service relevant with host server is host
Server when pre-set second network interface card is connected to one or more slave servers, and receives and is connected to host services
The DHCP request that each slave server of device is sent is distributed IP address for each slave server, can be guaranteed in cluster
Host server can be disposed normally, since when disposing the host server of cluster, host server needs the software disposed
It disposes in advance, it is only necessary to when the first network interface card is connected to external equipment, start the software of deployment, it is no longer necessary to
When the deployment of cluster, then it is host server disposition software, the deployment process of cluster is made to become simple.
Optionally, in another embodiment of the present invention, after reference Fig. 2, step S105, further includes:
S206, each slave server of reception are sent to the machine configuration information in database;
Wherein, after distributing IP address for each slave server, slave server can be directly connected to according to IP address
To the message server and database to first server.Slave server just directly sends database for the machine configuration information
In.
S207, multiple tasks are generated;
Specifically, these tasks generated, are task of the later period by slave server process.
S208, multiple tasks are stored in message server;
S209, each slave server of reception are sent to the task processing result in database;
S210, the Mission Success processing message that each slave server is sent is received.
Specifically, can send task processing result in database after the completion of each slave server handles task
And it sends Mission Success and handles message to host server.
Optionally, in another embodiment of the present invention, after step S105, further includes:
S211, it detects whether to receive the instruction for wherein one or more slave servers that unloading is connected to itself;
When technical staff wants to unload wherein one or more slave servers, first server can detect and receive skill
The unloading of art personnel input is connected to the instruction of wherein one or more the slave servers of itself.
Whether each slave server in slave server that S212, judgement are unloaded has handling not successfully for task;
Specifically, judging whether is each slave server in the slave server being unloaded when detection receives instruction
There is handling not successfully for task.
S213, handling not successfully for the task of slave server being unloaded, having handling not successfully for task is distributed
To one or more slave servers being connected to itself, not being unloaded;
Specifically, when there is one or more slave servers to there is what is handled not successfully to appoint in the slave server being unloaded
Handling not successfully for the task of slave server being unloaded, having handling not successfully for task is distributed to and is connected to certainly by business
Body, one or more slave servers for not being unloaded;
It should be noted that since the task for the slave server that will be unloaded is there is still a need for having handled, first service
Device handling not successfully for the task for the slave server being unloaded is distributed to be connected to itself, be not unloaded one or more
A slave server.
In addition, being to detect whether that receiving unloading is connected to after first server generates multiple tasks in the present embodiment
The instruction of wherein one or more the slave servers of itself.Other than such case, can also work as is each slave server
When not generating after distribution IP address and multiple tasks, detect whether to receive wherein one or more for unloading and being connected to itself
The instruction of slave server, at this point, slave server will not get task and handle due to not generating multiple tasks also,
At this point, just there is no distribute handling not successfully for the task of slave server being unloaded, having handling not successfully for task
To one or more slave server such cases being connected to itself, not being unloaded.
S214, shutdown message is sent to the slave server being unloaded;
When need by slave server unload when, just send shutdown message to the slave server being unloaded, and then make from
Machine server executes power-off operation.
S215, in the database, deletes the machine configuration information for the slave server being unloaded.
Specifically, will be deleted and be unloaded when the one or more slave servers for being connected to first server are unloaded
Slave server the machine configuration information, so, first server is just inquired less than the slave server being unloaded
The machine configuration information.
In the present embodiment, after first server generates multiple tasks, and in the one or more slaves for being connected to itself
When server needs to be unloaded, handling not successfully for the task for the slave server being unloaded is distributed to be connected to itself,
The one or more slave servers not being unloaded, so that generating for task be enable normally to handle.
Optionally, a kind of dispositions method of cluster is provided in another embodiment of the present invention, is applied to second server,
Second server is previously stored with the service relevant with host server and relevant with slave server
Service, referring to Fig. 3, dispositions method includes:
S301, judge whether pre-set second network interface card is connected to host server and judges pre-set
Whether one network interface card is connected to external equipment;
Wherein, the first network interface card of second server, the first network interface card of the function of the second network interface card and first server, the second net
The function of card is identical.
S302, the starting service relevant with slave server;
Specifically, when judging that pre-set second network interface card is connected to host server and pre-set first net
Card is not attached to external equipment, starts the service relevant with slave server.
Wherein, the service relevant with slave server refers to task processing service.Starting has with slave server
The service of incidence relation starts software corresponding with task processing service.
S303, DHCP request is sent to host server;
Specifically, DHCP request can be sent to host after second server is connected to host server by the second network interface card
Server, to obtain the IP address of host server distribution.
The IP address that S304, receiving host server are sent;
S305, the message server and database for being connected to host server.
Specifically, after the IP address that receiving host server is sent, it will be able to be connected to host server according to IP address
Message server and database, and then the content in the message server and database of host server can be read.
In the present embodiment, when judging that pre-set second network interface card is connected to host server and pre-set
One network interface card is not attached to external equipment, starts the service relevant with slave server, i.e. starting has with slave server
The server of the service of incidence relation is slave server, hereafter, sends DHCP request to host server, receiving host service
The IP address that device is sent, and it is connected to the message server and database of host server, it can guarantee the slave clothes in cluster
Business device can be disposed normally, since when disposing the slave server of cluster, slave server needs the software disposed to mention
It is preceding to dispose, it is only necessary to when the second network interface card is connected to host server and the first network interface card is not attached to external equipment, starting
The software of deployment, it is no longer necessary in the deployment of cluster, then be slave server disposition software, make the deployment process of cluster
What is become is simple.
Optionally, in another embodiment of the present invention, after reference Fig. 4, step S305, further includes:
S406, the machine configuration information is sent to database;
Specifically, host server can be facilitated to read slave server after the machine configuration information is sent to database
Configuration information.
S407, in message server, get task to be treated, and by the sequence labelled notation in the machine configuration information
In task to be treated;
Specifically, after getting task, it is main by the sequence labelled notation in the machine configuration information in task to be treated
Which task what which slave server process machine server was just able to know that is.
S408, processing task;
Specifically.The task of general slave server process is to detect to sample, obtain the analysis result of sample with
Analysis report.
It it should be noted that each slave server can get multiple tasks, but can only be one in the task of processing
After the completion of a task processing, another task is reprocessed, multiple tasks cannot be handled simultaneously.
S409, after task is disposed, task processing result is saved to database;
In general, task processing result is the analysis result and analysis report of sample.
S410, Mission Success processing message is sent to host server.
It sends Mission Success and handles message to host server, host server is just able to know that the progress of task processing.
Optionally, in another embodiment of the present invention, after step S305, further includes:
The shutdown message that S411, receiving host server are sent;
When second server will be unloaded, the shutdown message of host server transmission will be received.
S412, the machine configuration information of itself stored in database is saved in local data base.
The machine configuration information of itself stored in database is saved in local data base, master can be connected in next time
When machine server, host server is sent by the machine configuration information of itself.
It should be noted that after the machine configuration information of itself stored in database is saved in local data base, just
Power-off operation can be executed.
In addition, after second server shutdown, when being switched on again, additionally it is possible to which starting is relevant with slave server
Service either starts the service relevant with host server.
In the present embodiment, second server gets task to be treated, and handles the task, and will be unloaded
When, after the machine configuration information of itself stored in database is saved in local data base, execute power-off operation.
In the present invention, each server is previously stored with the service and and slave relevant with host server
The relevant service of server, when pre-set first network interface card is connected to external equipment, starting has with host server
The service of incidence relation, that is, the server for starting the service relevant with host server is host server, when preparatory
The second network interface card being arranged is connected to host server and pre-set first network interface card is not attached to external equipment, starting with from
The relevant service of machine server, that is, the server for starting the service relevant with slave server is slave service
Device.It should be noted is that each server can both become host server, slave server can also be become.
Optionally, a kind of first server is provided in another embodiment of the present invention, first server is previously stored with
The service relevant with host server and the service relevant with slave server, referring to Fig. 5, first service
Device includes:
First judging unit 101, for judging whether pre-set first network interface card is connected to external equipment;
Host services start unit 102, for judging pre-set first network interface card connection when the first judging unit 101
To external equipment, start the service relevant with host server;
Second judgment unit 103, for judging whether pre-set second network interface card is connected to one or more slave clothes
Business device;
Third judging unit 104, for judging that pre-set second network interface card is connected to one when second judgment unit 103
A or multiple slave servers judge whether that the DHCP for receiving each slave server for being connected to host server transmission is asked
It asks;
Allocation unit 105, for being connected to the every of host server when third judging unit 104 is judged to receive
The DHCP request that a slave server is sent distributes IP address for each slave server.
In the present embodiment, when judging that the first network interface card is connected to external equipment, start relevant with host server
Service, that is, the server for starting the service relevant with host server is host server, when pre-set the
Two network interface cards are connected to one or more slave servers, and receive each slave server transmission for being connected to host server
DHCP request, for each slave server distribute IP address, can guarantee that the host server in cluster can be disposed normally,
Since when disposing the host server of cluster, host server needs the software disposed to dispose in advance, it is only necessary to
When first network interface card is connected to external equipment, start the software of deployment, it is no longer necessary in the deployment of cluster, then be host clothes
Business device deployment software, makes the deployment process of cluster become simple.
It should be noted that the course of work of each unit in the present embodiment, please refers in the corresponding embodiment of Fig. 1
Content, details are not described herein.
Optionally, in another embodiment of the present invention, referring to Fig. 6, first server further include:
First receiving unit 106 is after each slave server distributes IP address, to receive for allocation unit 105
Each slave server is sent to the machine configuration information in database;
Generation unit 107, for generating multiple tasks;
Storage unit 108, for multiple tasks to be stored in message server;
Second receiving unit 109, the task processing result being sent in database for receiving each slave server;
Third receiving unit 110 handles message for receiving the Mission Success that each slave server is sent;
Detection unit 111 is after each slave server distributes IP address, to detect whether for allocation unit 105
Receive the instruction that unloading is connected to wherein one or more the slave servers of itself;
4th judging unit 112 judges the slave service being unloaded for receiving instruction when the detection of detection unit 111
Whether each slave server in device has handling not successfully for task;
Task allocation unit 113 has one or more slave servers to have not for working as in the slave server being unloaded
Being successfully processed for task, by handling not successfully for the task of slave server being unloaded, having handling not successfully for task point
One or more slave servers that dispensing is connected to itself, not being unloaded;
First transmission unit 114, for sending shutdown message to the slave server being unloaded;
Unit 115 is deleted, in the database, deleting the machine configuration information for the slave server being unloaded.
In the present embodiment, after first server generates multiple tasks, and in the one or more slaves for being connected to itself
When server needs to be unloaded, handling not successfully for the task for the slave server being unloaded is distributed to be connected to itself,
The one or more slave servers not being unloaded, so that generating for task be enable normally to handle.
It should be noted that the course of work of each unit in the present embodiment, referring to figure 2. in corresponding embodiment
Content, details are not described herein.
Fig. 5 and Fig. 6 description first server have the function of taking on host server, furthermore first server also has
Take on the function of slave server.Referring to Fig. 7, first server further include:
5th judging unit 116, for judging whether pre-set second network interface card is connected to host server and sentences
Whether pre-set first network interface card that breaks is connected to external equipment;
Slave services start unit 117, for judging pre-set second network interface card connection when the 5th judging unit 116
It is not attached to external equipment to host server and pre-set first network interface card, is started relevant with slave server
Service;
Second transmission unit 118, for sending DHCP request to host server;
4th receiving unit 119, the IP address sent for receiving host server;
Connection unit 120, for being connected to the message server and database of host server;
Third transmission unit 121 is connected to the message server and database of host server for connection unit 120
Afterwards, the machine configuration information is sent to database;
Unit 122 is got, for getting task to be treated in message server;
Marking unit 123, for by the sequence labelled notation in the machine configuration information in task to be treated;
Processing unit 124, for handling task;
First storage unit 125, for after task is disposed, task processing result to be saved to database;
4th transmission unit 126 handles message to host server for sending Mission Success;
5th receiving unit 127 is connected to the message server and database of host server for connection unit 120
Afterwards, the shutdown message that receiving host server is sent;
Second storage unit 128, for the machine configuration information of itself stored in database to be saved in local data
Library.
In the present embodiment, first server has the function of taking on slave server.
It should be noted that the course of work of each unit in the present embodiment, the referring to figure 3. corresponding implementation with Fig. 4
Content in example, details are not described herein.
Optionally, a kind of second server is provided in another embodiment of the present invention, second server is previously stored with
The service relevant with host server and the service relevant with slave server, referring to Fig. 8, second service
Device includes:
First judgment module 201, for judging whether pre-set second network interface card is connected to host server and sentences
Whether pre-set first network interface card that breaks is connected to external equipment;
Starting module 202 is serviced, for judging that pre-set second network interface card is connected to master when first judgment module 201
Machine server and pre-set first network interface card are not attached to external equipment, start the clothes relevant with slave server
Business;
First sending module 203, for sending DHCP request to host server;
First receiving module 204, the IP address sent for receiving host server;
Link block 205, for being connected to the message server and database of host server.
In the present embodiment, when judging that the first network interface card is connected to external equipment, start relevant with host server
Service, that is, the server for starting the service relevant with host server is host server, when pre-set the
Two network interface cards are connected to one or more slave servers, and receive each slave server transmission for being connected to host server
DHCP request, for each slave server distribute IP address, can guarantee that the host server in cluster can be disposed normally,
Since when disposing the host server of cluster, host server needs the software disposed to dispose in advance, it is only necessary to
When first network interface card is connected to external equipment, start the software of deployment, it is no longer necessary in the deployment of cluster, then be host clothes
Business device deployment software, makes the deployment process of cluster become simple.
It should be noted that second server has the function of taking on slave server in the present embodiment.
In addition, the course of work of the modules in the present embodiment, the content in corresponding embodiment referring to figure 3.,
This is repeated no more.
Optionally, in another embodiment of the present invention, referring to Fig. 9, second server further include:
Second sending module 206 is connected to the message server and database of host server for link block 205
Afterwards, the machine configuration information is sent to database;
Module 207 is got, for getting task to be treated in message server;
Mark module 208, for by the sequence labelled notation in the machine configuration information in task to be treated;
Processing module 209, for handling task;
First preserving module 210, for after task is disposed, task processing result to be saved to database;
Third sending module 211 handles message to host server for sending Mission Success;
Second receiving module 212 is connected to the message server and database of host server for link block 205
Afterwards, the shutdown message that receiving host server is sent;
Second preserving module 213, for the machine configuration information of itself stored in database to be saved in local data
Library.
In the present embodiment, second server gets task to be treated, and handles the task, and will be unloaded
When, after the machine configuration information of itself stored in database is saved in local data base, execute power-off operation.
It should be noted that second server has the function of taking on slave server, in addition, second in the present embodiment
Server also has the function of taking on host server, specifically please refers to the function of first server.
The course of work of modules in the present embodiment, the content in corresponding embodiment is herein no longer referring to figure 4.
It repeats.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (15)
1. a kind of dispositions method of cluster, which is characterized in that be applied to first server, the first server is previously stored with
The service relevant with host server and the service relevant with slave server, the dispositions method packet
It includes:
Judge whether pre-set first network interface card is connected to external equipment;
When judging that pre-set first network interface card is connected to the external equipment, starting is described related with host server
The service of connection relationship;The service relevant with host server described in the starting includes starting described and host server
The relevant corresponding software being arranged in advance in the first server of service;
Judge whether pre-set second network interface card is connected to one or more slave servers;
When judging that pre-set second network interface card is connected to one or more slave servers, judge whether to receive
The dynamic host configuration protocol DHCP request sent to each slave server for being connected to the host server;
When the DHCP request for judging to receive each slave server for being connected to host server transmission, for each from
The Protocol IP address interconnected between machine server distribution network.
2. dispositions method according to claim 1, which is characterized in that after distributing IP address for each slave server, also
Include:
Receive the machine configuration information that each slave server is sent in database;
Generate multiple tasks;
The multiple task is stored in message server;
Receive the task processing result that each slave server is sent in database;
Receive the Mission Success processing message that each slave server is sent.
3. dispositions method according to claim 2, which is characterized in that described to distribute IP address for each slave server
Afterwards, further includes:
It detects whether to receive the instruction for unloading wherein one or more the slave servers for being connected to itself;
When detection receives described instruction, judge whether each slave server in the slave server being unloaded has not successfully
The task of processing;
When there are one or more slave servers to have handling not successfully for task in the slave server being unloaded, will be unloaded
Handling not successfully for task carry, the slave server that has handling not successfully for task distribute to be connected to itself, not by
One or more slave servers of unloading;
Send the slave server that shutdown message is unloaded described in;
In the database, the machine configuration information for the slave server being unloaded described in deletion.
4. a kind of dispositions method of cluster, which is characterized in that be applied to second server, the second server is previously stored with
The service relevant with host server and the service relevant with slave server, the dispositions method packet
It includes:
Judge whether pre-set second network interface card is connected to the host server and judges pre-set first network interface card
Whether external equipment is connected to;
When judging that pre-set second network interface card is connected to the host server and pre-set described first
Network interface card is not attached to the external equipment, the starting service relevant with slave server;Described in the starting with
The relevant service of slave server include starting it is described it is corresponding with the relevant service of slave server
Software in the second server is set in advance;
DHCP request is sent to the host server;
The IP address that the host server is sent is received, and is connected to the message server and data of the host server
Library.
5. dispositions method according to claim 4, which is characterized in that the message clothes for being connected to the host server
It is engaged in after device and database, further includes:
The machine configuration information is sent to the database;
In the message server, task to be treated is got, and by the sequence labelled notation in the machine configuration information
In the task to be treated;
Handle the task;
After the task is disposed, task processing result is saved to the database;
It sends Mission Success and handles message to the host server.
6. dispositions method according to claim 5, which is characterized in that the message clothes for being connected to the host server
It is engaged in after device and database, further includes:
Receive the shutdown message that the host server is sent;
The machine configuration information of itself stored in the database is saved in local data base.
7. a kind of first server, which is characterized in that the first server is previously stored with pass relevant with host server
The service of system and the service relevant with slave server, the first server include:
First judging unit, for judging whether pre-set first network interface card is connected to external equipment;
Host services start unit, for judging that pre-set first network interface card is connected to when first judging unit
The external equipment, the starting service relevant with host server;Have described in the starting with host server
Institute is arranged in including corresponding with the relevant service of host server described in starting in the service of incidence relation in advance
State the software in first server;
Second judgment unit, for judging whether pre-set second network interface card is connected to one or more slave services
Device;
Third judging unit, for judging that pre-set second network interface card is connected to one when the second judgment unit
Or multiple slave servers, judge whether to receive each slave server for being connected to host server transmission
DHCP request;
Allocation unit, for being connected to each of described host server when the third judging unit is judged to receive
The DHCP request that slave server is sent distributes IP address for each slave server.
8. first server according to claim 7, which is characterized in that further include:
First receiving unit, for the allocation unit be each slave server distribute IP address after, receive each from
Machine server is sent to the machine configuration information in database;
Generation unit, for generating multiple tasks;
Storage unit, for the multiple task to be stored in message server;
Second receiving unit, the task processing result being sent in database for receiving each slave server;
Third receiving unit handles message for receiving the Mission Success that each slave server is sent.
9. first server according to claim 8, which is characterized in that further include:
Detection unit is after each slave server distributes IP address, to detect whether to receive for the allocation unit
Unloading is connected to the instruction of wherein one or more the slave servers of itself;
4th judging unit judges the slave server being unloaded for receiving described instruction when detection unit detection
In each slave server whether have handling not successfully for task;
Task allocation unit has one or more slave servers to have not successfully for working as in the slave server being unloaded
The task of processing distributes to handling not successfully for the task of slave server being unloaded, having handling not successfully for task
One or more slave servers being connected to itself, not being unloaded;
First transmission unit, the slave server being unloaded described in for sending shutdown message;
Unit is deleted, is used in the database, the machine configuration information for the slave server being unloaded described in deletion.
10. first server according to claim 7, which is characterized in that further include:
5th judging unit, for judging whether pre-set second network interface card is connected to the host server and judgement
Whether pre-set first network interface card is connected to external equipment;
Slave services start unit, for judging that pre-set second network interface card is connected to when the 5th judging unit
The host server and pre-set first network interface card are not attached to the external equipment, and starting is described to be taken with slave
The relevant service of business device;
Second transmission unit, for sending DHCP request to the host server;
4th receiving unit, the IP address sent for receiving the host server;
Connection unit, for being connected to the message server and database of the host server.
11. first server according to claim 10, which is characterized in that further include:
Third transmission unit, after the message server and database of the host server are connected to for the connection unit,
The machine configuration information is sent to the database;
Unit is got, for getting task to be treated in the message server;
Marking unit, for by the sequence labelled notation in the machine configuration information in the task to be treated;
Processing unit, for handling the task;
First storage unit, for after the task is disposed, task processing result to be saved to the database;
4th transmission unit handles message to the host server for sending Mission Success.
12. first server according to claim 11, which is characterized in that further include:
5th receiving unit, after the message server and database of the host server are connected to for the connection unit,
Receive the shutdown message that the host server is sent;
Second storage unit, for the machine configuration information of itself stored in the database to be saved in local data base.
13. a kind of second server, which is characterized in that the second server is previously stored with pass relevant with host server
The service of system and the service relevant with slave server, the second server include:
First judgment module, for judging whether pre-set second network interface card is connected to the host server and judgement
Whether pre-set first network interface card is connected to external equipment;
Starting module is serviced, for judge that pre-set second network interface card is connected to described when the first judgment module
Host server and pre-set first network interface card are not attached to the external equipment, start described and slave server
Relevant service;The service relevant with slave server described in the starting includes that starting is described to be taken with slave
The relevant corresponding software being arranged in advance in the second server of service of business device;
First sending module, for sending DHCP request to the host server;
First receiving module, the IP address sent for receiving the host server;
Link block, for being connected to the message server and database of the host server.
14. second server according to claim 13, which is characterized in that further include:
Second sending module, after the message server and database of the host server are connected to for the link block,
The machine configuration information is sent to the database;
Module is got, for getting task to be treated in the message server;
Mark module, for by the sequence labelled notation in the machine configuration information in the task to be treated;
Processing module, for handling the task;
First preserving module, for after the task is disposed, task processing result to be saved to the database;
Third sending module handles message to the host server for sending Mission Success.
15. second server according to claim 14, which is characterized in that further include:
Second receiving module, after the message server and database of the host server are connected to for the link block,
Receive the shutdown message that the host server is sent;
Second preserving module, for the machine configuration information of itself stored in the database to be saved in local data base.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710069382.7A CN106603316B (en) | 2017-02-08 | 2017-02-08 | A kind of dispositions method of cluster, first server and second server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710069382.7A CN106603316B (en) | 2017-02-08 | 2017-02-08 | A kind of dispositions method of cluster, first server and second server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106603316A CN106603316A (en) | 2017-04-26 |
CN106603316B true CN106603316B (en) | 2019-05-14 |
Family
ID=58586707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710069382.7A Active CN106603316B (en) | 2017-02-08 | 2017-02-08 | A kind of dispositions method of cluster, first server and second server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106603316B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202166925U (en) * | 2011-07-25 | 2012-03-14 | 北大方正集团有限公司 | Machine cabinet of servers |
CN102591679A (en) * | 2011-11-30 | 2012-07-18 | 中国科学院计算机网络信息中心 | Quick application software arrangement method for cluster system |
CN104219099A (en) * | 2014-09-25 | 2014-12-17 | 浪潮(北京)电子信息产业有限公司 | Automatic server cluster deploying method and device |
CN104394223A (en) * | 2014-12-03 | 2015-03-04 | 浪潮集团有限公司 | Automatic rapid deployment method for large-scale computer cluster system nodes |
CN105791362A (en) * | 2014-12-24 | 2016-07-20 | 联想(北京)有限公司 | Server operating system deployment method and server |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9519518B2 (en) * | 2013-05-15 | 2016-12-13 | Citrix Systems, Inc. | Systems and methods for deploying a spotted virtual server in a cluster system |
-
2017
- 2017-02-08 CN CN201710069382.7A patent/CN106603316B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202166925U (en) * | 2011-07-25 | 2012-03-14 | 北大方正集团有限公司 | Machine cabinet of servers |
CN102591679A (en) * | 2011-11-30 | 2012-07-18 | 中国科学院计算机网络信息中心 | Quick application software arrangement method for cluster system |
CN104219099A (en) * | 2014-09-25 | 2014-12-17 | 浪潮(北京)电子信息产业有限公司 | Automatic server cluster deploying method and device |
CN104394223A (en) * | 2014-12-03 | 2015-03-04 | 浪潮集团有限公司 | Automatic rapid deployment method for large-scale computer cluster system nodes |
CN105791362A (en) * | 2014-12-24 | 2016-07-20 | 联想(北京)有限公司 | Server operating system deployment method and server |
Non-Patent Citations (1)
Title |
---|
广域网环境下应用系统远程部署的研究及实现;赵廷波等;《计算机工程》;20070831;全文 |
Also Published As
Publication number | Publication date |
---|---|
CN106603316A (en) | 2017-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110535831B (en) | Kubernetes and network domain-based cluster security management method and device and storage medium | |
CN103139157B (en) | A kind of based on the network communication method of socket, Apparatus and system | |
CN113645071B (en) | Cluster deployment method, system, medium and electronic terminal | |
CN108965457A (en) | A kind of message delivery method of distributed cluster system, device, equipment and medium | |
CN104618164A (en) | Management method for rapid cloud computing platform application deployment | |
CN109634738A (en) | Asynchronous processing method, server, storage medium and device based on micro services | |
CN108256118A (en) | Data processing method, device, system, computing device and storage medium | |
CN108897854A (en) | A kind of monitoring method and device of overtime task | |
CN111338893A (en) | Process log processing method and device, computer equipment and storage medium | |
CN107807815A (en) | The method and apparatus of distributed treatment task | |
CN109491895A (en) | Server stress test method and device | |
CN112637304A (en) | Cross-cloud resource processing system and resource management method | |
CN111597033A (en) | Task scheduling method and device | |
CN109656569A (en) | Multi-environment application dispositions method, equipment, storage medium and device | |
CN110162397A (en) | Resource allocation methods, apparatus and system | |
CN110890987A (en) | Method, device, equipment and system for automatically creating cluster | |
CN109885612A (en) | The synchronization take-effective method and device of block chain intelligence contract | |
CN113055493B (en) | Data packet processing method, device, system, scheduling device and storage medium | |
CN113220480B (en) | Distributed data task cross-cloud scheduling system and method | |
JP2001306360A (en) | Automated system for coping with computer fault and recording medium having fault coping automation program recorded thereon | |
CN106603316B (en) | A kind of dispositions method of cluster, first server and second server | |
CN108965403A (en) | O&M monitors establishment of connection method and terminal device | |
CN104821939B (en) | It is a kind of to be used to implement computer and the method and apparatus of mobile equipment room asynchronous communication | |
CN107045452A (en) | Dispatching method of virtual machine and device | |
CN113992448B (en) | Data transparent transmission method, system, medium and computing device |
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 |