Background technology
Cloud computing is the product that traditional calculations machine technology such as network calculations, Distributed Calculation, parallel computation, effectiveness calculating, the network storage, virtual, load balancing and network technical development merge.Some that relate under the cloud computing environment are defined as follows:
The cloud node refers to: under cloud computing environment, can provide the node of independent single service; Such as: business processing, load balancing, physically, the just corresponding virtual machine of cloud node.
Cloud is used and is referred to: under cloud computing environment, externally provide various services, such as basic resource service, business service etc., In the view of the service user, a service is exactly an integral body, be made up of several nodes and be indifferent to this business service, it is exactly the resource summation of a service application ingredient that cloud is used, and comprises load equalizer, service processing node, database etc.
Yun Chi refers to: under the cloud computing environment, all physical hosts are provided by the as a whole computing power that externally provides, and all these computational resources have been formed a computing pool, general designation cloud pond.
Under the cloud computing environment, the business service that externally provides generally is made up of some nodes, and each node " is played the part of " different roles in business service, and node may be as being responsible for balanced device, service processing node or database node etc.
These nodes being dispersed in the cloud pond at random, the supvr of cloud computing can not hold and safeguard these nodes from the integral body of business, realize the life management to all nodes, must form node to all and manage one by one; The business service node is in when operation, and the concrete computational resource that uses is from where indeterminate, might all nodes all is the resource with same physical host; To the migration of business service, need there be node to derive one by one to said, and then imports one by one.
Summary of the invention
The embodiment of the present application provides a kind of cloud application processing method and system, has effectively solved above-mentioned technical matters.
Technical scheme is as follows:
A kind of cloud application processing method comprises:
The apply property that cloud is used carries out predefine;
Select the cloud node of described cloud application-dependent according to the apply property of described cloud application;
Determine the dependence between the described cloud node;
Select to satisfy the physical host of described cloud node service requirement according to described dependence;
Use the cloud node that described physical host starts described cloud application-dependent, and revise the starting state that described cloud is used.
Above-mentioned method, preferred, the apply property that described cloud is used comprises: the descriptor that the title that cloud is used and cloud are used.
Above-mentioned method, preferred, determine to comprise in the process of the dependence between the described cloud node: the startup priority of determining described cloud node.
Above-mentioned method, preferred, determine the dependence between the described cloud node after, also comprise:
Form described cloud and use logical relation with its dependence cloud node, and the process that described logical relation is stored.
Above-mentioned method, preferred, the process that satisfies the physical host of described cloud node service requirement according to described dependence selection is specially:
Search the physical host that all satisfy cloud node computational resource;
Determine the quantity of the cloud node that belongs to described cloud application-dependent that moves in the described physical host;
Select the minimum physical host of the described cloud node of operation.
Above-mentioned method, preferred, use the process that described physical host starts the cloud node of described cloud application-dependent and be specially:
The physical host minimum at the described cloud node of selecting of operation starts the cloud node;
Reselecting the physical host that satisfies cloud node service requirement finishes until all cloud nodes startups.
Above-mentioned method, preferred, after startup cloud node finishes, if the success of described cloud application start, but exist certain independent cloud node not start success, then point out this cloud node not start success, manual this cloud node that restarts separately.
A kind of cloud application processing system comprises predefine unit, first selected cell, determining unit, second selected cell and start unit;
Wherein: described predefine unit is used for the apply property that cloud is used is carried out predefine;
Described first selected cell is used for selecting based on the apply property that the cloud of described predefine unit definition is used the cloud node of described cloud application-dependent;
Described determining unit is for the dependence between the volume cloud node of determining described first selected cell selection;
The dependence that described second selected cell is used for determining according to described determining unit selects to satisfy the physical host of described cloud node service requirement;
The physical host that described start unit is used for described second selected cell selection of application starts the cloud node of described cloud application-dependent, and revises the starting state that described cloud is used.
Above-mentioned system, preferred, also comprise: storage unit;
Described storage unit is used to form the logical relation of described cloud application and its dependence cloud node, and described logical relation is stored.
As seen the technical scheme that is provided by above the embodiment of the present application the invention provides cloud application processing method and system, by the predefine of apply property that cloud is used, the cloud node of selecting cloud application start process to rely on; Determine the dependence between the cloud node, according to described dependence, to determining the startup priority between the described cloud node, the physical host of selecting to satisfy cloud node service requirement carries out start-up operation to the cloud node.Cloud application processing method provided by the invention and system, by in the cloud application process, business service is formed node and is organized, and from forming an organic whole in logic, can obtain the business service state at any time; Each functional node to business service carries out unified life cycle management, set up internodal dependence, when formulating the startup of cloud node, the Distribution Strategy in the cloud pond on the physical host is so the situations of having avoided node all to rely on a physical host take place.
Embodiment
In order to make those skilled in the art person understand the application's scheme better.Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment only is the application's part embodiment, rather than whole embodiment.Based on the embodiment among the application, those of ordinary skills are not making the every other embodiment that obtains under the creative work prerequisite, all should belong to the scope of the application's protection.
The cloud application processing method process flow diagram that the embodiment of the present application provides comprises as shown in Figure 1:
Step S101: the apply property that cloud is used carries out predefine;
Described apply property comprises title and the descriptor that cloud is used;
Step S102: the cloud node of selecting described cloud application-dependent according to the apply property of described cloud application;
Cloud is used and is made up of some cloud nodes, therefore these cloud nodes need be selected and is organized into together;
Step S103: determine the dependence between the described cloud node;
Have certain dependence between the cloud node that the composition cloud is used, these dependences have determined their startup priority;
Step S104: the physical host of selecting to satisfy described cloud node service requirement according to described dependence;
Step S105: use the cloud node that described physical host starts described cloud application-dependent, and revise the starting state that described cloud is used.
For above step is described more clearly, the processing that the embodiment of the present application provides cloud application processing method medium cloud to use defines the logical relation synoptic diagram of process flow diagram and cloud application and described cloud application-dependent cloud node respectively as Fig. 2 and shown in Figure 5:
Shown in Fig. 2, comprising:
Step S201: the Name and Description information that the definition cloud is used;
It is succinct that the title that cloud is used is wanted, and clearly this cloud effect of using, and makes the title of using according to cloud namely know the cloud service that this cloud is used to be provided, as: the title that cloud is used may be defined as CRM service, GPS service etc.; Be equipped with concise and to the point function declaration again, make and locate the service ability that this cloud is used more clearly;
Step S202: select to form the node that cloud is used;
Step S203: the role of defined node in cloud is used;
Cloud is used and is made up of some cloud nodes, therefore need be with described cloud node organization together, each cloud node is the role difference therein, such as a cloud application database node, service providing node, load equalizer node etc. must be arranged, the function that these are different need be provided by numerous cloud nodes;
Step S204: defined node starts priority;
Because the dependence of any is arranged between each cloud node that the composition cloud is used, these dependences have determined the startup priority between the cloud node, such as, business service supplier's node needs dependency database supplier node, so the startup priority of database provider cloud node will be higher than business service supplier cloud node;
Step S205: judge whether that cloud uses all the cloud nodes rely on and all define and finish; If execution in step S206; Otherwise, return step S202;
Step S206: will define the logic persistence, and be embodied in presentation layer;
The definition that cloud is used is persisted in the database, forms logical relation as shown in Figure 3.
Fig. 2 be in the cloud platform by cloud use each form the cloud node, but each cloud node is independently, carries out under the scattered prerequisite.
As shown in Figure 4, comprising:
Step S401: need to select the cloud of operation to use;
Read the persistence information that cloud is used, cloud is used all cloud node objects that rely on read in the formation;
Cloud is used through after fixed, its logical message has write in the database, when show cloud use with and during the cloud node, from database, read earlier the cloud application message and be packaged into the cloud application, read the cloud nodal information and be packaged into the cloud node object, and the cloud node object read in the formation manage;
Step S402: obtain the startup priority that each forms node;
Step S403: the startup priority of checking each node;
According to starting priority arrangement, the front that is arranged in formation that priority is high is exactly in order to start the cloud node sequentially with the cloud node according to the purpose that starts prioritization, satisfies the dependence between them with the cloud node object in the formation;
Step S404: search the physical host that satisfies resource requirement;
Step S405: search the minimum physical host of cloud application node number;
Computational resource size according to the cloud node, search the physical host that all satisfy resource requirement, such as: database node needs the network interface card bandwidth of double-core CPU, 3G internal memory, 100M, so just need at first find the physical host that satisfies resource requirement, search the cloud number of nodes that this cloud is used that belongs to that has moved on each physical host then, find the physical host of a minimum number;
Start the cloud node at the physical host of selecting, the state of revising the cloud node is for starting, and the dependence node number of this cloud application on the physical host is added 1;
In order more clearly to search process flow diagram as shown in Figure 4 to what the selection course of physical host was described that the embodiment of the present application provides physical host, comprising:
Step S301: search the physical host that satisfies cloud node computational resource;
Step S302: the quantity of determining the cloud node that belongs to described cloud application-dependent of described physical host operation;
Step S303: select the minimum physical host of the described cloud node of operation;
If satisfying, existing 10 physical hosts start requirement, wherein 2 cloud nodes have been moved in one, moved a cloud node in other 9 respectively, then in other 9, select a physical host to start a cloud node at random, operation node number with this physical host adds 1 then, has 2 to move 2 cloud nodes in such 10 physical hosts, selects a physical host to start the cloud node in other 8, and the like, finish until all cloud node startups;
Step S406: start node and revise the state of node;
Step S407 judges whether all cloud nodes all start and finishes; If, execution in step S408; Otherwise, execution in step S403;
Step S408: revise the state that cloud is used;
Finish when all cloud nodes start, will revise the state that cloud is used, if the success of cloud application start is wherein arranged, the cloud node starts failure, then points out which cloud node of user to be not activated success, the manual cloud node that starts failure separately.
In the process that starts each cloud node, do not need manual intervention, the operator only sends the instruction that starts the cloud application and gets final product, and starts each cloud node that cloud is used according to priority automatically by program, unless some cloud nodes start failure, need artificial independent the startup.
For aforesaid method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
At above method embodiment, the disposal system that the embodiment of the present application also provides a kind of cloud to use as shown in Figure 6, comprising:
Predefine unit 501, first selected cell 502, determining unit 503, second selected cell 504 and start unit 505;
Wherein: predefine unit 501 is used for the apply property that cloud is used is carried out predefine;
First selected cell 502 is used for selecting based on the apply property that the cloud of described predefine unit 501 definition is used the cloud node of described cloud application-dependent;
Determining unit 503 is for the dependence between the volume cloud node of determining 502 selections of described first selected cell;
Second selected cell 504 is used for satisfying according to the dependence selection that described determining unit 503 is determined the physical host of described cloud node service requirement;
The physical host that start unit 505 is used for 504 selections of described second selected cell of application starts the cloud node of described cloud application-dependent, and revises the starting state that described cloud is used.
One detailed construction synoptic diagram of the cloud application processing system that the embodiment of the present application provides also comprises: storage unit 506 as shown in Figure 7;
Storage unit 506 is used to form the logical relation of described cloud application and its dependence cloud node, and described logical relation is stored.
Comprehensive above method and system embodiment, the cloud application processing method that the application provides and system have realized the unified life cycle management to the cloud application; The composition cloud node that cloud is used starts on the different physical hosts as far as possible, to guarantee the cloud reliability of applying; Because application has realized integrated assembling in logic to cloud, visually more can embody under the cloud computing environment theory of service-centric.
Each embodiment in this instructions 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.The above only is the application's embodiment; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the application's principle; can also make some improvements and modifications, these improvements and modifications also should be considered as the application's protection domain.