CN103475521A - Method and device for deploying server - Google Patents
Method and device for deploying server Download PDFInfo
- Publication number
- CN103475521A CN103475521A CN2013104101454A CN201310410145A CN103475521A CN 103475521 A CN103475521 A CN 103475521A CN 2013104101454 A CN2013104101454 A CN 2013104101454A CN 201310410145 A CN201310410145 A CN 201310410145A CN 103475521 A CN103475521 A CN 103475521A
- Authority
- CN
- China
- Prior art keywords
- deployment
- node
- rule
- message
- regular
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
本发明实施例公开了一种部署服务器的方法和装置,涉及控制技术领域,能够支持不同种类的服务器的部署,适用范围广。本发明实施例提供的方法应用于服务器系统,所述服务器系统包括计算节点、存储节点和I/O节点,所述方法包括:获取部署规则;在所述服务器系统包含的各节点中,确定与所述部署规则匹配的第一目标节点,所述第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;按照所述部署规则对所述第一目标节点进行部署。
The embodiment of the invention discloses a server deployment method and device, relates to the field of control technology, can support the deployment of different types of servers, and has a wide range of applications. The method provided by the embodiment of the present invention is applied to a server system, and the server system includes computing nodes, storage nodes, and I/O nodes. The method includes: acquiring deployment rules; A first target node matched by the deployment rule, where the first target node includes a target computing node, a target storage node, and a target I/O node; and the first target node is deployed according to the deployment rule.
Description
技术领域technical field
本发明涉及控制技术领域,尤其涉及一种部署服务器的方法和装置。The present invention relates to the technical field of control, in particular to a method and device for deploying a server.
背景技术Background technique
在数据中心云平台管理中,传统的部署服务器的方法为:用户根据业务需求,配置多个不同的配置文件、脚本,通过这些配置文件、脚本对服务器进行部署,从而使其达到特定的业务需求。该传统的部署服务器的方法专业性强,操作复杂,用户往往需要大量的时间和精力才能完成对一台服务器的部署。In data center cloud platform management, the traditional method of deploying servers is as follows: users configure multiple configuration files and scripts according to business needs, and deploy servers through these configuration files and scripts so that they can meet specific business needs . The traditional method for deploying servers is highly specialized and complicated to operate, and users often need a lot of time and energy to complete the deployment of a server.
针对传统部署服务器的方法的缺点,目前,可以通过对同一种类的服务器进行统一管理的方法对服务器进行部署,其中,同一种类的服务器是指配置相同种类的服务器。但是,不同的业务需求要求服务器具有不同的配置,也就是说需要使用不同种类的服务器才可以满足不同的业务需求,导致该部署方法的适用范围小。In view of the shortcomings of the traditional method of deploying servers, at present, the servers can be deployed through a method of unified management of servers of the same type, wherein the servers of the same type refer to servers configured with the same type. However, different business requirements require servers to have different configurations, that is to say, different types of servers are required to meet different business requirements, resulting in a limited scope of application of this deployment method.
发明内容Contents of the invention
本发明的实施例提供一种部署服务器的方法和装置,能够支持不同种类的服务器的部署,适用范围广。Embodiments of the present invention provide a method and device for deploying servers, which can support the deployment of different types of servers and have a wide range of applications.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,提供一种部署服务器的方法,应用于服务器系统,所述服务器系统包括计算节点、存储节点和I/O节点,所述方法包括:In a first aspect, a method for deploying a server is provided, which is applied to a server system, where the server system includes computing nodes, storage nodes, and I/O nodes, and the method includes:
获取部署规则;Get deployment rules;
在所述服务器系统包含的各节点中,确定与所述部署规则匹配的第一目标节点,所述第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;Among the nodes included in the server system, determine a first target node that matches the deployment rule, where the first target node includes a target computing node, a target storage node, and a target I/O node;
按照所述部署规则对所述第一目标节点进行部署。Deploy the first target node according to the deployment rule.
结合第一方面,在第一种可能的实现方式中,所述在所述服务器系统包含的各节点中,确定与所述部署规则匹配的第一目标节点,包括:With reference to the first aspect, in a first possible implementation manner, the determining the first target node that matches the deployment rule among the nodes included in the server system includes:
在预设的部署规则库中,确定符合所述部署规则的目标部署规则;In the preset deployment rule base, determine a target deployment rule that meets the deployment rule;
扫描所述服务器系统中的各节点,得到与所述目标部署规则对应的节点匹配的可用节点;scanning each node in the server system to obtain an available node matching the node corresponding to the target deployment rule;
在所述可用节点中确定与所述部署规则匹配的第一目标节点。A first target node that matches the deployment rule is determined among the available nodes.
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述可用节点包括可用计算节点,所述在所述可用节点中确定与所述部署规则匹配的第一目标节点,包括:With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the available nodes include available computing nodes, and the first Target nodes, including:
以第一提示消息提示用户;所述第一提示消息包括所述可用计算节点的标识,用以提示用户从所述可用计算节点中选择与所述部署规则匹配的目标计算节点;Prompting the user with a first prompt message; the first prompt message includes the identifier of the available computing node, and is used to prompt the user to select a target computing node that matches the deployment rule from the available computing nodes;
获取用户指示的所述目标计算节点。Acquire the target computing node indicated by the user.
结合第一方面,在第三种可能的实现方式中,所述获取部署规则,包括:With reference to the first aspect, in a third possible implementation manner, the acquisition of deployment rules includes:
获取用户指示的生成m个部署规则的消息,m>1;Obtain the message of generating m deployment rules indicated by the user, where m>1;
根据所述生成m个部署规则的消息,生成部署规则模版;Generate a deployment rule template according to the message generating m deployment rules;
根据所述部署规则模版生成m个所述部署规则。Generate m deployment rules according to the deployment rule template.
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,所述部署规则模版与m个所述部署规则存在关联关系,所述方法还包括:With reference to the third possible implementation of the first aspect, in a fourth possible implementation, the deployment rule template is associated with m deployment rules, and the method further includes:
获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则中的n个所述部署规则,1≤n<m;Obtaining a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is n deployment rules among the m deployment rules, 1≤n<m;
根据所述更新对象解除n个所述部署规则与所述部署规则模版的关联关系;disassociate the n deployment rules from the deployment rule template according to the update object;
按照所述更新内容更新n个所述部署规则。The n deployment rules are updated according to the update content.
结合第一方面的第三种可能的实现方式,在第五种可能的实现方式中,所述部署规则模版与m个所述部署规则存在关联关系,所述方法还包括:With reference to the third possible implementation of the first aspect, in a fifth possible implementation, the deployment rule template is associated with m deployment rules, and the method further includes:
获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则;Obtain a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is m deployment rules;
根据所述更新对象,按照所述更新内容更新所述部署规则模版;According to the update object, update the deployment rule template according to the update content;
根据所述更新后的部署规则模版更新m个所述部署规则。Updating the m deployment rules according to the updated deployment rule template.
结合第一方面、第一方面的第一种可能的实现方式至第五种可能的实现方式任一种,在第六种可能的实现方式中,所述方法还包括:In combination with the first aspect, any one of the first possible implementation manner to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner, the method further includes:
获取实际部署规则;Obtain the actual deployment rules;
当所述实际部署规则与所述部署规则不匹配时,以第二提示消息提示用户;When the actual deployment rule does not match the deployment rule, prompting the user with a second prompt message;
获取用户根据所述第二提示消息发出的指示消息;Obtaining an instruction message sent by the user according to the second prompt message;
响应所述指示消息。Respond to the indication message.
结合第一方面的第六种可能的实现方式,在第七种可能的实现方式中,所述第二指示消息为包含修改后的所述部署规则的消息;所述响应所述指示消息,包括:With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner, the second indication message is a message including the modified deployment rule; the response to the indication message includes :
在所述服务器系统包含的各节点中,确定与所述修改后的所述部署规则匹配的第二目标节点;Among the nodes included in the server system, determine a second target node that matches the modified deployment rule;
按照所述修改后的所述部署规则对所述第二目标节点进行部署;Deploy the second target node according to the modified deployment rule;
或者,所述第二指示消息为删除所述部署规则的消息;所述响应所述指示消息,包括:Alternatively, the second indication message is a message for deleting the deployment rule; the response to the indication message includes:
按照所述删除所述部署规则的消息删除所述部署规则。Delete the deployment rule according to the message of deleting the deployment rule.
第二方面,提供一种部署服务器的装置,应用于服务器系统,所述服务器系统包括计算节点、存储节点和I/O节点,所述装置包括:In a second aspect, a device for deploying a server is provided, which is applied to a server system, the server system includes computing nodes, storage nodes, and I/O nodes, and the device includes:
获取单元,用于获取部署规则;An acquisition unit, used to acquire deployment rules;
确定单元,用于在所述服务器系统包含的各节点中,确定与所述部署规则匹配的第一目标节点,所述第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;A determining unit, configured to, among the nodes included in the server system, determine a first target node that matches the deployment rule, where the first target node includes a target computing node, a target storage node, and a target I/O node;
部署单元,用于按照所述部署规则对所述第一目标节点进行部署。A deployment unit, configured to deploy the first target node according to the deployment rule.
结合第二方面,在第一种可能的实现方式中,所述确定单元具体用于,With reference to the second aspect, in a first possible implementation manner, the determining unit is specifically configured to:
在预设的部署规则库中,确定符合所述部署规则的目标部署规则;In the preset deployment rule base, determine a target deployment rule that meets the deployment rule;
扫描所述服务器系统中的各节点,得到与所述目标部署规则对应的节点匹配的可用节点;scanning each node in the server system to obtain an available node matching the node corresponding to the target deployment rule;
在所述可用节点中确定与所述部署规则匹配的第一目标节点。A first target node that matches the deployment rule is determined among the available nodes.
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述可用节点包括可用计算节点,所述确定单元具体用于,With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the available nodes include available computing nodes, and the determining unit is specifically configured to:
以第一提示消息提示用户;所述第一提示消息包括所述可用计算节点的标识,用以提示用户从所述可用计算节点中选择与所述部署规则匹配的目标计算节点;Prompting the user with a first prompt message; the first prompt message includes the identifier of the available computing node, and is used to prompt the user to select a target computing node that matches the deployment rule from the available computing nodes;
获取用户指示的所述目标计算节点。Acquire the target computing node indicated by the user.
结合第二方面,在第三种可能的实现方式中,所述获取单元具体用于,With reference to the second aspect, in a third possible implementation manner, the acquiring unit is specifically configured to:
获取用户指示的生成m个部署规则的消息,m>1;Obtain the message of generating m deployment rules indicated by the user, where m>1;
根据所述生成m个部署规则的消息,生成部署规则模版;Generate a deployment rule template according to the message generating m deployment rules;
根据所述部署规则模版生成m个所述部署规则。Generate m deployment rules according to the deployment rule template.
结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,所述部署规则模版与m个所述部署规则存在关联关系;With reference to the third possible implementation of the second aspect, in a fourth possible implementation, the deployment rule template is associated with m deployment rules;
所述获取单元还用于,获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则中的n个所述部署规则,1≤n<m;The acquiring unit is further configured to acquire a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is n deployments among the m deployment rules Rule, 1≤n<m;
所述装置还包括:The device also includes:
解除单元,用于根据所述更新对象解除n个所述部署规则与所述部署规则模版的关联关系;A disengagement unit, configured to disassociate n deployment rules from the deployment rule template according to the update object;
更新单元,用于按照所述更新内容更新n个所述部署规则。An update unit, configured to update the n deployment rules according to the update content.
结合第二方面的第三种可能的实现方式,在第五种可能的实现方式中,所述部署规则模版与m个所述部署规则存在关联关系;With reference to the third possible implementation of the second aspect, in a fifth possible implementation, the deployment rule template is associated with m deployment rules;
所述获取单元还用于,获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则;The acquiring unit is further configured to acquire a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is m deployment rules;
所述装置还包括:The device also includes:
更新单元,用于根据所述更新对象,按照所述更新内容更新所述部署规则模版;根据所述更新后的部署规则模版更新m个所述部署规则。An updating unit, configured to update the deployment rule template according to the update content according to the update object; update m deployment rules according to the updated deployment rule template.
结合第二方面、第二方面的第一种可能的实现方式至第五种可能的实现方式任一种,在第六种可能的实现方式中,所述获取单元还用于,获取实际部署规则;With reference to the second aspect, any one of the first possible implementation manner to the fifth possible implementation manner of the second aspect, in a sixth possible implementation manner, the acquiring unit is further configured to acquire the actual deployment rule ;
所述装置还包括:提示单元,用于当所述实际部署规则与所述部署规则不匹配时,以第二提示消息提示用户;The device further includes: a prompting unit, configured to prompt the user with a second prompt message when the actual deployment rule does not match the deployment rule;
所述获取单元还用于,获取用户根据所述第二提示消息发出的指示消息;The acquiring unit is further configured to acquire an indication message sent by the user according to the second prompt message;
所述装置还包括:响应单元,用于响应所述指示消息。The device further includes: a response unit, configured to respond to the indication message.
结合第二方面的第六种可能的实现方式,在第七种可能的实现方式中,所述第二指示消息为包含修改后的所述部署规则的消息;所述响应单元具体用于,With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner, the second indication message is a message including the modified deployment rule; the response unit is specifically configured to:
在所述服务器系统包含的各节点中,确定与所述修改后的所述部署规则匹配的第二目标节点;Among the nodes included in the server system, determine a second target node that matches the modified deployment rule;
按照所述修改后的所述部署规则对所述第二目标节点进行部署;Deploy the second target node according to the modified deployment rule;
或者,所述第二指示消息为删除所述部署规则的消息;所述响应单元具体用于,按照所述删除所述部署规则的消息删除所述部署规则。Alternatively, the second indication message is a message for deleting the deployment rule; the response unit is specifically configured to delete the deployment rule according to the message for deleting the deployment rule.
本发明实施例提供的部署服务器的方法和装置,应用于服务器系统,服务器系统包括计算节点、存储节点和I/O节点,通过获取部署规则,并在服务器系统包括的各节点中,确定与部署规则匹配的第一目标节点,该第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;按照该部署规则对第一目标节点进行部署。本方案通过选择第一目标节点,将选择的第一目标节点构成用户实现某种业务所需要的服务器,通过对第一目标节点的部署实现对该服务器的部署。这样,当由于业务需求不同使得所需要部署的服务器的种类不同时,可以通过选择不同的第一目标节点构成所需要的服务器,从而实现对该服务器的部署,也就是说,本方案能够支持不同种类的服务器的部署,因而有较广的适用范围。The method and device for deploying a server provided by the embodiments of the present invention are applied to a server system. The server system includes computing nodes, storage nodes, and I/O nodes. By obtaining deployment rules, and among the nodes included in the server system, determine and deploy A first target node that matches the rule, the first target node includes a target computing node, a target storage node, and a target I/O node; the first target node is deployed according to the deployment rule. In this solution, by selecting the first target node, the selected first target node constitutes the server required by the user to realize a certain service, and the deployment of the server is realized through the deployment of the first target node. In this way, when the types of servers to be deployed are different due to different business requirements, the server can be deployed by selecting different first target nodes to form the required server. That is to say, this solution can support different The deployment of various types of servers, so it has a wider scope of application.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明实施例提供的一种部署服务器的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for deploying a server provided by an embodiment of the present invention;
图2为本发明实施例提供的另一种部署服务器的方法的流程示意图;FIG. 2 is a schematic flowchart of another method for deploying a server provided by an embodiment of the present invention;
图3为本发明实施例提供的另一种部署服务器的方法的流程示意图;FIG. 3 is a schematic flowchart of another method for deploying a server provided by an embodiment of the present invention;
图4为本发明实施例提供的一种监测服务器对应的部署规则的方法的流程示意图;FIG. 4 is a schematic flowchart of a method for monitoring a deployment rule corresponding to a server provided by an embodiment of the present invention;
图5为本发明实施例提供的一种部署服务器的装置的结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for deploying a server according to an embodiment of the present invention;
图6为本发明实施例提供的另一种部署服务器的装置的结构示意图;FIG. 6 is a schematic structural diagram of another device for deploying a server provided by an embodiment of the present invention;
图7为本发明实施例提供的另一种部署服务器的装置的结构示意图。FIG. 7 is a schematic structural diagram of another apparatus for deploying a server provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
实施例一Embodiment one
参见图1,为本发明实施例提供的一种部署服务器的方法,应用于服务器系统,所述服务器系统包括计算节点、存储节点和I/O节点,该方法包括:Referring to FIG. 1, a method for deploying a server provided by an embodiment of the present invention is applied to a server system, and the server system includes computing nodes, storage nodes and I/O nodes. The method includes:
101:获取部署规则。101: Obtain a deployment rule.
其中,本发明实施例可以应用于服务器系统中,该服务器系统由计算节点、存储节点和I/O节点构成。若干个计算节点、存储节点和I/O节点可以构成一个具有完整功能的服务器。本方法的执行主体可以为对服务器系统内的各节点进行统一管理的管理模块(也可以叫做控制模块、控制器等)。Wherein, the embodiment of the present invention can be applied in a server system, and the server system is composed of computing nodes, storage nodes and I/O nodes. Several computing nodes, storage nodes and I/O nodes can form a server with complete functions. The subject of execution of this method may be a management module (also called a control module, a controller, etc.) that uniformly manages each node in the server system.
部署规则可以为用户根据业务需求所配置的。具体可以包括:安装程序、用户为实现某种业务所需要的服务器的配置等,其中,用户为实现某种业务所需要的服务器的配置可以包括:CPU的大小、硬盘的大小、带宽等,CPU的大小可以对应计算节点,硬盘的大小可以对应存储节点,带宽可以对应I/O节点。Deployment rules can be configured by users according to business needs. Specifically, it may include: the installation program, the configuration of the server required by the user to realize a certain business, etc. Among them, the configuration of the server required by the user to realize a certain business may include: the size of the CPU, the size of the hard disk, bandwidth, etc., CPU The size of the hard disk can correspond to the computing node, the size of the hard disk can correspond to the storage node, and the bandwidth can correspond to the I/O node.
102:在所述服务器系统包含的各节点中,确定与所述部署规则匹配的第一目标节点,所述第一目标节点包括目标计算节点、目标存储节点和目标I/O节点。102: Among the nodes included in the server system, determine a first target node that matches the deployment rule, where the first target node includes a target computing node, a target storage node, and a target I/O node.
其中,各节点是指,服务器系统包括的各计算节点、各存储节点和各I/O节点。Wherein, each node refers to each computing node, each storage node, and each I/O node included in the server system.
示例性的,若部署规则中包含的硬盘的大小为20G,则与该部署规则匹配的第一目标节点可以为该服务器系统中的容量为20G的存储节点。Exemplarily, if the size of the hard disk included in the deployment rule is 20G, the first target node matching the deployment rule may be a storage node with a capacity of 20G in the server system.
可选的,步骤102可以包括:Optionally,
A)在预设的部署规则库中,确定符合所述部署规则的目标部署规则;A) In the preset deployment rule base, determine the target deployment rule that conforms to the deployment rule;
B)扫描所述服务器系统中的各节点,得到与所述目标部署规则对应的节点匹配的可用节点;B) scanning each node in the server system to obtain an available node matching the node corresponding to the target deployment rule;
C)在所述可用节点中确定与所述部署规则匹配的第一目标节点。C) Determining a first target node that matches the deployment rule among the available nodes.
示例性的,可用节点可以为服务器系统包括的各节点中的、未被使用的节点;具体可以包括:可用计算节点、可用存储节点和可用I/O节点。Exemplarily, the available nodes may be unused nodes among the nodes included in the server system; specifically, available computing nodes, available storage nodes, and available I/O nodes may be included.
进一步可选的,步骤C)可以包括:Optionally, step C) may include:
以第一提示消息提示用户;所述第一提示消息包括所述可用计算节点的标识,用以提示用户从所述可用计算节点中选择与所述部署规则匹配的目标计算节点;Prompting the user with a first prompt message; the first prompt message includes the identifier of the available computing node, and is used to prompt the user to select a target computing node that matches the deployment rule from the available computing nodes;
获取用户指示的所述目标计算节点。Acquire the target computing node indicated by the user.
需要说明的是,实际实现时,步骤C)还可以包括:服务器系统自动在可用节点中确定目标计算节点。It should be noted that, in actual implementation, step C) may also include: the server system automatically determines the target computing node among the available nodes.
103:按照所述部署规则对所述第一目标节点进行部署。103: Deploy the first target node according to the deployment rule.
步骤103是对硬件的部署,以实现用户的某种业务需求。Step 103 is to deploy hardware to realize certain business requirements of users.
需要说明的是,本发明实施例中的服务器是根据用户的需求确定的,对服务器进行部署可以为对构成该服务器的各节点进行部署。具体的,将步骤102中确定的第一目标节点构成一个服务器,该服务器是指用户为实现某种业务所需要的服务器,对该服务器进行部署具体可以为对第一目标节点进行部署。It should be noted that the server in the embodiment of the present invention is determined according to the user's requirements, and the deployment of the server may be the deployment of each node constituting the server. Specifically, the first target node determined in
可选的,在本发明的一个实施例中,步骤101可以包括:Optionally, in an embodiment of the present invention, step 101 may include:
1)、获取用户指示的生成m个部署规则的消息,m>1;1) Obtain the message of generating m deployment rules indicated by the user, where m>1;
2)、根据所述生成m个部署规则的消息,生成部署规则模版;2) Generate a deployment rule template according to the message of generating m deployment rules;
3)、根据所述部署规则模版生成m个所述部署规则。3) Generate m deployment rules according to the deployment rule template.
进一步可选的,所述部署规则模版与m个所述部署规则存在关联关系,在步骤3)之后,所述方法还可以包括:更新部署规则,具体包括但不限于以下两种方式:Further optionally, the deployment rule template is associated with m deployment rules, and after step 3), the method may further include: updating the deployment rules, specifically including but not limited to the following two ways:
方式一:method one:
获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则中的n个所述部署规则,1≤n<m;Obtaining a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is n deployment rules among the m deployment rules, 1≤n<m;
根据所述更新对象解除n个所述部署规则与所述部署规则模版的关联关系;disassociate the n deployment rules from the deployment rule template according to the update object;
按照所述更新内容更新n个所述部署规则。The n deployment rules are updated according to the update content.
方式二:Method 2:
获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则;Obtain a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is m deployment rules;
根据所述更新对象,按照所述更新内容更新所述部署规则模版;According to the update object, update the deployment rule template according to the update content;
根据所述更新后的部署规则模版更新m个所述部署规则。Updating the m deployment rules according to the updated deployment rule template.
可选的,在步骤103之后,所述方法还可以包括监测服务器的实际部署规则与部署规则是否匹配,当不匹配时提示用户,具体包括:Optionally, after
i)、获取实际部署规则;i), Obtain the actual deployment rules;
ii)、当所述实际部署规则与所述部署规则不匹配时,以第二提示消息提示用户;ii) when the actual deployment rule does not match the deployment rule, prompting the user with a second prompt message;
iii)、获取用户根据所述第二提示消息发出的指示消息;iii) Obtaining an instruction message sent by the user according to the second prompt message;
iv)、响应所述指示消息。iv). Respond to the indication message.
示例性性的,在该可选的方式中,可以包括以下两种情况:Exemplarily, in this optional manner, the following two situations may be included:
情况1:所述第二指示消息为包含修改后的所述部署规则的消息;iv)具体可以包括:Case 1: The second indication message is a message containing the modified deployment rule; iv) Specifically, it may include:
在所述服务器系统包含的各节点中,确定与所述修改后的所述部署规则匹配的第二目标节点;Among the nodes included in the server system, determine a second target node that matches the modified deployment rule;
按照所述修改后的所述部署规则对所述第二目标节点进行部署;Deploy the second target node according to the modified deployment rule;
情况2:所述第二指示消息为删除所述部署规则的消息;iv)具体可以包括:Case 2: The second indication message is a message for deleting the deployment rule; iv) specifically may include:
按照所述删除所述部署规则的消息删除所述部署规则。Delete the deployment rule according to the message of deleting the deployment rule.
进一步地,若所述部署规则模版与所述部署规则存在关联关系,则在所述按照所述删除所述部署规则的消息删除所述部署规则之前,所述方法还包括:Further, if the deployment rule template is associated with the deployment rule, before deleting the deployment rule according to the message of deleting the deployment rule, the method further includes:
解除所述部署规则与所述部署规则模版的关联关系。Disassociate the deployment rule from the deployment rule template.
本发明实施例提供的部署服务器的方法,应用于服务器系统,服务器系统包括计算节点、存储节点和I/O节点,通过获取部署规则,并在服务器系统包括的各节点中,确定与部署规则匹配的第一目标节点,该第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;按照该部署规则对第一目标节点进行部署。本方案通过选择第一目标节点,将选择的第一目标节点构成用户实现某种业务所需要的服务器,通过对第一目标节点的部署实现对该服务器的部署。这样,当由于业务需求不同使得所需要部署的服务器的种类不同时,可以通过选择不同的第一目标节点构成所需要的服务器,从而实现对该服务器的部署,也就是说,本方案能够支持不同种类的服务器的部署,因而有较广的适用范围。The method for deploying a server provided by the embodiment of the present invention is applied to a server system. The server system includes computing nodes, storage nodes, and I/O nodes. By obtaining the deployment rules, and among the nodes included in the server system, it is determined that they match the deployment rules. The first target node includes a target computing node, a target storage node, and a target I/O node; the first target node is deployed according to the deployment rule. In this solution, by selecting the first target node, the selected first target node constitutes the server required by the user to realize a certain service, and the deployment of the server is realized through the deployment of the first target node. In this way, when the types of servers to be deployed are different due to different business requirements, the server can be deployed by selecting different first target nodes to form the required server. That is to say, this solution can support different The deployment of various types of servers, so it has a wider scope of application.
实施例二Embodiment two
本实施例具体描述如何对一个服务器或者多个相同种类的服务器进行部署。This embodiment specifically describes how to deploy one server or multiple servers of the same type.
参见图2,为本发明实施例提供的一种部署服务器的方法,应用于服务器系统,服务器系统包括计算节点、存储节点和I/O节点,该方法包括:Referring to FIG. 2 , a method for deploying a server provided by an embodiment of the present invention is applied to a server system. The server system includes computing nodes, storage nodes and I/O nodes. The method includes:
201:获取用户指示的生成m个部署规则的消息,m≥1。201: Obtain a message for generating m deployment rules indicated by the user, where m≥1.
其中,每个部署规则对应一个服务器。Wherein, each deployment rule corresponds to a server.
当m=1时,本实施例具体为对一个服务器进行部署;当m>1时,本实施例具体为对多个相同种类的服务器进行部署。When m=1, this embodiment specifically deploys one server; when m>1, this embodiment specifically deploys multiple servers of the same type.
202:判断m是否大于1。202: Determine whether m is greater than 1.
若是,则执行步骤203;若否,则执行步骤205。If yes, go to step 203; if not, go to step 205.
203:根据生成m个部署规则的消息,生成部署规则模版。203: Generate a deployment rule template according to the message of generating m deployment rules.
其中,该部署规则模版主要用于管理按照m个部署规则进行部署的m个服务器,具体如何管理可以包含但是不限于下述实施例三和实施例四所示的内容。Wherein, the deployment rule template is mainly used to manage m servers deployed according to m deployment rules, how to manage specifically may include but not limited to the content shown in the following embodiment three and embodiment four.
204:根据部署规则模版生成m个部署规则。204: Generate m deployment rules according to the deployment rule template.
需要说明的是,本实施例以及下述实施例三和实施例四中均默认:在执行204步骤之后,部署规则模版与该m个部署规则存在关联关系。It should be noted that, in this embodiment and in the third and fourth embodiments described below, it is defaulted that after
步骤204之后执行步骤206。Step 206 is executed after
205:根据生成m个部署规则的消息,生成1个部署规则。205: Generate 1 deployment rule according to the message of generating m deployment rules.
步骤205之后执行步骤206。Step 206 is executed after
206:在预设的部署规则库中,确定符合该m个部署规则的目标部署规则;206: In the preset deployment rule base, determine target deployment rules that meet the m deployment rules;
其中,当m大于1时,由于m个部署规则均相同,因此,该步骤206中可以具体为:在预设的部署规则库中,确定符合1个部署规则的目标部署规则。其中,部署规则库中的部署规则可以预先设置在服务器系统中,这些部署规则可以为根据经验或者项目需求设置的、较常用的部署规则。Wherein, when m is greater than 1, since the m deployment rules are all the same, the
示例性的,若部署规则所要求的硬盘的大小为19.8G,部署规则库中包含的容量大于或者等于19.8G的存储节点为20G存储节点、30G存储节点,则符合该部署规则的目标存储节点为20G存储节点、30G存储节点。同理,可以类推出确定符合部署规则的要求的计算节点和I/O节点的方法,此处不再赘述。Exemplarily, if the size of the hard disk required by the deployment rule is 19.8G, and the storage nodes with a capacity greater than or equal to 19.8G contained in the deployment rule base are 20G storage nodes and 30G storage nodes, then the target storage nodes that meet the deployment rule It is a 20G storage node and a 30G storage node. Similarly, methods for determining computing nodes and I/O nodes that meet the requirements of the deployment rules can be deduced in a similar manner, which will not be repeated here.
207:扫描服务器系统中的各节点,得到与目标部署规则对应的节点匹配的可用节点。207: Scan each node in the server system to obtain an available node that matches the node corresponding to the target deployment rule.
其中,可用节点是指,服务器系统的各节点中的、未被使用的节点;具体可以包括:可用计算节点、可用存储节点和可用I/O节点。Wherein, the available nodes refer to unused nodes among the nodes of the server system; specifically, available computing nodes, available storage nodes and available I/O nodes may be included.
208:服务器系统在可用节点中自动确定与部署规则匹配的第一目标节点。208: The server system automatically determines the first target node that matches the deployment rule among the available nodes.
具体的,服务器系统在可用计算节点中自动确定目标计算节点,在可用存储节点中自动确定目标存储节点,在可用I/O节点中自动确定目标I/O节点。Specifically, the server system automatically determines a target computing node among available computing nodes, automatically determines a target storage node among available storage nodes, and automatically determines a target I/O node among available I/O nodes.
示例性的,若可用存储节点包括5个,而部署规则所要求的存储节点为3个,则服务器系统可以自动选择其中的3个作为目标存储节点。Exemplarily, if there are 5 storage nodes available and 3 storage nodes required by the deployment rule, the server system may automatically select 3 of them as target storage nodes.
209:按照该部署规则对第一目标节点进行部署。209: Deploy the first target node according to the deployment rule.
可选的,在可用计算节点中确定目标计算节点还可以包括:Optionally, determining the target computing node among the available computing nodes may also include:
以第一提示消息提示用户,该第一提示消息包括可用计算节点的标识,用以提示用户从可用计算节点中选择目标计算节点;Prompting the user with a first prompt message, where the first prompt message includes an identifier of an available computing node, to prompt the user to select a target computing node from the available computing nodes;
获取用户指示的所述目标计算节点。Acquire the target computing node indicated by the user.
本发明实施例提供的部署服务器的方法,应用于服务器系统,在获取到用户指示的生成1个部署规则时,生成1个部署规则;在获取到用户指示的生成至少2个部署规则时,生成部署规则模版,再根据该部署规则模版生成至少2个部署规则;通过预设的部署规则库确定与部署规则匹配的第一目标节点;进而按照该部署规则对第一目标节点进行部署。本方案通过选择第一目标节点,将选择的第一目标节点构成服务器,通过对第一目标节点的部署实现对服务器的部署。这样,当由于业务需求不同使得所需要部署的服务器的种类不同时,可以通过选择不同的第一目标节点构成所需要的服务器,从而实现对该服务器的部署,也就是说,本方案能够支持不同种类的服务器的部署,因而有较广的适用范围。另外,本方案通过在获取到用户指示的生成至少2个部署规则时,生成部署规则模版,将部署规则模版与该至少2个部署规则进行关联,为统一管理该至少2个部署规则提供方便。The method for deploying a server provided by the embodiment of the present invention is applied to a server system, and generates one deployment rule when one deployment rule instructed by the user is obtained; when at least two deployment rules are obtained and generated by the user instruction, generates Deploy a rule template, and then generate at least two deployment rules according to the deployment rule template; determine the first target node matching the deployment rule through the preset deployment rule library; and then deploy the first target node according to the deployment rule. In this solution, by selecting the first target node, the selected first target node constitutes a server, and the deployment of the server is realized by deploying the first target node. In this way, when the types of servers to be deployed are different due to different business requirements, the server can be deployed by selecting different first target nodes to form the required server. That is to say, this solution can support different The deployment of various types of servers, so it has a wider scope of application. In addition, this solution provides convenience for unified management of the at least 2 deployment rules by generating a deployment rule template when at least 2 deployment rules instructed by the user are obtained, and associating the deployment rule template with the at least 2 deployment rules.
实施例三Embodiment Three
本实施例具体描述在对多个相同种类的服务器进行部署之后,如何实现对其中一个或者多个服务器对应的部署规则进行更新,其中,对多个相同种类的服务器进行部署可以参见上述实施例二。This embodiment specifically describes how to update the deployment rules corresponding to one or more servers after deploying multiple servers of the same type. For deploying multiple servers of the same type, refer to the second embodiment above. .
参见图3,为本发明实施例提供的一种部署服务器的方法,包括:Referring to Fig. 3, a method for deploying a server provided by an embodiment of the present invention includes:
301:获取用户指示的更新部署规则的消息,该消息包含更新对象和更新内容;更新对象为:m个部署规则中的n个部署规则,1≤n≤m。301: Obtain a message of updating a deployment rule indicated by a user, the message includes an update object and an update content; the update object is: n deployment rules among m deployment rules, 1≤n≤m.
其中,更新对象可以为对n个部署规则所要求的计算节点、存储节点或者I/O节点中的一种或者多种进行更新。Wherein, the update object may be to update one or more of computing nodes, storage nodes, or I/O nodes required by the n deployment rules.
302:判断n是否等于m。302: Determine whether n is equal to m.
若否,则执行步骤303;若是,则执行步骤305。If not, execute
303:根据更新对象解除n个部署规则与部署规则模版的关联关系。303: Disassociate the n deployment rules from the deployment rule template according to the update object.
304:按照更新内容更新n个部署规则。304: Update n deployment rules according to the update content.
步骤304之后执行步骤307。Step 307 is executed after
305:按照更新内容更新部署规则模版。305: Update the deployment rule template according to the update content.
306:根据更新后的部署规则模版更新n个部署规则,得到更新后的n个部署规则。306: Update n deployment rules according to the updated deployment rule template, and obtain n updated deployment rules.
307:按照更新后的n个部署规则确定与更新后的n个部署规则匹配的第三目标节点。307: Determine a third target node that matches the updated n deployment rules according to the updated n deployment rules.
其中,确定第三目标节点的过程可以参考上述实施例一和实施例二,此处不再赘述。Wherein, for the process of determining the third target node, reference may be made to the first and second embodiments above, which will not be repeated here.
需要说明的是,为了与实施例一和实施例四中的第二目标节点进行区分,本实施例中将与更新后的n个部署规则匹配的目标节点称为第三目标节点。It should be noted that, in order to distinguish it from the second target node in Embodiment 1 and Embodiment 4, the target node that matches the updated n deployment rules is called the third target node in this embodiment.
308:按照更新后的n个部署规则对第三目标节点进行部署。308: Deploy the third target node according to the updated n deployment rules.
本发明实施例提供的部署服务器的方法,在按照实施例二中的方法部署多个相同种类的服务器的基础上,若需要对其中的部分服务器对应的部署规则进行更新,则解除该部分服务器对应的部署规则与部署规则模版的关联关系,按照更新内容更新该部分服务器对应的部署规则;若需要对全部服务器对应的部署规则进行更新,则按照更新内容更新部署规则模版,根据更新后的部署规则模版生成更新后的部署规则;最后基于更新后的部署规则按照实施例二中的方法对服务器进行部署。本方案实现了在批量部署服务器的情况下单独更新或者批量更新服务器对应的部署规则,对多个相同种类的服务器的统一管理,管理方式灵活、方便。In the server deployment method provided by the embodiment of the present invention, on the basis of deploying multiple servers of the same type according to the method in Embodiment 2, if it is necessary to update the deployment rules corresponding to some of the servers, the corresponding According to the relationship between deployment rules and deployment rule templates, update the deployment rules corresponding to this part of the server according to the update content; The template generates an updated deployment rule; finally, the server is deployed according to the method in Embodiment 2 based on the updated deployment rule. This solution implements individual update or batch update of deployment rules corresponding to servers in the case of batch deployment of servers, unified management of multiple servers of the same type, and flexible and convenient management methods.
实施例四Embodiment Four
本实施例具体描述在对多个相同种类的服务器进行部署之后,监测服务器的实际部署规则与部署规则是否匹配,并在不匹配时提示用户。其中,对多个相同种类的服务器进行部署方法可以参见上述实施例二。This embodiment specifically describes whether the actual deployment rules of the servers match the deployment rules after deploying multiple servers of the same type, and prompts the user if they do not match. For the method of deploying multiple servers of the same type, reference may be made to the second embodiment above.
参见图4,为本发明实施例提供的一种监测服务器对应的部署规则的方法,包括:Referring to Fig. 4, a method for monitoring deployment rules corresponding to servers provided by an embodiment of the present invention includes:
401:获取第i个服务器的实际部署规则,i的初始值为1,1≤i≤m,m>1。401: Obtain the actual deployment rules of the i-th server, the initial value of i is 1, 1≤i≤m, m>1.
示例性的,每个服务器对应一个部署规则,第i个服务器对应第i个部署规则。服务器系统可以周期性监测或者实时监测每个服务器的实际部署规则。Exemplarily, each server corresponds to a deployment rule, and the i-th server corresponds to the i-th deployment rule. The server system can periodically monitor or monitor the actual deployment rules of each server in real time.
402:判断第i个服务器的实际部署规则与部署规则是否匹配。402: Determine whether the actual deployment rule of the i-th server matches the deployment rule.
其中,该部署规则是指实施例二中步骤201中获取的用户指示的部署规则,可以为m个部署规则中的任意一个。Wherein, the deployment rule refers to the deployment rule indicated by the user obtained in
若否,则执行步骤403;若是,则执行步骤411。If not, execute step 403; if yes, execute step 411.
403:以第二提示消息提示用户。403: Prompt the user with a second prompt message.
步骤403之后,执行步骤404或者步骤407。After step 403, step 404 or step 407 is performed.
404:获取用户根据第二提示消息发出的包含修改后的部署规则的消息。404: Obtain a message containing the modified deployment rule sent by the user according to the second prompt message.
405:解除第i个服务器对应的部署规则与部署规则模版的关联关系。405: Disassociate the deployment rule corresponding to the i-th server from the deployment rule template.
需要说明的是,由于修改后的部署规则与部署规则模版生成的部署规则不同,因此该修改后的部署规则不能再与部署规则模版保持关联关系。It should be noted that since the modified deployment rule is different from the deployment rule generated by the deployment rule template, the modified deployment rule cannot maintain an association relationship with the deployment rule template.
406:在服务器系统包括的各节点中,确定与修改后的部署规则匹配的第二目标节点。406: Among the nodes included in the server system, determine a second target node that matches the modified deployment rule.
407:按照修改后的部署规则对第二目标节点进行部署。407: Deploy the second target node according to the modified deployment rule.
其中,第二目标节点为第i个服务器对应的目标节点,也就是说,该第i个服务器由第二目标节点构成。Wherein, the second target node is the target node corresponding to the i-th server, that is, the i-th server is composed of the second target node.
步骤407之后,执行步骤411。After step 407, step 411 is performed.
408:获取用户根据第二提示消息发出的删除部署规则的消息。408: Obtain a message about deleting the deployment rule sent by the user according to the second prompt message.
409:解除第i个服务器对应的部署规则与部署规则模版的关联关系。409: Disassociate the deployment rule corresponding to the i-th server from the deployment rule template.
410:按照删除部署规则的消息删除第i个服务器对应的部署规则。410: Delete the deployment rule corresponding to the i-th server according to the message of deleting the deployment rule.
411:判断i与m是否相等。411: Determine whether i and m are equal.
若否,则执行步骤412;若是,则结束。If not, execute step 412; if yes, end.
411:i自加1。411: i increments by 1.
步骤412之后,返回步骤401。After step 412, return to step 401.
本发明实施例提供的监测服务器对应的部署规则的方法,实现了在批量部署服务器的情况下监测每个服务器对应的实际部署规则,当服务器对应的实际部署规则与批量部署服务器时的部署规则不一致时提示用户,使得用户根据该提示信息做相应的补救措施,保证了服务器系统中的服务器对应的实际部署规则与用户为实现某种业务所需要的服务器对应的部署规则(批量部署服务器时的部署规则)的一致性,提高了服务器系统的整体性能。The method for monitoring the deployment rules corresponding to the servers provided by the embodiment of the present invention realizes the monitoring of the actual deployment rules corresponding to each server in the case of deploying servers in batches, and when the actual deployment rules corresponding to the servers are inconsistent with the deployment rules when deploying servers in batches Prompt the user from time to time, so that the user can take corresponding remedial measures according to the prompt information, ensuring that the actual deployment rules corresponding to the servers in the server system and the deployment rules corresponding to the servers required by the user to achieve a certain business (deployment rules when deploying servers in batches) rules) consistency, improving the overall performance of the server system.
实施例五Embodiment five
参见图5,为本发明实施例提供的一种部署服务器的装置,应用于服务器系统,用以执行图1所示的部署服务器的方法,所述服务器系统包括计算节点、存储节点和I/O节点,所述装置包括:Referring to FIG. 5, an apparatus for deploying a server provided by an embodiment of the present invention is applied to a server system to execute the method for deploying a server shown in FIG. 1. The server system includes computing nodes, storage nodes, and I/O node, said means comprising:
获取单元51,用于获取部署规则;An acquisition unit 51, configured to acquire deployment rules;
确定单元52,用于在所述服务器系统包含的各节点中,确定与所述部署规则匹配的第一目标节点,所述第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;A determining unit 52, configured to determine a first target node that matches the deployment rule among the nodes included in the server system, where the first target node includes a target computing node, a target storage node, and a target I/O node ;
部署单元53,用于按照所述部署规则对所述第一目标节点进行部署。The deployment unit 53 is configured to deploy the first target node according to the deployment rule.
可选的,所述确定单元52具体用于,Optionally, the determining unit 52 is specifically configured to:
在预设的部署规则库中,确定符合所述部署规则的目标部署规则;In the preset deployment rule base, determine a target deployment rule that meets the deployment rule;
扫描所述服务器系统中的各节点,得到与所述目标部署规则对应的节点匹配的可用节点;scanning each node in the server system to obtain an available node matching the node corresponding to the target deployment rule;
在所述可用节点中确定与所述部署规则匹配的第一目标节点。A first target node that matches the deployment rule is determined among the available nodes.
可选的,所述可用节点包括可用计算节点,所述确定单元52具体用于,Optionally, the available nodes include available computing nodes, and the determining unit 52 is specifically configured to:
以第一提示消息提示用户;所述第一提示消息包括所述可用计算节点的标识,用以提示用户从所述可用计算节点中选择与所述部署规则匹配的目标计算节点;Prompting the user with a first prompt message; the first prompt message includes the identifier of the available computing node, and is used to prompt the user to select a target computing node that matches the deployment rule from the available computing nodes;
获取用户指示的所述目标计算节点。Acquire the target computing node indicated by the user.
可选的,所述获取单元51具体用于,Optionally, the acquiring unit 51 is specifically configured to:
获取用户指示的生成m个部署规则的消息,m>1;Obtain the message of generating m deployment rules indicated by the user, where m>1;
根据所述生成m个部署规则的消息,生成部署规则模版;Generate a deployment rule template according to the message generating m deployment rules;
根据所述部署规则模版生成m个所述部署规则。Generate m deployment rules according to the deployment rule template.
可选的,所述部署规则模版与m个所述部署规则存在关联关系;Optionally, the deployment rule template is associated with m deployment rules;
所述获取单元51还用于,获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则中的n个所述部署规则,1≤n<m;The acquisition unit 51 is further configured to acquire a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is n of the m deployment rules. Deployment rules, 1≤n<m;
参见图6,所述装置还包括:Referring to Figure 6, the device also includes:
解除单元54,用于根据所述更新对象解除n个所述部署规则与所述部署规则模版的关联关系;A release unit 54, configured to release the association relationship between n deployment rules and the deployment rule template according to the update object;
更新单元55,用于按照所述更新内容更新n个所述部署规则。An update unit 55, configured to update the n deployment rules according to the update content.
可选的,所述部署规则模版与m个所述部署规则存在关联关系;Optionally, the deployment rule template is associated with m deployment rules;
所述获取单元51还用于,获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则;The acquiring unit 51 is further configured to acquire a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is m deployment rules;
参见图6,所述装置还包括:Referring to Figure 6, the device also includes:
更新单元55,用于根据所述更新对象,按照所述更新内容更新所述部署规则模版;根据所述更新后的部署规则模版更新m个所述部署规则。The update unit 55 is configured to update the deployment rule template according to the update content according to the update object, and update m deployment rules according to the updated deployment rule template.
可选的,所述获取单元51还用于,获取实际部署规则;Optionally, the obtaining unit 51 is also used to obtain actual deployment rules;
参见图6,所述装置还包括:提示单元56,用于当所述实际部署规则与所述部署规则不匹配时,以第二提示消息提示用户;Referring to FIG. 6, the device further includes: a prompt unit 56, configured to prompt the user with a second prompt message when the actual deployment rule does not match the deployment rule;
所述获取单元51还用于,获取用户根据所述第二提示消息发出的指示消息;The obtaining unit 51 is further configured to obtain an indication message sent by the user according to the second prompt message;
所述装置还包括:响应单元57,用于响应所述指示消息。The device further includes: a response unit 57, configured to respond to the indication message.
可选的,所述第二指示消息为包含修改后的所述部署规则的消息;所述响应单元57具体用于,Optionally, the second indication message is a message containing the modified deployment rule; the response unit 57 is specifically configured to:
在所述服务器系统包含的各节点中,确定与所述修改后的所述部署规则匹配的第二目标节点;Among the nodes included in the server system, determine a second target node that matches the modified deployment rule;
按照所述修改后的所述部署规则对所述第二目标节点进行部署;Deploy the second target node according to the modified deployment rule;
或者,所述第二指示消息为删除所述部署规则的消息;所述响应单元具体用于,按照所述删除所述部署规则的消息删除所述部署规则。Alternatively, the second indication message is a message for deleting the deployment rule; the response unit is specifically configured to delete the deployment rule according to the message for deleting the deployment rule.
本发明实施例提供的部署服务器的装置,应用于服务器系统,服务器系统包括计算节点、存储节点和I/O节点,通过获取部署规则,并在服务器系统包括的各节点中,确定与部署规则匹配的第一目标节点,该第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;按照该部署规则对第一目标节点进行部署。本方案通过选择第一目标节点,将选择的第一目标节点构成用户实现某种业务所需要的服务器,通过对第一目标节点的部署实现对该服务器的部署。这样,当由于业务需求不同使得所需要部署的服务器的种类不同时,可以通过选择不同的第一目标节点构成所需要的服务器,从而实现对该服务器的部署,也就是说,本方案能够支持不同种类的服务器的部署,因而有较广的适用范围。The device for deploying a server provided by the embodiment of the present invention is applied to a server system. The server system includes computing nodes, storage nodes, and I/O nodes. By obtaining the deployment rules, and among the nodes included in the server system, it is determined that they match the deployment rules. The first target node includes a target computing node, a target storage node, and a target I/O node; the first target node is deployed according to the deployment rule. In this solution, by selecting the first target node, the selected first target node constitutes the server required by the user to realize a certain service, and the deployment of the server is realized through the deployment of the first target node. In this way, when the types of servers to be deployed are different due to different business requirements, the server can be deployed by selecting different first target nodes to form the required server. That is to say, this solution can support different The deployment of various types of servers, so it has a wider scope of application.
实施例六Embodiment six
参见图7,为本发明实施例提供的一种部署服务器的装置,应用于服务器系统,用以执行图1所示的部署服务器的方法,所述服务器系统包括计算节点、存储节点和I/O节点,所述装置包括:存储器71和处理器72,其中,Referring to FIG. 7, an apparatus for deploying a server provided by an embodiment of the present invention is applied to a server system to execute the method for deploying a server shown in FIG. 1. The server system includes computing nodes, storage nodes, and I/O node, the device includes: a memory 71 and a processor 72, wherein,
存储器71,用于存储一组代码,该代码用于控制处理器72执行如下动作:The memory 71 is used to store a set of codes, and the codes are used to control the processor 72 to perform the following actions:
获取部署规则;Get deployment rules;
在所述服务器系统包含的各节点中,确定与所述部署规则匹配的第一目标节点,所述第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;Among the nodes included in the server system, determine a first target node that matches the deployment rule, where the first target node includes a target computing node, a target storage node, and a target I/O node;
按照所述部署规则对所述第一目标节点进行部署。Deploy the first target node according to the deployment rule.
可选的,处理器72具体用于,Optionally, the processor 72 is specifically used to:
在预设的部署规则库中,确定符合所述部署规则的目标部署规则;In the preset deployment rule base, determine a target deployment rule that meets the deployment rule;
扫描所述服务器系统中的各节点,得到与所述目标部署规则对应的节点匹配的可用节点;scanning each node in the server system to obtain an available node matching the node corresponding to the target deployment rule;
在所述可用节点中确定与所述部署规则匹配的第一目标节点。A first target node that matches the deployment rule is determined among the available nodes.
可选的,所述可用节点包括可用计算节点,处理器72具体用于,Optionally, the available nodes include available computing nodes, and the processor 72 is specifically configured to:
以第一提示消息提示用户;所述第一提示消息包括所述可用计算节点的标识,用以提示用户从所述可用计算节点中选择与所述部署规则匹配的目标计算节点;Prompting the user with a first prompt message; the first prompt message includes the identifier of the available computing node, and is used to prompt the user to select a target computing node that matches the deployment rule from the available computing nodes;
获取用户指示的所述目标计算节点。Acquire the target computing node indicated by the user.
可选的,处理器72具体用于,Optionally, the processor 72 is specifically used to:
获取用户指示的生成m个部署规则的消息,m>1;Obtain the message of generating m deployment rules indicated by the user, where m>1;
根据所述生成m个部署规则的消息,生成部署规则模版;Generate a deployment rule template according to the message generating m deployment rules;
根据所述部署规则模版生成m个所述部署规则。Generate m deployment rules according to the deployment rule template.
可选的,所述部署规则模版与m个所述部署规则存在关联关系,处理器72还用于,Optionally, the deployment rule template is associated with m deployment rules, and the processor 72 is further configured to:
获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则中的n个所述部署规则,1≤n<m;Obtaining a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is n deployment rules among the m deployment rules, 1≤n<m;
根据所述更新对象解除n个所述部署规则与所述部署规则模版的关联关系;disassociate the n deployment rules from the deployment rule template according to the update object;
按照所述更新内容更新n个所述部署规则。The n deployment rules are updated according to the update content.
可选的,所述部署规则模版与m个所述部署规则存在关联关系,处理器72还用于,Optionally, the deployment rule template is associated with m deployment rules, and the processor 72 is further configured to:
获取用户指示的更新部署规则的消息,所述更新部署规则的消息包含更新对象和更新内容,所述更新对象为m个所述部署规则;Obtain a message of updating a deployment rule indicated by a user, the message of updating a deployment rule includes an update object and an update content, and the update object is m deployment rules;
根据所述更新对象,按照所述更新内容更新所述部署规则模版;According to the update object, update the deployment rule template according to the update content;
根据所述更新后的部署规则模版更新m个所述部署规则。Updating the m deployment rules according to the updated deployment rule template.
可选的,处理器72还用于,获取实际部署规则;Optionally, the processor 72 is also used to acquire actual deployment rules;
当所述实际部署规则与所述部署规则不匹配时,以第二提示消息提示用户;When the actual deployment rule does not match the deployment rule, prompting the user with a second prompt message;
获取用户根据所述第二提示消息发出的指示消息;Obtaining an instruction message sent by the user according to the second prompt message;
响应所述指示消息。Respond to the indication message.
可选的,所述第二指示消息为包含修改后的所述部署规则的消息;处理器72具体用于,在所述服务器系统包含的各节点中,确定与所述修改后的所述部署规则匹配的第二目标节点;按照所述修改后的所述部署规则对所述第二目标节点进行部署;Optionally, the second indication message is a message containing the modified deployment rule; the processor 72 is specifically configured to, in each node included in the server system, determine the A second target node that matches the rule; deploy the second target node according to the modified deployment rule;
或者,所述第二指示消息为删除所述部署规则的消息;处理器72具体用于,按照所述删除所述部署规则的消息删除所述部署规则。Alternatively, the second indication message is a message for deleting the deployment rule; the processor 72 is specifically configured to delete the deployment rule according to the message for deleting the deployment rule.
本发明实施例提供的部署服务器的装置,应用于服务器系统,服务器系统包括计算节点、存储节点和I/O节点,通过获取部署规则,并在服务器系统包括的各节点中,确定与部署规则匹配的第一目标节点,该第一目标节点包括目标计算节点、目标存储节点和目标I/O节点;按照该部署规则对第一目标节点进行部署。本方案通过选择第一目标节点,将选择的第一目标节点构成用户实现某种业务所需要的服务器,通过对第一目标节点的部署实现对该服务器的部署。这样,当由于业务需求不同使得所需要部署的服务器的种类不同时,可以通过选择不同的第一目标节点构成所需要的服务器,从而实现对该服务器的部署,也就是说,本方案能够支持不同种类的服务器的部署,因而有较广的适用范围。The device for deploying a server provided by the embodiment of the present invention is applied to a server system. The server system includes computing nodes, storage nodes, and I/O nodes. By obtaining the deployment rules, and among the nodes included in the server system, it is determined that they match the deployment rules. The first target node includes a target computing node, a target storage node, and a target I/O node; the first target node is deployed according to the deployment rule. In this solution, by selecting the first target node, the selected first target node constitutes the server required by the user to realize a certain service, and the deployment of the server is realized through the deployment of the first target node. In this way, when the types of servers to be deployed are different due to different business requirements, the server can be deployed by selecting different first target nodes to form the required server. That is to say, this solution can support different The deployment of various types of servers, so it has a wider scope of application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk or optical disk, etc., which can store program codes. medium.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310410145.4A CN103475521B (en) | 2013-09-10 | 2013-09-10 | A method and device for deploying a server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310410145.4A CN103475521B (en) | 2013-09-10 | 2013-09-10 | A method and device for deploying a server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103475521A true CN103475521A (en) | 2013-12-25 |
CN103475521B CN103475521B (en) | 2016-11-16 |
Family
ID=49800231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310410145.4A Active CN103475521B (en) | 2013-09-10 | 2013-09-10 | A method and device for deploying a server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103475521B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103685568A (en) * | 2013-12-31 | 2014-03-26 | 曙光云计算技术有限公司 | Platform service application deployment method and system of PAAS (Platform As A Service) platform under cloud computing environment |
CN107172208A (en) * | 2017-06-30 | 2017-09-15 | 联想(北京)有限公司 | The dispositions method and its system of server |
CN107769949A (en) * | 2016-08-19 | 2018-03-06 | 华为技术有限公司 | A kind of application component dispositions method and deployment node |
CN111769971A (en) * | 2020-05-28 | 2020-10-13 | 苏州浪潮智能科技有限公司 | A kind of server ad hoc network method, device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1976289A (en) * | 2006-12-22 | 2007-06-06 | 中国建设银行股份有限公司 | Program arranging method and system based on distributing network |
WO2012041763A1 (en) * | 2010-09-30 | 2012-04-05 | International Business Machines Corporation | Data transform method and data transformer |
CN102571591A (en) * | 2012-01-18 | 2012-07-11 | 中国人民解放军国防科学技术大学 | Method, edge router and system for realizing marked network communication |
-
2013
- 2013-09-10 CN CN201310410145.4A patent/CN103475521B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1976289A (en) * | 2006-12-22 | 2007-06-06 | 中国建设银行股份有限公司 | Program arranging method and system based on distributing network |
WO2012041763A1 (en) * | 2010-09-30 | 2012-04-05 | International Business Machines Corporation | Data transform method and data transformer |
CN102571591A (en) * | 2012-01-18 | 2012-07-11 | 中国人民解放军国防科学技术大学 | Method, edge router and system for realizing marked network communication |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103685568A (en) * | 2013-12-31 | 2014-03-26 | 曙光云计算技术有限公司 | Platform service application deployment method and system of PAAS (Platform As A Service) platform under cloud computing environment |
CN107769949A (en) * | 2016-08-19 | 2018-03-06 | 华为技术有限公司 | A kind of application component dispositions method and deployment node |
US10684850B2 (en) | 2016-08-19 | 2020-06-16 | Huawei Technologies Co., Ltd. | Application component deployment method and deployment node |
CN107769949B (en) * | 2016-08-19 | 2021-02-12 | 华为技术有限公司 | Application component deployment method and deployment node |
CN107172208A (en) * | 2017-06-30 | 2017-09-15 | 联想(北京)有限公司 | The dispositions method and its system of server |
CN107172208B (en) * | 2017-06-30 | 2021-09-14 | 联想(北京)有限公司 | Server deployment method and system |
CN111769971A (en) * | 2020-05-28 | 2020-10-13 | 苏州浪潮智能科技有限公司 | A kind of server ad hoc network method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103475521B (en) | 2016-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111930521A (en) | Method and device for deploying application, electronic equipment and readable storage medium | |
CN105051687B (en) | Using dispositions method and equipment | |
JP6086124B2 (en) | Information processing terminal, synchronization control method, and synchronization control program | |
JP2018530214A (en) | Method and apparatus for deploying network services | |
US11132126B1 (en) | Backup services for distributed file systems in cloud computing environments | |
CN103475521B (en) | A method and device for deploying a server | |
CN115578096A (en) | Block chain parallel transaction method, device, equipment and storage medium | |
CN106201466B (en) | Heat-based template management method | |
US20170039259A1 (en) | Method and Apparatus for Implementing Storage of File in IP Disk | |
CN110809043A (en) | Data processing method, device, equipment and storage medium based on Internet of things | |
CN107092502A (en) | A kind of application method of automatic configuration and device based on cloud operating system | |
CN112905306A (en) | Multi-cluster container management method and device, electronic equipment and storage medium | |
JP2012190296A (en) | Handwritten character conversion service configuration system and handwritten character conversion system | |
CN109508226B (en) | A management method of virtual machine life cycle based on openstack | |
US11080909B2 (en) | Image layer processing method and computing device | |
CN113434190B (en) | Data processing method and device, storage medium and electronic equipment | |
CN113342461B (en) | Equipment mounting method and device, computer equipment and readable storage medium | |
CN111740869B (en) | Physical network card-based kubernets network implementation method, system, equipment and medium | |
CN106559454B (en) | Resource access method, device and system | |
CN108322537A (en) | Method, apparatus, equipment and the storage medium in Cloud Server node resource pond | |
WO2021077862A1 (en) | File synchronization method and device | |
US10846468B2 (en) | Apparatus and methods for creating and sending table information | |
CN113297158A (en) | Cloud security product management method, device, equipment and storage medium | |
CN113721841A (en) | Data access method, device, equipment and storage medium | |
TW202232476A (en) | Building and deployment system and method of shared software solution and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20200422 Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee after: HUAWEI TECHNOLOGIES Co.,Ltd. Address before: 301, A building, room 3, building 301, foreshore Road, No. 310052, Binjiang District, Zhejiang, Hangzhou Patentee before: Hangzhou Huawei Digital Technology Co.,Ltd. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211221 Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province Patentee after: xFusion Digital Technologies Co., Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
TR01 | Transfer of patent right |
Effective date of registration: 20250305 Address after: 450046, 10th Floor, North Chuangzhi Tiandi Building, Dongshigeng Street, Longzihu Wisdom Island Middle Road East, Zhengdong New District, Zhengzhou City, Henan Province Patentee after: Henan Kunlun Technology Co.,Ltd. Country or region after: China Patentee after: xFusion Digital Technologies Co., Ltd. Address before: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province Patentee before: xFusion Digital Technologies Co., Ltd. Country or region before: China |