+

CN118869469A - Method, device, server and storage medium for automatic deployment of server - Google Patents

Method, device, server and storage medium for automatic deployment of server Download PDF

Info

Publication number
CN118869469A
CN118869469A CN202310436538.6A CN202310436538A CN118869469A CN 118869469 A CN118869469 A CN 118869469A CN 202310436538 A CN202310436538 A CN 202310436538A CN 118869469 A CN118869469 A CN 118869469A
Authority
CN
China
Prior art keywords
server
servers
pxe
seed
service
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.)
Pending
Application number
CN202310436538.6A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202310436538.6A priority Critical patent/CN118869469A/en
Publication of CN118869469A publication Critical patent/CN118869469A/en
Pending legal-status Critical Current

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
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • 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
    • H04L41/0876Aspects of the degree of configuration automation
    • 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

Landscapes

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

Abstract

本申请公开了一种自动化部署服务器的方法、装置、服务器和存储介质,该方法包括:装置基于m个第一服务器的第一地址分配请求,分别向m个第一服务器发送第一指示信息,为m个第一服务器提供PXE服务;第一服务器收到第一指示信息后利用分配的第一IP地址基于装置提供的PXE服务完成PXE启动;装置为m个第一服务器提供种子服务器配置服务,第一服务器基于装置提供的种子服务器配置服务将自身配置为种子服务器,种子服务器能够为第二服务器提供PXE服务;装置基于第二服务器的第二地址分配请求向第二服务器发送第二指示信息,第二服务器收到第二指示信息后利用分配的第二IP地址基于第一服务器提供的PXE服务完成PXE启动。通过这种方式,本申请能够免于受限服务端网络带宽和计算性能,为自动化部署服务器集群提供技术支持。

The present application discloses a method, device, server and storage medium for automatic deployment of servers, the method comprising: the device sends first indication information to m first servers respectively based on first address allocation requests of m first servers, and provides PXE services for the m first servers; after receiving the first indication information, the first server uses the allocated first IP address to complete PXE startup based on the PXE service provided by the device; the device provides seed server configuration services for the m first servers, and the first server configures itself as a seed server based on the seed server configuration service provided by the device, and the seed server can provide PXE services for the second server; the device sends second indication information to the second server based on the second address allocation request of the second server, and after receiving the second indication information, the second server uses the allocated second IP address to complete PXE startup based on the PXE service provided by the first server. In this way, the present application can avoid the limited server-side network bandwidth and computing performance, and provide technical support for automatic deployment of server clusters.

Description

Method, device, server and storage medium for automatically deploying server
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for automatically deploying a server, an apparatus for automatically deploying a server, a first server, a second server, and a storage medium.
Background
When a large number of new factory servers such as a data center are in office, the iSAC network ports of the servers are required to be allocated with addresses, and as the iSAC network ports of the servers and the iSAC network ports of the switches generally use the same default addresses of factory burning of respective server manufacturers, conflicts are generated in the same environment, so that the servers cannot be used, and the servers are required to be reconfigured according to a plan. One of the processing modes is as follows: the method is characterized in that a PC (Personal Computer ) or other single service end is used for starting PXE (Pre-boot Execution Environment, pre-starting execution environment) service, the PXE technology is used for guiding a server to start from a network, and after the server is successfully started, a configuration script is automatically issued for configuration.
However, when the server cluster is faced to a very large scale server cluster, the server cluster is still limited by the network bandwidth and the computing performance of the server, and the server can be started in batches by manpower, so that all automatic deployment can not be realized; or a control maximum number of parallelism in an orderly arrangement, overall efficiency remains limited.
Disclosure of Invention
Based on the above, the embodiment of the application provides a method for automatically deploying a server, a device for automatically deploying the server, a first server, a second server and a storage medium, which can avoid the limitation of network bandwidth and computing performance of a server side and provide technical support for an automatically deploying server cluster.
In a first aspect, the present application provides a method for automatically deploying a server, applied to a device for automatically deploying a server, where the device is connected to n servers of a server cluster through a switch, and the servers have a pre-boot execution environment PXE boot function, and the method includes:
Based on first address allocation requests of m first servers, respectively sending first indication information to the m first servers, wherein the first indication information is used for indicating the first servers to complete PXE starting based on PXE services provided by the device by using the allocated first IP addresses, and m is smaller than n;
providing the PXE service for the m first servers, so that the m first servers complete PXE startup;
Providing seed server configuration service for the m first servers, so that the m first servers are configured as seed servers, wherein the seed servers can provide the PXE service for a second server, and the second server is a server except for the m first servers serving as seed servers in the server cluster;
And sending second indication information to the second server based on a second address allocation request of the second server, wherein the second indication information is used for indicating the second server to complete PXE starting based on PXE service provided by the first server by using the allocated second IP address.
In a second aspect, the present application provides a method for automatically deploying a server, applied to a first server, where the first server is a server in m servers in a server cluster, where the server cluster includes n servers, and m is smaller than n, where the server has a pre-boot execution environment PXE boot function, and the n servers are connected to a device for automatically deploying a server through a switch, where the method includes:
Receiving first indication information of the device, wherein the first indication information is sent by the device based on a first address allocation request of the first server and is used for indicating the first server to complete PXE starting based on PXE service provided by the device by using an allocated first IP address;
Using the first IP address to complete PXE starting based on the PXE service provided by the device;
configuring the seed server configuration service provided by the device as a seed server, wherein the seed server can provide the PXE service for a second server, and the second server is a server except the m first servers serving as seed servers in the server cluster;
and providing the PXE service for the second server, so that the second server completes PXE starting.
In a third aspect, the present application provides a method for automatically deploying a server, applied to a second server, where the second server is a server in a server cluster except for m first servers serving as seed servers, where the server cluster includes n servers, where m is smaller than n, and where the server has a pre-boot execution environment PXE boot function, and where the n servers are connected to a device of the automatically deploying server through a switch, where the method includes:
Receiving second indication information of the device, wherein the second indication information is sent by the device based on a second address allocation request of the second server and is used for indicating the second server to complete PXE starting based on PXE services provided by the first server by using an allocated second IP address;
and using the second IP address to complete PXE starting based on the PXE service provided by the first server.
In a fourth aspect, the present application provides an apparatus for automatically deploying servers, the apparatus being connected to n servers of a server cluster through a switch, the servers having a pre-boot execution environment PXE boot function, the apparatus comprising a communication module, a memory, and a processor, the communication module being configured to communicate, the memory being configured to store a computer program; the processor is configured to execute the computer program and to implement the method of automatically deploying a server as described in the first aspect above when the computer program is executed.
In a fifth aspect, the present application provides a first server, where the first server is a server of m servers in a server cluster, where the server cluster includes n servers, where m is smaller than n, where the server has a pre-boot execution environment PXE boot function, where the n servers are connected to a device for automatically deploying servers through a switch, where the first server includes a communication module, a memory, and a processor, where the communication module is used for communication, and the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the method of automatically deploying a server as described in the second aspect above when the computer program is executed.
In a sixth aspect, the present application provides a second server, where the second server is a server other than m first servers in a server cluster, where the server cluster includes n servers, where m is smaller than n, where the server has a pre-boot execution environment PXE boot function, where the n servers are connected to a device for automatically deploying servers through a switch, and where the second server includes a communication module, a memory, and a processor, where the communication module is used for communication, and the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the method of automatically deploying a server as described in the third aspect above when the computer program is executed.
In a seventh aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement a method of automatically deploying a server as described in the first aspect or the second aspect or the third aspect above.
The embodiment of the application provides a method for automatically deploying a server, a device for automatically deploying the server, a first server, a second server and a storage medium, wherein the device firstly respectively sends first indication information to m first servers based on first address allocation requests of the m first servers to provide PXE services for the m first servers; after receiving the first indication information, the first server completes PXE starting based on the PXE service provided by the device by using the allocated first IP address; the device then provides seed server configuration services for the m first servers, the first servers configure themselves as seed servers based on the seed server configuration services provided by the device, the seed servers being capable of providing PXE services for the second servers; and then the device sends second indication information to the second server based on a second address allocation request of the second server, and the second server completes PXE starting based on the PXE service provided by the first server by using the allocated second IP address after receiving the second indication information of the device. Compared with the prior art that only other single service ends provide the PXE service, the device in the embodiment of the application helps the plurality of first servers to configure the plurality of first servers into seed servers capable of providing the PXE service after providing the PXE service for the plurality of first servers, and after the seed servers are configured, the device guides the subsequent second servers to complete PXE startup based on the PXE service provided by the plurality of first servers after becoming the seed servers, namely, the device in the embodiment of the application further has the PXE service provided by the plurality of first servers after becoming the seed servers after providing the PXE service for the plurality of first servers.
Drawings
FIG. 1 is a schematic illustration of an application environment of an embodiment of a method of the present application for automatically deploying a server;
FIG. 2 is a process diagram of one embodiment of a related art installation operating system using PXE technology;
FIGS. 3-10 are flow diagrams of eight embodiments of a method of automating deployment of servers in accordance with the present application;
FIG. 11 is a diagram illustrating two ways of issuing commands to a server through IPMI in the related art;
FIG. 12 is a schematic diagram illustrating the architecture of one embodiment of an apparatus for automated deployment of servers in accordance with the present application;
FIG. 13 is a schematic diagram of a first embodiment of a server according to the present application;
FIG. 14 is a schematic diagram of a second embodiment of a server according to the present application;
FIGS. 15-17 are schematic diagrams of an automated deployment server of the present application divided into three phases in one embodiment of a method;
FIG. 18 is a schematic diagram of a seed server keep-alive mechanism in an embodiment of a method of automatically deploying servers of the present application;
FIG. 19 is a schematic diagram of one embodiment of a solution to the seed server exception of FIG. 18;
FIG. 20 is a diagram of an embodiment of a distributed seed server providing PXE services after adding a seed server in FIG. 19;
FIG. 21 is a schematic diagram of an embodiment of the main component structure of the apparatus and server of the present application;
FIG. 22 is a main flow diagram of one embodiment of a method of automating the deployment of servers in accordance with the present application;
FIGS. 23-25 are schematic diagrams of one embodiment of a DHCP service module switching corresponding modes at three different stages in a method of automatically deploying a server according to the present application;
FIG. 26 is a flow chart of one embodiment of a method for automatically deploying a server during the process of distributing seed servers according to the present application:
FIG. 27 is a flow diagram of one embodiment of a method for automatically deploying servers during allocation of a generic server in accordance with the present application;
FIG. 28 is a flow chart of one embodiment of a seed server keep-alive mechanism in a method for automatically deploying a server according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
In the following description, suffixes such as "module", "part" or "unit" for representing elements are used only for facilitating the description of the present application, and have no particular meaning in themselves. Thus, "module," "component," or "unit" may be used in combination.
Before describing embodiments of the present application in detail, technical content related to the present application will be described.
When a large number of new factory servers such as a data center are opened, the network port iSAC (out-of-band management port) of the server needs to be allocated with addresses, and as the iSAC network port of the server and the iSAC network port of the switch generally use the same default address of factory burning of respective server manufacturers, conflict can occur in the same environment to cause the server to be unusable, and the server needs to be reconfigured according to a plan. Typical processing methods include: (1) The method is characterized in that the method comprises the steps of logging in a server out-of-band management system for modification through a Web browser manually, or using a display keyboard to sequentially connect a VGA (Video GRAPHICS ARRAY ) Video port and a USB (Universal Serial Bus ) socket of the server to enter a BIOS (Basic Input Output System) for manual modification. (2) The method is characterized in that a PC (Personal Computer ) or other single service end is used for starting PXE (Pre-boot Execution Environment, pre-starting execution environment) service, the PXE technology is used for guiding a server to start from a network, and after the server is successfully started, a configuration script is automatically issued for configuration.
The related technical scheme needs to use more manual participation, has very low efficiency and has great hidden trouble in accuracy. Even if the solution of using the PXE server to deploy the servers is a single server, the solution is still limited by the network bandwidth and the computing performance of the server when facing the server cluster with very large scale. When all servers ask for PXE boot and image downloading to the server side at the same time, the network may be blocked, so that the image downloading fails and overtime retries are caused, at the moment, the servers may need to be started manually in batches, and all automatic deployment cannot be realized; or a control maximum number of parallelism in an orderly arrangement, overall efficiency remains limited.
The embodiment of the application provides a method for automatically deploying a server, a device for automatically deploying the server, a first server, a second server and a storage medium, wherein the device firstly respectively sends first indication information to m first servers based on first address allocation requests of the m first servers to provide PXE services for the m first servers; after receiving the first indication information, the first server completes PXE starting based on the PXE service provided by the device by using the allocated first IP address; the device then provides seed server configuration services for the m first servers, the first servers configure themselves as seed servers based on the seed server configuration services provided by the device, the seed servers being capable of providing PXE services for the second servers; and then the device sends second indication information to the second server based on a second address allocation request of the second server, and the second server completes PXE starting based on the PXE service provided by the first server by using the allocated second IP address after receiving the second indication information of the device. Compared with the prior art that only other single service ends provide the PXE service, the device in the embodiment of the application helps the plurality of first servers to configure the plurality of first servers into seed servers capable of providing the PXE service after providing the PXE service for the plurality of first servers, and after the seed servers are configured, the device guides the subsequent second servers to complete PXE startup based on the PXE service provided by the plurality of first servers after becoming the seed servers, namely, the device in the embodiment of the application further has the PXE service provided by the plurality of first servers after becoming the seed servers after providing the PXE service for the plurality of first servers.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
An application environment of an embodiment of the method of the embodiment of the present application and an open source technical system supporting the embodiment of the present application will be described.
An application environment of an embodiment of the method of the embodiment of the application is shown in fig. 1, and the device of the embodiment of the application can be applied to a scene of configuring and planning networking of server cluster hardware such as a large-scale server, a switch and the like deployed for the first time by a telecom operator or a large-scale communication company.
The application environment includes the device (abbreviated as the present device) of the embodiment of the present application, a plurality of EOR (End of Row) switches, a plurality of TOR (Top of Rack) switches, and a Server cluster including a plurality of servers. The plurality of EOR switches includes EOR switch 1, EOR switch 2, … …, EOR switch n; the plurality of TOR switches includes TOR switch 1, TOR switch 2, TOR switch 3, TOR switch 4, TOR switches 5, … …, TOR switch n. TOR switches 1,2, 3 are respectively connected with EOR switch 1, TOR switches 4, 5 are respectively connected with EOR switch 2, … …, and TOR switch n is connected with EOR switch n. Server1, server2, server3, server4, server5, server6, … …, etc. are respectively connected with TOR switch 1; the Server11, server12, server13, server14, server15, server16, … …, etc. are respectively connected with the TOR switch 2; the Server21, server22, server23, server24, server25, server26, … …, etc. are respectively connected with the TOR switch 3; The Server41, server42, server43, server44, server45, server46, … …, etc. are respectively connected with the TOR switch 4; the Server51, the Server52, the Server53, the Server54, the Server55, the servers 56, … … and the like are respectively connected with the TOR switch 5; … …; server2001, server2002, server2003, server2004, server2005, server2006, … …, etc. are connected to TOR switch n, respectively. The TOR switch is located at the top of the cabinet, and the access mode is a common wiring mode from the server to the switch or from the switch to the switch, and plays a role of connecting the server with the core layer or convergence layer switch. EOR switches are centrally mounted within cabinets at the end of a column of cabinets, which require a large number of horizontal cables to be routed to the TOR switches for the equipment cabinets. Before configuration, the server is required to leave the factory on-board or an external network port to start a PXE starting function, and the out-of-band management address of the switch is a DHCP (Dynamic Host Configuration Protocol ) automatic acquisition mode. The servers are connected by TOR switches at the top of the cabinets, which are in turn networked by adjacent EOR switches (actual networking is relatively complex, as just an example). The ports of all switches are provided with unified VLAN (Virtual Local Area Network ), and the device of the embodiment of the application is connected to the EOR switch, namely, the DHCP request broadcast message (namely, IP address allocation request) of the server and the switch can be ensured to interact with the device of the embodiment of the application through a two-layer network.
The general technology for supporting the device automation deployment Server in the embodiment of the application mainly comprises a PXE technology, wherein the PXE technology is developed by Intel corporation, works in a network mode of Client/Server (Client/Server), supports a workstation (i.e. a Client) to download files such as an operating system kernel, a mirror image and the like from a remote Server (i.e. a Server) through a network, and supports starting the operating system through the network; typically, the operating system will be installed in the memory of the server (i.e., the client), and the restart will be eliminated, referred to herein simply as PXE boot (i.e., the server completes the mirror system boot by installing the operating system over the network). In the starting process of the operating system, the client may request to allocate an IP address of the management system, and then download a starting software package to the local memory for execution by using TFTP (TRIVIAL FILE TRANSFER Protocol, simple file transfer Protocol) or MTFTP (multi-point TFTP service) Protocol, and the starting software package completes the setting of the basic software of the client, so as to guide the operating system pre-installed in the client.
The PXE technology constructs a server (i.e., client) auto-configuration environment, and may also use a generic IPMI (INTELLIGENT PLATFORM MANAGEMENT INTERFACE ) interface for configuring hardware parameters. IPMI is an open free standard, which is an industrial standard adopted by peripheral devices of enterprise systems with Intel architecture, and all large server manufacturers can issue parameter configuration to the servers through the technology.
A process for installing an embodiment of an operating system using PXE technology may be seen in fig. 2, which may include the steps of:
(1) The client (i.e., server) broadcasts an address assignment request to obtain the IP address provided by the DHCP service.
(2) The PXE server responds to the address allocation request, allocates an IP address for the client, and indicates a boot file acquisition mode and an address of a service providing the boot file in the PXE server.
(3) And after the client receives the boot file, the client utilizes the allocated IP address to provide the service request boot file of the boot file to the PXE server.
(4) The service for providing the boot file in the PXE server provides the download service of the boot file for the client.
(5) After the client downloads the boot file, the boot file is analyzed, and the files such as the operating system kernel, the mirror image and the like are continuously provided for the PXE server according to the boot file. The boot file uses a standard format to write the file name and the acquisition method required in the PXE starting process, and the boot file can help the client to download files which are more suitable for the kernel, the mirror image and the like of the operating system. The PXE image is an image that the server PXE boot needs to install, typically a miniature customized image, for example: linux mirror images, which are versions of various platforms such as x86 and arm. The kernel file is a kernel requiring the prior configuration of the kernel file when the PXE image is installed, and the kernel file can be divided into an x86 architecture, an arm architecture and other architectures.
(6) The PXE server provides the service of the files such as the operating system kernel, the mirror image and the like, and provides the downloading service of the files such as the operating system kernel, the mirror image and the like for the client; so far, the client can install the operating system to complete the PXE startup after downloading files such as the kernel, the mirror image and the like of the operating system.
In some embodiments, the client may also directly download files such as kernel and mirror image of the operating system without downloading the boot file, and then install the operating system to complete the PXE startup.
In some embodiments, the operating system includes, but is not limited to: linux, windows, etc.
The method of the embodiment of the application comprises a method of a device side, a method of a first server side and a method of a second server side, and the method of the device side, the method of the first server side and the method of the second server side are combined together to enable PEX starting of a server cluster to be free from limiting the network bandwidth and the computing performance of the device (namely the server side), and the method of the device side, the method of the first server side and the method of the second server side are respectively and independently implemented and provide technical support for enabling PEX starting of the server cluster to be free from limiting the network bandwidth and the computing performance of the device (namely the server side). In order to better understand the method according to the embodiment of the present application, a method at the device side, a method at the first server side, and a method at the second server side are described below.
Referring to fig. 3 to 6, fig. 3 to 6 are flowcharts of four embodiments of a method for automatically deploying a server according to the present application, fig. 3 is a flowchart of a method for automatically deploying a device side of a server, fig. 4 is a flowchart of a method for a first server side, fig. 5 is a flowchart of a method for a second server side, and fig. 6 is a flowchart for combining a method for a device side, a method for a first server side, and a method for a second server side.
The device for automatically deploying the server is connected with n servers of a server cluster through a switch, and the servers have a pre-start execution environment PXE start function; the first servers are m servers serving as seed servers in a server cluster; the second server is a server except m first servers serving as seed servers in the server cluster.
The device of the embodiment of the application can provide PXE services for m first servers, namely the device is used as a PXE server end of the m first servers, the m first servers are used as client ends, and the m first servers can complete PXE starting under the PXE services provided by the device; the device of the embodiment of the application can also provide seed server configuration service for the m first servers, namely, after the m first servers complete PXE startup, the m first servers are assisted to be configured as seed servers, so that the m first servers can provide PXE service for the second servers; the device of the embodiment of the application can also guide the second server, so that the second server takes the first server as the PXE server end to finish the PXE start of the second server.
The method of the device end comprises the following steps: step S101 to step S104; the method of the first server side comprises the following steps: step S201 to step S204; the method of the second server side comprises the following steps: step S301 and step S302.
Step S101: the device is used for respectively sending first indication information to m first servers based on first address allocation requests of the m first servers, wherein the first indication information is used for indicating the first servers to finish PXE starting based on PXE services provided by the device by using the allocated first IP addresses, and m is smaller than n.
The m first servers may transmit a first address allocation request in the form of a broadcast to request allocation of an IP address to themselves. The m first servers may be servers that broadcast the first address allocation request first, or servers corresponding to the first address allocation request received first by the device that deploys the server automatically, or preset servers, etc. In general, the m first servers may be m servers corresponding to the first address allocation request first received by the device of the automated deployment server. m is a specified number and may be determined based on the number of servers in the server cluster.
After receiving the broadcast of the first address allocation request, the device allocates first IP addresses to m first servers respectively based on the first address allocation request, so that the m first servers utilize the first IP addresses allocated by the device to each first server to complete PXE startup based on PXE services provided by the device (namely, as a PXE server, provide download services of related files required for PXE startup, for example, provide download services of files such as an operating system kernel and an image, or provide download services of files such as a boot file, an operating system kernel and an image), thereby generating first indication information, and send the first indication information to the m first servers.
It should be noted that the device may be a monolithic device integrated together, and the device may include a plurality of ports, where the plurality of ports respectively provide a plurality of different services; the device may also include a plurality of sub-devices, each of which may have a different IP address. Thus, in some embodiments, the first indication information may also include a port of the device providing PXE services; in other embodiments, the first indication information may further include an IP address of the device providing PXE services.
Step S201: the first server receives first indication information of the device, wherein the first indication information is sent by the device based on a first address allocation request of the first server and is used for indicating the first server to complete PXE starting based on PXE services provided by the device by using an allocated first IP address.
Step S102: the device provides the PXE service for the m first servers, so that the m first servers complete PXE startup.
Step S202: and the first server completes PXE starting based on the PXE service provided by the device by using the first IP address.
After receiving the first indication information, the first server interacts with the PXE service of the device by utilizing a first IP address allocated by the device for the device according to the first indication information, and finally installs an operating system to complete the PXE starting.
In some embodiments, the PXE services may include services that provide boot files and services that provide files for operating system kernels, images, and the like.
Step S103: the device provides seed server configuration service for the m first servers, so that the m first servers are configured as seed servers, the seed servers can provide the PXE service for a second server, and the second server is a server except for the m first servers serving as seed servers in the server cluster.
Step S203: the first server configures itself as a seed server based on a seed server configuration service provided by the device, the seed server being capable of providing the PXE service to a second server, the second server being a server of the server cluster other than the m first servers as seed servers.
After the m first servers complete the PXE startup, the seed server configuration service of the device interacts with the m first servers to assist the m first servers to be configured as seed servers, and after the m first servers are configured as seed servers, the PXE service can be provided for the second server. The second server is a server except the m first servers serving as seed servers in the server cluster, and the second server is a server except the first servers serving as seed servers and not completing PXE startup.
Step S104: the device sends second indication information to the second server based on a second address allocation request of the second server, wherein the second indication information is used for indicating the second server to complete PXE starting based on PXE service provided by the first server by using the allocated second IP address.
After the m first servers complete the configuration of the seed server, the device responds to a second address allocation request of the second server and allocates a second IP address for the second server; because the m first servers have completed the configuration of the seed server, the device hopes the second server to turn to the first server as the PXE server, and the second server completes PXE starting with the assistance of the first server as the PXE server, so as to generate second indication information and send the second indication information to the second server.
In some embodiments, the second indication information may carry, in addition to the second IP address assigned by the device to the second server, an IP address of the first server that provides the PXE service to the second server.
Step S301: the second server receives second indication information of the device, wherein the second indication information is sent by the device based on a second address allocation request of the second server and is used for indicating the second server to complete PXE starting based on PXE services provided by the first server by using the allocated second IP address.
Step S204: the first server provides the PXE service for the second server, so that the second server completes PXE starting.
Step S302: and the second server completes PXE starting based on the PXE service provided by the first server by using the second IP address.
And the second server receives the second indication information, interacts with the PXE service of the first server by utilizing a second IP address distributed to the second server by the device according to the second indication information, and finally installs an operating system to finish PXE starting.
Compared with the prior art that only other single service ends provide the PXE service, the device in the embodiment of the application helps the plurality of first servers to configure the plurality of first servers into seed servers capable of providing the PXE service after providing the PXE service for the plurality of first servers, and after the seed servers are configured, the device guides the subsequent second servers to complete PXE startup based on the PXE service provided by the plurality of first servers after becoming the seed servers, namely, the device in the embodiment of the application further has the PXE service provided by the plurality of first servers after becoming the seed servers after providing the PXE service for the plurality of first servers.
In some embodiments, in step S103, the apparatus provides a seed server configuration service for the m first servers, and may further include: substep S1031 and substep S1032; step S203, the first server configures itself as a seed server based on the seed server configuration service provided by the device, which may include: substep S2031, substep S2032 and substep S2033, as shown in fig. 7.
Substep S2031: the first server sends a download request to the device, the download request being for requesting the device to download files needed to provide the PXE service.
Substep S1031: the device receives download requests of the m first servers respectively, wherein the download requests are used for requesting the device to download files required by the PXE service.
Sub-step S1032: and the device responds to the downloading request and respectively sends the file to the m first servers, so that the m first servers respectively perform configuration related to the PXE service provision based on the file.
Substep S2032: the first server receives the file transmitted by the device in response to the download request.
Substep S2033: the first server performs a configuration related to providing the PXE service based on the file.
In the embodiment of the present application, after the m first servers complete the PXE startup, a download request may be sent to the device, so as to request the device to download the file required for providing the PXE service. After the device receives the download requests of the m first servers respectively, the device can send the files to the m first servers respectively, so that the m first servers can perform configuration related to providing the PXE service based on the files respectively. After receiving the file, the first server can perform configuration related to providing the PXE service based on the file. In some embodiments, the first server configuring the associated ports based on the file in connection with providing the PXE service may include the first server configuring the associated ports based on the file such that subsequent first servers provide the PXE service using the ports.
In some embodiments, the files required by the PXE service may include boot files, operating system kernels, images, and the like. In other embodiments, the files required by the PXE service may include files such as operating system kernels, images, and the like.
In some embodiments, if the files required by the PXE service may include files such as boot files, operating system kernel, images, etc., the m first servers may first send a download request of the boot files, and the device may send the boot files to the m first servers in response to the download request of the boot files, respectively; after receiving the boot files, the m first servers send downloading requests of the operating system kernel, the mirror image and other files, and the device responds to the downloading requests of the operating system kernel, the mirror image and other files and sends the operating system kernel, the mirror image and other files to the m first servers respectively. Similarly, when the first server configures the relevant ports according to the files, the first server may also provide different ports according to the number, the type and the like of the files and configure the ports.
In some embodiments, step S103, the providing, by the apparatus, a seed server configuration service for the m first servers may include: the apparatus provides a seed server configuration service for the m first servers if it is determined that the m first servers are selected as seed servers. Also, in step S203, the first server configures itself as a seed server based on the seed server configuration service provided by the apparatus, and may include: in the event that it is determined that itself is selected as the seed server, it is configured as a seed server based on the seed server configuration service provided by the device.
In the embodiment of the application, after the m first servers are started by PXE, the m first servers and the device can interact so that both sides can determine that the m first servers are selected as seed servers. And under the condition that the two parties determine that the m first servers are selected as seed servers, the m first servers and the device interact again to configure the first servers as seed servers so as to prepare for the first servers to provide PXE services. By the method, the configuration of the seed server for the server which is not selected as the seed server can be avoided, and the configuration resources of the seed server are wasted.
In some embodiments, at the device end, the method may further include: step S105, step S106, and step S107 are as shown in fig. 8.
Step S105: the device obtains state information of the first server.
Step S106: the device determines whether the first server is abnormal according to the state information of the first server.
Step S107: the apparatus marks the first server as abnormal if it is determined that the first server is abnormal, so that the apparatus no longer indicates the abnormal first server to provide the PXE service.
In the embodiment of the application, the device needs to detect whether the first server serving as the seed server is normal or abnormal, so that the state information of the first server needs to be acquired, whether the first server is normal or abnormal is judged according to the state information of the first server, if the first server is normal, the device does not operate, if the first server is abnormal, the first server needs to be marked as abnormal, and the subsequent first server which does not indicate the abnormality any more provides the PXE service, namely the second server is not guided to take the abnormal first server as the PXE service end. In this way, the first server can be monitored to avoid that an abnormal first server affects the PXE start of a second server.
In some embodiments, at the device end, the method may further include: step S108 and step S109 are as shown in fig. 9.
Step S108: the device periodically acquires state information of the abnormal first server.
Step S109: and the device marks the abnormal first server as normal according to the state information of the abnormal first server under the condition that the abnormal first server is determined to be normal, so that the device can re-instruct the normal first server to provide PXE service.
In the embodiment of the application, the device can continuously monitor the abnormal first server, periodically acquire the state information of the abnormal first server, and when the abnormal first server is still abnormal, the device does not operate, and when the abnormal first server is recovered to be normal, the abnormal first server is marked as normal, and then the recovered first server is instructed to provide the PXE service again, namely other second servers are continuously guided to take the recovered first server as the PXE server. By the method, monitoring of the abnormal first server can be kept, PXE service is continuously provided when the abnormal first server is recovered to be normal, and PXE starting of a subsequent second server in the server cluster is prevented from being delayed due to the reduction of the number of seed servers.
In some embodiments, the method may further comprise: step S110, step S111, and step S303 are as shown in fig. 10.
Step S110: the device reselects a server from the second servers that is a seed server.
Step S111: the apparatus provides a seed server configuration service for the selected second server, and configures the selected second server as a seed server.
Step S303: the second server configures itself as a seed server based on a seed server configuration service provided by the device, the seed server being capable of providing PXE services for a subsequent second server to be deployed.
In the embodiment of the application, after the first server is abnormal, in order to avoid affecting the subsequent PXE start of the second server, the second server serving as the seed server can be reselected from the second servers (the second server which has already completed PXE start at present or the second server which has not completed PXE start at present; normally, the second server which has completed PXE start at present is selected from the second servers), and the selected second server serving as the seed server can interact with the seed server configuration service of the device, so that the selected second server is configured as the seed server. In this way, the seed servers can be added from the second servers under the condition that the first servers are abnormal, so that the delay of the PXE starting of the subsequent second servers in the server cluster due to the reduction of the number of the seed servers is avoided.
In some embodiments, the method may further include: step S205.
Step S205: the first server periodically transmits its own configuration status information to the device.
At this time, the device side, step S105, may include: the device periodically receives the configuration state information sent by the first server.
In the embodiment of the present application, the configuration status information of the first server may refer to configuration information related to providing the PXE service, and whether the first server is normal or abnormal may be determined according to the configuration status information of the first server. The first server actively and periodically transmits the configuration state information of the first server to the device, and the device can acquire the state information of the first server after periodically receiving the configuration state information transmitted by the first server, so that whether the first server is abnormal or not can be judged.
In some embodiments, at the device end, in step S105, the device acquires status information of the first server, and may further include: the device periodically or aperiodically logs in the first server and detects the state of the first server to obtain the state information of the first server.
In the embodiment of the application, the device actively acquires the state information of the first server, namely the device periodically or aperiodically logs in the first server and detects the state of the first server to acquire the state information of the first server.
In some embodiments, the means for obtaining the state information of the first server may be a combination of the two, that is, the means may receive the configuration state information sent by the first server, log on the first server periodically or aperiodically, and detect the state of the first server, to obtain the state information of the first server, and obtain the state information of the first server according to the information of the two.
In some embodiments, the method may further include: step S112.
Step S112: the apparatus transmits a third IP address allocated for the switch to the switch based on a third address allocation request of the switch.
In the embodiment of the present application, the switch may further broadcast a third address allocation request, and the device may send, to the switch, a third IP address allocated to the switch based on the third address allocation request of the switch after receiving the third address allocation request. Compared with the manual configuration of the IP address of the switch in the related art, the device in the embodiment of the application can automatically configure the IP address for the switch, so that other devices can interact with the switch or can set the related configuration of the switch.
In some embodiments, the method may further include: step S206.
Step S206: the first server automatically configures itself in the process of performing PXE starting, wherein the configuration comprises at least one of configuration of out-of-band addresses and configuration of hardware parameters.
Also, in some embodiments, the second server side, the method may further include: step S304.
Step S304: and the second server automatically configures itself in the PXE starting process, wherein the configuration comprises at least one of configuration of out-of-band addresses and configuration of hardware parameters.
In embodiments of the present application, the PXE boot of servers in a server cluster is not the ultimate goal, which is to want to automatically configure itself with the PXE boot. The configuration includes at least one of configuration of out-of-band addresses, configuration of hardware parameters. The out-of-band address of the server, i.e. the IP address of the server's own management system, is not related to the service network, and is typically used for remote configuration of the server.
In some embodiments, the server automatically configures itself during the PXE start-up process may be that the server automatically configures itself during the PXE start-up process through IPMI (INTELLIGENT PLATFORM MANAGEMENT INTERFACE ).
Referring to FIG. 11, two ways to issue commands to a server through IPMI include: (1) The client connects to the server iSAC network port, and sends the remote command to the server hardware management system by using IPMI through the network, (2) directly sends the command to the server hardware management system by using IPMI installed on the server memory or hard disk and the service operation system providing the service operation.
In an embodiment, during a PXE boot process, when the server starts the image, since the image (for example, a micro Linux image) includes tools such as IPMI and configuration scripts, a configuration command is issued to the server out-of-band through in-band when the image is started, that is, in the second mode in the IPMI diagram, the IPMI command is sent to the server hardware management system through the deployed service operating system.
Referring to fig. 12, fig. 12 is a schematic structural diagram of an embodiment of an apparatus for automatically deploying a server according to the present application, and it should be noted that the apparatus according to the embodiment of the present application can implement the method of the apparatus end, and detailed descriptions of related contents are omitted herein.
The device 100 is connected with n servers of a server cluster through a switch, the servers have a pre-boot execution environment PXE boot function, the device 100 comprises a communication module 3, a memory 1 and a processor 2, the communication module 3 is used for communication, and the memory 1 is used for storing a computer program; the processor 2 is configured to execute the computer program and to implement the method for automatically deploying a server at the device side as above when executing the computer program. The communication module 3 and the memory 1 are connected with the processor 2 through a bus.
The processor 2 may be a micro control unit, a central processing unit or a digital signal processor, among others. The memory 1 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a usb disk, a removable hard disk, or the like.
Referring to fig. 13, fig. 13 is a schematic structural diagram of a first server according to an embodiment of the present application, and it should be noted that, in the first server according to the embodiment of the present application, the method of the first server can be implemented, and detailed descriptions of related content are omitted herein, referring to the above method parts.
The first server 200 is a server of m servers in a server cluster, where the server cluster includes n servers, and m is smaller than n, the servers have a pre-boot execution environment PXE boot function, the n servers are connected to a device of an automation deployment server through a switch, the first server 200 includes a communication module 33, a memory 11, and a processor 22, the communication module 33 is used for communication, and the memory 11 is used for storing a computer program; the processor 22 is configured to execute the computer program and implement the method for automatically deploying servers at the first server side as described above when the computer program is executed. The communication module 33 and the memory 11 are connected to the processor 22 via a bus.
The processor 22 may be a micro control unit, a central processing unit or a digital signal processor, among others. The memory 11 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a usb disk, a removable hard disk, or the like.
Referring to fig. 14, fig. 14 is a schematic structural diagram of a second server according to an embodiment of the present application, and it should be noted that, the second server according to the embodiment of the present application can implement the method of the second server, and detailed descriptions of related contents are omitted herein.
The second server 300 is a server except m first servers in a server cluster, where the server cluster includes n servers, and m is smaller than n, where the servers have a pre-boot execution environment PXE boot function, the n servers are connected to a device of the automated deployment server through a switch, the second server 300 includes a communication module 333, a memory 111, and a processor 222, the communication module 333 is used for communication, and the memory 111 is used for storing a computer program; the processor 222 is configured to execute the computer program and implement the method for automatically deploying servers at the second server side as described above when the computer program is executed. The communication module 333 and the memory 111 are connected to the processor 222 via a bus.
The processor 222 may be a micro control unit, a central processing unit, or a digital signal processor, among others. The memory 111 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a usb disk, a removable hard disk, or the like.
The present application also provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement a method for automatically deploying a server as described above at a device end.
The computer readable storage medium may be an internal storage unit of the above apparatus, such as a hard disk or a memory. The computer readable storage medium may also be an external storage device of the above apparatus, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc.
The present application also provides another computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement a method for automatically deploying servers at the first server side as above.
The computer readable storage medium may be an internal storage unit of the first server, such as a hard disk or a memory. The computer readable storage medium may also be an external storage device of the first server, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc.
The present application also provides a further computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement a method of automatically deploying servers as described above at the second server side.
The computer readable storage medium may be an internal storage unit of the second server, such as a hard disk or a memory. The computer readable storage medium may also be an external storage device of the second server, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc.
The method according to the embodiment of the present application will be described in detail with reference to specific examples.
The embodiment of the application relates to a device for automatically deploying a server in a large data center and an application server, in particular to an out-of-band address and hardware parameters of the automatically deployed server.
Different interactions between the device and the server and different interactions between the servers can adopt different network transmission protocols based on the types of the interactions, the contents of the interactions and the like, and related services can be provided based on the different network transmission protocols. The DHCP protocol, FTP protocol, TFTP protocol are exemplified below.
The embodiment of the application applies the PXE technology, and the device distributes DHCP addresses (temporary used ipv4 or ipv6 addresses) to all devices of a data center by analyzing and responding to DHCP request messages (namely address distribution requests) of the switch and the server. When receiving the DHCP request message of the server, the device replies a specific DHCP response message (i.e., the first indication information and the second indication information) to the server, and the control server completes the PXE startup from the designated PXE server.
The remote PXE server for the server PXE start will be: (1) The device of the embodiment of the application provides the PXE service, and (2) the seed server provides the PXE service (the seed server is the server which is selected from the servers and completes the PXE startup and provides the PXE service).
The method solves the problems of low configuration efficiency and limitation of the configuration process by the calculation performance and the network bandwidth of the PXE server when the large data center server is deployed currently by controlling a plurality of servers to establish a mode called a seed server.
The message (message) is a data unit exchanged and transmitted in the network, namely a data block to be sent by the station at one time; the message contains the complete data information to be sent. The DHCP request message is a data message of dynamically acquiring an IP address from a DHCP server in the environment by a network port of network equipment through a broadcast message, and the data message is in a DHCP format and is mainly used for dynamically acquiring a broadcast inquiry of the IP address. The DHCP response message is a message with a format of DHCP, and is mainly used for unicast to a designated host, where the message carries an IP address assigned to the host. The request message/response message pair appears, typically as a message that the client and the server send to each other specifying interactions that can be confirmed.
The method of the embodiment of the application operates in the environment and mainly comprises the following working procedures:
the operation environment of the method of the embodiment of the application is as follows: linux or Windows.
The process involved in the method of the embodiment of the application can comprise three main stages:
Stage one: the deployment phase of EOR switches in the environment is shown in fig. 15.
In stage one, the device of the embodiment of the application can receive and respond to the DHCP request message of the switch and discard the DHCP request message of the server. At this time, the device of the embodiment of the application will send a DHCP response message carrying the allocated IP address (i.e., the third IP address) to the switch management network port that sends the DHCP request message (i.e., the third address allocation request), and the IP address (i.e., the third IP address) can be used to log in the management system of the switch to configure the switch, so as to ensure that the environment network is smooth. The deployment of TOR switches is also initiated at this stage, and may go through three main stages. The device at this stage discards the DHCP request message of the server.
Stage two: the seed server (i.e., first server) configuration phase, as shown in fig. 16.
In the second stage, the device of the embodiment of the present application may receive and respond to the DHCP request message of the switch (i.e. the third address allocation request) and the DHCP request message of the first server (i.e. the first address allocation request), and discard the DHCP request message of the normal server that is not selected as the seed server. At this time, the device of the embodiment of the application can identify the MAC address of the first server by analyzing the DHCP request message (i.e. the first address allocation request) of the first server, select the first servers (i.e. m first servers) with a designated number as seed servers according to the need, and only deploy the first servers as seed servers at this stage, the first servers can automatically download required files, complete PXE startup and perform configuration of related services, and serve as PXE servers to provide PXE services (i.e. provide download services of boot files and operating system kernel, mirror image, etc.) for PXE startup of the second server of the subsequent non-seed servers.
Stage three: the general server (i.e., second server) configuration phase is shown in fig. 17.
In stage three, the device of the embodiment of the present application may receive and respond to the DHCP request message of the switch (i.e., the third address allocation request) and the DHCP request message of the second server (i.e., the second address allocation request). At this time, the device in the embodiment of the present application may analyze the DHCP request message (i.e. the second address allocation request) of the second server to construct a DHCP response message (i.e. the second indication information), and send the DHCP response message (i.e. the second indication information) to inform the common server (i.e. the second server) to the seed server to obtain the boot file, the operating system kernel, the mirror image, etc. so as to complete PXE startup, where after the startup, the servers each acquire the configuration item from the device to perform automatic configuration.
Seed server keep-alive mechanism (i.e., a solution to determine if the first server is anomalous):
The device of the embodiment of the application is provided with a seed server keep-alive mechanism in the second stage and the third stage, and SSH (Secure Shell) is carried out by the device of the embodiment of the application through self-checking of the seed server at regular time to remotely log in the seed server to check and judge the state of the seed server, and the seed server is newly added or removed according to the state of the seed server, so that the situation that the failed seed server cannot be distributed or distributed to provide PXE service to a second server in deployment is avoided, and the whole deployment process is ensured to be orderly carried out.
1. The basis for the seed server to determine activity is shown in fig. 18:
(1) The device of the embodiment of the application receives the configuration state information of the seed server, for example: the device receives configuration state information of the seed server 1: the IP address is 192.168.100.101/16 and the MAC address is 00:00:00:00:aa:aa.
(2) The device of the embodiment of the application can log in the seed server uninterruptedly and regularly to check the state of the seed server, for example: the device will log in the seed server 2 at regular time to check the status of the seed server, resulting in: the IP address is 192.168.100.102/16 and the MAC address is 00:00:00:00:aa:bb.
The device of the embodiment of the application can acquire the state of the seed server in at least one of the two modes, and then maintain the state mark of the seed server according to the state of the seed server.
2. Solution at seed server anomaly as shown in fig. 19:
(1) And marking the address of the abnormal seed server as abnormal, and no longer distributing the address of the PXE service to the second server to be deployed subsequently. And detecting the abnormal seed server at fixed time, and when the abnormal seed server is recovered to be normal, recovering the normal mark of the seed server by the device, and providing PXE service for the second server to be deployed.
(2) And expanding the number of the seed servers, and adding selected servers in the second servers to be configured to configure the seed servers.
For example: referring to fig. 19, an anomaly of the seed server 1 is detected, the seed server 1 is marked as anomaly, and a selected seed server 3 (IP address 192.168.100.103/16, mac address 00:00:00:aa/cc) is added to the second server to be configured. Referring to fig. 20, when a to-be-provisioned server (i.e., a second server) is booted up by using the PXE service provided by the seed server, in addition to the allocation of the seed server 2 (192.168.100.102/16) to provide the PXE service to the second server, the allocation of the seed server 3 (192.168.100.103/16) to provide the PXE service to the second server is increased, and in the case that the seed server 1 is abnormal, the seed server 1 is not allocated to provide the PXE service to the second server.
(II) the device and the main component structure of the server in the embodiment of the application:
referring to fig. 21, the main functional modules are: the system comprises a main program control module, a DHCP service module (providing interactive service related to a DHCP protocol), an FTP service module (providing interactive service related to the FTP protocol), a TFTP service module (providing interactive service related to the TFTP protocol), a seed server keep-alive module, a remote seed server self-starting module and a deployment state progress module.
(1) And a main program control module:
The main program control module can be arranged in the device of the embodiment of the application and is used for controlling the program scheduling of each module and controlling the whole flow according to the running state of each module.
(2) DHCP service module:
The DHCP service module may be disposed in the device, the server, and the switch according to the embodiments of the present application, and is configured to provide an interaction service related to the DHCP protocol, including, but not limited to: and sending a DHCP request message, processing the DHCP request message, constructing a DHCP protocol response message, distributing IP addresses to the switch and the server, and informing the second server to download related files for PXE starting to a designated remote end (namely a PXE server).
(3) TFTP service module:
The TFTP service module may be provided in the apparatus and the server according to the embodiments of the present application, and is configured to provide an interaction service related to the TFTP protocol, including, but not limited to: and providing PXE service for the first server, and storing files such as boot files, operating system kernels, images and the like required by PXE startup.
(4) FTP service module:
The FTP service module may be provided in the device and the server according to the embodiments of the present application, for providing interactive services related to the FTP protocol, including but not limited to: and providing a channel for data and state interaction for the main program control module and the server which is successfully started by the PXE, storing an IP relation table to be allocated to the server, and files such as a guide file, an operating system kernel, an image and the like required by the PXE service for a common server (namely a second server) in a seed server, marking the seed server, and receiving configuration state information, an automatic allocation configuration result, a connection checking result and the like of the seed server.
(5) Seed server keep-alive module:
the seed server keep-alive module can be arranged in the device of the embodiment of the application and is used for monitoring the built remote seed server in real time, so that all deployment is ensured to be orderly carried out.
(6) Remote seed server self-starting module:
The remote seed server self-starting module can be arranged on a first server serving as a seed server or on the first server and a second server serving as seed servers, and is used for judging whether the seed server is the seed server or not through interaction with the main program control module, if so, the PXE service of the seed server is automatically created according to configuration requirements, and the PXE service is provided for a subsequent second server.
(7) Deployment state progression module:
The deployment state progress module can be arranged in the device of the embodiment of the application and is used for displaying the running state of the device, the deployment state of the access equipment in the environment and the like.
(III) main method flow:
Referring to fig. 22, the main flow includes:
(1) And starting a main program, initializing resource data, and starting a DHCP service, a TFTP service and an FTP service.
(2) The DHCP service module responds to the DHCP request message of the switch in the whole course of the three stages, and distributes out-of-band addresses for the switch to configure the switch.
(3) After the switch is configured successfully, the seed server is configured (i.e. the PXE start is completed, and the seed server is configured to provide PXE services).
(4) After the seed server is configured successfully, a common server is configured (namely, the PXE startup is completed under the guidance of the seed server).
Wherein the DHCP service module switches the corresponding mode at different stages to respond to the DHCP request message, see fig. 23 to 25. The corresponding modes are respectively: sw_only mode (as shown in fig. 23), allocation seed server mode (as shown in fig. 24), in which the DHCP service module does not respond to the DHCP request message of the server, and allocation normal server mode (as shown in fig. 25), in which the DHCP service module responds to ONLY the DHCP request message of the first server of the specified number that arrives first, and in which the DHCP service module responds to all DHCP request messages.
As shown in fig. 23, the main program control module sends an instruction for switching sw_only mode, the DHCP service module starts sw_only mode, discards the DHCP request message of the server, responds to the DHCP request message of the switch, allocates a third IP address to the switch, configures an out-of-band address of the switch, and can configure and plan the switch through the out-of-band address, thereby ensuring that all switches and servers can be connected by two-layer networks and have no loop.
As shown in fig. 24, when all EOR switches are configured successfully, it indicates that DHCP request messages broadcast by all servers in the environment can interact with DHCP service modules of the device, the main program control module will switch the DHCP service modules to an allocation seed server mode, respond to DHCP request messages of the switches to allocate a third IP address to the switches, configure out-of-band addresses of the switches, select the first server of the designated number (the first m) of the servers as a seed server for DHCP request messages of the servers, record MAC addresses thereof, mark and save the seed servers to a directory of FTP service modules of the device, and respond only to the selected MAC address as the seed server at this stage, and construct a DHCP response message Wen Gaozhi first server to obtain a related file for PXE startup from TFTP service modules of the device.
As shown in fig. 25, the main program control module sends an instruction for allocating a normal server mode, the DHCP service module starts to allocate the normal server mode, allocates a second IP address to the DHCP request message of the server, instructs the seed server to provide PXE service (i.e., the seed server serves as a PXE service end), allocates a third IP address to the switch in response to the DHCP request message of the switch, and configures an out-of-band address of the switch.
As shown in fig. 26, the seed server allocation process includes the following steps:
The DHCP service module responds to the request of the first m servers, distributes a first IP address for the servers, and designates a local TFTP service module to respectively provide PXE service for the servers. The DHCP service module records the MAC address of the seed server, marks the seed server and stores the seed server to the FTP service module. The seed server acquires a guide file, an operating system kernel, a mirror image and other files required for performing PXE starting from the TFTP service module, and completes the PXE starting. After the seed server successfully completes PXE starting, a mark of the seed server is obtained from the FTP service module, whether the seed server is the seed server or not is judged, the seed server needs to build a TFTP service module, the TFTP service module on the seed server provides PXE service for a subsequent common server, and a source file required by the PXE service can be obtained from the FTP service module of the device when the first server confirms that the seed server is the seed server. In the PXE starting process, the seed server starts the prefabricated script, acquires the relevant configuration file and the script from the FTP service module of the device, carries out relevant automatic configuration, particularly BMC (Baseboard Management Controller ) IP configuration, uploads the configuration result of the server to the FTP service module of the device through a self-starting FTP request, and the main program control module judges the configuration result through analyzing the returned file.
As shown in fig. 27, in the process of distributing a general server, the following procedure is included:
After the seed servers are all configured, the main program control module switches the DHCP service module to be in a common server mode, starts to receive all DHCP request messages in the environment, constructs a response message for the DHCP request messages of the second server to be distributed with a second IP address, and informs the second server to acquire files required by PXE starting from the TFTP service module of any seed server (namely, provides PXE service). Because the main program control module of the device is designed with a seed server keep-alive mechanism (as shown in fig. 28), the ordinary server obtains files required by the start of the PXE from the TFTP service module of any seed server, after the PXE start is completed, the mark of the seed server can be obtained from the FTP service module, and if the mark is the seed server, the source file required by the PXE service needs to be obtained from the FTP service module of the device. In the process of PXE starting, a common server starts a prefabricated script, acquires relevant configuration files and scripts from an FTP service module of the device, carries out relevant automatic configuration, particularly BMC (Baseboard Management Controller ) IP configuration, uploads configuration results of the server to the FTP service module of the device through a self-starting FTP request, and a main program control module judges the configuration results through analysis of the returned files.
As shown in fig. 28, the seed server keep-alive mechanism includes the following procedures:
the seed server keep-alive module circularly reads the seed server mark in the FTP service module of the device, logs in and detects the seed server through SSH, detects whether the seed server is abnormal, and updates the seed server mark in the FTP service module according to the state of the seed server. When the seed servers are abnormal, the configuration of the seed servers can be supplemented, for example, if the number of the seed servers is insufficient, the seed servers are configured through the ordinary servers which have completed PXE startup, so that the situation that the second server which does not complete PXE startup cannot connect with the seed servers and cannot complete PXE startup can be avoided.
The DHCP service module in the embodiment of the application has the following functions:
(1) Analyzing the DHCP request message of the server and the exchanger and constructing the DHCP response message.
(2) And monitoring, analyzing, constructing and sending a completion request response DHCP request message through a socket. When 2400 clients make requests (namely send DHCP request messages) through actual tests, the DHCP service module can accurately complete message monitoring, analysis, construction and sending within 1 minute.
(3) When the DHCP request message is analyzed, the server and the switch are distinguished through attributes such as vendor-class and uuid carried by the DHCP request message.
Compared with a single PXE server-side guide server PXE start, the embodiment of the application adopts the PXE technology, and has great promotion in the aspects of full automation, high speed and high efficiency. When the method of the embodiment of the application operates, a plurality of servers are selected and controlled to be automatically deployed into a seed server (namely a PXE server), and the main program control module guides other servers (namely a second server) to finish PXE starting from the seed server, and maintains a keep-alive mechanism and a supplement mechanism of the seed server at the same time so as to ensure high-speed automatic deployment of a large-scale server. The total deployment duration is basically not influenced by the total number of servers in the server cluster, and the more the servers, the higher the deployment efficiency.
The technical key point is that the flow control of the message analysis processing of the server and the switch in the deployment environment realizes the load balancing of calculation and bandwidth when a plurality of PXE servers provide the PXE service by analyzing the request message and constructing the response message. The main program Control module is used for carrying out centralized processing on the request message from the Control Plane, the multi-remote seed server is responsible for providing PXE service, CU (Control Plane) separation is realized on an application architecture, and the deployment efficiency and the stability of the system are improved.
The method of the embodiment of the application has the advantages that:
(1) Taking simultaneous deployment of 2000 servers as an example, if manual configuration requires a lot of manpower or extra-long time, if configuration is performed by using a common single PXE server, batch configuration is required, all deployment needs 2-3 hours and manual participation may be required; the method of the embodiment of the application does not need manual participation or other modes for batch configuration, the deployment time can be controlled to be 6-15 minutes, the rate of the server deployment is very little influenced by the total number of the servers, even if tens of thousands of servers are deployed at the same time, all the deployment can be completed within 10-20 minutes, and the larger-scale server cluster deployment shows higher efficiency.
(2) Without being limited by the network bandwidth between the configuration software and the server, the seed server is configured first, and the subsequent generic servers all receive PXE services from the seed server.
(3) The labor is saved, and the accuracy is improved.
It should be noted that, in the embodiments of the present application, all components may be replaced in any configuration process, component relationships, and operation logic according to the embodiments of the present application. The PXE server can be replaced by a TFTP service module with a network transmission protocol such as an HTTP service module, the FTP service module can be replaced by a TFTP service module, an HTTP service module with a network transmission protocol, and the software running platform can be replaced by Linux or Windows, a server or a PC. Address assignment may use DHCP protocol or DHCPv6 protocol, i.e. both IPv4 and IPv6 support.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and thus do not limit the scope of the claims of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the present application shall fall within the scope of the appended claims.

Claims (19)

1. A method for automatically deploying a server, wherein the device is applied to the automatically deploying the server, the device is connected with n servers of a server cluster through a switch, the servers have a pre-boot execution environment PXE boot function, and the method comprises:
Based on first address allocation requests of m first servers, respectively sending first indication information to the m first servers, wherein the first indication information is used for indicating the first servers to complete PXE starting based on PXE services provided by the device by using the allocated first IP addresses, and m is smaller than n;
providing the PXE service for the m first servers, so that the m first servers complete PXE startup;
Providing seed server configuration service for the m first servers, so that the m first servers are configured as seed servers, wherein the seed servers can provide the PXE service for a second server, and the second server is a server except for the m first servers serving as seed servers in the server cluster;
And sending second indication information to the second server based on a second address allocation request of the second server, wherein the second indication information is used for indicating the second server to complete PXE starting based on PXE service provided by the first server by using the allocated second IP address.
2. The method of claim 1, wherein said providing seed server configuration services for said m first servers comprises:
Respectively receiving download requests of the m first servers, wherein the download requests are used for requesting the device to download files required by the PXE service;
And responding to the downloading request, respectively sending the file to the m first servers, and respectively configuring the m first servers related to the PXE service provision based on the file.
3. The method of claim 1, wherein said providing seed server configuration services for said m first servers comprises:
Providing a seed server configuration service for the m first servers in the case that the m first servers are determined to be selected as seed servers.
4. The method according to claim 1, wherein the method further comprises:
Acquiring state information of the first server;
determining whether the first server is abnormal according to the state information of the first server;
in the event that the first server is determined to be anomalous, the first server is marked as anomalous, causing the apparatus to no longer instruct the anomalous first server to provide PXE services.
5. The method according to claim 4, wherein the method further comprises:
Periodically acquiring state information of the abnormal first server;
According to the state information of the abnormal first server, under the condition that the abnormal first server is determined to be normal, marking the abnormal first server as normal, so that the device can re-instruct the normal first server to provide PXE service;
And/or the number of the groups of groups,
Reselecting a server serving as a seed server from the second servers;
Providing a seed server configuration service for the selected second server, and enabling the selected second server to be configured as a seed server.
6. The method of claim 4, wherein the obtaining the state information of the first server comprises:
periodically receiving configuration state information sent by the first server;
And/or logging in the first server periodically or aperiodically and detecting the state of the first server to obtain the state information of the first server.
7. The method according to claim 1, wherein the method further comprises:
And transmitting a third IP address allocated for the switch to the switch based on the third address allocation request of the switch.
8. A method for automatically deploying a server, applied to a first server, where the first server is a server in m servers in a server cluster, where the server cluster includes n servers, m is smaller than n, and the server has a pre-boot execution environment PXE boot function, and the n servers are connected to a device for automatically deploying the server through a switch, where the method includes:
Receiving first indication information of the device, wherein the first indication information is sent by the device based on a first address allocation request of the first server and is used for indicating the first server to complete PXE starting based on PXE service provided by the device by using an allocated first IP address;
Using the first IP address to complete PXE starting based on the PXE service provided by the device;
configuring the seed server configuration service provided by the device as a seed server, wherein the seed server can provide the PXE service for a second server, and the second server is a server except the m first servers serving as seed servers in the server cluster;
and providing the PXE service for the second server, so that the second server completes PXE starting.
9. The method of claim 8, wherein the configuring itself as a seed server based on the seed server configuration service provided by the apparatus comprises:
sending a download request to the device, wherein the download request is used for requesting the device to download files required by the PXE service;
Receiving the file sent by the device in response to the download request;
and performing configuration related to providing the PXE service based on the file.
10. The method of claim 8, wherein the configuring itself as a seed server based on the seed server configuration service provided by the apparatus comprises:
In the event that it is determined that itself is selected as the seed server, it is configured as a seed server based on the seed server configuration service provided by the device.
11. The method of claim 8, wherein the method further comprises:
and periodically sending configuration state information of the device to the device.
12. The method of claim 8, wherein the method further comprises:
In the process of performing PXE starting, the automatic configuration is performed on the automatic configuration, wherein the configuration comprises at least one of configuration of an out-of-band address and configuration of hardware parameters.
13. A method for automatically deploying a server, wherein the method is applied to a second server, the second server is a server except m first servers serving as seed servers in a server cluster, the server cluster includes n servers, m is smaller than n, the server has a pre-boot execution environment PXE boot function, and the n servers are connected with a device for automatically deploying the server through a switch, the method includes:
Receiving second indication information of the device, wherein the second indication information is sent by the device based on a second address allocation request of the second server and is used for indicating the second server to complete PXE starting based on PXE services provided by the first server by using an allocated second IP address;
and using the second IP address to complete PXE starting based on the PXE service provided by the first server.
14. The method of claim 13, wherein the method further comprises:
the seed server configuration service provided by the device is used for configuring the seed server as a seed server, and the seed server can provide PXE service for a second server to be deployed subsequently.
15. The method of claim 13, wherein the method further comprises:
In the process of performing PXE starting, the automatic configuration is performed on the automatic configuration, wherein the configuration comprises at least one of configuration of an out-of-band address and configuration of hardware parameters.
16. An apparatus for automatically deploying servers, wherein the apparatus is connected to n servers of a server cluster through a switch, the servers have a pre-boot execution environment PXE boot function, the apparatus comprises a communication module, a memory, and a processor, the communication module is used for communication, and the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the method of automatically deploying a server according to any one of claims 1-7 when the computer program is executed.
17. A first server, wherein the first server is a server of m servers of a server cluster, the server cluster includes n servers, m is smaller than n, the server has a pre-boot execution environment PXE boot function, the n servers are connected with a device for automatically deploying the servers through a switch, the first server includes a communication module, a memory, and a processor, the communication module is used for communication, and the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the method of automatically deploying a server according to any one of claims 8-12 when the computer program is executed.
18. A second server, wherein the second server is a server except m first servers in a server cluster, the server cluster comprises n servers, m is smaller than n, the servers have a pre-boot execution environment PXE boot function, the n servers are connected with a device for automatically deploying the servers through a switch, the second server comprises a communication module, a memory and a processor, the communication module is used for communication, and the memory is used for storing a computer program; the processor is configured to execute the computer program and to implement the method of automatically deploying a server according to any one of claims 13-15 when the computer program is executed.
19. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to implement the method of automatically deploying a server according to any one of claims 1-15.
CN202310436538.6A 2023-04-13 2023-04-13 Method, device, server and storage medium for automatic deployment of server Pending CN118869469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310436538.6A CN118869469A (en) 2023-04-13 2023-04-13 Method, device, server and storage medium for automatic deployment of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310436538.6A CN118869469A (en) 2023-04-13 2023-04-13 Method, device, server and storage medium for automatic deployment of server

Publications (1)

Publication Number Publication Date
CN118869469A true CN118869469A (en) 2024-10-29

Family

ID=93177695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310436538.6A Pending CN118869469A (en) 2023-04-13 2023-04-13 Method, device, server and storage medium for automatic deployment of server

Country Status (1)

Country Link
CN (1) CN118869469A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120075043A (en) * 2025-04-22 2025-05-30 天津市天河计算机技术有限公司 Super computing cluster decentralization configuration method, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120075043A (en) * 2025-04-22 2025-05-30 天津市天河计算机技术有限公司 Super computing cluster decentralization configuration method, device and storage medium

Similar Documents

Publication Publication Date Title
US10986174B1 (en) Automatic discovery and configuration of server nodes
US11194560B2 (en) Autonomous server installation
US7600005B2 (en) Method and apparatus for provisioning heterogeneous operating systems onto heterogeneous hardware systems
CN104580475B (en) Long-range control method, terminal device, management server and tele-control system
CN109587005B (en) Connection detection method and device, computer equipment and readable storage medium
CN110719209B (en) Cluster network configuration method, system, equipment and readable storage medium
US8023434B2 (en) Arrangements for auto-merging and auto-partitioning processing components
EP3495938B1 (en) Raid configuration
US6651093B1 (en) Dynamic virtual local area network connection process
CN110971689B (en) System installation method, device, system, equipment and storage medium
US7844766B1 (en) System and method for location specific computer enabled services/monitoring
CN112948008B (en) Method for managing physical bare machine based on Ironic
US8819200B2 (en) Automated cluster node configuration
CN114866515A (en) IP address configuration method, device, electronic equipment and storage medium
CN118869469A (en) Method, device, server and storage medium for automatic deployment of server
CN118426685A (en) Cluster deployment method and computing device
CN111209125B (en) Multi-process command line implementation method
CN110955537B (en) Method and device for containing pipes by physical machine
CN113835715A (en) Chassis board, cluster system, software deployment method and storage medium
CN107659621A (en) A kind of RAID control cards collocation method and device
CN111008043A (en) Server starting method of cloud platform and terminal
CN110493055A (en) FPGA card configuration method, device, system and readable storage medium storing program for executing
CN111600751B (en) Data center management method and system
CN112311570A (en) Method and device for opening network equipment
US20240223448A1 (en) In service upgrade of radio access network radio unit of a cellular network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载