Summary of the invention
For solving above-mentioned technical problem, the embodiment of the present invention provides a kind of server resource management system and management method, and technical scheme is as follows:
The embodiment of the present invention provides a kind of server resource management system, and this system includes: management information receiving module, management information distribution module and server resource module;
Described management information receiving module, receives unit including configuration information, for receiving the resource group configuration information that user submits to;
Described management information distribution module, including configuration information extraction unit, for according to the resource grouping information being pre-configured with, extracting the configuration strategy corresponding to each resource group from described resource group configuration information respectively;
Described server resource management module, for the attribute according to resource group, resolves the configuration strategy extracted, generates the script suitable with this resource group.
According to a kind of detailed description of the invention of the present invention, described configuration information extraction unit, it is additionally operable to:
Whether the resource group configuration information version that detection user submits to has renewal, if it is, extract the configuration strategy corresponding to each resource group further from described resource group configuration information respectively.
According to a kind of detailed description of the invention of the present invention, described configuration information extraction unit, it is additionally operable to:
The configuration strategy extracted is preserved in the shared memory space that extremely each resource group is corresponding respectively.
According to a kind of detailed description of the invention of the present invention, described server resource management module, specifically for:
From the shared memory space that each resource group is corresponding, obtain the configuration strategy corresponding with this resource group respectively.
According to a kind of detailed description of the invention of the present invention, described server resource management module, it is additionally operable to:
Whether the configuration strategy version that detection is extracted has renewal, if it is, resolve configuration strategy further.
According to a kind of detailed description of the invention of the present invention, described management information receiving module, also include:
Grouping information receives unit, for receiving the resource grouping information that user submits to.
According to a kind of detailed description of the invention of the present invention, described management information distribution module, also include:
Grouping management unit, for the resource grouping information submitted to according to user, the packet to server resource is modified.
According to a kind of detailed description of the invention of the present invention, described management information distribution module, it is additionally operable to:
Whether the resource grouping information version that detection user submits to has renewal, if it is, the resource grouping information submitted to according to described user further, the packet to server resource is modified.
According to a kind of detailed description of the invention of the present invention, described management information distribution module, it is additionally operable to:
Set of resources for newly increasing joins shared memory space.
According to a kind of detailed description of the invention of the present invention, described management information distribution module, it is additionally operable to:
Generate access credentials for newly assigned shared memory space, and this access credentials is sent to server resource management module.
The embodiment of the present invention also provides for a kind of server resource management method, and the method includes:
Management information receiving module receives the resource group configuration information that user submits to;
Management information distribution module, according to the resource grouping information being pre-configured with, extracts the configuration strategy corresponding to each resource group from described resource group configuration information respectively;
The configuration strategy extracted, according to the attribute of resource group, is resolved by server resource management module, generates the script suitable with this resource group.
According to a kind of detailed description of the invention of the present invention, the method also includes:
Whether the resource group configuration information version that management information distribution module detection user submits to has renewal, if it is, extract the configuration strategy corresponding to each resource group further from described resource group configuration information respectively.
According to a kind of detailed description of the invention of the present invention, the method also includes:
The configuration strategy extracted is preserved in the shared memory space that extremely each resource group is corresponding by management information distribution module respectively.
According to a kind of detailed description of the invention of the present invention, the method also includes:
Server resource management module, from the shared memory space that each resource group is corresponding, obtains the configuration strategy corresponding with this resource group respectively.
According to a kind of detailed description of the invention of the present invention, the method also includes:
Whether the configuration strategy version that the detection of server resource management module is extracted has renewal, if it is, resolve configuration strategy further.
According to a kind of detailed description of the invention of the present invention, the method also includes:
Management information receiving module receives the resource grouping information that user submits to.
According to a kind of detailed description of the invention of the present invention, the method also includes:
The resource grouping information that management information distribution module is submitted to according to user, the packet to server resource is modified.
According to a kind of detailed description of the invention of the present invention, the method also includes:
Whether the resource grouping information version that management information distribution module detection user submits to has renewal, if it is, the resource grouping information submitted to according to described user further, the packet to server resource is modified.
According to a kind of detailed description of the invention of the present invention, the method also includes:
Management information distribution module is that the set of resources newly increased joins shared memory space.
According to a kind of detailed description of the invention of the present invention, the method also includes:
Management information distribution module is that newly assigned shared memory space generates access credentials, and sends this access credentials to server resource management module.
Technical scheme provided by the present invention, is divided into different packets in advance by server resource, and user only needs the configuration information managing server packet and providing.The configuration information of user can be resolved to the execution script with self attributes according to the attribute of self by different resource groups.Apply technical scheme provided by the present invention, it is not necessary to depend on the virtualization hypervisor technology of any particular vendor, and have only to little artificial participation, i.e. may utilize unified method and realize the automatic configuration of large scale scale heterogeneous server resource.
Detailed description of the invention
For the technical scheme making those skilled in the art be more fully understood that in the present invention, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained, all should belong to the scope of protection of the invention.
Under the applied environment of virtualized server cluster, system manager wishes to realize by the way of configuration script as far as possible automated management, and server resource can be carried out batch operation.Based on the demand, the present invention provide a kind of can be with the system and method for automatization's bulk management server resource.
First below a kind of server resource management system provided by the present invention is illustrated, shown in Figure 1, this system is constituted by managing information receiving module 100, management information distribution module 200 and server resource management module 300 3 part, will be described in detail function and the cooperation relation of these parts below:
Management information receiving module 100:
Management information receiving module 100 is the interactive interface of system and system manager, and system manager can submit resource group configuration information by management information receiving module 100 to system, to realize the management of the mass to server resource.Shown in Figure 1, in management information receiving module, at least include that a configuration information receives unit 110, for receiving the resource group configuration information that user submits to.User mentioned here refers generally to system manager, and certain the present invention program is not required to be defined the concrete identity of operator.
The configuration information that system manager submits to can be to use in the way of false code, and concrete form can be drafted voluntarily, and by convenient service device resource resolution and premised on facilitating operation management, the embodiment of the present invention is made without restriction to the concrete form of configuration information.
Below with one section of concrete code form, configuration information is illustrated:
In the present invention program, server resource group refers to that Configuration Type is identical, using the teaching of the invention it is possible to provide with virtual server or the set of physical server of type of service.Wherein, Configuration Type is identical, and to be primarily referred to as run operating system identical, for virtual server, also includes that virtualization scheme is identical.
In above-mentioned configuration information, first specify server resource group Group1, then illustrate that this resource group needs the operation that batch uses.Wherein " File ", " Service ", " Command " represent three kinds of the most frequently used operations in configuring server resource respectively, and in configuring server resource respectively below, three kinds of the most frequently used operations illustrate.
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, it is desirable to provide file attribute include file owners, file content, the resource group at file place, access rights etc..
B. Service Management
The function of resource group configuration information as implied above is: unified service in destination server resource group is opened/closed mode management, it is desirable to provide Service Properties include service name, service state.
C. execution is ordered
Command{
rm-f/tmp/*
}
Resource group configuration information as implied above is that resource group is sought unity of action the form of order.Only command name, server resource group need to be provided just to perform unified order or script.
It is understood that the concrete resource group configuration message form of above-mentioned offer, it is only used for schematically illustrating, should not be construed as the restriction to technical solution of the present invention.
According to another embodiment of the invention, system manager can also submit resource grouping information by management information receiving module 100 to system, to realize the grouping management to server.Shown in Figure 2, management information receiving module in 100, may further include grouping information receive unit 120, for receive user submit to resource grouping information.
The Server Consolidation of the same type of service provided in server resource is same group by system manager, by resource grouping information, grouping information is received unit 120 and submits to system.The resource grouping information that system manager submits to can be in the way of using false code, and concrete form can be drafted voluntarily, and the example of one section resource grouping information is presented herein below
Group1
192.168.1.2192.168.1.3…
Group2
192.168.1.31192.168.1.32…
Resource grouping information as implied above, according to system manager, the distribution of server resource group is carried out array format, first resource group names (Group1) is inputted, next whole IP addresses that this group comprises are inputted ... the most repeatedly, the group inputting whole resource by this way and the IP address comprised.
It is understood that the concrete resource grouping information form of above-mentioned offer, it is only used for schematically illustrating, 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 receiving module 100, server resource management module 300 respectively, is distributed for the management information realizing submitting user to.Shown in Figure 1, in management information distribution module 200, at least include a configuration information extraction unit 210, for according to the resource grouping information being pre-configured with, extracting the configuration strategy corresponding to each resource group from described resource group configuration information respectively.
In a kind of detailed description of the invention of the present invention, configuration information extraction unit 210 can be according to the resource grouping information being pre-configured with, application regular expression and SED(StreamEditor, a kind of online editor) mode, at resource group configuration Information locating to each resource group names, then the configuration strategy corresponding to each resource group is captured, and respectively the configuration strategy corresponding to different resource group is saved as different documents.
The configuration policy document obtained after fractionation, can be saved in respectively in the shared memory space corresponding with each resource group, this memory space is distributed by managing information distribution module 200, it is understandable that, different memory space mentioned here can be the differentiation of amount of physical memory aspect, can also be differentiation in logic, the most different server resources sets up vertical different Shared Folders.
In a kind of detailed description of the invention of the present invention, configuration information extraction unit 210 can also detect the version of current configuration information in advance, it is contrasted with the configuration information in management information receiving module 100, if discovery version updating, then download the configuration information of latest edition from management information receiving module 100, therefrom extract the configuration strategy corresponding to each resource group.After extraction, can further resource group configuration information before and/or configuration strategy be deleted.
According to another embodiment of the invention, management information distribution module 200 can be also used for realizing server resource grouping management.Shown in Figure 2, in management information distribution module 200, may further include grouping management unit 220, for the resource grouping information submitted to according to user, the packet to server resource is modified.
In a kind of detailed description of the invention of the present invention, grouping management unit 220 can apply regular expression and SED instrument, parses the IP address that resource group names claims and this group comprises, they be placed in environmental variable from resource grouping information.
The resource group names detected is claimed to compare with the most saved resource grouping information by grouping management unit 220, if be detected that add new resource group, then creates a new user, and this user can name by the title of resource group;If be detected that resource group reduces, then delete the user not being resolved to.After user's name renewal terminates, it can be user's assignment of password.
After completing the renewal of resource group, update the IP of each resource group correspondence array further, wherein for the resource group newly increased, create new array, the IP that this resource group comprises is placed in this array.
In a kind of detailed description of the invention of the present invention, grouping management unit 220 can also detect the version of Current resource grouping information in advance, it is contrasted with the resource grouping information in management information receiving module 100, if discovery version updating, the resource grouping information of latest edition is then downloaded from management information receiving module 100, the most further according to the resource grouping information of new edition version, the packet to server resource is modified.
In a kind of detailed description of the invention of the present invention, grouping management unit 220 can also join shared memory space for the set of resources that newly increases, and user corresponding to the most newly added resource group creates Shared Folders, and preserves the network path of this document folder.Corresponding user right can be set simultaneously, the most read-only/read-write etc., if Shared Folders is provided with access rights, grouping management unit 220 also needs to further user name, password, the credential information such as network path of Shared Folders are supplied to server resource management module 300, owing to server resource management module 300 is arranged on every station server of resource group, therefore, therefore this step is really according to up-to-date resource packet situation, is sent on the IP of the extremely array that each resource group is corresponding by credential information.
Shown in Fig. 3, for grouping management unit 220, server resource is grouped the flow chart being managed.It is understood that the one that this flow process is only the present invention is embodied as flow process, step therein is not intended that the restriction to basic scheme of the present invention.Such as, grouping management unit 220 can not carry out version detection, and directly according to the resource grouping information of new edition version, the packet to server resource is modified.For shared memory space, can not conduct interviews priority assignation, etc..
Server resource management module 300 actively can periodically send request to management information distribution module 200, it is also possible to the configuration strategy version updating prompting sent according to management information distribution module 200, sends request to management information distribution module 200;Obtained configuration strategy is resolved by server resource management module 300;Etc..
Server resource management module 300:
Server resource management module 300 is connected with management information distribution module 200, it is arranged on every station server, its major function is to obtain the configuration strategy for different resource group from management information distribution module 200, and according to the attribute of resource group residing for server, configuration strategy is resolved accordingly, generate the script suitable with different resource group, realize the various management operations to resource group by running these scripts.
In a kind of detailed description of the invention of the present invention, server resource management module 300 can receive the access credentials that management information distribution module 200 sends over, then according to this voucher, send request to configuration distribution module 200, thus get the configuration strategy belonging to corresponding resource group.Detailed process is as follows:
First server resource management module 300 receives the voucher for obtaining resource group configuration strategy to management information distribution module 200 application application, and credential information content includes 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 configuration strategy corresponding to each resource group.
After obtaining corresponding to the configuration strategy of each resource group, according to the specific object of each resource group, respectively corresponding configuration strategy is resolved, generate a set of can be at the script of resource group local runtime.This analytic method has universality, according at present conventional virtualization scheme and configure operating system on a virtual machine, analytic method can be divided into two classes:
Use server or the virtual machine of Linux/Unix operating system, use the physical machine of Xen/KVM virtualization mode, the format analysis configuration file of regular expression and SED can be used to generate command script;
Use server or the virtual machine of WindowsServer sequence of maneuvers system, use the physical machine of Vmware/Hyper-V virtualization mode, can resolve in the way of using regular expression and POWERSHELL.
Certainly, according to actual applied environment, it would however also be possible to employ other analytic method, this is not required to be defined by the present invention.
After not generating execution script for different set of resources, by performing script, it is possible to realize the bulk management of server resource.
In a kind of detailed description of the invention of the present invention, server resource management module 300 can also detect the version being currently configured strategy in advance, it is contrasted with the configuration strategy obtained from management information distribution module 200, if discovery version updating, the most further the configuration strategy of redaction is resolved, to generate new script.
Shown in Fig. 4, obtain for server resource management module 300 and configure strategy and configuration strategy carries out resolving the flow chart of generation script.It is understood that the one that this flow process is only the present invention is embodied as flow process, step therein is not intended that the restriction to basic scheme of the present invention.Such as, server resource management module 300 actively can periodically send request to management information distribution module 200, it is also possible to the configuration strategy version updating prompting sent according to management information distribution module 200, sends request to management information distribution module 200;Server resource management module 300 can not carry out version detection, directly resolves obtained configuration strategy;Etc..
The system that the embodiment of the present invention is provided, in concrete implementation process, can configure according to framework as shown in Figure 5, wherein management information submits to module 100 can include two SVN servers, it is respectively intended to receive system manager for assembling the renewal put by server resource group with to each group of server resource, two SVN servers can back up mutually, to avoid loss of data.
Management information distribution module 200 may operate on the server installing Linux/Unix operating system, and in order to ensure its high availability, management information distribution module 200 can include the server of more than two, takes the mode of master-slave back-up to provide service.In the Servers-all that management information distribution module 200 module is corresponding, SVN client it is installed simultaneously and sets up data warehouse, being used for checking management information version and the update content of manager's submission being downloaded.
Server resource management module 300 operates in each server member in each resource group, and server member here can be physical server, it is also possible to 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 resource group, configuration strategy is resolved accordingly, generate the script suitable with resource group, realize the various management operations to resource group by running these scripts.
It is understood that the framework shown in Fig. 5 is only a kind of detailed description of the invention of the present invention, should not be construed as the restriction to the present invention program.
Apply scheme provided by the present invention, when realizing automated management large-scale server resource, the method having used packet, becomes identical group by the Server Consolidation of the same type of service provided in server resource, it is achieved that resource group is carried out unified configuration and management.
Corresponding to said system embodiment, the present invention also provides for a kind of server resource management method, and shown in Figure 6, the method may comprise steps of:
S101, management information receiving module receives the resource group configuration information that user submits to;
S102, management information distribution module, according to the resource grouping information being pre-configured with, extracts the configuration strategy corresponding to each resource group from described resource group configuration information respectively;
S103, the configuration strategy extracted, according to the attribute of resource group, is resolved by server resource management module, generates the script suitable with this resource group.
According to a kind of detailed description of the invention of the present invention, at S102, it is also possible to including:
Whether the resource group configuration information version that management information distribution module detection user submits to has renewal, if it is, extract the configuration strategy corresponding to each resource group further from described resource group configuration information respectively.
And
The configuration strategy extracted is preserved in the shared memory space that extremely each resource group is corresponding by management information distribution module respectively.
According to a kind of detailed description of the invention of the present invention, at S103, it is also possible to including:
Server resource management module, from the shared memory space that each resource group is corresponding, obtains the configuration strategy corresponding with this resource group respectively.
Server resource management module can also detect whether extracted configuration strategy version has renewal in advance, if it is, resolve configuration strategy further.
According to a kind of detailed description of the invention of the present invention, at S101, it is also possible to including:
Management information receiving module receives the resource grouping information that user submits to.
Correspondingly, at S102, the resource grouping information that management information distribution module is submitted to according to user, the packet to server resource is modified.
Management information distribution module can also detect whether the resource grouping information version of user's submission has renewal, if it is, the resource grouping information submitted to according to described user further, the packet to server resource is modified.
Additionally, management information distribution module can also join shared memory space for the set of resources newly increased, and management information distribution module is that newly assigned shared memory space generates access credentials, and sends this access credentials to server resource management module.
As seen through the above description of the embodiments, those skilled in the art is it can be understood that can add the mode of required general hardware platform by software to the present invention and realize.Based on such understanding, the part that prior art is contributed by technical scheme the most in other words can embody with the form of software product, this computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) perform each embodiment of the present invention or the method described in some part of embodiment.
Each embodiment in this specification all uses the mode gone forward one by one to describe, and between each embodiment, identical similar part sees mutually, and what each embodiment stressed is the difference with other embodiments.For embodiment of the method, owing to it is substantially similar to system embodiment, so describing fairly simple, relevant part sees the part of system embodiment and illustrates.
The above is only the detailed description of the invention of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.