Summary of the invention
For solving the problems of the technologies described above, the embodiment of the invention provides a kind of server resource management system and management method, and technical scheme is as follows:
The embodiment of the invention provides a kind of server resource management system, and this system comprises: management information receiver module, management information distribution module and server resource module;
Described management information receiver module comprises the configuration information receiving element, is used for receiving the resource group configuration information that the user submits to;
Described management information distribution module comprises the configuration information extraction unit, is used for according to pre-configured resource grouping information, extracts respectively the collocation strategy corresponding to each resource group from described resource group configuration information;
Described server resource management module is used for the attribute according to the resource group, and the collocation strategy that extracts is resolved, and generates the script suitable with this resource group.
According to a kind of embodiment of the present invention, described configuration information extraction unit also is used for:
Whether the resource group configuration information version that detects user's submission has renewal, if so, then further extracts respectively the collocation strategy corresponding to each resource group from described resource group configuration information.
According to a kind of embodiment of the present invention, described configuration information extraction unit also is used for:
The collocation strategy that extracts is saved to respectively in shared memory space corresponding to each resource group.
According to a kind of embodiment of the present invention, described server resource management module specifically is used for:
From shared memory space corresponding to each resource group, obtain respectively the collocation strategy corresponding with this resource group.
According to a kind of embodiment of the present invention, described server resource management module also is used for:
Whether have renewal, if so, then further collocation strategy is resolved if detecting the collocation strategy version that extracts.
According to a kind of embodiment of the present invention, described management information receiver module also comprises:
The grouping information receiving element is used for receiving the resource grouping information that the user submits to.
According to a kind of embodiment of the present invention, described management information distribution module also comprises:
The grouping management unit is used for the resource grouping information according to user's submission, and the grouping of server resource is made amendment.
According to a kind of embodiment of the present invention, described management information distribution module also is used for:
Whether the resource grouping information version that detects user's submission has renewal, and if so, the resource grouping information of then further submitting to according to described user is made amendment to the grouping of server resource.
According to a kind of embodiment of the present invention, described management information distribution module also is used for:
For the set of resources that newly increases is joined shared memory space.
According to a kind of embodiment of the present invention, described management information distribution module also is used for:
For newly assigned shared memory space generates access credentials, and this access credentials is sent to the server resource management module.
The embodiment of the invention also provides a kind of server resource management method, and the method comprises:
The management information receiver module receives the resource group configuration information that the user submits to;
The management information distribution module extracts respectively the collocation strategy corresponding to each resource group according to pre-configured resource grouping information from described resource group configuration information;
The server resource management module is resolved the collocation strategy that extracts according to the attribute of resource group, generates the script suitable with this resource group.
According to a kind of embodiment of the present invention, the method also comprises:
Whether the resource group configuration information version that the management information distribution module detects user's submission has renewal, if so, then further extracts respectively the collocation strategy corresponding to each resource group from described resource group configuration information.
According to a kind of embodiment of the present invention, the method also comprises:
The management information distribution module is saved to the collocation strategy that extracts respectively in shared memory space corresponding to each resource group.
According to a kind of embodiment of the present invention, the method also comprises:
The server resource management module is obtained respectively the collocation strategy corresponding with this resource group from shared memory space corresponding to each resource group.
According to a kind of embodiment of the present invention, the method also comprises:
Whether the server resource management module detects the collocation strategy version that extracts renewal, if so, then further collocation strategy is resolved.
According to a kind of embodiment of the present invention, the method also comprises:
The management information receiver module receives the resource grouping information that the user submits to.
According to a kind of embodiment of the present invention, the method also comprises:
The management information distribution module is made amendment to the grouping of server resource according to the resource grouping information that the user submits to.
According to a kind of embodiment of the present invention, the method also comprises:
Whether the resource grouping information version that the management information distribution module detects user's submission has renewal, and if so, the resource grouping information of then further submitting to according to described user is made amendment to the grouping of server resource.
According to a kind of embodiment of the present invention, the method also comprises:
The management information distribution module is that the set of resources that newly increases is joined shared memory space.
According to a kind of embodiment of the present invention, the method also comprises:
The management information distribution module is that newly assigned shared memory space generates access credentials, and this access credentials is sent to the server resource management module.
Technical scheme provided by the present invention is divided into server resource different groupings in advance, the configuration information that the user only needs the management server grouping and provides.Different resource groups can be according to the attribute of self, and user's configuration information is resolved to execution script with self attributes.Use technical scheme provided by the present invention, do not need to depend on the virtual hypervisor technology of any particular vendor, and only need artificial participation seldom, can utilize unified method to realize the automation configuration of large scale scale heterogeneous server resource.
Embodiment
In order to make those skilled in the art understand better technical scheme among the present invention, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills obtain should belong to the scope of protection of the invention.
Under the applied environment of virtualized server cluster, the system manager wishes as far as possible to realize automatic management by the mode of configuration script, and can carry out batch operation to server resource.Based on the demand, the invention provides a kind of system and method that can automation bulk management server resource.
The below at first describes a kind of server resource management system provided by the present invention, referring to shown in Figure 1, this system is made of management information receiver module 100, management information distribution module 200 and server resource management module 300 3 parts, below will function and the cooperation relation of these several parts be elaborated:
Management information receiver module 100:
Management information receiver module 100 is interactive interfaces of system and system manager, and the system manager can submit resource group configuration information to system by management information receiver module 100, to realize the mass management to server resource.Referring to shown in Figure 1, in the management information receiver module, comprise at least a configuration information receiving element 110, be used for receiving the resource group configuration information that the user submits to.Here said user refers generally to the system manager, and the present invention program does not need operator's concrete identity is limited certainly.
The configuration information that the system manager submits to can adopt the mode of false code, and concrete form can be drafted voluntarily, resolves and the handled easily management gets final product as prerequisite take convenient service device resource, and the embodiment of the invention does not need to limit to the concrete form of configuration information.
The below is illustrated configuration information with one section concrete code form:
In the present invention program, it is identical that type is put in the assignment of server resource group, and the set of virtual server or the physical server of service of the same type can be provided.Wherein, Configuration Type is identical to refer to that mainly the operating system of moving is identical, for virtual server, comprises that also virtualization scheme is identical.
In above-mentioned configuration information, at first specify a server resource group Group1, illustrate that then this resource group needs the operation of adopting in batches.Wherein " File ", " Service ", " Command " represent respectively three kinds of the most frequently used operations in the server resource configuration, and the below will describe three kinds of the most frequently used operations in the server resource configuration respectively.
A. Document Editing:
The function of resource group configuration information as implied above is: create a new configuration file to destination server resource group is unified, the file attribute that need to provide comprises the resource group, access rights at the file owner, file content, file place etc.
B. Service Management
The function of resource group configuration information as implied above is: unification is carried out the On/Off condition managing to the service on the destination server resource group, and the Service Properties that need to provide comprises service name, service state.
C. command execution
Command{
rm-f/tmp/*
}
Resource group configuration information as implied above is the seek unity of action form of order of resource group.Only need provide command name, the server resource group is just carried out unified order or script.
Be understandable that, the above-mentioned concrete resource group configuration message form that provides only is used for schematically illustrating, and should not be construed as the restriction to technical solution of the present invention.
According to another embodiment of the invention, the system manager can also submit the resource grouping information to system by management information receiver module 100, to realize the grouping management to server.Referring to shown in Figure 2, in the management information receiver module 100, may further include grouping information receiving element 120, be used for receiving the resource grouping information that the user submits to.
The system manager is same group with the Server Consolidation of the same type of service that provides in the server resource, and grouping information is submitted to system by resource grouping information receiving element 120.The resource grouping information that the system manager submits to can adopt the mode of false code, and concrete form can be drafted voluntarily, and the below is the example of one section resource grouping information
Group1
192.168.1.2 192.168.1.3…
Group2
192.168.1.31 192.168.1.32…
...
Resource grouping information as implied above, according to the system manager distribution of server resource group is come array format, at first input resource group name (Group1), next input whole IP address that this group comprises ... so repeatedly, input by this way the group of whole resources and the IP address that comprises.
Be understandable that, the above-mentioned concrete resource grouping information form that provides only is used for schematically illustrating, and should not be construed as the restriction to technical solution of the present invention.
Management information distribution module 200:
Management information distribution module 200 is connected with management information receiver module 100, server resource management module 300 respectively, is used for realization the management information that the user submits to is distributed.Referring to shown in Figure 1, in management information distribution module 200, comprise at least a configuration information extraction unit 210, be used for according to pre-configured resource grouping information, from described resource group configuration information, extract respectively the collocation strategy corresponding to each resource group.
In a kind of embodiment of the present invention, configuration information extraction unit 210 can be according to pre-configured resource grouping information, using regular expression and SED(Stream Editor, a kind of online editor) mode, arrive each resource group name at the resource group configuration Information locating, then the corresponding collocation strategy of each resource group is grasped, and respectively the corresponding collocation strategy of different resource group is saved as different documents.
The collocation strategy document that obtains after the fractionation, can be kept at respectively in the shared memory space corresponding with each resource group, this memory space is distributed by management information distribution module 200, be understandable that, here the said different memory space differentiation that can be the amount of physical memory aspect, also can be differentiation in logic, for example be that different server resources is set up vertical different Shared Folders.
In a kind of embodiment of the present invention, configuration information extraction unit 210 can also detect the version of current configuration information in advance, configuration information in itself and the management information receiver module 100 is compared, if discovery version updating, then download the configuration information of latest edition from management information receiver module 100, therefrom extract the collocation strategy corresponding to each resource group.Extract complete after, can be further with before resource group configuration information and/or collocation strategy deletion.
According to another embodiment of the invention, management information distribution module 200 can also be used for realizing the server resource grouping management.Referring to shown in Figure 2, in management information distribution module 200, may further include grouping management unit 220, be used for the resource grouping information according to user's submission, the grouping of server resource is made amendment.
In a kind of embodiment of the present invention, grouping management unit 220 can using regular expression and SED instrument, parses the IP address that the resource group name claims and this group comprises from the resource grouping information, and they are placed environmental variance.
Grouping management unit 220 claims the resource group name that detects to compare with the resource grouping information of having preserved, and has increased new resource group if detect, and then creates a New Consumers, and this user can name with the title of resource group; Reduce if detect the resource group, then delete the user who is not resolved to.After user's name is upgraded end, can be the user assignment password.
After finishing the renewal of resource group, further upgrade the IP of the corresponding array of each resource group, wherein for the resource group that newly increases, create new array, the IP that this resource group is comprised places this array.
In a kind of embodiment of the present invention, grouping management unit 220 can also detect the version of current resource grouping information in advance, resource grouping information in itself and the management information receiver module 100 is compared, if discovery version updating, then download the resource grouping information of latest edition from management information receiver module 100, then further according to the resource grouping information of new edition version, the grouping of server resource is made amendment.
In a kind of embodiment of the present invention, shared memory space can also be joined for the set of resources that newly increases in grouping management unit 220, for example for new user corresponding to resource group who adds creates Shared Folders, and preserves the network path of this document folder.Simultaneously corresponding user right can be set, for example read-only/read-write etc., if Shared Folders is provided with access rights, grouping management unit 220 also needs further the credential informations such as network path of user name, password, Shared Folders are offered server resource management module 300, because server resource management module 300 is installed on every station server of resource group, therefore, therefore this step is actual is according to up-to-date resource grouping situation, credential information is sent on the IP of array corresponding to each resource group.
Flow chart shown in Figure 3, as to manage for the grouping of the 220 pairs of server resources in grouping management unit.Be understandable that, this flow process only is a kind of implementation flow process of the present invention, and step does not wherein consist of the restriction to basic scheme of the present invention.For example, grouping management unit 220 can not carry out version detection, directly according to the resource grouping information of new edition version, the grouping of server resource is made amendment.For shared memory space, the authority setting that can not conduct interviews, etc.
Server resource management module 300 can initiatively periodically send request to management information distribution module 200, also can according to the collocation strategy version updating prompting of management information distribution module 200 transmissions, send request to management information distribution module 200; 300 pairs of resulting collocation strategies of server resource management module are resolved; Etc..
Server resource management module 300:
Server resource management module 300 is connected with management information distribution module 200, be configured on every station server, its major function is to obtain collocation strategy for the different resource group from management information distribution module 200, and the attribute according to server resource group of living in, collocation strategy is resolved accordingly, generate the script suitable with the different resource group, by moving these scripts realizations to the various bookkeepings of resource group.
In a kind of embodiment of the present invention, the access credentials that server resource management module 300 can receiving management distribution of information module 200 sends over, then according to this voucher, send request to configuration distribution module 200, thereby get access to the collocation strategy that belongs to corresponding resource group.Detailed process is as follows:
Server resource management module 300 at first receives to obtain to the 200 application applications of management information distribution module the voucher of resource group configuration strategy, and the credential information content comprises user name, password, Shared Folders path etc.; Then according to this voucher, initiate request to management information distribution module 200, from Shared Folders, obtain the collocation strategy corresponding to each resource group.
After obtaining the collocation strategy corresponding to each resource group, according to the specific object of each resource group, respectively corresponding collocation strategy is resolved, generating a cover can be at the script of resource group local runtime.This analytic method has generality, according to virtualization scheme at present commonly used and be configured in virtual hands-operation system, analytic method can be divided into two classes:
Use server or the virtual machine of Linux/Unix operating system, use the physical machine of the virtual mode of Xen/KVM, can adopt the format analysis configuration file of regular expression and SED to generate command script;
Use server or the virtual machine of Windows Server series operating system, use the physical machine of the virtual mode of Vmware/Hyper-V, can adopt the mode of regular expression and POWERSHELL to resolve.
Certainly, according to the applied environment of reality, can adopt other analytic method, the present invention does not need this to limit yet.
Do not generate for different set of resources and to carry out after the script, by carrying out script, just can realize the bulk management of server resource.
In a kind of embodiment of the present invention, server resource management module 300 can also detect the version of current collocation strategy in advance, itself and the collocation strategy that obtains from management information distribution module 200 are compared, if discovery version updating, then further the collocation strategy of redaction is resolved, to generate new script.
Flow chart shown in Figure 4, as to obtain collocation strategy and collocation strategy is resolved generation script for server resource management module 300.Be understandable that, this flow process only is a kind of implementation flow process of the present invention, and step does not wherein consist of the restriction to basic scheme of the present invention.For example, server resource management module 300 can initiatively periodically send request to management information distribution module 200, also can according to the collocation strategy version updating prompting of management information distribution module 200 transmissions, send request to management information distribution module 200; Server resource management module 300 can not carried out version detection, directly resulting collocation strategy is resolved; Etc..
The system that provides for the embodiment of the invention, in concrete implementation process, can be configured according to framework as shown in Figure 5, wherein management information submits to module 100 can comprise two SVN servers, be used for the receiving system keeper respectively for organizing the renewal that server resource assembly is put with the server resource group with to each, two SVN servers can back up mutually, to avoid loss of data.
Management information distribution module 200 may operate on the server that Linux/Unix operating system is installed, and in order to guarantee its high availability, management information distribution module 200 can comprise the server more than two, takes the mode of master-slave back-up that service is provided.The SVN client is installed in Servers-all corresponding to management information distribution module 200 modules simultaneously and sets up data warehouse, be used for checking the management information version and the update content that the keeper submits to is downloaded.
Server resource management module 300 operates among each server member in each resource group, and the server member here can be physical server, also may be virtual server.The member of different resource group obtains for this resource group configuration strategy from management information distribution module server respectively, and the attribute according to the resource group, collocation strategy is resolved accordingly, generate the script suitable with the resource group, by moving these scripts realizations to the various bookkeepings of resource group.
Be understandable that, framework shown in Figure 5 only is a kind of embodiment of the present invention, should not be construed as the restriction to the present invention program.
Use scheme provided by the present invention, when realizing the extensive server resource of automatic management, used the method for grouping, the Server Consolidation of the same type of service that provides in the server resource has been become identical group, realized the resource group is carried out unified disposition and management.
Corresponding to said system embodiment, the present invention also provides a kind of server resource management method, and referring to shown in Figure 6, the method can may further comprise the steps:
S101, the management information receiver module receives the resource group configuration information that the user submits to;
S102, management information distribution module extract respectively the collocation strategy corresponding to each resource group according to pre-configured resource grouping information from described resource group configuration information;
S103, the server resource management module is resolved the collocation strategy that extracts according to the attribute of resource group, generates the script suitable with this resource group.
According to a kind of embodiment of the present invention, at S102, can also comprise:
Whether the resource group configuration information version that the management information distribution module detects user's submission has renewal, if so, then further extracts respectively the collocation strategy corresponding to each resource group from described resource group configuration information.
And
The management information distribution module is saved to the collocation strategy that extracts respectively in shared memory space corresponding to each resource group.
According to a kind of embodiment of the present invention, at S103, can also comprise:
The server resource management module is obtained respectively the collocation strategy corresponding with this resource group from shared memory space corresponding to each resource group.
Whether the server resource management module can also detect the collocation strategy version that extracts in advance renewal, if so, then further collocation strategy is resolved.
According to a kind of embodiment of the present invention, at S101, can also comprise:
The management information receiver module receives the resource grouping information that the user submits to.
Correspondingly, at S102, the management information distribution module is made amendment to the grouping of server resource according to the resource grouping information that the user submits to.
Whether the resource grouping information version that the management information distribution module can also detect user's submission has renewal, and if so, the resource grouping information of then further submitting to according to described user is made amendment to the grouping of server resource.
In addition, the management information distribution module can also be joined shared memory space for the set of resources that newly increases, and the management information distribution module is that newly assigned shared memory space generates access credentials, and this access credentials is sent to the server resource management module.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, such as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses is difference with other embodiment.Especially, for embodiment of the method, because its basic simlarity is in system embodiment, so describe fairly simplely, relevant part gets final product referring to the part explanation of system embodiment.
The above only is the specific embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.