Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Below by the embodiment being described with reference to the drawings, be exemplary, only for explaining the present invention, and can not be interpreted as limitation of the present invention.On the contrary, embodiments of the invention comprise spirit and all changes within the scope of intension, modification and the equivalent that falls into additional claims.
In description of the invention, it will be appreciated that, term " first ", " second " be only for describing object, and can not be interpreted as indication or hint relative importance or the implicit quantity that indicates indicated technical characterictic.Thus, one or more these features can be expressed or impliedly be comprised to the feature that is limited with " first ", " second ".In description of the invention, the implication of " a plurality of " is two or more, unless otherwise expressly limited specifically.
Below in conjunction with Figure of description, describe in detail according to the collocation method of the server of the embodiment of the present invention.
A collocation method for server, comprises the following steps: configuration server is installed and from predetermined bill of lading platform, is obtained required configuration parameter, and configuration parameter is resolved to generate installation configuration file, and installation configuration file is sent to build-in services device; Destination server is started shooting and is loaded kernel file, sets up and communicates by letter, and from build-in services device, obtain installation configuration file by communication with build-in services device; Destination server obtains the master network IP address of installation kit server from the script of kernel file, and from installation kit server, obtains the installation kit that appointment configuration file is installed according to the master network IP address of installation kit server; And destination server is carried out fitting operation according to configuration file and installation kit are installed.
Fig. 1 is the flow chart of the collocation method of server according to an embodiment of the invention.As shown in Figure 1, the collocation method according to the server of the embodiment of the present invention, comprises the following steps:
S101: configuration server is installed and is obtained required configuration parameter from predetermined bill of lading platform, and configuration parameter is resolved to generate installation configuration file, and installation configuration file is sent to build-in services device.
Particularly, business demand side generates required configuration parameter in predetermined bill of lading platform.Then, predetermined bill of lading platform for example, is sent to installation configuration server with the form of programming language (, python dictionary) by configuration parameter, then by configuration server is installed, programming language is resolved to generate installation configuration file.Finally, configuration server is installed and installation configuration file is distributed to the build-in services device of each machine room.
S102: destination server is started shooting and loaded kernel file, sets up and communicates by letter, and obtain installation configuration file by communication from build-in services device with build-in services device.
Particularly, destination server (that is, the server of system to be installed) arranges pxe by ipmi platform management instrument and starts and start shooting, and loads kernel file.Then, destination server is selected driver module according to network interface card model, and driver module is loaded into kernel.Then, destination server starts Intranet network interface card, by Intranet DynamicHost, agreement is set and obtains Intranet IP, and according to Intranet IP and other predetermined network parameters, parameters such as gateway and mask, configuration Intranet, so that destination server is communicated by letter with build-in services device, destination server can download and install configuration file from build-in services device thus.
S103: destination server obtains the master network IP address of installation kit server from the script of kernel file, and from installation kit server, obtain the installation kit that appointment configuration file is installed according to the master network IP address of installation kit server.
In one embodiment of the invention, installation kit server is a cluster of being set up by 3 servers that ten thousand Broadcoms are installed.
S104: destination server is carried out fitting operation according to configuration file and installation kit are installed.
Particularly, first, destination server is according to the network interface card that the master network IP address configuration destination server in configuration file is installed, and generates disk array, root partition and home subregion according to configuration file is installed.Afterwards, destination server is installed to the installation kit obtaining from installation kit server root partition in the mode of decompress(ion).Then, destination server is according to configuration files such as the network of installation configuration file generation destination server and syslog.Then, according to configuration file is installed, be that destination server is installed grub(multiple operating system start-up routine), configuration fstab(is for the file of the static information of storing documents system) etc. os starting file.Complete thus the installation configuration of destination server.
Should understand, destination server has loaded diverse network file system in the process of installation system, taken the cyberspace of part, and because the quantity of the destination server that needs in machine room to install is very huge, therefore in the present invention, in order to guarantee the smooth installation of other destination servers, after each destination server installation has configured, all unload all NFSs in destination server, such as nfs and ftp etc., thereby be other server Free up Memories, guarantee that all servers can be realized configuration is installed.
In addition, in the present invention, after installation, also by data cached the brush into hard disk in the internal memory of destination server.This is because data cached more unstable in internal memory, easily loses, and therefore in the present invention the data in buffer memory is brushed into hard disk, guarantees the safety and stability of data.
According to the collocation method of the server of the embodiment of the present invention, before installing, system generated the configuration file needing, system is obtained after kernel by guiding, automatically perform follow-up installation layoutprocedure, realize and automatically install and configure, omnidistance unmanned the intervention, greatly save human cost, improve installation effectiveness, unified script simultaneously, and then solved follow-up transition issue.
Fig. 2 is the flow chart of the collocation method of server in accordance with another embodiment of the present invention.As shown in Figure 2, according to the collocation method of the server of the embodiment of the present invention, comprise the following steps:
Step S201, business demand side generates the configuration parameter needing in predetermined bill of lading platform, and bill of lading platform for example, is sent to installation configuration server with the form of programming language (, python dictionary) by configuration parameter.
Step S202, installs after configuration server receives programming language and resolves, and generates and configuration file is installed and is distributed on the build-in services device of each machine room.
Step S203, destination server arranges pxe by ipmi platform management instrument and starts and start shooting, and loads kernel file, carries out installation order.
Step S204, destination server is selected driver module according to network interface card model, and driver module is loaded into kernel.
Step S205, destination server starts Intranet network interface card, by Intranet DynamicHost, agreement is set and obtains Intranet IP, and according to Intranet IP and other network parameters configuration Intranet, Intranet network interface card can be communicated by letter with build-in services device.
Step S206, downloads and installs configuration file from build-in services device, and the master network IP installing in configuration file is configured on the network interface card of destination server.
Step S207, the master network IP address that obtains installation kit server from the script of kernel file.
Step S208 generates disk array, root partition and home subregion according to configuration file is installed on destination server.
Step S209, obtains from installation kit server the installation kit that appointment in configuration file is installed according to the master network IP address of installation kit server, and is installed on root partition in the mode of decompress(ion).
Step S210, according to configuration files such as the network on installation configuration file generation destination server, syslog.
Step S211 is the startup files such as destination server is installed grub, configuration fstab according to configuration file is installed.
Step S212, unloads all NFSs.
Step S213, returns the data cached brush in internal memory to hard disk.
Step S214, restarts destination server.
Step S215, after startup, carries out initialize routine and automatically carries out the operation of disk configuration and custom program.
For example, can realize the operation of Baidu's custom program.
According to the collocation method of the server of the embodiment of the present invention, after startup of server, server is carried out to secondary configuration, realize the specific demand of server, meet the demand of each business of business demand side.
Fig. 3 is the flow chart of the collocation method of the server of another embodiment according to the present invention.As shown in Figure 3, according to the collocation method of the server of the embodiment of the present invention, comprise the following steps:
Step S301, business demand side generates the configuration parameter needing in predetermined bill of lading platform, and bill of lading platform is sent to installation configuration server by configuration parameter with the form of programming language.
Step S302, installs after configuration server receives programming language and resolves, and generates and configuration file is installed and is distributed on the build-in services device of each machine room.
Step S303, destination server arranges pxe by ipmi platform management instrument and starts and start shooting, and loads kernel file, carries out installation order.
Step S304, destination server is selected driver module according to network interface card model, and driver module is loaded into kernel.
Step S305, destination server starts Intranet network interface card, by Intranet DynamicHost, agreement is set and obtains Intranet IP, and according to Intranet IP and other network parameters configuration Intranet, Intranet network interface card can be communicated by letter with build-in services device.
Step S306, downloads and installs configuration file from build-in services device, and the master network IP installing in configuration file is configured on the network interface card of destination server.
Step S307, the master network IP address that obtains installation kit server from the script of kernel file.
Step S308 generates disk array, root partition and home subregion according to configuration file is installed on destination server.
Step S309, obtains from installation kit server the installation kit that appointment in configuration file is installed according to the master network IP address of installation kit server, and is installed on root partition in the mode of decompress(ion).
Step S310, according to configuration files such as the network on installation configuration file generation destination server, syslog.
Step S311 is that my server of target is installed grub, the startup files such as configuration fstab according to configuration file is installed.
Step S312, unloads all NFSs.
Step S313, returns the data cached brush in internal memory to hard disk.
Step S314, restarts destination server.
Step S315, after startup, carries out initialize routine and automatically carries out the operation of disk configuration and custom program.
Step S316, carries out trace routine with detection hardware fault.
After hardware fault being detected, process in time.
According to the collocation method of the server of the embodiment of the present invention, after startup of server, automatically server is carried out to the detection of hardware fault, and process in time, guarantee the normal operation of server.
Below in conjunction with Figure of description, describe in detail according to the configuration-system of the server of the embodiment of the present invention.
A configuration-system for server, comprising: bill of lading platform, for configuration parameter is provided; Configuration server is installed, for obtaining required configuration parameter from bill of lading platform, and required configuration parameter is resolved to generate installation configuration file, and send installation configuration file; Build-in services device, for receiving installation configuration file; Installation kit server, for providing installation kit; And destination server, for starting shooting and loading kernel file, foundation is communicated by letter and from build-in services device, obtains installation configuration file by communication with build-in services device, and the master network IP address that obtains installation kit server from the script of kernel file, and from installation kit server, obtain the installation kit that appointment configuration file is installed according to the master network IP address of installation kit server, and according to being installed, configuration file and installation kit carry out fitting operation.
Fig. 4 is the structured flowchart of the configuration-system of server according to an embodiment of the invention.As shown in Figure 4, according to the configuration-system of the server of the embodiment of the present invention, comprise: bill of lading platform 201, installation configuration server 202, build-in services device 203, installation kit server 204 and destination server 205.
Bill of lading platform 201 is for providing configuration parameter.
Configuration server 202 is installed for obtaining required configuration parameter from bill of lading platform 201, and required configuration parameter is resolved to generate installation configuration file, and send installation configuration file.Particularly, business demand side generates the configuration parameter needing in bill of lading platform 201, then, bill of lading platform 201 by configuration parameter with programming language (for example, python dictionary) formation is placed configuration server 202 is installed, configuration server 202 is installed and is received after data, data are resolved to generate configuration file is installed.
Build-in services device 203 is for receiving installation configuration file.Particularly, after installation configuration server 202 generation installation configuration files, installation configuration file is distributed to the build-in services device 203 of each machine room.
Installation kit server 204 is for providing installation kit.In one embodiment of the invention, installation kit server 204 is a cluster of being set up by 3 servers that ten thousand Broadcoms are installed.
Destination server 205 is for starting shooting and loading kernel file, foundation is communicated by letter and from build-in services device 203, obtains installation configuration file by communication with build-in services device 203, and the master network IP address that obtains installation kit server 204 from the script of kernel file, and from installation kit server 204, obtain the installation kit that appointment configuration file is installed according to the master network IP address of installation kit server 204, and according to being installed, configuration file and installation kit carry out fitting operation.
Particularly, first destination server 205 arranges pxe by ipmi platform management instrument and starts and start shooting, and loads kernel file, carries out installation order.Then, destination server 205 is selected driver module according to network interface card model, and driver module is loaded into kernel.Then, destination server 205 starts Intranet network interface card, by Intranet DynamicHost, agreement is set and obtains Intranet IP, and according to Intranet IP and other network parameters configuration Intranet, Intranet network interface card can be communicated by letter with build-in services device 203.Then, destination server 205 downloads and installs configuration file from build-in services device 203, and the master network IP installing in configuration file is configured on the network interface card of destination server.Afterwards, destination server 205 obtains the master network IP address of installation kit server 204 from the script of kernel file, according to the master network IP address of installation kit server 204, from installation kit server 204, obtains the installation kit that appointment configuration file is installed.Then, according to being installed, configuration file on destination server 205, generates disk array, root partition and home subregion, mode by installation kit with decompress(ion) is installed on root partition, and according to the configuration files such as configuration file generating network, syslog being installed, grub is installed, is configured the startup files such as fstab, complete installation.Finally, unload all NFSs, with Free up Memory, guarantee the normal mounting configuration of other servers.And, the data cached brush in internal memory is returned to hard disk, guarantee the safety and stability of data.
According to the configuration-system of the server of the embodiment of the present invention, before installing, system generated the configuration file needing, system is obtained after kernel by guiding, automatically perform follow-up installation layoutprocedure, realize and automatically install and configure, omnidistance unmanned the intervention, greatly save human cost, improve installation effectiveness, unified script simultaneously, and then solved follow-up transition issue.
In one embodiment of the invention, after destination server 205 starts, carry out predetermined initialize routine to carry out the operation of disk configuration and custom program.Thus, realize the specific demand of server, meet the demand of each business of business demand side.
In another embodiment of the present invention, after destination server 205 starts, also carry out predetermined trace routine with detection hardware fault.After hardware fault being detected, handling failure, guarantees the normal operation of server thus in time.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is by claims and be equal to and limit.