WO2013120243A1 - System and method for processing virtual machine in cloud platform - Google Patents

System and method for processing virtual machine in cloud platform Download PDF

Info

Publication number
WO2013120243A1
WO2013120243A1 PCT/CN2012/071063 CN2012071063W WO2013120243A1 WO 2013120243 A1 WO2013120243 A1 WO 2013120243A1 CN 2012071063 W CN2012071063 W CN 2012071063W WO 2013120243 A1 WO2013120243 A1 WO 2013120243A1
Authority
WO
WIPO (PCT)
Prior art keywords
automatic processing
policy
parameter
automatic
virtual machines
Prior art date
Application number
PCT/CN2012/071063
Other languages
French (fr)
Chinese (zh)
Inventor
王烽
王军
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201280000116.4A priority Critical patent/CN103354990B/en
Priority to PCT/CN2012/071063 priority patent/WO2013120243A1/en
Publication of WO2013120243A1 publication Critical patent/WO2013120243A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems

Definitions

  • Embodiments of the present invention relate to the field of computer information, and more particularly, to a system and method for processing a virtual machine in a cloud platform. Background technique
  • the virtual machine cluster deployment template provides a small number of defined automatic processing rules for automating virtual machine clusters.
  • Embodiments of the present invention provide a system and method for processing a virtual machine in a cloud platform, which can improve the flexibility of automatic processing of a virtual machine cluster.
  • a system for processing a virtual machine in a cloud platform including: an obtaining module, configured to obtain an automation rule, the automation rule includes an automatic processing policy; and a processing module, configured to perform the The automatic processing strategy generates automatic processing parameters, and invokes the cloud platform to automatically process a group of virtual machines according to the automatic processing parameters.
  • a method for processing a virtual machine in a cloud platform including: acquiring an automation rule, the automation rule including an automatic processing policy; generating an automatic processing parameter according to the automatic processing policy when executing the automation rule, and according to The automatic processing parameter invokes the cloud platform to automatically process a group of virtual machines.
  • the technical solution may generate an automatic processing parameter according to an automatic processing policy when executing the automation rule, and invoke the cloud platform to automatically perform a set of virtual machines according to the automatic processing parameter. This improves the flexibility of automated processing of virtual machine clusters.
  • FIG. 1 is a block diagram of a system for processing a virtual machine in a cloud platform according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a system architecture for processing a virtual machine in a cloud platform according to an embodiment of the present invention.
  • FIG. 3 is a block diagram of a rule execution unit of one embodiment of the present invention.
  • FIG. 4 is a block diagram of a policy management unit of one embodiment of the present invention.
  • FIG. 5 is a schematic flow chart of a method for processing a virtual machine in a cloud platform according to an embodiment of the present invention.
  • Figure 6 is a schematic flow diagram of an automation rule in accordance with one embodiment of the present invention. Detailed ways
  • a general virtual machine (VM) cluster deployment template can only provide a few defined automatic processing policies.
  • a regular VM cluster deployment template can define a capacity reduction policy, but cannot define a VM to be deleted when volume reduction. Select a policy that removes a VM and cannot specify which VM to delete.
  • the conventional VM cluster deployment template generally only describes the static information and structure of the VM cluster, and lacks description and definition of the automation rules of the VM cluster in the cloud environment. For example, the conventional VM cluster deployment template does not consider how to increase during the operation of the VM cluster. And reduce the VM, therefore, the defined rules are not flexible and cannot be extended.
  • a set of processing VMs that can be customized based on automated rules is proposed in accordance with an embodiment of the present invention.
  • An automated rule for automating processing of a VM cluster can be set up in an automation template in accordance with an embodiment of the present invention, and the user can set the automation rules (eg, the automatic processing policies contained therein) during the operation of the VM cluster, Thereby, the automatic processing capability and flexibility of the VM cluster can be greatly improved.
  • FIG. 1 is a block diagram of a system for processing a VM in a cloud platform according to an embodiment of the present invention.
  • the system of Figure 1 includes: an acquisition module 110 and a processing module 120.
  • the acquisition module 110 obtains an automation rule that includes an automatic processing policy.
  • the processing module 120 generates an automatic processing parameter according to the automatic processing policy when executing the automation rule, and invokes the cloud platform to automatically process a group of virtual machines according to the automatic processing parameter.
  • cloud platforms can provide cloud-based services for developers to create applications.
  • cloud platforms allow developers to run programs written in the cloud and/or use the cloud. service provided.
  • the cloud platform 250 shown in Figure 2 can provide cloud-based services.
  • Automated processing of a set of VMs in cloud platform 250 involves automatic capacity tuning (Auto Scaling) of a set of VMs in various cloud platforms (eg, cloud platforms such as Amazon, Galax, or vCenter), in accordance with an embodiment of the present invention
  • a group of VMs may be a VM cluster, and automatic processing may also involve resource adjustments between VM clusters.
  • a VM cluster can include one or more sets of VMs.
  • cloud platform 250 can provide processing or management actions for a group of VMs in a VM cluster, such as adding, deleting, modifying, querying, and the like. It should be understood that when the above virtual machine cluster is a composite virtual machine cluster (members are virtual machine clusters), the above set of VMs may also refer to a VM cluster.
  • automatic processing can include operations such as capacity expansion, volume reduction, or resource adjustment between VM clusters.
  • the automatic processing parameter can be an automatic capacity adjustment parameter or a resource adjustment parameter between VM clusters.
  • the above automatic processing parameters are parameters required for automatic processing of a group of VMs, and the automatic processing parameters can be generated according to the selected automatic processing strategy when the automation rules are executed.
  • Automation rules can take the form of plugins, for example, automation plugins 1, 2 n.
  • An automation rule corresponds to a group of VMs in a VM cluster.
  • An automated rule is performed for each set of VMs for automatic processing according to an embodiment of the present invention, and an automatically processed action, a name of an automatic process, a cooling time window, a trigger condition, an automatic processing policy, and the like can be defined for each VM group.
  • the obtaining module 110 may directly acquire an automation rule in the form of a plug-in, may also parse a preset template of the user, and convert the automation template into an automation rule. Then the plugin.
  • the above automation rule is a rule or logic for determining automatic capacity adjustment of a VM cluster during operation of the VM cluster.
  • the automation rule may involve judgment and triggering of capacity expansion or volume reduction, automatic processing policy selection, and automatic
  • the acquisition of the capacity adjustment parameters and the call to the external cloud platform 250, etc., are not limited in this way according to an embodiment of the present invention, for example, the user may add more judgments and other rules as needed.
  • the automatic processing policy described above indicates a policy of how to perform automatic capacity adjustment on a group of VMs or groups of VMs in a VM cluster during operation of the VM cluster, for example, how to expand or reduce capacity, according to an embodiment of the present invention.
  • the above automatic processing policy may also indicate how to perform resource adjustment between clusters.
  • the automation module is obtained by the acquisition module 110 of the system of FIG. 1, wherein the automation rule includes an automatic processing policy; and the processing module 120 generates an automatic processing parameter according to the automatic processing policy, and according to the automatic processing
  • the parameter invokes the cloud platform to automatically process a set of virtual machines. Since the automatic processing parameters according to the embodiment of the present invention are generated when the automation rules are executed, the user can conveniently set the automatic processing policy during the running of the VM cluster, so as to modify these automatic processing parameters, thereby greatly Improve the automatic processing power and flexibility of VM clusters.
  • the above automatic processing strategy may be used to select a VM when performing automatic capacity adjustment, which may be preset in an automation template, and optionally, may also invoke an automatic processing policy setting or request a user to at least during the above-mentioned one VM running process.
  • An automatic processing policy is set up so that the system invokes the cloud platform 250 to perform automatic capacity adjustment on the set of VMs according to the needs of the user.
  • the processing module 120 may obtain an automatic processing policy according to the user when it is determined according to an automation rule that a set of VMs (for example, a VM instance group or a VM cluster) needs to be expanded (Auto Scale Out) or reduced (Auto Scale In). Set the resulting automatic processing parameters, and according to these automatic processing parameters to expand or reduce the capacity of a group of VMs in the VM cluster or the entire VM cluster.
  • an automatic processing parameter may be generated according to an automatic processing policy when the automation rule is executed, and the cloud platform is invoked to automatically process a group of virtual machines according to the automatic processing parameter, thereby improving automatic processing of the virtual machine cluster. flexibility.
  • FIG. 2 is a schematic diagram of a system architecture for processing a VM in a cloud platform according to an embodiment of the present invention.
  • the system of FIG. 2 includes: an acquisition module 210 and a processing module 220, similar to the acquisition module 110 and the processing module 120 of FIG. 1, and detailed descriptions are omitted as appropriate herein.
  • the acquisition module 210 obtains an automation rule that includes an automatic processing policy.
  • the processing module 220 generates an automatic processing parameter according to the automatic processing policy when executing the automation rule, and invokes the cloud platform 250 to automatically process a group of virtual machines according to the automatic processing parameter.
  • the processing module 220 includes: a rule execution unit 222 and a policy management unit 223.
  • the rule execution unit 222 selects an automatic processing policy when executing the automation rule, requests the automatic processing parameter according to the selected automatic processing policy, and automatically processes the set of virtual machines according to the automatic processing parameter calling cloud platform 250.
  • the policy management unit 223 manages the setting of the automatic processing policy, generates the automatic processing parameter according to the setting of the selected automatic processing policy, and provides the automatic processing parameter to the rule execution unit.
  • Figure 3 is a block diagram of a rule execution unit in accordance with one embodiment of the present invention. 4 is a block diagram of a policy management unit of one embodiment of the present invention.
  • an automatic processing policy when executing an automation rule, can be selected according to the triggered automatic processing action (for example, expansion or volume reduction). For example, when the expansion is triggered, the VM type selection policy and the VM number selection policy can be selected and triggered. When volume reduction is performed, the VM instance selection policy and the VM number selection policy can be selected. The automatic processing parameters corresponding to the automatic processing policy can then be requested or invoked according to the selected automatic processing policy. Finally, the cloud platform 250 can be invoked to automatically process the set of virtual machines according to the automatic processing parameters.
  • the triggered automatic processing action for example, expansion or volume reduction.
  • the VM type selection policy and the VM number selection policy can be selected and triggered.
  • volume reduction the VM instance selection policy and the VM number selection policy can be selected.
  • the automatic processing parameters corresponding to the automatic processing policy can then be requested or invoked according to the selected automatic processing policy.
  • the cloud platform 250 can be invoked to automatically process the set of virtual machines according to the automatic processing parameters.
  • the processing module 220 further includes: a rule management unit 221.
  • the rules management unit 221 receives the automation rules from the acquisition module 210 and is used to add or delete the automation rules.
  • This automation rule can take the form of an automated rule plugin (for example, it can be implemented by a script or by a drl file generated by Drools or DocObject software).
  • the rule management unit 221 can dynamically modify, add, or delete an automated rule plugin.
  • the rule execution unit 222 triggers automatic processing when the trigger condition is met, for example, triggering expansion or volume reduction. Automatic processing may include automatic capacity adjustment of a set of VMs (or VM clusters) according to the automatic processing parameters described above and/or resource adjustments between VM clusters.
  • the rule execution unit 222 may request the automatic management parameter from the policy management unit 223, for example, when the automatic capacity adjustment is performed, the automatic capacity adjustment parameter may be requested.
  • the policy management unit 223 can manage the settings of the at least one automatic processing policy, and after receiving the request of the rule execution unit 222, feed back the automatic processing parameters that need to be taken to the rule execution unit 222, for example, provide automatic capacity adjustment parameters (for example, expand the VM).
  • the setting of the above automatic processing policy may refer to a related parameter set by the user for calculating an automatic processing parameter, for example, a ratio value of volume reduction (or capacity expansion). Take For example, the ratio value is set to 0.05 and the ratio base value is 100.
  • the automatic processing parameter can be calculated as 5, that is, the capacity reduction (or expansion) is 5.
  • the setting of the automatic processing policy by the user may be implemented by a form of a plug-in (for example, a script or a rule engine), and the embodiment according to the present invention is not limited thereto, for example, may also be implemented by prompting a user input form, for example, In the pop-up window, the user is prompted to enter a ratio of the ratio of the volume reduction (or expansion).
  • a plug-in for example, a script or a rule engine
  • the processing module 220 further includes: a parameter obtaining unit 224.
  • the parameter obtaining unit 224 obtains the real-time feature parameters of the set of VMs, and provides the real-time feature parameters to the rule execution unit 221, wherein the rule execution unit 222 further determines, according to the preset threshold of the trigger condition, the real-time feature parameter The trigger condition selects the automatic processing strategy to trigger automatic processing of the above set of VMs.
  • the parameter acquisition unit 224 can be configured to calculate real-time characteristic parameters of the object based on the VM cluster parameters, such as the average CPU utilization of the above-described set of VMs (or VM clusters) and the like.
  • the system of FIG. 1 further includes: a monitoring module 230.
  • the monitoring module 230 monitors the first parameter of the set of VMs in real time, and provides the first parameter to the parameter obtaining unit 224, wherein the parameter obtaining unit 224 further calculates the real-time feature parameter according to the first parameter; and/or for real-time monitoring
  • the second parameter of the set of VMs is provided, and the second parameter is provided to the policy management unit 223, wherein the policy management unit 223 further calculates the automatic processing parameter according to the second parameter and the user's setting of the selected automatic processing policy.
  • parameter acquisition unit 224 can perform statistical calculations on data for a set of VMs or VM clusters obtained from monitoring module 230 to obtain an average, variance, etc. of a set of VMs or VM clusters.
  • the monitoring module 230 can be an external monitoring agent, for example, a Watch module in an Automatic Management Engine (AME) for providing parameters or other monitoring parameters for a group of VMs (or VM clusters).
  • the first parameter may be a real-time parameter such as the CPU utilization of each VM
  • the second parameter may also be a real-time parameter of the VM, for example, when it is required to jointly determine according to a certain real-time parameter of a group of VMs and an automatic processing policy setting.
  • the policy management unit 223 can acquire the corresponding second parameter through the monitoring module 230.
  • the rule execution unit 222 includes: a trigger subunit 310 and an invocation subunit 320.
  • the triggering sub-unit 310 selects the automatic processing policy according to the triggering condition, and compares the real-time feature parameter with the preset threshold of the triggering condition. When the real-time feature parameter satisfies the preset threshold of the triggering condition, the triggering sub-unit 320 is triggered.
  • One of the above The group VM performs automatic capacity adjustment.
  • the calling sub-unit 320 requests the policy management unit 223 to return the automatic capacity adjustment parameter according to the selected automatic processing policy, and invokes the cloud platform 250 to perform automatic capacity adjustment on the set of VMs according to the automatic capacity adjustment parameter.
  • the trigger sub-unit 310 matches the real-time feature parameters and trigger conditions of the VM, and triggers automatic processing.
  • the calling sub-unit 320 selects an automatic processing policy corresponding to the above-mentioned automatic processing of the trigger from the automatic processing policy configured in the automation rule according to the triggered automatic processing (for example, expansion or volume reduction), and requests the policy management unit 223 to The automatic capacity adjustment parameter corresponding to the selected automatic processing strategy, and the returned result is used as an automatic capacity adjustment parameter (or an action parameter) to invoke the drive module 240 of the external cloud platform.
  • the rule execution unit 222 invokes the external cloud platform 250 to perform an action of deleting or creating a VM according to the policies and the corresponding automatic capacity adjustment parameters.
  • the policy management unit 223 includes: a management subunit 410 and a policy subunit 420.
  • the management sub-unit 410 diverts the request based on the identification of the automatic processing policy selected from the request from the calling sub-unit 320, and/or the setting for dynamically adding a new automatic processing policy.
  • the policy subunit 420 calculates the automatic capacity adjustment parameter according to the setting of the selected automatic processing policy by the user and the second parameter of the set of VMs, and the automatic capacity adjustment parameter Returned to the calling subunit 320.
  • the automatic capacity adjustment parameter can also be calculated according to the user's setting of the automatic processing policy selected above, and the automatic capacity adjustment parameter is returned to the calling subunit 320.
  • the management sub-unit 410 is responsible for offloading the request to set the plug-in of the automatic processing policy, and can dynamically add a new plug-in for the automatic processing policy. If the newly added auto-processing policy setting plug-in (for example, script or rule engine) can be placed in the specified directory, the management sub-unit 410 can call this script according to the standard rules.
  • the policy sub-unit 420 can automatically determine the automatic processing parameters according to the predetermined automatic processing policy and the parameters input by the user, for example, the number of VMs to be expanded, VM specifications, and the like.
  • the settings plug-in for the automatic processing policy can be dynamically added by the user as needed.
  • the policy subunit 420 can be at least one, for example, the policy subunits 1, 2n, respectively corresponding to at least one automatic processing policy setting.
  • the identifier of the automatic processing policy may be the name of the automatic processing policy
  • the management sub-unit 410 determines the setting of the automatic processing policy corresponding to the identifier according to the identifier.
  • the processing module 220 can also be triggered according to conditions, timing or events.
  • the above set of VMs are automatically processed.
  • the trigger can be divided into a condition trigger, an event trigger, or a timer trigger.
  • the conditional trigger is obtained by the monitoring module 230 to obtain external parameters (eg, the CPU utilization of a group of VMs or the CPU utilization of the VM cluster) to the parameter acquisition unit 224 of the processing module 220, and then to the triggering subunit 310 of the rule execution unit 222. To determine if the condition is met (for example, if the CPU utilization is greater than 90%).
  • external parameters eg, the CPU utilization of a group of VMs or the CPU utilization of the VM cluster
  • event triggering triggers automatic processing when a previously defined event is detected (for example, when a VM in a set of VMs has an error in capacity expansion, or the VM cannot be created successfully) (for example, inter-cluster resource adjustment) ).
  • Time triggering means that the trigger subunit 310 detects the specified time (predefined time) and triggers automatic processing.
  • the above automatic processing policy includes: at least one of a policy for selecting a type of a VM, a policy for selecting a number of VMs, and a policy for selecting an instance of a VM, wherein the rule execution unit
  • the at least one of the above-described policies for selecting the type of the virtual machine, the above-described policy for selecting the number of virtual machines, and the above-described policy for selecting an instance of the virtual machine are selected.
  • an automatic processing policy includes a VM quantity selection policy, a VM type selection policy, or a VM instance selection policy.
  • the VM number selection policy refers to the number of VMs that are added or deleted when expanding or reducing capacity. There are many rules for adding or deleting VMs. Users can customize them. For example, users can be set to pre-defined. The value indicates that several units are added; it can be set to prompt the user to enter the number of VMs themselves; it can be set to a random number; or it can be set to a user-defined script.
  • VM type selection policy means that when expanding capacity, it is decided to increase the type of VM (that is, the specification parameters of the VM, such as the number of CPUs, the size of the disk, the size of the memory, etc.), similar to the number selection policy, the user can set Predefined templates (which can define VM specifications), the same type as other VMs in the set of VMs, or templates that prompt the user for input, and so on.
  • VMClassPolicy means that when expanding capacity, it is decided to increase the type of VM (that is, the specification parameters of the VM, such as the number of CPUs, the size of the disk, the size of the memory, etc.), similar to the number selection policy, the user can set Predefined templates (which can define VM specifications), the same type as other VMs in the set of VMs, or templates that prompt the user for input, and so on.
  • the VM Instance Selection Policy (VMInstancePolicy) is an instance of the VM that was decided to delete when the volume is reduced.
  • the user can set the predetermined script file (pre-defined deletion rules, such as deleting the VM with the lowest CPU utilization, the VM created at the beginning, etc.), prompting the user to input the deletion.
  • VM or a pre-configured VM, etc.
  • the acquisition module 210 obtains an automated rule by parsing a predetermined automation template, the automated template including an extensible markup language file.
  • the automation template can be configured as needed, that is, the automation rules are configured in the automation template, and the configured automatic template is uploaded to the system of FIG.
  • the setting of trigger conditions in the automation rules and the setting of the automatic processing policy can be placed in the specified directory in the form of plug-ins (for example, implemented by scripts or rule engines).
  • the system of Figure 1 deploys a VM cluster based on the above automated template.
  • the acquisition module 210 can parse the user-preset automation template and convert it into at least one automation rule, and the automation rule can take the form of a plug-in, for example, the automation plug-in 1, 2 n .
  • An automation rule corresponds to a group of VMs in a VM cluster.
  • the acquisition module 210 parses the automation template, translates the automation rules into implementation rules, and adds the implementation rules to the rule execution unit 222 of the processing module 220.
  • the above-described automation rules can be set by a script or a rule engine or by inputting parameters in a pop-up window.
  • the above automatic processing policy may be set by a script or a rule engine or by inputting a parameter in a popup window.
  • the setting related parameters of the automatic processing policy (related parameters for generating automatic processing parameters, for example, ratio values) or the thresholds of the triggering conditions of the automatic rules may be set in the plug-in implemented by the script rule engine, or prompt the user to Enter in the pop-up window.
  • the automation template may take the form of an XML file, in which case the XML file may also be verified so that the XML file is a valid file, which is not based on embodiments of the present invention, for example, an automated template.
  • the processing module 220 invokes the internal platform to invoke the cloud platform 250 to automatically process the set of VMs.
  • the system of FIG. 2 further includes: a driving module 240.
  • the driver module 240 translates the call to the internal interface to the application interface that invokes the cloud platform 250.
  • the driver module 240 is configured to adapt an external platform for converting the internal unified interface call into an API (Application Programming Interface) call of the external platform, that is, by converting the calling internal unified interface to calling the underlying platform.
  • API Application Programming Interface
  • Interface for example, will convert the call to the AddVM interface for creating VMs in AME to the creation of an external Galax platform. Create a call to the mnlnstance interface of the VM.
  • the processing module 220 is further configured to allow automatic processing on the set of VMs when a time interval between two automatic processes exceeds a preset threshold.
  • the above-mentioned VMs are not allowed to be automatically processed, only if the trigger condition satisfies the preset threshold and two automatic processes are performed.
  • the automatic processing of the above set of VMs is allowed only when the time interval exceeds the preset threshold.
  • the upper and lower limits of the available resources of the set of VMs are set in the above-mentioned automatic template, and the processing module is further configured to determine whether to allow the foregoing one according to the upper and lower limits of the available resources of the set of virtual machines.
  • the group VM performs automatic capacity adjustment.
  • an upper limit and a lower limit of available resources of a group of VMs in a VM cluster may be set or defined in an automation template, and a set of VMs of the VM cluster is a set of VM instances, which may be scaled, that is, an VM instance is added or Reduce the VM instance.
  • a group of VMs has a maximum number of instances and a minimum number of instances, and the number of scaled VMs cannot exceed the range of available resources of a group of VMs (or the upper and lower limits of available resources of the VM cluster).
  • a group of VMs can also be called an instance group.
  • a node that cannot be scaled (such as a control node) it is considered to be a VM cluster with the same resource upper and lower limits and 1 being the same.
  • the tag ⁇ Automations> defines the automated processing actions.
  • the tag attributes include: name (automated name), for example, AutoScaleOut or AutoScaleOut; timeWindow, in which no other automatic expansion or decompression operations can be performed, in seconds.
  • Automated processing involves the following problem: the trigger condition is defined by ⁇ 1 18861; the automatic processing action is defined by ⁇ ( ⁇ 011>tag; the automatic processing strategy is defined by ⁇ 1 1116>. Igger typ - i co ⁇ dl ioi"i">cp Loa.d sgr. SC ⁇ Trigger >
  • Trigger type conditional trigger ( condition )
  • Trigger condition CPU utilization is greater than 90% (cpuload>90)
  • Trigger Action Create VM ( AddVM )
  • VMType Selection Policy Policy Name: Assigned ( Assigned )
  • Ratio value 0.05 That is, an automatic expansion mode template is defined according to an embodiment of the present invention:
  • the VM of the instance group is expanded (the trigger rule is triggered by the condition).
  • the VM type selection policy is set to increase the VM type to a pre-configured template ServerTemplate (for example, using a custom VM type) to expand.
  • the number of VMs is selected.
  • the ratio is expanded according to the ratio of the instance groups: 5% of the upper limit of the instance group (or cluster) is expanded each time. (For example, the instance group upper limit can be pre-configured or defined in the template)
  • cooling time window as 2 minutes, that is, after this automatic expansion operation, no other automatic actions can be performed within 2 minutes.
  • the VM instance group automatically reduces the volume (corresponding to the volume reduction part in the above automation template example):
  • Trigger type conditional trigger ( condition )
  • Trigger condition CPU utilization is less than 20% ( cpuload ⁇ 20 )
  • Trigger Action Delete VM ( RemoveVM )
  • VMInstancePolicy Policy Name: Minimum (Minimum)
  • the VM instance selection policy specifies that the VM with the lowest CPU utilization is deleted.
  • VM number selection strategy which specifies the number of VMs to be reduced by using a script, and reduces the capacity according to the ratio of the instance group (for example, the number of reductions is 5% of the upper limit of the instance group).
  • cooling time window as 2 minutes, that is, after this automatic volume reduction operation, no other automatic actions can be performed within 2 minutes.
  • event triggering and time triggering can be set in the template, as follows:
  • Example: ⁇ Trigger type "event,,>MemberScaleOutError ⁇ /Trigger>. Indicates that automatic processing (for example, intercluster resource adjustment) is triggered when a MemberScaleOutError event occurs (with member expansion failure).
  • VM number selection policy Determines the number of VMs to be added or deleted when expanding or reducing capacity.
  • Script determined by a user-defined script
  • Ratio Proportional increase according to the base number, the base number can be set to the maximum VM number of the group or the current VM number, etc.
  • VM type selection policy (VMClassPolicy): When expanding, decide to increase the type of VM class: VMClassPolicy
  • Script Determined by a user-defined script.
  • VM instance selection policy (VMInstancePolicy): When descaling, decide to delete the VM instance class: VMInstancePolicy.
  • FIG. 5 is a schematic flow chart of a method for processing a VM in a cloud platform according to an embodiment of the present invention. The method of Figure 5 can be performed by the system of Figure 1.
  • an automatic processing parameter may be generated according to an automatic processing policy when an automation rule is executed, and the cloud platform is invoked to automatically perform a group of virtual machines according to the automatic processing parameter. Processing, thereby increasing the flexibility of automated processing of virtual machine clusters.
  • an automatic processing policy may be selected when the automation rule is executed; the automatic processing parameter is generated according to the setting of the selected automatic processing policy; and the cloud platform is invoked to automatically process the set of virtual machines according to the automatic processing parameter.
  • the method of FIG. 5 further includes: adding or deleting the automation rule.
  • the real-time feature parameters of the set of VMs may be acquired, and the set of VMs is triggered to be processed if the real-time feature parameters meet the preset threshold of the trigger condition, where When you select an automatic processing policy, you select an automatic processing policy based on the trigger condition.
  • the first parameter of the set of VMs may be monitored in real time, and the real-time feature parameter is further calculated according to the first parameter; and/or the second parameter of the set of VMs is monitored in real time, And calculating the automatic processing parameter according to the second parameter and the setting of the automatic processing policy selected by the user.
  • the automatic processing may be an automatic capacity adjustment.
  • the preset threshold of the real-time feature parameter and the trigger condition may be compared, and when the real-time feature parameter meets the preset threshold of the trigger condition, Triggering automatic capacity adjustment on the set of VMs; and acquiring the automatic capacity adjustment parameter by requesting, and calling the cloud platform to perform automatic capacity adjustment on the set of VMs according to the automatic capacity adjustment parameter.
  • the request when managing the setting of the automatic processing policy, may be offloaded according to the identifier of the selected automatic processing policy included in the request, and/or a setting of a new automatic processing policy may be dynamically added;
  • the automatic capacity adjustment parameter may be calculated according to the setting of the at least one automatic processing policy and the second parameter of the set of VMs by the user after receiving the request, or may be automatically processed according to the user according to the user after receiving the request.
  • the setting of the policy calculates the automatic capacity adjustment parameter.
  • the at least one automatic processing policy includes: at least one of a policy of selecting a type of a VM, a policy of selecting a number of VMs, and/or a policy of selecting an instance of a VM, wherein the automatic processing policy may be selected from The above-described policy for carrying the type of the selected virtual machine, the above-described policy for selecting the number of virtual machines, and the above-described policy for selecting an instance of the virtual machine select at least one of the policies.
  • the method of FIG. 5 further includes: parsing a predetermined automation module by parsing Board, to get the automation rules, the above automated template includes an extensible markup language file.
  • the above-described automation rules can be set by a script or a rule engine or by inputting parameters in a pop-up window.
  • the above automatic processing policy is set by a script or a rule engine or is set by inputting a parameter in a popup window.
  • the cloud platform may be invoked by calling the internal interface to perform automatic capacity adjustment on the set of VMs, and the internal interface may be invoked to be converted into an application interface that invokes the cloud platform.
  • automatic processing of the set of VMs is allowed if the minimum time interval between two automatic processes exceeds a preset threshold.
  • the upper and lower limits of the available resources of the foregoing set of VMs are set in the foregoing auto-template, and the upper limit and the lower limit of the available resources of the set of VMs may be further determined whether to allow the set of VMs. Perform automatic capacity adjustment.
  • the set of VMs may also be automatically processed based on conditions, timing, or events.
  • FIG. 6 is a schematic flow chart of an automated processing rule in accordance with an embodiment of the present invention.
  • 605 can be executed by a deployment engine and 610 through 680 can be executed by an automation engine.
  • the trigger type may include condition triggering, time triggering, and event triggering.
  • step 645 If the above event occurs, perform step 645.
  • timing is performed.
  • step 645 is performed.
  • conditional triggering is set in the template
  • real-time feature parameters can be obtained. For example, the data reported by the VM is monitored and the parameters of a group of VMs in the VM cluster are obtained, and the average CPU utilization of a group of VMs in the VM cluster is calculated.
  • the VM is deleted according to the trigger action field of the "trigger" tab in "AutoScaleln" in the automation template. Otherwise, The CPU utilization is calculated cyclically at a certain interval, and the next step is not performed.
  • cooling time window According to the “cooling time window” field in the template, obtain a cooling time window size, determine whether it is currently in the cooling time window of the last automatic action, and if yes, execute 610, otherwise, execute 650.
  • determine the type of automatic capacity adjustment For example, according to the above trigger condition, whether the expansion or volume reduction triggers the corresponding automatic processing strategy is selected.
  • the policy rule is selected according to the number of VMs, for example, according to the "automatic processing strategy 2" in the template.
  • the decision expands the cluster's upper limit by 5% (MaxCount is the cluster upper limit in the previously defined cluster upper and lower limits). For example, if the cluster upper limit is 100 VMs, then 5 VMs will be added.
  • the type of the decision expansion VM uses the template ServerTemplate (for example, using a custom VM type, that is, creating VM specifications, etc.).
  • the setting of the automatic processing policy can be implemented by setting the above policy template "ServerTemplate”.
  • the volume reduction needs to be performed, according to the "Automatic Processing Strategy 2" in the "Action” tab of the volume reduction section of the above template, select the policy rule according to the number of VMs, for example, according to the "automatic processing” in the template.
  • the javascript script "MaxCount*0.05" in Strategy 2", 5% of the upper limit of the decision expansion cluster. If the cluster upper limit is 100 VMs, then 5 VMs are reduced.
  • the setting of the automatic processing policy can be realized by setting the javascript script.
  • the VM is deleted according to the VM instance selection policy rule, for example, “automatic processing strategy one”
  • the strategy specified in is to remove the smallest VM of CPU utilization. That is, the CPU utilization of the VM is deleted from small to large.
  • the automation engine calls the external cloud platform to automatically adjust the cluster.
  • VM creation is performed according to the type of VM to be added (for example, the type of VM set by the user on the ServerTemplate template) and the number (for example, 5).
  • the VM is created by calling an external driver and by an external driver call.
  • the VM can be created via AME's AddVM interface call.
  • the AME creates the VM from the underlying layer via an external platform (for example, Galax) and joins it into the VM cluster.
  • the specified VM is removed from the VM cluster based on the list and number of VM instances to be deleted (for example, 5).
  • the VM is deleted by calling an external driver and by an external driver call.
  • the VM can be deleted by AME's Remove VM interface, and AME deletes the VM from the underlying layer through the external Galax platform. In actual implementation, you can notify the service first and wait for a period of time before deleting the VM.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling through some interfaces, devices or units.
  • a communication connection which can be electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software function unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Abstract

The present invention provides a system and a method for processing a virtual machine in a cloud platform. The system comprises: an acquisition module, for acquiring an automation rule, the automation rule comprising an automatic processing strategy; and a processing module, for generating, according to the automatic processing strategy, an automatic processing parameter when executing the automation rule, and invoking the cloud platform to automatically process a set of virtual machines according to the automatic processing parameter. According to the embodiment of the present invention, the automatic processing parameter can be generated according to the automatic processing strategy when the automation rule is executed, and the cloud platform is invoked to automatically process a set of virtual machines according to the automatic processing parameter, thereby improving the flexibility in the automatic processing on the virtual machine cluster.

Description

处理云平台中的虚拟机的系统和方法 技术领域  System and method for processing virtual machines in a cloud platform
本发明实施例涉及计算机信息领域, 更具体地, 涉及一种处理云平台中 的虚拟机的系统和方法。 背景技术  Embodiments of the present invention relate to the field of computer information, and more particularly, to a system and method for processing a virtual machine in a cloud platform. Background technique
随着云计算的发展,对基于自动化规则管理云环境中的虚拟机集群的技 术的需求也越来越大。 虚拟机集群的生命周期要经历部署、 运行、 销毁、 故 障等阶段, 而部署的策略一般在虚拟机集群创建时已经确定。 例如, 通过对 虚拟机集群进行模板化部署, 能够实现无人工干预的大规模部署, 大大加快 了虚拟机集群的部署速度。  With the development of cloud computing, the need for technologies based on automated rules to manage virtual machine clusters in cloud environments is growing. The life cycle of a virtual machine cluster goes through phases of deployment, operation, destruction, and failure, and the deployed policy is generally determined when the virtual machine cluster is created. For example, by templating a virtual machine cluster, large-scale deployment without human intervention can be achieved, which greatly speeds up the deployment of virtual machine clusters.
目前, 用户能够利用云服务商提供的虚拟机集群部署模板对虚拟机集群 进行部署。 虚拟机集群部署模板提供了少量定义好的自动处理规则, 用于对 虚拟机集群进行自动化处理。  Currently, users can deploy virtual machine clusters using virtual machine cluster deployment templates provided by cloud providers. The virtual machine cluster deployment template provides a small number of defined automatic processing rules for automating virtual machine clusters.
然而, 在虚拟机集群部署完成之后, 虚拟机集群只能以固定的自动化处 理规则工作。 因此, 虚拟机集群的自动化处理很不灵活。 发明内容  However, after the virtual machine cluster is deployed, the virtual machine cluster can only work with fixed automated processing rules. Therefore, the automated processing of virtual machine clusters is very inflexible. Summary of the invention
本发明实施例提供一种处理云平台中的虚拟机的系统和方法, 能够提高 虚拟机集群的自动化处理的灵活性。  Embodiments of the present invention provide a system and method for processing a virtual machine in a cloud platform, which can improve the flexibility of automatic processing of a virtual machine cluster.
一方面, 提供了一种处理云平台中的虚拟机的系统, 包括: 获取模块, 用于获取自动化规则, 该自动化规则包括自动处理策略; 和处理模块, 用于 在执行该自动化规则时根据该自动处理策略生成自动处理参数, 并且根据该 自动处理参数调用该云平台对一组虚拟机进行自动处理。  In one aspect, a system for processing a virtual machine in a cloud platform is provided, including: an obtaining module, configured to obtain an automation rule, the automation rule includes an automatic processing policy; and a processing module, configured to perform the The automatic processing strategy generates automatic processing parameters, and invokes the cloud platform to automatically process a group of virtual machines according to the automatic processing parameters.
另一方面, 提供了一种处理云平台中的虚拟机的方法, 包括: 获取自动 化规则, 该自动化规则包括自动处理策略; 在执行该自动化规则时根据该自 动处理策略生成自动处理参数, 并且根据该自动处理参数调用该云平台对一 组虚拟机进行自动处理。  In another aspect, a method for processing a virtual machine in a cloud platform is provided, including: acquiring an automation rule, the automation rule including an automatic processing policy; generating an automatic processing parameter according to the automatic processing policy when executing the automation rule, and according to The automatic processing parameter invokes the cloud platform to automatically process a group of virtual machines.
本技术方案可以在执行该自动化规则时根据自动处理策略生成自动处 理参数, 并且根据该自动处理参数调用该云平台对一组虚拟机进行自动处 理, 从而提高了虚拟机集群的自动化处理的灵活性。 附图说明 The technical solution may generate an automatic processing parameter according to an automatic processing policy when executing the automation rule, and invoke the cloud platform to automatically perform a set of virtual machines according to the automatic processing parameter. This improves the flexibility of automated processing of virtual machine clusters. DRAWINGS
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技 术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图 仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only the present invention. For some embodiments, other drawings may be obtained from those of ordinary skill in the art without departing from the drawings.
图 1是本发明实施例的处理云平台中的虚拟机的系统的框图。  1 is a block diagram of a system for processing a virtual machine in a cloud platform according to an embodiment of the present invention.
图 2 是本发明一个实施例的处理云平台中的虚拟机的系统架构的示意 图。  2 is a schematic diagram of a system architecture for processing a virtual machine in a cloud platform according to an embodiment of the present invention.
图 3是本发明一个实施例的规则执行单元的框图。  3 is a block diagram of a rule execution unit of one embodiment of the present invention.
图 4是本发明一个实施例的策略管理单元的框图。  4 is a block diagram of a policy management unit of one embodiment of the present invention.
图 5是本发明一个实施例的处理云平台中的虚拟机的方法的示意性流程 图。  FIG. 5 is a schematic flow chart of a method for processing a virtual machine in a cloud platform according to an embodiment of the present invention.
图 6是本发明一个实施例的自动化规则的示意性流程图。 具体实施方式  Figure 6 is a schematic flow diagram of an automation rule in accordance with one embodiment of the present invention. Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创 造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without making creative labor are within the scope of the present invention.
常规虚拟机(Virtual Machine, VM )集群(Cluster )部署模板只能提供 少数定义好的自动处理策略, 例如, 常规 VM集群部署模板可以定义减容策 略,但是无法定义减容时要删除的 VM的选择策略, 即删除 VM时无法指定 要删除哪一台 VM。 扩容和减容策略只有三种(绝对增量、 百分比增量和绝 对数量 ), 无法扩展, 而且用户不能在 VM集群运行过程中设置或自定义自 动处理策略。 另外, 常规 VM集群部署模板一般只描述 VM集群的静态信息 和结构, 缺少对云环境中 VM集群的自动化规则的描述和定义, 例如, 常规 VM集群部署模板没有考虑在 VM集群运行过程中如何增加和减少 VM, 因 此, 定义的规则^艮不灵活, 无法扩展。  A general virtual machine (VM) cluster deployment template can only provide a few defined automatic processing policies. For example, a regular VM cluster deployment template can define a capacity reduction policy, but cannot define a VM to be deleted when volume reduction. Select a policy that removes a VM and cannot specify which VM to delete. There are only three expansion and reduction strategies (absolute increments, percentage increments, and absolute numbers) that cannot be extended, and users cannot set or customize automatic processing policies during VM cluster operation. In addition, the conventional VM cluster deployment template generally only describes the static information and structure of the VM cluster, and lacks description and definition of the automation rules of the VM cluster in the cloud environment. For example, the conventional VM cluster deployment template does not consider how to increase during the operation of the VM cluster. And reduce the VM, therefore, the defined rules are not flexible and cannot be extended.
根据本发明的实施例提出了基于自动化规则可用户定制的处理 VM 集 群的系统和方法。 根据本发明的实施例可以在自动化模板中设置用于对 VM 集群进行自动化处理的自动化规则,用户可以在 VM集群的运行过程中对自 动化规则 (例如, 对其中包含的自动处理策略)进行设置, 从而可大大提高 VM集群的自动处理能力和灵活性。 A set of processing VMs that can be customized based on automated rules is proposed in accordance with an embodiment of the present invention. Group systems and methods. An automated rule for automating processing of a VM cluster can be set up in an automation template in accordance with an embodiment of the present invention, and the user can set the automation rules (eg, the automatic processing policies contained therein) during the operation of the VM cluster, Thereby, the automatic processing capability and flexibility of the VM cluster can be greatly improved.
图 1是本发明实施例的处理云平台中的 VM的系统的框图。图 1的系统 包括: 获取模块 110和处理模块 120。  1 is a block diagram of a system for processing a VM in a cloud platform according to an embodiment of the present invention. The system of Figure 1 includes: an acquisition module 110 and a processing module 120.
获取模块 110获取自动化规则, 该自动化规则包括自动处理策略。 处理 模块 120在执行该自动化规则时根据该自动处理策略生成自动处理参数, 并 且根据该自动处理参数调用该云平台对一组虚拟机进行自动处理。  The acquisition module 110 obtains an automation rule that includes an automatic processing policy. The processing module 120 generates an automatic processing parameter according to the automatic processing policy when executing the automation rule, and invokes the cloud platform to automatically process a group of virtual machines according to the automatic processing parameter.
例如, 云平台 (cloud platforms )可以提供基于云 (cloud ) 的服务, 供 开发者创建应用时采用, 换句话说, 云平台允许开发者将编写的程序放在 云里运行和 /或使用云里提供的服务。 例如, 图 2所示的云平台 250, 可以提 供基于云的服务。 对云平台 250中的一组 VM进行自动处理涉及对各种云 平台 (例如, Amazon, Galax或 vCenter等云平台) 中的一组 VM进行自动 容量调整( Auto Scaling ) ,根据本发明的实施例并不限于此,例如, 一组 VM 可以是 VM集群, 自动处理还可涉及 VM集群间的资源调整。 VM集群可以 包括一组或多组 VM。 例如, 云平台 250可以提供 VM集群中的一组 VM的 处理或管理动作, 如增加、 删除、 修改、 查询等操作。 应该理解, 当上述虚 拟机集群为复合虚拟机集群(成员为虚拟机集群 )时, 上述一组 VM也可以 指一个 VM集群。  For example, cloud platforms can provide cloud-based services for developers to create applications. In other words, cloud platforms allow developers to run programs written in the cloud and/or use the cloud. service provided. For example, the cloud platform 250 shown in Figure 2 can provide cloud-based services. Automated processing of a set of VMs in cloud platform 250 involves automatic capacity tuning (Auto Scaling) of a set of VMs in various cloud platforms (eg, cloud platforms such as Amazon, Galax, or vCenter), in accordance with an embodiment of the present invention Not limited to this, for example, a group of VMs may be a VM cluster, and automatic processing may also involve resource adjustments between VM clusters. A VM cluster can include one or more sets of VMs. For example, cloud platform 250 can provide processing or management actions for a group of VMs in a VM cluster, such as adding, deleting, modifying, querying, and the like. It should be understood that when the above virtual machine cluster is a composite virtual machine cluster (members are virtual machine clusters), the above set of VMs may also refer to a VM cluster.
例如,自动处理可以包括扩容、减容或者 VM集群间的资源调整等操作。 例如, 自动处理参数可以是自动容量调整参数, 也可以是 VM集群间的资源 调整参数。换句话说, 上述自动处理参数是对一组 VM进行自动处理时所需 的参数,可以在执行自动化规则时根据所选择的自动处理策略生成上述自动 处理参数。  For example, automatic processing can include operations such as capacity expansion, volume reduction, or resource adjustment between VM clusters. For example, the automatic processing parameter can be an automatic capacity adjustment parameter or a resource adjustment parameter between VM clusters. In other words, the above automatic processing parameters are parameters required for automatic processing of a group of VMs, and the automatic processing parameters can be generated according to the selected automatic processing strategy when the automation rules are executed.
自动化规则可以采用插件的形式, 例如, 自动化插件 1、 2 n。 一 个自动化规则对应于 VM集群中的一组 VM。根据本发明的实施例针对每组 VM执行一个自动化规则进行自动处理, 可以对每个 VM组定义自动处理的 动作、 自动处理的名称、 冷却时间窗、 触发条件、 自动处理策略等等。 根据 本发明的实施例, 获取模块 110可以直接获取采用插件形式的自动化规则, 也可以解析用户预先设定的自动化模板, 并且将自动化模板转化成自动化规 则插件。 Automation rules can take the form of plugins, for example, automation plugins 1, 2 n. An automation rule corresponds to a group of VMs in a VM cluster. An automated rule is performed for each set of VMs for automatic processing according to an embodiment of the present invention, and an automatically processed action, a name of an automatic process, a cooling time window, a trigger condition, an automatic processing policy, and the like can be defined for each VM group. According to an embodiment of the present invention, the obtaining module 110 may directly acquire an automation rule in the form of a plug-in, may also parse a preset template of the user, and convert the automation template into an automation rule. Then the plugin.
例如,上述自动化规则是用于在 VM集群的运行过程中确定对 VM集群 进行自动容量调整的规则或逻辑, 例如, 自动化规则可以涉及扩容或减容的 判断和触发、 自动处理策略的选择、 自动容量调整参数的获取以及对外部云 平台 250的调用等等, 根据本发明的实施例并不限于此, 例如, 用户可以根 据需要添加更多的判断以及其它规则。  For example, the above automation rule is a rule or logic for determining automatic capacity adjustment of a VM cluster during operation of the VM cluster. For example, the automation rule may involve judgment and triggering of capacity expansion or volume reduction, automatic processing policy selection, and automatic The acquisition of the capacity adjustment parameters and the call to the external cloud platform 250, etc., are not limited in this way according to an embodiment of the present invention, for example, the user may add more judgments and other rules as needed.
例如,上述自动处理策略指示在 VM集群的运行过程中如何对 VM集群 中的一组 VM或多组 VM进行自动容量调整的策略,例如,如何扩容或减容, 根据本发明的实施例并不限于此, 例如, 上述自动处理策略还可以指示如何 进行集群间的资源调整。  For example, the automatic processing policy described above indicates a policy of how to perform automatic capacity adjustment on a group of VMs or groups of VMs in a VM cluster during operation of the VM cluster, for example, how to expand or reduce capacity, according to an embodiment of the present invention. For this reason, for example, the above automatic processing policy may also indicate how to perform resource adjustment between clusters.
例如, 在 VM集群运行过程中, 由图 1的系统的获取模块 110获取自动 化规则, 其中自动化规则包括自动处理策略; 并由处理模块 120根据上述自 动处理策略生成自动处理参数, 并且根据该自动处理参数调用该云平台对一 组虚拟机进行自动处理。 由于根据本发明的实施例的自动处理参数是在执行 自动化规则时生成的, 因此, 用户可以在 VM集群的运行过程中方便地对自 动处理策略进行设置, 以便修改这些自动处理参数, 从而可大大提高 VM集 群的自动处理能力和灵活性。  For example, during the operation of the VM cluster, the automation module is obtained by the acquisition module 110 of the system of FIG. 1, wherein the automation rule includes an automatic processing policy; and the processing module 120 generates an automatic processing parameter according to the automatic processing policy, and according to the automatic processing The parameter invokes the cloud platform to automatically process a set of virtual machines. Since the automatic processing parameters according to the embodiment of the present invention are generated when the automation rules are executed, the user can conveniently set the automatic processing policy during the running of the VM cluster, so as to modify these automatic processing parameters, thereby greatly Improve the automatic processing power and flexibility of VM clusters.
上述自动处理策略可以用于在进行自动容量调整时选择 VM, 其可以预 先设置在自动化模板中, 可选地, 还可以在上述一组 VM运行过程中调用自 动处理策略的设置或请求用户对至少一个自动处理策略进行设置, 以便该系 统根据用户的需要调用云平台 250对上述一组 VM进行自动容量调整。例如, 处理模块 120可以在根据自动化规则确定需要对一组 VM (例如, VM实例 组或 VM集群 )进行扩容( Auto Scale Out )或减容( Auto Scale In ) 时, 获 取根据用户对自动处理策略的设置得到的自动处理参数, 并且根据这些自动 处理参数对 VM集群中的一组 VM或对整个 VM集群进行扩容或减容。  The above automatic processing strategy may be used to select a VM when performing automatic capacity adjustment, which may be preset in an automation template, and optionally, may also invoke an automatic processing policy setting or request a user to at least during the above-mentioned one VM running process. An automatic processing policy is set up so that the system invokes the cloud platform 250 to perform automatic capacity adjustment on the set of VMs according to the needs of the user. For example, the processing module 120 may obtain an automatic processing policy according to the user when it is determined according to an automation rule that a set of VMs (for example, a VM instance group or a VM cluster) needs to be expanded (Auto Scale Out) or reduced (Auto Scale In). Set the resulting automatic processing parameters, and according to these automatic processing parameters to expand or reduce the capacity of a group of VMs in the VM cluster or the entire VM cluster.
根据本发明的实施例可以在执行自动化规则时根据自动处理策略生成 自动处理参数, 并且根据该自动处理参数调用该云平台对一组虚拟机进行自 动处理, 从而提高了虚拟机集群的自动化处理的灵活性。  According to an embodiment of the present invention, an automatic processing parameter may be generated according to an automatic processing policy when the automation rule is executed, and the cloud platform is invoked to automatically process a group of virtual machines according to the automatic processing parameter, thereby improving automatic processing of the virtual machine cluster. flexibility.
图 2是本发明一个实施例的处理云平台中的 VM的系统架构的示意图。 图 2的系统包括: 获取模块 210和处理模块 220, 与图 1的获取模块 110和 处理模块 120类似, 这里适当省略详细的描述。 获取模块 210获取自动化规则, 该自动化规则包括自动处理策略。 处理 模块 220在执行该自动化规则时根据该自动处理策略生成自动处理参数, 并 且根据该自动处理参数调用云平台 250对一组虚拟机进行自动处理。 2 is a schematic diagram of a system architecture for processing a VM in a cloud platform according to an embodiment of the present invention. The system of FIG. 2 includes: an acquisition module 210 and a processing module 220, similar to the acquisition module 110 and the processing module 120 of FIG. 1, and detailed descriptions are omitted as appropriate herein. The acquisition module 210 obtains an automation rule that includes an automatic processing policy. The processing module 220 generates an automatic processing parameter according to the automatic processing policy when executing the automation rule, and invokes the cloud platform 250 to automatically process a group of virtual machines according to the automatic processing parameter.
根据本发明的实施例, 处理模块 220包括: 规则执行单元 222和策略管 理单元 223。 规则执行单元 222在执行该自动化规则时选择自动处理策略, 根据选择的自动处理策略请求该自动处理参数, 并且根据该自动处理参数调 用云平台 250对上述一组虚拟机进行自动处理。 策略管理单元 223管理该自 动处理策略的设置,根据对该选择的自动处理策略的设置生成该自动处理参 数, 并向该规则执行单元提供该自动处理参数。 图 3是本发明一个实施例的 规则执行单元的框图。 图 4是本发明一个实施例的策略管理单元的框图。  According to an embodiment of the present invention, the processing module 220 includes: a rule execution unit 222 and a policy management unit 223. The rule execution unit 222 selects an automatic processing policy when executing the automation rule, requests the automatic processing parameter according to the selected automatic processing policy, and automatically processes the set of virtual machines according to the automatic processing parameter calling cloud platform 250. The policy management unit 223 manages the setting of the automatic processing policy, generates the automatic processing parameter according to the setting of the selected automatic processing policy, and provides the automatic processing parameter to the rule execution unit. Figure 3 is a block diagram of a rule execution unit in accordance with one embodiment of the present invention. 4 is a block diagram of a policy management unit of one embodiment of the present invention.
例如, 在执行自动化规则时, 可以根据触发的自动处理动作(例如, 扩 容或减容)选择自动处理策略, 例如, 在触发了扩容时, 可以选择 VM类型 选择策略和 VM数量选择策略,在触发了减容时,可以选择 VM实例选择策 略和 VM数量选择策略。 然后, 可以根据所选择的自动处理策略请求或调用 与该自动处理策略相对应的自动处理参数。 最后, 可以根据该自动处理参数 调用云平台 250对上述一组虚拟机进行自动处理。  For example, when executing an automation rule, an automatic processing policy can be selected according to the triggered automatic processing action (for example, expansion or volume reduction). For example, when the expansion is triggered, the VM type selection policy and the VM number selection policy can be selected and triggered. When volume reduction is performed, the VM instance selection policy and the VM number selection policy can be selected. The automatic processing parameters corresponding to the automatic processing policy can then be requested or invoked according to the selected automatic processing policy. Finally, the cloud platform 250 can be invoked to automatically process the set of virtual machines according to the automatic processing parameters.
根据本发明的另一实施例, 处理模块 220还包括: 规则管理单元 221。 规则管理单元 221从获取模块 210接收该自动化规则, 并且用于增加或删除 该自动化规则。  According to another embodiment of the present invention, the processing module 220 further includes: a rule management unit 221. The rules management unit 221 receives the automation rules from the acquisition module 210 and is used to add or delete the automation rules.
该自动化规则可以采用自动化规则插件(例如, 可以由脚本来实现, 或 者由 Drools或者 DocObject软件生成的 drl文件来实现) 的形式。 规则管理 单元 221可以动态修改、 添加或删除自动化规则插件。 规则执行单元 222, 在满足触发条件时触发自动处理, 例如, 触发扩容或减容。 自动处理可以包 括根据上述自动处理参数对一组 VM (或 VM集群)进行自动容量调整和 / 或进行 VM集群间的资源调整。 另外, 规则执行单元 222可以向策略管理单 元 223请求自动处理参数, 例如, 在进行自动容量调整时, 可以请求自动容 量调整参数。 策略管理单元 223可以管理至少一个自动处理策略的设置, 并 且在接收到规则执行单元 222的请求后向规则执行单元 222反馈需要采取的 自动处理参数, 例如, 提供自动容量调整参数(例如, 扩容 VM的数量和规 格等、 或者减容的数量和实例)。 上述自动处理策略的设置可以指用户设置 的用于计算自动处理参数的相关参数, 例如, 减容(或扩容)的比率值。 以 比率值被设置为 0.05且比率基础值为 100为例,可以计算出自动处理参数为 5, 即减容(或扩容) 5台。 用户对自动处理策略的设置可以通过插件的形式 (例如,脚本或规则引擎)来实现,根据本发明的实施例并不限于此, 例如, 还可以通过提示用户输入的形式来实现, 例如, 在弹出窗口中提示用户输入 减容(或扩容) 的比率值。 This automation rule can take the form of an automated rule plugin (for example, it can be implemented by a script or by a drl file generated by Drools or DocObject software). The rule management unit 221 can dynamically modify, add, or delete an automated rule plugin. The rule execution unit 222 triggers automatic processing when the trigger condition is met, for example, triggering expansion or volume reduction. Automatic processing may include automatic capacity adjustment of a set of VMs (or VM clusters) according to the automatic processing parameters described above and/or resource adjustments between VM clusters. In addition, the rule execution unit 222 may request the automatic management parameter from the policy management unit 223, for example, when the automatic capacity adjustment is performed, the automatic capacity adjustment parameter may be requested. The policy management unit 223 can manage the settings of the at least one automatic processing policy, and after receiving the request of the rule execution unit 222, feed back the automatic processing parameters that need to be taken to the rule execution unit 222, for example, provide automatic capacity adjustment parameters (for example, expand the VM). The number and specifications, etc., or the number and examples of volume reduction). The setting of the above automatic processing policy may refer to a related parameter set by the user for calculating an automatic processing parameter, for example, a ratio value of volume reduction (or capacity expansion). Take For example, the ratio value is set to 0.05 and the ratio base value is 100. The automatic processing parameter can be calculated as 5, that is, the capacity reduction (or expansion) is 5. The setting of the automatic processing policy by the user may be implemented by a form of a plug-in (for example, a script or a rule engine), and the embodiment according to the present invention is not limited thereto, for example, may also be implemented by prompting a user input form, for example, In the pop-up window, the user is prompted to enter a ratio of the ratio of the volume reduction (or expansion).
可选地, 作为另一实施例, 处理模块 220还包括: 参数获取单元 224。 参数获取单元 224获取上述一组 VM的实时特征参数,并且向规则执行单元 221提供该实时特征参数, 其中规则执行单元 222还在该实时特征参数满足 触发条件的预设门限的情况下, 根据该触发条件选择该自动处理策略, 以触 发对上述一组 VM进行自动处理。  Optionally, as another embodiment, the processing module 220 further includes: a parameter obtaining unit 224. The parameter obtaining unit 224 obtains the real-time feature parameters of the set of VMs, and provides the real-time feature parameters to the rule execution unit 221, wherein the rule execution unit 222 further determines, according to the preset threshold of the trigger condition, the real-time feature parameter The trigger condition selects the automatic processing strategy to trigger automatic processing of the above set of VMs.
例如,参数获取单元 224可以用于根据 VM集群参数计算对象的实时特 征参数, 如上述一组 VM (或 VM集群) 的平均 CPU利用率等。  For example, the parameter acquisition unit 224 can be configured to calculate real-time characteristic parameters of the object based on the VM cluster parameters, such as the average CPU utilization of the above-described set of VMs (or VM clusters) and the like.
可选地, 作为另一实施例, 图 1的系统还包括: 监控模块 230。 监控模 块 230实时监控上述一组 VM的第一参数,并且向参数获取单元 224提供该 第一参数, 其中参数获取单元 224还根据该第一参数计算该实时特征参数; 和 /或用于实时监控上述一组 VM的第二参数, 并且向策略管理单元 223提 供该第二参数,其中该策略管理单元 223还根据该第二参数和用户对上述选 择的自动处理策略的设置计算该自动处理参数。 例如, 参数获取单元 224可 以对从监控模块 230获取的一组 VM或 VM集群的数据进行统计计算,以获 得一组 VM或 VM集群的平均值、 方差等。  Optionally, as another embodiment, the system of FIG. 1 further includes: a monitoring module 230. The monitoring module 230 monitors the first parameter of the set of VMs in real time, and provides the first parameter to the parameter obtaining unit 224, wherein the parameter obtaining unit 224 further calculates the real-time feature parameter according to the first parameter; and/or for real-time monitoring The second parameter of the set of VMs is provided, and the second parameter is provided to the policy management unit 223, wherein the policy management unit 223 further calculates the automatic processing parameter according to the second parameter and the user's setting of the selected automatic processing policy. For example, parameter acquisition unit 224 can perform statistical calculations on data for a set of VMs or VM clusters obtained from monitoring module 230 to obtain an average, variance, etc. of a set of VMs or VM clusters.
例如, 监控模块 230 可以为外部监控代理, 例如, 自动化管理引擎 ( Automatic Management Engine, AME ) 中的监控( Watch )模块, 用于提 供一组 VM (或 VM集群)的参数或其他监控参数。 例如, 第一参数可以是 各个 VM的 CPU利用率等实时参数, 第二参数也可以是 VM的实时参数, 例如, 当需要根据一组 VM的某个实时参数与自动处理策略的设置来联合确 定自动处理参数时, 策略管理单元 223可以通过监控模块 230获取相应的第 二参数。  For example, the monitoring module 230 can be an external monitoring agent, for example, a Watch module in an Automatic Management Engine (AME) for providing parameters or other monitoring parameters for a group of VMs (or VM clusters). For example, the first parameter may be a real-time parameter such as the CPU utilization of each VM, and the second parameter may also be a real-time parameter of the VM, for example, when it is required to jointly determine according to a certain real-time parameter of a group of VMs and an automatic processing policy setting. When the parameters are automatically processed, the policy management unit 223 can acquire the corresponding second parameter through the monitoring module 230.
参见图 3, 在实现自动容量调整的方案中, 规则执行单元 222包括: 触 发子单元 310和调用子单元 320。 触发子单元 310根据该触发条件选择该自 动处理策略, 并且比较上述实时特征参数与上述触发条件的预设门限, 在该 实时特征参数满足该触发条件的预设门限时,触发调用子单元 320对上述一 组 VM进行自动容量调整。调用子单元 320根据选择的该自动处理策略请求 该策略管理单元 223返回上述自动容量调整参数, 并且根据该自动容量调整 参数调用云平台 250对上述一组 VM进行自动容量调整。 Referring to FIG. 3, in the scheme for implementing automatic capacity adjustment, the rule execution unit 222 includes: a trigger subunit 310 and an invocation subunit 320. The triggering sub-unit 310 selects the automatic processing policy according to the triggering condition, and compares the real-time feature parameter with the preset threshold of the triggering condition. When the real-time feature parameter satisfies the preset threshold of the triggering condition, the triggering sub-unit 320 is triggered. One of the above The group VM performs automatic capacity adjustment. The calling sub-unit 320 requests the policy management unit 223 to return the automatic capacity adjustment parameter according to the selected automatic processing policy, and invokes the cloud platform 250 to perform automatic capacity adjustment on the set of VMs according to the automatic capacity adjustment parameter.
例如, 触发子单元 310匹配 VM的实时特征参数与触发条件, 触发自动 处理。 调用子单元 320根据所触发的自动处理(例如, 扩容或减容)从自动 化规则中配置的自动处理策略中选择与上述触发的自动处理相对应的自动 处理策略, 并且向策略管理单元 223请求与所选择的自动处理策略相对应的 自动容量调整参数, 并将返回的结果作为自动容量调整参数 (或动作参数 ), 以调用外部云平台的驱动模块 240。例如,可能采取的自动处理策略有三种, VM数量选择策略、 VM类型选择策略、 VM实例选择策略。 然后, 规则执 行单元 222根据这些策略以及相应的自动容量调整参数调用外部云平台 250 执行删除或者创建 VM的动作。  For example, the trigger sub-unit 310 matches the real-time feature parameters and trigger conditions of the VM, and triggers automatic processing. The calling sub-unit 320 selects an automatic processing policy corresponding to the above-mentioned automatic processing of the trigger from the automatic processing policy configured in the automation rule according to the triggered automatic processing (for example, expansion or volume reduction), and requests the policy management unit 223 to The automatic capacity adjustment parameter corresponding to the selected automatic processing strategy, and the returned result is used as an automatic capacity adjustment parameter (or an action parameter) to invoke the drive module 240 of the external cloud platform. For example, there are three automatic processing strategies that may be adopted, a VM number selection policy, a VM type selection policy, and a VM instance selection policy. Then, the rule execution unit 222 invokes the external cloud platform 250 to perform an action of deleting or creating a VM according to the policies and the corresponding automatic capacity adjustment parameters.
参见图 4, 策略管理单元 223包括: 管理子单元 410和策略子单元 420。 管理子单元 410根据来自调用子单元 320的请求中包含上述选择的自动处理 策略的标识分流上述请求,和 /或用于动态添加新的自动处理策略的设置。策 略子单元 420在从管理子单元 410接收到该请求之后,根据用户对上述选择 的自动处理策略的设置和上述一组 VM 的第二参数计算该自动容量调整参 数, 并且将该自动容量调整参数返回给调用子单元 320。 当然也可以根据用 户对上述选择的自动处理策略的设置计算该自动容量调整参数, 并且将该自 动容量调整参数返回给调用子单元 320  Referring to FIG. 4, the policy management unit 223 includes: a management subunit 410 and a policy subunit 420. The management sub-unit 410 diverts the request based on the identification of the automatic processing policy selected from the request from the calling sub-unit 320, and/or the setting for dynamically adding a new automatic processing policy. After receiving the request from the management subunit 410, the policy subunit 420 calculates the automatic capacity adjustment parameter according to the setting of the selected automatic processing policy by the user and the second parameter of the set of VMs, and the automatic capacity adjustment parameter Returned to the calling subunit 320. Of course, the automatic capacity adjustment parameter can also be calculated according to the user's setting of the automatic processing policy selected above, and the automatic capacity adjustment parameter is returned to the calling subunit 320.
管理子单元 410负责分流调用自动处理策略的设置插件的请求, 并且可 以动态添加新的自动处理策略的设置插件。如可以将新增加的自动处理策略 的设置插件(例如,脚本或规则引擎)放到指定目录下, 按照标准规则命名, 管理子单元 410可以调用这个脚本。 策略子单元 420可以根据预定的自动处 理策略和用户输入的参数自动决策自动处理参数, 例如, 扩容的 VM个数、 VM规格等。 自动处理策略的设置插件可以由用户根据需要动态添加。 策略 子单元 420可以为至少一个, 例如, 策略子单元 1、 2 n, 分别对应于 至少一个自动处理策略设置。 例如, 该自动处理策略的标识可以是自动处理 策略的名称, 管理子单元 410根据该标识确定与该标识对应的自动处理策略 的设置。  The management sub-unit 410 is responsible for offloading the request to set the plug-in of the automatic processing policy, and can dynamically add a new plug-in for the automatic processing policy. If the newly added auto-processing policy setting plug-in (for example, script or rule engine) can be placed in the specified directory, the management sub-unit 410 can call this script according to the standard rules. The policy sub-unit 420 can automatically determine the automatic processing parameters according to the predetermined automatic processing policy and the parameters input by the user, for example, the number of VMs to be expanded, VM specifications, and the like. The settings plug-in for the automatic processing policy can be dynamically added by the user as needed. The policy subunit 420 can be at least one, for example, the policy subunits 1, 2n, respectively corresponding to at least one automatic processing policy setting. For example, the identifier of the automatic processing policy may be the name of the automatic processing policy, and the management sub-unit 410 determines the setting of the automatic processing policy corresponding to the identifier according to the identifier.
根据本发明的实施例, 处理模块 220还可以根据条件、 定时或事件触发 对上述一组 VM进行自动处理。 According to an embodiment of the invention, the processing module 220 can also be triggered according to conditions, timing or events. The above set of VMs are automatically processed.
相应地, 触发可以分为条件(condition )触发、 事件(event )触发或定 时(timer )触发。  Accordingly, the trigger can be divided into a condition trigger, an event trigger, or a timer trigger.
条件触发由监控模块 230获取外部参数(例如, 一组 VM的 CPU利用 率或者 VM集群的 CPU利用率)传送给处理模块 220的参数获取单元 224, 然后传送给规则执行单元 222的触发子单元 310, 以判断条件是否满足(例 如, CPU利用率是否大于 90% )。  The conditional trigger is obtained by the monitoring module 230 to obtain external parameters (eg, the CPU utilization of a group of VMs or the CPU utilization of the VM cluster) to the parameter acquisition unit 224 of the processing module 220, and then to the triggering subunit 310 of the rule execution unit 222. To determine if the condition is met (for example, if the CPU utilization is greater than 90%).
类似条件触发, 事件触发是指当检测到之前定义的事件(例如, 当一组 VM内有 VM在扩容时发生了错误, 或 VM无法创建成功 )时, 触发自动处 理(例如, 集群间资源调整)。  Triggered by a similar condition, event triggering triggers automatic processing when a previously defined event is detected (for example, when a VM in a set of VMs has an error in capacity expansion, or the VM cannot be created successfully) (for example, inter-cluster resource adjustment) ).
时间触发, 是指触发子单元 310检测到指定时刻 (预先定义的时间), 就触发自动处理。  Time triggering means that the trigger subunit 310 detects the specified time (predefined time) and triggers automatic processing.
根据本发明的实施例, 上述自动处理策略包括: 用于选择 VM的类型的 策略、用于选择 VM的数量的策略和用于选择 VM的实例的策略中的至少一 个, 其中该规则执行单元从上述用于选择虚拟机的类型的策略、 上述用于选 择虚拟机的数量的策略和上述用于选择虚拟机的实例的策略中选择至少一 个策略。  According to an embodiment of the present invention, the above automatic processing policy includes: at least one of a policy for selecting a type of a VM, a policy for selecting a number of VMs, and a policy for selecting an instance of a VM, wherein the rule execution unit The at least one of the above-described policies for selecting the type of the virtual machine, the above-described policy for selecting the number of virtual machines, and the above-described policy for selecting an instance of the virtual machine are selected.
例如, 自动处理策略包括 VM数量选择策略、 VM类型选择策略或 VM 实例选择策略。  For example, an automatic processing policy includes a VM quantity selection policy, a VM type selection policy, or a VM instance selection policy.
VM数量选择策略( VMCountPolicy )是指在扩容或者减容时, 决定增 加或删除的 VM数量,增加或删除 VM数量的规则有 ^艮多种,用户可以自定 义, 例如, 用户可以设置为预先定义的值, 表示增加几台; 可以设置为提示 用户自己输入 VM数量; 可以设置为随机数量; 或者可以设置为用户自定义 脚本等。  The VM number selection policy (VMCountPolicy) refers to the number of VMs that are added or deleted when expanding or reducing capacity. There are many rules for adding or deleting VMs. Users can customize them. For example, users can be set to pre-defined. The value indicates that several units are added; it can be set to prompt the user to enter the number of VMs themselves; it can be set to a random number; or it can be set to a user-defined script.
VM类型选择策略( VMClassPolicy )是指在扩容时, 决定增加 VM的 类型 (即创建 VM的规格参数, 如 CPU个数, 磁盘大小, 内存大小等等), 类似于数量选择策略, 用户可以设置为预定义的模板 (可以定义 VM规格)、 与该组 VM内其它 VM的类型相同、 或提示用户输入的模板等等。  VM type selection policy (VMClassPolicy) means that when expanding capacity, it is decided to increase the type of VM (that is, the specification parameters of the VM, such as the number of CPUs, the size of the disk, the size of the memory, etc.), similar to the number selection policy, the user can set Predefined templates (which can define VM specifications), the same type as other VMs in the set of VMs, or templates that prompt the user for input, and so on.
VM 实例选择策略( VMInstancePolicy )是指在减容时, 决定删除 VM 的实例。 用户可以设置为预定的脚本文件 (预先定义的删除规则, 如删除 CPU利用率最小的 VM、 最开始创建的 VM等等), 提示用户输入要删除的 VM, 或预先设置好的 VM等等。 The VM Instance Selection Policy (VMInstancePolicy) is an instance of the VM that was decided to delete when the volume is reduced. The user can set the predetermined script file (pre-defined deletion rules, such as deleting the VM with the lowest CPU utilization, the VM created at the beginning, etc.), prompting the user to input the deletion. VM, or a pre-configured VM, etc.
根据本发明的实施例, 获取模块 210通过解析预定的自动化模板, 获取 自动化规则, 该自动化模板包括可扩展标记语言文件。  In accordance with an embodiment of the present invention, the acquisition module 210 obtains an automated rule by parsing a predetermined automation template, the automated template including an extensible markup language file.
例如, 当用户需要使用云服务商的 VM集群提供的服务时, 可以根据需 要配置自动化模板, 即在自动化模板中配置自动化规则, 并将配置好的自动 化模板上传到图 1的系统中。 另外, 可以将对自动化规则中的触发条件的设 置以及对自动处理策略的设置以插件(例如, 通过脚本或规则引擎实现)的 形式放到指定目录下。图 1的系统根据上述自动化模板对 VM集群进行部署。 获取模块 210可以解析用户预先设定的自动化模板, 并且转化成至少一个自 动化规则, 自动化规则可以采用插件的形式, 例如, 自动化插件 1、 2 n。 一个自动化规则对应于 VM集群中的一组 VM。 例如, 在部署 VM集群 时, 获取模块 210解析自动化模板, 将自动化规则翻译成实现规则, 并将实 现规则添加到处理模块 220的规则执行单元 222中。  For example, when a user needs to use the services provided by the cloud service provider's VM cluster, the automation template can be configured as needed, that is, the automation rules are configured in the automation template, and the configured automatic template is uploaded to the system of FIG. In addition, the setting of trigger conditions in the automation rules and the setting of the automatic processing policy can be placed in the specified directory in the form of plug-ins (for example, implemented by scripts or rule engines). The system of Figure 1 deploys a VM cluster based on the above automated template. The acquisition module 210 can parse the user-preset automation template and convert it into at least one automation rule, and the automation rule can take the form of a plug-in, for example, the automation plug-in 1, 2 n . An automation rule corresponds to a group of VMs in a VM cluster. For example, when deploying a VM cluster, the acquisition module 210 parses the automation template, translates the automation rules into implementation rules, and adds the implementation rules to the rule execution unit 222 of the processing module 220.
根据本发明的实施例,上述自动化规则可以通过脚本或规则引擎进行设 置或通过在弹出窗口中输入参数的形式进行设置。  According to an embodiment of the present invention, the above-described automation rules can be set by a script or a rule engine or by inputting parameters in a pop-up window.
根据本发明的实施例,上述自动处理策略可以通过脚本或规则引擎进行 设置或通过在弹出窗口中输入参数的形式进行设置。  According to an embodiment of the present invention, the above automatic processing policy may be set by a script or a rule engine or by inputting a parameter in a popup window.
例如, 自动处理策略的设置相关参数 (用于生成自动处理参数的相关参 数, 例如, 比率值)或者自动化规则的触发条件的门限可以被设置在由脚本 规则引擎实现的插件中, 或者提示用户在弹出窗口中输入。  For example, the setting related parameters of the automatic processing policy (related parameters for generating automatic processing parameters, for example, ratio values) or the thresholds of the triggering conditions of the automatic rules may be set in the plug-in implemented by the script rule engine, or prompt the user to Enter in the pop-up window.
例如, 自动化模板可以采用 XML文件的格式, 在这种情况下, 还可以 对 XML文件进行校验, 以便该 XML文件是有效的文件, 根据本发明的实 施例并不于此,例如,自动化模板还可以采用 json( JavaScript Object Notation) 文件的格式或 ovf ( Open Virtualization Format )文件的格式。  For example, the automation template may take the form of an XML file, in which case the XML file may also be verified so that the XML file is a valid file, which is not based on embodiments of the present invention, for example, an automated template. You can also use the format of a json (JavaScript Object Notation) file or the format of an ovf (Open Virtualization Format) file.
可选地, 作为另一实施例, 处理模块 220通过调用内部接口来调用云平 台 250对上述一组 VM进行自动处理, 图 2的系统还包括: 驱动模块 240。 驱动模块 240将调用该内部接口转换为调用云平台 250的应用程序接口。  Optionally, as another embodiment, the processing module 220 invokes the internal platform to invoke the cloud platform 250 to automatically process the set of VMs. The system of FIG. 2 further includes: a driving module 240. The driver module 240 translates the call to the internal interface to the application interface that invokes the cloud platform 250.
驱动模块 240用于适配外部平台, 用于将内部统一接口调用转换为对外 部平台的 API ( Application Programming Interface, 应用程序编程接口 )的调 用, 即可以通过将调用内部统一接口转换为调用底层平台的接口, 例如, 将 对 AME中的创建 VM的 AddVM接口的调用转换为对外部 Galax平台的创 建 VM的 mnlnstance接口的调用。 The driver module 240 is configured to adapt an external platform for converting the internal unified interface call into an API (Application Programming Interface) call of the external platform, that is, by converting the calling internal unified interface to calling the underlying platform. Interface, for example, will convert the call to the AddVM interface for creating VMs in AME to the creation of an external Galax platform. Create a call to the mnlnstance interface of the VM.
可选地, 作为另一实施例, 处理模块 220还用于在两次自动处理之间的 时间间隔超过预设门限的情况下允许对上述一组 VM进行自动处理。  Optionally, in another embodiment, the processing module 220 is further configured to allow automatic processing on the set of VMs when a time interval between two automatic processes exceeds a preset threshold.
例如, 如果两次自动处理之间的时间间隔小于预设门限, 即使触发条件 满足预设门限, 也不允许对上述一组 VM进行自动处理, 只有在触发条件满 足预设门限且两次自动处理之间的时间间隔超过预设门限的情况下, 才允许 对上述一组 VM进行自动处理。  For example, if the time interval between two automatic processes is less than the preset threshold, even if the trigger condition satisfies the preset threshold, the above-mentioned VMs are not allowed to be automatically processed, only if the trigger condition satisfies the preset threshold and two automatic processes are performed. The automatic processing of the above set of VMs is allowed only when the time interval exceeds the preset threshold.
根据本发明的实施例,上述自动化模板中设置有上述一组 VM的可用资 源的上限和下限, 该处理模块还用于根据上述一组虚拟机的可用资源的上限 和下限确定是否允许对上述一组 VM进行自动容量调整。  According to the embodiment of the present invention, the upper and lower limits of the available resources of the set of VMs are set in the above-mentioned automatic template, and the processing module is further configured to determine whether to allow the foregoing one according to the upper and lower limits of the available resources of the set of virtual machines. The group VM performs automatic capacity adjustment.
根据本发明的实施例可以在自动化模板中设置或定义 VM 集群中的一 组 VM的可用资源的上限和下限, VM集群的一组 VM是 VM实例的集合, 可以进行伸缩, 即增加 VM实例或者减少 VM实例。 一组 VM有最大实例 数和最小实例数, 伸缩的 VM的数目不能超过一组 VM的可用资源 (或者 VM集群的可用资源的上限和下限)的范围。 一组 VM也可以称为一个实例 组。 对于不能进行伸缩的节点 (如控制节点), 则认为它是资源上限和下限 相同且为 1的 VM集群。 例如, 可以通过集群属性定义集群的可用资源的上 限和下限以及当前实例数。 例如采用 XML形式的自动化模板的定义集群的 上限和下限的示例可以表示为 : <cluster nameprefix="Processor" templateid="ServerTemplate#2" maxinstcount=" 100" mininstcount="l" initinstcount="10">。  According to an embodiment of the present invention, an upper limit and a lower limit of available resources of a group of VMs in a VM cluster may be set or defined in an automation template, and a set of VMs of the VM cluster is a set of VM instances, which may be scaled, that is, an VM instance is added or Reduce the VM instance. A group of VMs has a maximum number of instances and a minimum number of instances, and the number of scaled VMs cannot exceed the range of available resources of a group of VMs (or the upper and lower limits of available resources of the VM cluster). A group of VMs can also be called an instance group. For a node that cannot be scaled (such as a control node), it is considered to be a VM cluster with the same resource upper and lower limits and 1 being the same. For example, you can define the upper and lower limits of the cluster's available resources and the current number of instances through the cluster properties. For example, an example of defining the upper and lower limits of a cluster using an automated template in XML can be expressed as: <cluster nameprefix="Processor" templateid="ServerTemplate#2" maxinstcount=" 100" mininstcount="l" initinstcount="10"> .
下面是采用 XML形式的自动化模板的扩容部分和减容部分的示例。 标签 <Automations>定义了自动化处理动作。 标签属性包括: name (自 动化处理的名字), 例如, AutoScaleOut (扩容) 或减容 ( AutoScaleOut ); timeWindow (时间窗),在该时间窗内不能进行其他的自动扩容或减容操作, 单位为秒。 自动化处理涉及如下问题:由<1 18861 定义触发条件;由< (^011> 标签定义自动处理动作; 由<1 1116>定义自动处理策略。 igger typ -i co^dl ioi"i" >cp Loa.d sgr. SC< Trigger > The following is an example of the expansion and decompression sections of an automation template in XML form. The tag <Automations> defines the automated processing actions. The tag attributes include: name (automated name), for example, AutoScaleOut or AutoScaleOut; timeWindow, in which no other automatic expansion or decompression operations can be performed, in seconds. . Automated processing involves the following problem: the trigger condition is defined by <1 18861; the automatic processing action is defined by <(^011>tag; the automatic processing strategy is defined by <1 1116>. Igger typ - i co^dl ioi"i">cp Loa.d sgr. SC< Trigger >
<Ac
Figure imgf000012_0001
<Ac
Figure imgf000012_0001
<R I 1. ≤ ^ = if ¾ί σ n.t l ,c r:^;¾= ^R tio <RI 1. ≤ ^ = if 3⁄4ί σ nt l ,c r:^;3⁄4= ^R tio
<B¾se .Ma5£-C oim.t < ..B . >  <B3⁄4se .Ma5£-C oim.t < ..B . >
< :丄 ο>δ .05</ a i.o> 二。i  < :丄 ο>δ .05</ a i.o> II. i
A car..! on n Λί t S ;a " " .:: ;ιβ tii 2ain " A car..! on n Λί t S ;a "".::;ιβ tii 2ain "
<?:i ger: t c ~ ' ' c o;r: di t-i n " > c u Lo ad &I ; 20 .g er <?:i ger: t c ~ ' ' c o;r: di t-i n " > c u Lo ad &I ; 20 .g er
¾c ript>
Figure imgf000012_0002
3⁄4c ript>
Figure imgf000012_0002
< .·■'' Au oro. on> 下面分别对上述自动化模板中的扩容部分和减容部分的示例进行说明: 一、 VM实例组自动扩容部分(对应于上述自动化模板示例中的扩容部 自动化 (标签 Automation )  < .·■'' Au oro. on> The following describes the expansion and decompression sections of the above automation template: 1. Automatic expansion of the VM instance group (corresponding to the expansion of the expansion module in the above automation template example) (label Automation)
名称: 自动扩容( AutoScaleOut ) Name: Auto CapacityOut ( AutoScaleOut )
冷却时间窗: 2分钟 Cooling time window: 2 minutes
触发 (标签 Trigger ):  Trigger (label Trigger ):
触发类型: 条件触发( condition )  Trigger type: conditional trigger ( condition )
触发条件: CPU利用率大于 90% (cpuload>90) Trigger condition: CPU utilization is greater than 90% (cpuload>90)
动作 (标签 Action):  Action (label Action):
触发动作: 创建 VM ( AddVM )  Trigger Action: Create VM ( AddVM )
自动处理策略一: VM类型选择策略( VMClassPolicy ) 策略名称: 指定 ( Assigned )  Automatic Processing Strategy 1: VM Type Selection Policy (VMClassPolicy) Policy Name: Assigned ( Assigned )
指定值: ServerTemplate  Specified value: ServerTemplate
自动处理策略二: VM数量选择策略( VMCountPolicy ) 策略名称: 比例 (Ratio)  Automatic Processing Strategy 2: VM Quantity Selection Policy (VMCountPolicy) Policy Name: Ratio (Ratio)
比例基础值: 最大个数(MaxCount)  Scale basis value: Maximum number (MaxCount)
比率值: 0.05 即根据本发明的实施例定义这样一个自动扩容方式模板:Ratio value: 0.05 That is, an automatic expansion mode template is defined according to an embodiment of the present invention:
1、 当检测到所在实例组的 CPU的平均利用率大于 90%时, 触发对该实 例组的 VM的扩容(对应触发规则为条件触发)。 1. When the average CPU usage of the instance group is greater than 90%, the VM of the instance group is expanded (the trigger rule is triggered by the condition).
2、 VM 类型选择策略, 设定增加 VM 的类型为预先设置的模板 ServerTemplate (例如, 采用自定义的 VM类型 )来扩容。  2. The VM type selection policy is set to increase the VM type to a pre-configured template ServerTemplate (for example, using a custom VM type) to expand.
3、 VM数量选择策略, 指定按实例组的比率进行扩容: 每次扩容实例 组(或集群)的上限值的 5%。 (例如, 实例组上限值可以在模板里预先配置 或定义)  3. The number of VMs is selected. The ratio is expanded according to the ratio of the instance groups: 5% of the upper limit of the instance group (or cluster) is expanded each time. (For example, the instance group upper limit can be pre-configured or defined in the template)
4、 定义冷却时间窗为 2分钟, 即本次自动扩容操作进行后, 2分钟内不 能进行其他自动化动作。  4. Define the cooling time window as 2 minutes, that is, after this automatic expansion operation, no other automatic actions can be performed within 2 minutes.
二、 VM实例组自动减容部分(对应于上述自动化模板示例中的减容部 分):  Second, the VM instance group automatically reduces the volume (corresponding to the volume reduction part in the above automation template example):
自动化 (标签 Automation )  Automation (label Automation)
名称: 自动扩容( AutoScaleln )  Name: Automatic Capacity Expansion ( AutoScaleln )
冷却时间窗: 2分钟  Cooling time window: 2 minutes
触发(标签 Trigger ):  Trigger (label Trigger ):
触发类型: 条件触发( condition )  Trigger type: conditional trigger ( condition )
触发条件: CPU利用率小于 20% ( cpuload < 20 )  Trigger condition: CPU utilization is less than 20% ( cpuload < 20 )
动作 (标签 Action ):  Action (label Action ):
触发动作: 删除 VM ( RemoveVM )  Trigger Action: Delete VM ( RemoveVM )
自动处理策略一: VM实例选择策略 ( VMInstancePolicy ) 策略名称: 最小值(Minimum )  Automatic Processing Strategy 1: VM Instance Selection Policy (VMInstancePolicy) Policy Name: Minimum (Minimum)
属性值: CPU利用率 ( cpuload )  Attribute value: CPU utilization ( cpuload )
自动处理策略二: VM数量选择策略( VMCountPolicy ) 策略名称: 脚本(Script )  Automatic Processing Strategy 2: VM Number Selection Policy (VMCountPolicy) Policy Name: Script (Script)
脚本类型: javascript  Script type: javascript
脚本内容: MaxCount*0.05  Script content: MaxCount*0.05
即根据本发明的实施例定义这样一个的自动减容方式模板:  That is, such an automatic volume reduction mode template is defined according to an embodiment of the present invention:
1、 当检测到所在实例组的 CPU的平均利用率小于 20%时, 触发对该实 例组的 VM的减容。  1. When it is detected that the average CPU utilization of the instance group is less than 20%, the volume reduction of the VM of the instance group is triggered.
2、 VM实例选择策略, 指定了删除 CPU利用率最小的 VM。 3、 VM数量选择策略, 指定了使用脚本计算减容 VM的台数, 按实例 组的比率进行减容(例如, 减容台数为实例组上限值的 5% )。 2. The VM instance selection policy specifies that the VM with the lowest CPU utilization is deleted. 3. VM number selection strategy, which specifies the number of VMs to be reduced by using a script, and reduces the capacity according to the ratio of the instance group (for example, the number of reductions is 5% of the upper limit of the instance group).
4、 定义冷却时间窗为 2分钟, 即本次自动减容操作进行后, 2分钟内不 能进行其他自动化动作。  4. Define the cooling time window as 2 minutes, that is, after this automatic volume reduction operation, no other automatic actions can be performed within 2 minutes.
下面对上述自动化模板中的触发条件部分的内容进行详细说明: 条件触发:  The following details the contents of the trigger condition section in the above automation template: Conditional trigger:
参数: type="condition"  Parameters: type="condition"
描述: 负责检测实例组的属性值是否满足条件, 例如是否大于或小于阈 值。 可支持组合条件 (与、 或、 非)  Description: Responsible for detecting whether the attribute value of the instance group satisfies the condition, such as whether it is greater or less than the threshold. Can support combination conditions (and, or, not)
示例: <Trigger type="condition">cpuLoad &gt; 90</Trigger>表示当 cpuload属性大于 90时, 触发自动处理(例如, 扩容)  Example: <Trigger type="condition">cpuLoad &gt; 90</Trigger> indicates that when the cpuload attribute is greater than 90, automatic processing is triggered (for example, expansion)
上述模板只示出了条件触发, 根据本发明的实施例并不限于此, 例如, 可以在模板中设置事件触发和时间触发, 具体说明如下:  The above template only shows the conditional triggering. The embodiment according to the present invention is not limited thereto. For example, event triggering and time triggering can be set in the template, as follows:
事件触发:  Event trigger:
参数: type="event"  Parameters: type="event"
描述: 检测到事件发生时, 触发自动处理。 事件可以预先定义  Description: Automatic processing is triggered when an event is detected. Events can be pre-defined
示例: <Trigger type="event,,>MemberScaleOutError</Trigger>。表示当出 现 MemberScaleOutError事件(有成员扩容失败)时, 触发自动处理(例如, 集群间资源调整)。  Example: <Trigger type="event,,>MemberScaleOutError</Trigger>. Indicates that automatic processing (for example, intercluster resource adjustment) is triggered when a MemberScaleOutError event occurs (with member expansion failure).
时间触发:  Time trigger:
参数: type="timer"  Parameters: type="timer"
描述: 检测到了指定时刻, 触发自动处理, 该时刻是预先定义的 示例: <Trigger type="timer">2012-12-20:01:02:03</Trigger>。  Description: The specified time is detected and the automatic processing is triggered. This is a predefined example: <Trigger type="timer">2012-12-20:01:02:03</Trigger>.
下面对上述模板中的自动处理策略部分进行说明:  The following section describes the automatic processing strategy in the above template:
标签: <Rule>  Tags: <Rule>
描述: 定义自动处理策略, 即如何处理。 针对不同的自动处理, 有不同 的自动处理类别和方法  Description: Defines an automatic processing strategy, ie how to handle it. Different automatic processing categories and methods for different automatic processing
VM数量选择策略( VMCountPolicy ): 扩容或者减容时, 决定增加或删 除的 VM数量  VM number selection policy (VMCountPolicy): Determines the number of VMs to be added or deleted when expanding or reducing capacity.
class: VMCountPolicy  Class: VMCountPolicy
name: Script: 由用户自定义的脚本决定 Name: Script: determined by a user-defined script
Prompted: 提示用户输入  Prompted: Prompt user input
Assigned: 预先已经定义的值  Assigned: a value that has been previously defined
Random: 系统随机选择  Random: The system randomly chooses
Ratio: 根据基数按比例增加, 基数可以设为组的最大 VM数量或 者当前 VM数量等  Ratio: Proportional increase according to the base number, the base number can be set to the maximum VM number of the group or the current VM number, etc.
VM类型选择策略( VMClassPolicy ): 扩容时, 决定增加 VM的类型 class: VMClassPolicy  VM type selection policy (VMClassPolicy): When expanding, decide to increase the type of VM class: VMClassPolicy
name:  Name:
Script: 由用户自定义的脚本决定。  Script: Determined by a user-defined script.
Prompted: 提示用户输入  Prompted: Prompt user input
Assigned: 预先已经定义的值  Assigned: a value that has been previously defined
Random: 系统随机选择  Random: The system randomly chooses
Same: 采用与实例组中其他 VM相同的类型  Same: uses the same type as the other VMs in the instance group
VM实例选择策略 (VMInstancePolicy): 减容时, 决定删除的 VM实例 class: VMInstancePolicy。  VM instance selection policy (VMInstancePolicy): When descaling, decide to delete the VM instance class: VMInstancePolicy.
name:  Name:
Script: 由用户自定义的脚本决定  Script: determined by a user-defined script
Prompted: 提示用户输入  Prompted: Prompt user input
Assigned: 预先已经定义的值  Assigned: a value that has been previously defined
Random: 系统随机选择  Random: The system randomly chooses
Minimum: 对指定参数(例如, CPU利用率), 从小到大的开始选 择  Minimum: Select the starting parameters (for example, CPU utilization) from small to large
Maximum: 对指定参数, 从大到小的开始选择  Maximum: Select from the largest to the smallest of the specified parameters
图 5是本发明一个实施例的处理云平台中的 VM的方法的示意性流程 图。 图 5的方法可以由图 1的系统执行。  FIG. 5 is a schematic flow chart of a method for processing a VM in a cloud platform according to an embodiment of the present invention. The method of Figure 5 can be performed by the system of Figure 1.
510, 获取自动化规则, 该自动化规则包括自动处理策略。  510. Obtain an automation rule, where the automation rule includes an automatic processing policy.
520, 在执行该自动化规则时根据该自动处理策略生成自动处理参数, 并且根据该自动处理参数调用该云平台对一组虚拟机进行自动处理。  520. Generate an automatic processing parameter according to the automatic processing policy when executing the automation rule, and invoke the cloud platform to automatically process a group of virtual machines according to the automatic processing parameter.
根据本发明的实施例可以在执行自动化规则时根据自动处理策略生成 自动处理参数, 并且根据自动处理参数调用该云平台对一组虚拟机进行自动 处理, 从而提高了虚拟机集群的自动化处理的灵活性。 According to an embodiment of the present invention, an automatic processing parameter may be generated according to an automatic processing policy when an automation rule is executed, and the cloud platform is invoked to automatically perform a group of virtual machines according to the automatic processing parameter. Processing, thereby increasing the flexibility of automated processing of virtual machine clusters.
在 520中, 可以在执行该自动化规则时选择自动处理策略; 根据对该选 择的自动处理策略的设置生成该自动处理参数; 根据该自动处理参数调用该 云平台对上述一组虚拟机进行自动处理。  In 520, an automatic processing policy may be selected when the automation rule is executed; the automatic processing parameter is generated according to the setting of the selected automatic processing policy; and the cloud platform is invoked to automatically process the set of virtual machines according to the automatic processing parameter. .
可选地, 作为另一实施例, 图 5的方法还包括: 增加或删除该自动化规 则。  Optionally, as another embodiment, the method of FIG. 5 further includes: adding or deleting the automation rule.
可选地, 作为另一实施例, 还可以获取上述一组 VM的实时特征参数, 并且在该实时特征参数满足该触发条件的预设门限的情况下触发对上述一 组 VM进行处理,其中在选择自动处理策略时根据触发条件选择自动处理策 略。  Optionally, as another embodiment, the real-time feature parameters of the set of VMs may be acquired, and the set of VMs is triggered to be processed if the real-time feature parameters meet the preset threshold of the trigger condition, where When you select an automatic processing policy, you select an automatic processing policy based on the trigger condition.
可选地, 作为另一实施例, 还可以实时监控上述一组 VM的第一参数 , 并且还根据该第一参数计算该实时特征参数; 和 /或实时监控上述一组 VM 的第二参数, 并且根据该第二参数和用户对上述选择的自动处理策略的设置 计算该自动处理参数。  Optionally, as another embodiment, the first parameter of the set of VMs may be monitored in real time, and the real-time feature parameter is further calculated according to the first parameter; and/or the second parameter of the set of VMs is monitored in real time, And calculating the automatic processing parameter according to the second parameter and the setting of the automatic processing policy selected by the user.
根据本发明的实施例, 上述自动处理可以为自动容量调整, 在 520中, 可以比较该实时特征参数与触发条件的预设门限, 并且在该实时特征参数满 足该触发条件的预设门限时, 触发对上述一组 VM进行自动容量调整; 并且 可以通过请求的方式获取该自动容量调整参数, 并且根据该自动容量调整参 数调用该云平台对上述一组 VM进行自动容量调整。  According to an embodiment of the present invention, the automatic processing may be an automatic capacity adjustment. In 520, the preset threshold of the real-time feature parameter and the trigger condition may be compared, and when the real-time feature parameter meets the preset threshold of the trigger condition, Triggering automatic capacity adjustment on the set of VMs; and acquiring the automatic capacity adjustment parameter by requesting, and calling the cloud platform to perform automatic capacity adjustment on the set of VMs according to the automatic capacity adjustment parameter.
根据本发明的实施例, 在管理上述自动处理策略的设置时, 可以根据该 请求中包含的上述选择的自动处理策略的标识分流该请求,和 /或动态添加新 的自动处理策略的设置; 并且可以在接收到该请求之后根据用户对上述至少 一个自动处理策略的设置和上述一组 VM 的第二参数计算该自动容量调整 参数, 或可以在接收到该请求之后根据用户对上述至少一个自动处理策略的 设置计算该自动容量调整参数。  According to an embodiment of the present invention, when managing the setting of the automatic processing policy, the request may be offloaded according to the identifier of the selected automatic processing policy included in the request, and/or a setting of a new automatic processing policy may be dynamically added; The automatic capacity adjustment parameter may be calculated according to the setting of the at least one automatic processing policy and the second parameter of the set of VMs by the user after receiving the request, or may be automatically processed according to the user according to the user after receiving the request. The setting of the policy calculates the automatic capacity adjustment parameter.
根据本发明的实施例, 上述至少一个自动处理策略包括: 选择 VM的类 型的策略、选择 VM的数量的策略和 /选择 VM的实例的策略中的至少一个, 其中在选择自动处理策略时可以从上述用于载选择虚拟机的类型的策略、上 述用于选择虚拟机的数量的策略和上述用于选择虚拟机的实例的策略中选 择至少一个策略。  According to an embodiment of the present invention, the at least one automatic processing policy includes: at least one of a policy of selecting a type of a VM, a policy of selecting a number of VMs, and/or a policy of selecting an instance of a VM, wherein the automatic processing policy may be selected from The above-described policy for carrying the type of the selected virtual machine, the above-described policy for selecting the number of virtual machines, and the above-described policy for selecting an instance of the virtual machine select at least one of the policies.
可选地作为另一实施例, 图 5的方法还包括: 通过解析预定的自动化模 板, 获取该自动化规则, 上述自动化模板包括可扩展标记语言文件。 Optionally, as another embodiment, the method of FIG. 5 further includes: parsing a predetermined automation module by parsing Board, to get the automation rules, the above automated template includes an extensible markup language file.
根据本发明的实施例,上述自动化规则可以通过脚本或规则引擎进行设 置或者通过在弹出窗口中输入参数的形式进行设置。  According to an embodiment of the present invention, the above-described automation rules can be set by a script or a rule engine or by inputting parameters in a pop-up window.
根据本发明的实施例,上述自动处理策略通过脚本或规则引擎进行设置 或者通过在弹出窗口中输入参数的形式进行设置  According to an embodiment of the present invention, the above automatic processing policy is set by a script or a rule engine or is set by inputting a parameter in a popup window.
可选地, 作为另一实施例, 可以通过调用内部接口来调用该云平台对上 述一组 VM进行自动容量调整,还可以将调用该内部接口转换为调用该云平 台的应用程序接口。  Optionally, as another embodiment, the cloud platform may be invoked by calling the internal interface to perform automatic capacity adjustment on the set of VMs, and the internal interface may be invoked to be converted into an application interface that invokes the cloud platform.
可选地, 作为另一实施例, 在两次自动处理之间的最小时间间隔超过预 设门限的情况下允许对上述一组 VM进行自动处理。  Alternatively, as another embodiment, automatic processing of the set of VMs is allowed if the minimum time interval between two automatic processes exceeds a preset threshold.
可选地, 作为另一实施例, 上述自动化模板中设置有上述一组 VM的可 用资源的上限和下限,还可以根据上述一组 VM的可用资源的上限和下限确 定是否允许对上述一组 VM进行自动容量调整。  Optionally, as another embodiment, the upper and lower limits of the available resources of the foregoing set of VMs are set in the foregoing auto-template, and the upper limit and the lower limit of the available resources of the set of VMs may be further determined whether to allow the set of VMs. Perform automatic capacity adjustment.
根据本发明的实施例, 在 520中, 还可以根据条件、 定时或事件触发对 上述一组 VM进行自动处理。  In accordance with an embodiment of the present invention, in 520, the set of VMs may also be automatically processed based on conditions, timing, or events.
图 6是本发明一个实施例的自动化处理规则的示意性流程图。  6 is a schematic flow chart of an automated processing rule in accordance with an embodiment of the present invention.
605, 解析模板, 并将自动化规则配置到自动化引擎中。  605, parsing the template, and configuring the automation rules into the automation engine.
例如, 605可以由部署引擎来执行, 而 610至 680可以由自动化引擎来 执行。  For example, 605 can be executed by a deployment engine and 610 through 680 can be executed by an automation engine.
610,执行自动化规则,并根据自动化规则确定对 VM集群中的一组 VM 进行自动容量调整的触发类型, 例如, 触发类型可以包括条件触发、 时间触 发和事件触发等。  610. Perform an automation rule and determine a trigger type for automatically capacity adjustment of a group of VMs in the VM cluster according to the automation rule. For example, the trigger type may include condition triggering, time triggering, and event triggering.
615, 在模板中设置了事件触发的情况下, 等待触发事件。  615. Wait for the trigger event if the event trigger is set in the template.
620, 如果上述事件发生, 则执行步骤 645。  620. If the above event occurs, perform step 645.
625, 在模板中设置了时间触发的情况下, 进行计时。  625. When time triggering is set in the template, timing is performed.
630, 如果时间期满, 则执行步骤 645。  630, if the time expires, step 645 is performed.
635 , 在模板中设置了条件触发的情况下, 可以获取实时特征参数。 例 如, 监控 VM上报的数据并获取 VM集群中的一组 VM的参数, 并且计算 VM集群中的一组 VM平均 CPU利用率。  635. When conditional triggering is set in the template, real-time feature parameters can be obtained. For example, the data reported by the VM is monitored and the parameters of a group of VMs in the VM cluster are obtained, and the average CPU utilization of a group of VMs in the VM cluster is calculated.
640 , 例如, 当 VM集群中的一组 VM的平均 CPU利用率大于 90%时, 根据模板中的 "自动扩容(AutoScaleOut )" 中的 "触发" 标签的触发动作字 段 "创建 VM" , 然后执行步骤 645; 否则, 以一定时间间隔循环计算 CPU 利用率, 不再进行下一步。 640. For example, when the average CPU utilization of a group of VMs in a VM cluster is greater than 90%, according to the trigger action word of the "trigger" tag in "AutoScaleOut" in the template. The segment "Create VM", and then perform step 645; otherwise, cycle the CPU utilization at regular intervals, no longer proceed to the next step.
例如, 当 VM集群中的一组 VM的平均 CPU利用率小于 20%时, 根据 自动化模板中的 "自动扩容( AutoScaleln )" 中的 "触发" 标签的触发动作 字段 "删除 VM" , 否则, 以一定时间间隔循环计算 CPU利用率, 不再进行 下一步。  For example, when the average CPU utilization of a group of VMs in a VM cluster is less than 20%, the VM is deleted according to the trigger action field of the "trigger" tab in "AutoScaleln" in the automation template. Otherwise, The CPU utilization is calculated cyclically at a certain interval, and the next step is not performed.
645 , 根据上述模板中的 "冷却时间窗" 字段, 获取冷却时间窗大小, 判断当前是否在上一次自动化动作的冷却时间窗内, 如果是, 则执行 610, 否则, 执行 650。  645. According to the “cooling time window” field in the template, obtain a cooling time window size, determine whether it is currently in the cooling time window of the last automatic action, and if yes, execute 610, otherwise, execute 650.
650, 确定自动容量调整的类型。 例如, 根据上述触发条件触发了扩容 还是减容选择相应的自动处理策略。  650, determine the type of automatic capacity adjustment. For example, according to the above trigger condition, whether the expansion or volume reduction triggers the corresponding automatic processing strategy is selected.
655, 当需要执行扩容时, 根据上述模板中扩容部分的 "动作"标签 "触 发动作" 里的 "自动处理策略二", 根据 VM数量选择策略规则, 例如, 根 据模板中 "自动处理策略二" 中的 "比率基础值" 和 "比率值", 决策扩容 集群上限的 5% ( MaxCount为之前定义集群上限和下限里的集群上限值)。 例如, 集群上限值为 100台 VM, 则此时增加 5台 VM。  655. When the capacity expansion needs to be performed, according to the "automatic processing strategy 2" in the "action" label "trigger action" in the expansion part of the template, the policy rule is selected according to the number of VMs, for example, according to the "automatic processing strategy 2" in the template. In the "Ratio Base Value" and "Ratio Value", the decision expands the cluster's upper limit by 5% (MaxCount is the cluster upper limit in the previously defined cluster upper and lower limits). For example, if the cluster upper limit is 100 VMs, then 5 VMs will be added.
660, 根据上述模板中扩容部分的 "动作" 标签 "触发动作" 里的 "自 动处理策略一 ", 根据 VM类型选择策略规则, 例如, 根据模板中 "自动处 理策略一" 中指定的策略模板 " ServerTemplate" , 决策扩容 VM的类型使用 模板 ServerTemplate (例如, 采用自定义的 VM类型, 即创建 VM的规格参 数等)。 例如, 可以通过对上述策略模板 "ServerTemplate" 的设置实现对自 动处理策略的设置。  660. According to the “automatic processing policy 1” in the “action” label “trigger action” in the expansion part of the template, select a policy rule according to the VM type, for example, according to the policy template specified in the “automatic processing policy one” in the template. ServerTemplate" , the type of the decision expansion VM uses the template ServerTemplate (for example, using a custom VM type, that is, creating VM specifications, etc.). For example, the setting of the automatic processing policy can be implemented by setting the above policy template "ServerTemplate".
665, 当需要执行减容时, 根据上述模板中减容部分的 "动作"标签 "触 发动作" 里的 "自动处理策略二", 根据 VM数量选择策略规则, 例如, 根 据模板中的 "自动处理策略二" 中的 javascript脚本 "MaxCount*0.05" , 决 策扩容集群上限的 5%。 如果集群上限值为 100台 VM, 则减少 5台 VM。 例如, 本实施例可以通过对 javascript脚本的设置实现对自动处理策略的设 置。  When the volume reduction needs to be performed, according to the "Automatic Processing Strategy 2" in the "Action" tab of the volume reduction section of the above template, select the policy rule according to the number of VMs, for example, according to the "automatic processing" in the template. The javascript script "MaxCount*0.05" in Strategy 2", 5% of the upper limit of the decision expansion cluster. If the cluster upper limit is 100 VMs, then 5 VMs are reduced. For example, in this embodiment, the setting of the automatic processing policy can be realized by setting the javascript script.
670, 根据上述模板中减容部分的 "动作" 标签 "触发动作" 里的 "自 动处理策略一 ", 根据 VM实例选择策略规则决策减容时被删除的 VM, 例 如, "自动处理策略一" 中指定的策略是删除 CPU的利用率的最小的 VM, 即按 VM的 CPU利用率从小到大删除。 670. According to the “automatic processing strategy 1” in the “action” label “trigger action” in the volume reduction part of the template, the VM is deleted according to the VM instance selection policy rule, for example, “automatic processing strategy one” The strategy specified in is to remove the smallest VM of CPU utilization. That is, the CPU utilization of the VM is deleted from small to large.
675 , 判断自动容量调整后集群的容量是否满足集群可用资源的上限和 下限, 如果满足则执行 680, 否则执行 610。 例如, 如果扩容后集群的容量 超过上限,则不允许扩容,如果减容后集群的容量低于下限,则不允许减容。  675. Determine whether the capacity of the cluster after the automatic capacity adjustment meets the upper limit and the lower limit of the available resources of the cluster, and if yes, execute 680, otherwise execute 610. For example, if the capacity of the cluster exceeds the upper limit after capacity expansion, capacity expansion is not allowed. If the capacity of the cluster is lower than the lower limit after capacity reduction, volume reduction is not allowed.
680, 自动化引擎调用外部云平台对集群进行自动容量调整。  680, the automation engine calls the external cloud platform to automatically adjust the cluster.
例如, 在扩容的情况下, 根据待增加的 VM 类型 (例如, 用户在 ServerTemplate模板上设置的 VM类型)和数量(例如, 5台)执行 VM创 建工作。 通过调用外部驱动, 并通过外部驱动调用创建 VM, 例如, 可以通 过 AME的 AddVM接口调用创建 VM , AME通过外部平台 (例如, Galax ) 从底层创建 VM, 并加入到 VM集群中。  For example, in the case of capacity expansion, VM creation is performed according to the type of VM to be added (for example, the type of VM set by the user on the ServerTemplate template) and the number (for example, 5). The VM is created by calling an external driver and by an external driver call. For example, the VM can be created via AME's AddVM interface call. The AME creates the VM from the underlying layer via an external platform (for example, Galax) and joins it into the VM cluster.
在减容的情况下, 根据待删除 VM 实例列表和数量(例如, 5 台)从 VM集群中删除指定 VM。通过调用外部驱动,并通过外部驱动调用删除 VM , 例如,可以通过 AME的 Remove VM接口调用删除 VM , AME通过外部 Galax 平台从底层删除 VM。 在实际执行中, 可以先通知业务, 等待一段时间后再 删除 VM。  In the case of volume reduction, the specified VM is removed from the VM cluster based on the list and number of VM instances to be deleted (for example, 5). The VM is deleted by calling an external driver and by an external driver call. For example, the VM can be deleted by AME's Remove VM interface, and AME deletes the VM from the underlying layer through the external Galax platform. In actual implementation, you can notify the service first and wait for a period of time before deleting the VM.
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一 般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执 行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超 出本发明的范围。  Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到, 为描述的方便和筒洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。  It will be apparent to those skilled in the art that, for the convenience of the description and the cleaning process, the specific operation of the system, the device and the unit described above may be referred to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。 In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling through some interfaces, devices or units. Or a communication connection, which can be electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。  The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一 个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件功 能单元的形式实现。  In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software function unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销 售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方 案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在 一个存储介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算 机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部 分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器(ROM, Read-Only Memory )、 随机存取存储器 ( RAM, Random Access Memory )、 磁碟或者光盘等各种可以存储程序代码的介质。  The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims

权利要求 Rights request
1. 一种处理云平台中的虚拟机的系统, 其特征在于, 包括:  A system for processing a virtual machine in a cloud platform, comprising:
获取模块, 用于获取自动化规则, 所述自动化规则包括自动处理策略; 和  An acquisition module, configured to obtain an automation rule, where the automation rule includes an automatic processing policy; and
处理模块,用于在执行所述自动化规则时根据所述自动处理策略生成自 动处理参数, 并且根据所述自动处理参数调用所述云平台对一组虚拟机进行 自动处理。  And a processing module, configured to generate an automatic processing parameter according to the automatic processing policy when the automatic rule is executed, and invoke the cloud platform to automatically process a group of virtual machines according to the automatic processing parameter.
2. 根据权利要求 1所述的系统, 其特征在于, 所述处理模块包括: 规则执行单元, 用于在执行所述自动化规则时选择自动处理策略, 根据 选择的自动处理策略请求所述自动处理参数, 并且根据所述自动处理参数调 用所述云平台对所述一组虚拟机进行自动处理;  The system according to claim 1, wherein the processing module comprises: a rule execution unit, configured to select an automatic processing policy when executing the automation rule, and request the automatic processing according to the selected automatic processing policy And invoking the cloud platform to automatically process the set of virtual machines according to the automatic processing parameter;
策略管理单元, 用于管理所述自动处理策略的设置, 根据对所述选择的 自动处理策略的设置生成所述自动处理参数, 并向所述规则执行单元提供所 述自动处理参数。  And a policy management unit, configured to manage settings of the automatic processing policy, generate the automatic processing parameter according to the setting of the selected automatic processing policy, and provide the automatic processing parameter to the rule execution unit.
3. 根据权利要求 2所述的系统, 其特征在于, 所述处理模块还包括: 规则管理单元, 用于从所述获取模块接收所述自动化规则, 并且用于增 加或删除所述自动化规则。  The system according to claim 2, wherein the processing module further comprises: a rule management unit, configured to receive the automation rule from the obtaining module, and to add or delete the automation rule.
4. 根据权利要求 2或 3所述的系统, 其特征在于,  4. System according to claim 2 or 3, characterized in that
所述处理模块还包括参数获取单元,所述参数获取单元用于获取所述一 组虚拟机的实时特征参数, 并且向所述规则执行单元提供所述实时特征参 数;  The processing module further includes a parameter obtaining unit, configured to acquire real-time feature parameters of the set of virtual machines, and provide the real-time feature parameters to the rule execution unit;
所述规则执行单元还用于在所述实时特征参数满足触发条件的预设门 限的情况下, 根据所述触发条件选择所述自动处理策略, 以触发对所述一组 虚拟机进行自动处理。  The rule execution unit is further configured to: when the real-time feature parameter meets a preset threshold of a trigger condition, select the automatic processing policy according to the trigger condition to trigger automatic processing on the set of virtual machines.
5. 根据权利要求 4所述的系统, 其特征在于, 所述系统还包括: 监控模块, 用于实时监控所述一组虚拟机的第一参数, 并且向所述参数 获取单元提供所述第一参数, 其中所述参数获取单元还用于根据所述第一参 数计算所述实时特征参数; 和 /或用于实时监控所述一组虚拟机的第二参数, 并且向所述策略管理单元提供所述第二参数, 其中所述策略管理单元还用于 根据所述第二参数和用户对所述选择的自动处理策略的设置计算所述自动 处理参数。 The system according to claim 4, wherein the system further comprises: a monitoring module, configured to monitor a first parameter of the set of virtual machines in real time, and provide the parameter to the parameter obtaining unit a parameter, wherein the parameter obtaining unit is further configured to calculate the real-time feature parameter according to the first parameter; and/or to monitor a second parameter of the set of virtual machines in real time, and to the policy management unit Providing the second parameter, wherein the policy management unit is further configured to calculate the automatic processing parameter according to the second parameter and a setting of the selected automatic processing policy by a user.
6. 根据权利要求 4或 5所述的系统, 其特征在于, 所述规则执行单元 包括: The system according to claim 4 or 5, wherein the rule execution unit comprises:
触发子单元, 用于根据所述触发条件选择所述自动处理策略, 并且用于 比较所述实时特征参数与所述触发条件的预设门限,在所述实时特征参数满 足所述触发条件的预设门限时,触发调用子单元对所述一组虚拟机进行自动 容量调整; 和  a triggering subunit, configured to select the automatic processing policy according to the triggering condition, and configured to compare the real-time feature parameter with a preset threshold of the triggering condition, where the real-time feature parameter satisfies the triggering condition When the threshold is set, the triggering call subunit performs automatic capacity adjustment on the set of virtual machines; and
所述调用子单元,用于根据选择的所述自动处理策略请求所述策略管理 单元返回所述自动容量调整参数, 并且根据所述自动容量调整参数调用所述 云平台对所述一组虚拟机进行自动容量调整。  The calling subunit, configured to request the policy management unit to return the automatic capacity adjustment parameter according to the selected automatic processing policy, and invoke the cloud platform to the set of virtual machines according to the automatic capacity adjustment parameter Perform automatic capacity adjustment.
7. 根据权利要求 6所述的系统, 其特征在于, 所述策略管理单元包括: 管理子单元,用于根据来自所述调用子单元的所述请求中包含的所述选 择的自动处理策略的标识分流所述请求, 和 /或用于动态添加新的自动处理 策略的设置; 和  The system according to claim 6, wherein the policy management unit comprises: a management subunit, configured to: according to the selected automatic processing policy included in the request from the calling subunit Identifying the request to offload the request, and/or for dynamically adding a new automatic processing policy; and
策略子单元, 用于在从所述管理子单元接收到所述请求之后, 根据用户 对所述选择的自动处理策略的设置和所述一组虚拟机的所述第二参数计算 所述自动容量调整参数, 并且将所述自动容量调整参数返回给调用子单元。  a policy subunit, configured to calculate the automatic capacity according to a setting of the selected automatic processing policy by the user and the second parameter of the set of virtual machines after receiving the request from the management subunit The parameters are adjusted and the automatic capacity adjustment parameters are returned to the calling subunit.
8. 根据权利要求 1至 7中的任一项所述的系统, 其特征在于, 所述处 理模块还根据条件、 定时或事件触发对所述一组虚拟机进行自动处理。  The system according to any one of claims 1 to 7, wherein the processing module further automatically processes the set of virtual machines according to conditions, timing or events.
9. 根据权利要求 2至 8中的任一项所述的系统, 其特征在于, 所述自 动处理策略包括: 用于选择虚拟机的类型的策略、 用于选择虚拟机的数量的 策略和用于选择虚拟机的实例的策略中的至少一个, 其中所述规则执行单元 从所述用于选择虚拟机的类型的策略、所述用于选择虚拟机的数量的策略和 所述用于选择虚拟机的实例的策略中选择至少一个策略。  The system according to any one of claims 2 to 8, wherein the automatic processing policy comprises: a policy for selecting a type of a virtual machine, a policy for selecting a number of virtual machines, and At least one of a policy of selecting an instance of a virtual machine, wherein the rule execution unit selects a policy from the type for selecting a virtual machine, the policy for selecting a number of virtual machines, and the Select at least one of the policies of the instance of the machine.
10. 根据权利要求 1至 9中的任一项所述的系统, 其特征在于, 所述获 取模块通过解析预定的自动化模板, 获取自动化规则, 其中所述自动化模板 包括可扩展标记语言文件。  The system according to any one of claims 1 to 9, wherein the acquisition module acquires an automation rule by parsing a predetermined automation template, wherein the automation template comprises an extensible markup language file.
11. 根据权利要求 1至 10中的任一项所述的系统, 其特征在于, 所述 自动化规则通过脚本或规则引擎进行设置, 或者通过在弹出窗口中输入参数 的形式进行设置。  The system according to any one of claims 1 to 10, wherein the automation rule is set by a script or a rule engine, or is set by inputting a parameter in a popup window.
12. 根据权利要求 1至 11 中的任一项所述的系统, 其特征在于, 所述 处理模块通过调用内部接口来调用所述云平台对所述一组虚拟机进行自动 处理, 所述系统还包括: The system according to any one of claims 1 to 11, wherein the processing module invokes the internal interface to invoke the cloud platform to automatically perform the set of virtual machines. Processing, the system further includes:
驱动模块,用于将调用所述内部接口转换为调用所述云平台的应用程序 接口。  And a driving module, configured to convert the calling the internal interface into an application interface that invokes the cloud platform.
13. 根据权利要求 1至 12中的任一项所述的系统, 其特征在于, 所述 处理模块还用于在两次自动处理之间的时间间隔超过预设门限的情况下允 许对所述一组虚拟机进行自动处理。  The system according to any one of claims 1 to 12, wherein the processing module is further configured to allow the time interval when the time interval between two automatic processes exceeds a preset threshold A set of virtual machines is automatically processed.
14. 根据权利要求 1至 13中的任一项所述的系统, 其特征在于, 所述 自动化模板中设置有所述一组虚拟机的容量的上限和下限, 所述处理模块还 用于根据所述一组虚拟机的可用资源的上限和下限确定是否允许对所述一 组虚拟机进行自动处理。  The system according to any one of claims 1 to 13, wherein an upper limit and a lower limit of a capacity of the set of virtual machines are set in the automation template, and the processing module is further configured to The upper and lower limits of the available resources of the set of virtual machines determine whether automatic processing of the set of virtual machines is allowed.
15. 一种处理云平台中的虚拟机的方法, 其特征在于, 包括: 获取自动化规则, 所述自动化规则包括自动处理策略;  A method for processing a virtual machine in a cloud platform, comprising: acquiring an automation rule, the automation rule including an automatic processing policy;
在执行所述自动化规则时根据所述自动处理策略生成自动处理参数, 并 且根据所述自动处理参数调用所述云平台对一组虚拟机进行自动处理。  The automatic processing parameter is generated according to the automatic processing policy when the automation rule is executed, and the cloud platform is invoked to automatically process a group of virtual machines according to the automatic processing parameter.
16. 根据权利要求 15所述的方法, 其特征在于, 所述在执行所述自动 化规则时根据所述自动处理策略生成自动处理参数, 并且根据所述自动处理 参数调用所述云平台对一组虚拟机进行自动处理, 包括:  The method according to claim 15, wherein the generating an automatic processing parameter according to the automatic processing policy when executing the automation rule, and calling the cloud platform pair according to the automatic processing parameter The virtual machine performs automatic processing, including:
在执行所述自动化规则时选择自动处理策略;  Selecting an automatic processing strategy when executing the automated rules;
根据对所述选择的自动处理策略的设置生成所述自动处理参数; 根据所述自动处理参数调用所述云平台对所述一组虚拟机进行自动处 理。  And generating the automatic processing parameter according to the setting of the selected automatic processing policy; invoking the cloud platform to perform automatic processing on the set of virtual machines according to the automatic processing parameter.
17. 根据权利要求 16所述的方法, 其特征在于, 还包括:  17. The method according to claim 16, further comprising:
获取所述一组虚拟机的实时特征参数, 并且在所述实时特征参数满足触 发条件的预设门限的情况下触发对所述一组虚拟机进行自动处理, 其中所述 选择所述自动处理策略包括: 根据所述触发条件选择所述自动处理策略。  Acquiring real-time feature parameters of the set of virtual machines, and triggering automatic processing on the set of virtual machines if the real-time feature parameters meet a preset threshold of a trigger condition, wherein the selecting the automatic processing strategy The method includes: selecting the automatic processing policy according to the trigger condition.
18. 根据权利要求 17所述的方法, 其特征在于, 所述方法还包括: 实时监控所述一组虚拟机的第一参数, 并且还根据所述第一参数计算所 述实时特征参数;和 /或实时监控所述一组虚拟机的第二参数,并且根据所述 第二参数和用户对所述选择的自动处理策略的设置计算所述自动处理参数。  The method according to claim 17, wherein the method further comprises: monitoring a first parameter of the set of virtual machines in real time, and further calculating the real-time feature parameter according to the first parameter; and / or monitoring the second parameter of the set of virtual machines in real time, and calculating the automatic processing parameters according to the second parameter and a setting of the selected automatic processing policy by the user.
19. 根据权利要求 17或 18所述的方法, 其特征在于, 所述自动处理为 自动容量调整,所述在所述实时特征参数满足触发条件的预设门限的情况下 触发对所述一组虚拟机进行自动处理, 包括: The method according to claim 17 or 18, wherein the automatic processing is automatic capacity adjustment, and the real-time characteristic parameter satisfies a preset threshold of a trigger condition. Triggering automatic processing on the set of virtual machines, including:
比较所述实时特征参数与触发条件的预设门限, 并且在所述实时特征参 数满足所述触发条件的预设门限时,触发对所述一组虚拟机进行自动容量调 所述根据所述自动处理参数调用所述云平台对所述一组虚拟机进行自 动处理, 包括:  Comparing the preset threshold of the real-time feature parameter and the trigger condition, and triggering automatic capacity adjustment on the set of virtual machines when the real-time feature parameter meets a preset threshold of the trigger condition, according to the automatic The processing parameter invokes the cloud platform to automatically process the set of virtual machines, including:
根据所述选择的所述自动处理策略,通过请求的方式获取自动容量调整 参数, 并且根据所述自动容量调整参数调用所述云平台对所述一组虚拟机进 行自动容量调整。  And obtaining, according to the selected automatic processing policy, an automatic capacity adjustment parameter by using a request, and invoking the cloud platform to perform automatic capacity adjustment on the set of virtual machines according to the automatic capacity adjustment parameter.
20. 根据权利要求 19所述的方法, 其特征在于, 所述策略管理单元包 括:  The method according to claim 19, wherein the policy management unit comprises:
根据所述请求中包含的所述选择的自动处理策略的标识分流所述请求, 和 /或用于动态添加新的自动处理策略的设置。  The request is offloaded according to the identifier of the selected automatic processing policy included in the request, and/or the setting for dynamically adding a new automatic processing policy.
21. 根据权利要求 15至 20中的任一项所述的方法, 其特征在于, 还包 括:  The method according to any one of claims 15 to 20, further comprising:
根据条件、 定时或事件触发对所述一组虚拟机进行自动处理。  Automatic processing of the set of virtual machines is triggered based on conditions, timing, or events.
22. 根据权利要求 15至 21中的任一项所述的方法, 其特征在于, 所述 自动处理策略包括: 用于选择虚拟机的类型的策略、 用于选择虚拟机的数量 的策略和用于选择虚拟机的实例的策略中的至少一个, 其中所述选择自动处 理策略, 包括:  The method according to any one of claims 15 to 21, wherein the automatic processing policy comprises: a policy for selecting a type of a virtual machine, a policy for selecting a number of virtual machines, and At least one of the policies for selecting an instance of the virtual machine, wherein the selecting an automatic processing policy includes:
从所述用于选择虚拟机的类型的策略、所述用于选择虚拟机的数量的策 略和所述用于选择虚拟机的实例的策略中选择至少一个策略。  At least one of the policies is selected from the policy for selecting a type of virtual machine, the policy for selecting a number of virtual machines, and the policy for selecting an instance of a virtual machine.
23. 根据权利要求 15至 22中的任一项所述的方法, 其特征在于, 所述 获取自动化规则, 包括:  The method according to any one of claims 15 to 22, wherein the obtaining an automation rule comprises:
通过解析预定的自动化模板, 获取所述自动化规则, 其中所述自动化模 板包括可扩展标记语言文件。  The automated rules are obtained by parsing a predetermined automation template, wherein the automated template includes an extensible markup language file.
24. 根据权利要求 15至 23中的任一项所述的方法, 其特征在于, 所述 自动化规则通过脚本或规则引擎进行设置或者通过在弹出窗口中输入参数 的形式进行设置。  The method according to any one of claims 15 to 23, characterized in that the automation rule is set by a script or a rule engine or by inputting a parameter in a popup window.
25. 根据权利要求 15至 24中的任一项所述的方法, 其特征在于, 所述 调用所述云平台对所述一组虚拟机进行自动处理, 包括: 通过调用内部接口来调用所述云平台对所述一组虚拟机进行自动容量 调整, 所述方法还包括: The method according to any one of claims 15 to 24, wherein the invoking the cloud platform to automatically process the set of virtual machines comprises: Invoking the cloud platform to call the cloud platform to perform automatic capacity adjustment on the set of virtual machines, the method further includes:
将调用所述内部接口转换为调用所述云平台的应用程序接口。  The internal interface is invoked to be converted into an application interface that invokes the cloud platform.
26. 根据权利要求 15至 25中的任一项所述的方法, 其特征在于, 还包 括: 在两次自动处理之间的时间间隔超过预设门限的情况下允许对所述一组 虚拟机进行自动处理。  The method according to any one of claims 15 to 25, further comprising: allowing the set of virtual machines to be performed if a time interval between two automatic processes exceeds a preset threshold Perform automatic processing.
27. 根据权利要求 15至 26中的任一项所述的方法, 其特征在于, 所述 自动化模板中设置有所述一组虚拟机的可用资源的上限和下限,所述方法还 包括:  The method according to any one of claims 15 to 26, wherein the upper and lower limits of available resources of the set of virtual machines are set in the automation template, the method further comprising:
根据所述一组虚拟机的可用资源的上限和下限确定是否允许对所述一 组虚拟机进行自动处理。  Whether to allow automatic processing of the set of virtual machines is determined based on upper and lower limits of available resources of the set of virtual machines.
PCT/CN2012/071063 2012-02-13 2012-02-13 System and method for processing virtual machine in cloud platform WO2013120243A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201280000116.4A CN103354990B (en) 2012-02-13 2012-02-13 The system and method for the virtual machine in process cloud platform
PCT/CN2012/071063 WO2013120243A1 (en) 2012-02-13 2012-02-13 System and method for processing virtual machine in cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/071063 WO2013120243A1 (en) 2012-02-13 2012-02-13 System and method for processing virtual machine in cloud platform

Publications (1)

Publication Number Publication Date
WO2013120243A1 true WO2013120243A1 (en) 2013-08-22

Family

ID=48983519

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/071063 WO2013120243A1 (en) 2012-02-13 2012-02-13 System and method for processing virtual machine in cloud platform

Country Status (2)

Country Link
CN (1) CN103354990B (en)
WO (1) WO2013120243A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107046584A (en) * 2017-03-15 2017-08-15 中国互联网络信息中心 The DNS service dispositions method and system of a kind of overall coordination scheduling
CN107102884A (en) * 2017-03-15 2017-08-29 深圳市神云科技有限公司 The method and device of self-defined virtual machine operations
CN107665245A (en) * 2017-09-12 2018-02-06 平安科技(深圳)有限公司 A kind of triggering method based on event, terminal, equipment and readable storage medium storing program for executing
CN110781002A (en) * 2019-10-24 2020-02-11 浪潮云信息技术有限公司 Elastic expansion method, management system, terminal and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105988858A (en) * 2015-05-15 2016-10-05 中国银联股份有限公司 Virtual machine resource scheduling method, device and system
CN108156212B (en) * 2017-06-29 2020-12-22 广东网金控股股份有限公司 Elastic expansion method and system based on user perception
CN110442424A (en) * 2019-07-12 2019-11-12 苏州浪潮智能科技有限公司 A kind of method and apparatus for realizing virtual machine management platform dynamic configuration rule

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840346A (en) * 2009-12-30 2010-09-22 北京世纪互联宽带数据中心有限公司 Method and system for deploying cloud host computer
US20100313200A1 (en) * 2009-06-04 2010-12-09 Microsoft Corporation Efficient virtual machine management
CN101986274A (en) * 2010-11-11 2011-03-16 东软集团股份有限公司 Resource allocation system and resource allocation method in private cloud environment
CN102096461A (en) * 2011-01-13 2011-06-15 浙江大学 Energy-saving method of cloud data center based on virtual machine migration and load perception integration
US20110258621A1 (en) * 2010-04-14 2011-10-20 International Business Machines Corporation Autonomic Scaling Of Virtual Machines In A Cloud Computing Environment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214117B (en) * 2010-04-07 2014-06-18 中兴通讯股份有限公司南京分公司 Virtual machine management method, system and server
CN101951411A (en) * 2010-10-13 2011-01-19 戴元顺 Cloud scheduling system and method and multistage cloud scheduling system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100313200A1 (en) * 2009-06-04 2010-12-09 Microsoft Corporation Efficient virtual machine management
CN101840346A (en) * 2009-12-30 2010-09-22 北京世纪互联宽带数据中心有限公司 Method and system for deploying cloud host computer
US20110258621A1 (en) * 2010-04-14 2011-10-20 International Business Machines Corporation Autonomic Scaling Of Virtual Machines In A Cloud Computing Environment
CN101986274A (en) * 2010-11-11 2011-03-16 东软集团股份有限公司 Resource allocation system and resource allocation method in private cloud environment
CN102096461A (en) * 2011-01-13 2011-06-15 浙江大学 Energy-saving method of cloud data center based on virtual machine migration and load perception integration

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107046584A (en) * 2017-03-15 2017-08-15 中国互联网络信息中心 The DNS service dispositions method and system of a kind of overall coordination scheduling
CN107102884A (en) * 2017-03-15 2017-08-29 深圳市神云科技有限公司 The method and device of self-defined virtual machine operations
CN107046584B (en) * 2017-03-15 2020-08-14 中国互联网络信息中心 DNS service deployment method and system for overall cooperative scheduling
CN107102884B (en) * 2017-03-15 2021-06-22 无锡联云世纪科技股份有限公司 Method and device for customizing virtual machine operation
CN107665245A (en) * 2017-09-12 2018-02-06 平安科技(深圳)有限公司 A kind of triggering method based on event, terminal, equipment and readable storage medium storing program for executing
WO2019051865A1 (en) * 2017-09-12 2019-03-21 平安科技(深圳)有限公司 Event-based trigger method, terminal and device, and readable storage medium
CN110781002A (en) * 2019-10-24 2020-02-11 浪潮云信息技术有限公司 Elastic expansion method, management system, terminal and storage medium

Also Published As

Publication number Publication date
CN103354990A (en) 2013-10-16
CN103354990B (en) 2016-09-21

Similar Documents

Publication Publication Date Title
WO2013120243A1 (en) System and method for processing virtual machine in cloud platform
US10241835B2 (en) Scheduling storage and computing resources based on task types and service levels
CN107566493B (en) Agent node creating method, agent service method and system for complex user requirements
US9602380B2 (en) Context-aware dynamic policy selection for load balancing behavior
CN111614570B (en) Flow control system and method for service grid
US8584127B2 (en) Storage medium storing job management program, information processing apparatus, and job management method
US8296411B2 (en) Programmatically determining an execution mode for a request dispatch utilizing historic metrics
US9223601B2 (en) Control device, control method, and non-transitory computer-readable storage medium for a virtual system deployment
CN110933097B (en) Current limiting and automatic capacity expanding and shrinking method for multi-service gateway
CN112650575B (en) Resource scheduling method, device and cloud service system
US9652027B2 (en) Thread scheduling based on performance state and idle state of processing units
CN114489867B (en) Algorithm module scheduling method, algorithm module scheduling device and readable storage medium
US20150149594A1 (en) Automatic node deployment method and server system
CN107391665A (en) The creation method and device of a kind of database instance
CN111045908A (en) System performance monitoring method and device and computer equipment
US20170019313A1 (en) A generic model to implement a cloud computing service
CN112783614A (en) Object processing method, device, equipment, storage medium and program product
CN103036975A (en) Virtual machine control method and control device
CN112650541A (en) Application program starting acceleration method, system, equipment and storage medium
CN113687919B (en) Control method, device, equipment and storage medium for micro-service management
KR20110070725A (en) Automatic mash-up apparatus and method
US10120723B2 (en) Information processing system and control method for processing jobs in plurality of queues
CN113687908A (en) PMEM virtual machine creation method, device, equipment and readable storage medium
CN116048825A (en) Container cluster construction method and system
WO2016041202A1 (en) Deployment method and apparatus based on cloud environment system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12868421

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12868421

Country of ref document: EP

Kind code of ref document: A1