- Introduction to autoscaling
- How does Abiquo clone the base VM?
- How do I prepare for autoscaling?
- What restrictions apply to cloned VMs?
- How do I create a scaling group?
- How do I set up autoscaling?
- How do I set a trigger for scaling?
- How can I modify a scaling group?
- What happens during scaling?
- Delete a scaling group
Introduction to autoscaling
Abiquo 4.0 introduces horizontal autoscaling of virtual machines, using the scaling group entity, which is defined for a base virtual machine. When a scale out event or a scale in event is triggered, Abiquo will clone the base virtual machine and deploy, or delete or undeploy virtual machines, according to your scaling rules and policy. To trigger a scaling event, you can create an action plan for the virtual machine with scaling actions, and create scaling triggers that are either monitoring alerts for virtual appliances or schedules for planned scaling.
How does Abiquo clone the base VM?
Abiquo copies the virtual machine’s template disks from the Apps library to create a new virtual machine, using the disk controllers from the base virtual machine. Abiquo then applies the base virtual machine configuration. First Abiquo will add the same amount of CPU and RAM as in the base machine, and create empty disks and external storage volumes to match the disk configuration, as well as network connections of the same category. Then Abiquo will assign the same firewall policies and connect to the same load balancers. And Abiquo will copy all other configuration, including Chef recipes, backups, cloud-init, variables, and so on.
If the base virtual machine is not deployed, Abiquo will not deploy it. In order to add another virtual machine, Abiquo will clone the base machine and deploy the clone. If the base machine is deployed, Abiquo will count it as one of the active machines in the scaling group. As part of a scale in operation, Abiquo will delete clone machines but it will only undeploy the base machine. Note that if the base machine were deleted directly on the hypervisor, this would destroy the scaling group, whereas if the base machine is undeployed, the scaling group is not vulnerable to interference at the hypervisor level.
How do I prepare for autoscaling?
Ensure you have enough resources in your virtual datacenter to deploy up to the maximum number of cloned virtual machines. In particular, obtain enough available IP addresses of the same category to assign to the clones, for example, by reserving public IP addresses, or by obtaining IP addresses in external networks, or creating private networks. Then simply configure your base virtual machine and then configure autoscaling.
What restrictions apply to cloned VMs?
You cannot create alarms for cloned virtual machines that are part of a scaling group.
How do I create a scaling group?
A user with the privilege to Manage scaling groups can easily create a scaling group from the options menu of the base virtual machine icon.
Then complete the following dialog to create a scaling group.
To define the size range of the scaling group, users can set the minimum and maximum size, in terms of running virtual machines (deployed and powered on). The minimum size must be greater than or equal to zero, where zero is an undeployed base machine with no clones. Administrators may need to consider allocation limits and available resources.
The cooldown is used by Abiquo to determine whether it is too soon to scale again. When Abiquo receives a scaling request, it checks if the cooldown time has passed since the last event. If it hasn’t, Abiquo will discard the scaling request.
Users can choose to maintain virtual machine anti-affinity layers when autoscaling.
To ensure that the Abiquo workflow feature does not impede autoscaling by requiring a workflow response before deploying clone machines, administrators with the privilege to Manage workflow for scaling groups can disable workflow or enable it as required.
To define how Abiquo will scale the virtual machine group out or in during a scaling event, the user sets scaling rules. Remember that scaling rules do not schedule scaling events. Scaling rules only specify how many clones to create or remove in a scaling event. When scaling in, Abiquo deletes clone machines and/or undeploys the base machine. Scale in rules can be different from scale out rules. If users add a time frame for scaling, Abiquo will only use the rule during this interval. A default rule has no time frame and users can create one default rule for each scaling direction.
When you save the scaling group, Abiquo will mark the virtual machine icon with the scaling group symbol and display the scaling group name. If necessary, Abiquo will create clones of the base machine and deploy them in order to reach the minimum size. The number in the bottom right-hand corner of the icon is the number of running virtual machines in the scaling group, including the base machine.
How do I set up autoscaling?
To set up an autoscaling operation, you will need to create an action plan for the virtual machine with the scaling group and add an autoscaling action. Action plans can now include the following horizontal autoscaling actions:
- Scaling group: Start maintenance
- Scaling group: End maintenance
- Scaling group: Scale out
- Scaling group: Scale in
How do I set a trigger for scaling?
For Abiquo v4.0 action plans, the Triggers tab replaces the previous Task schedules tab, and you can now configure action plans to be triggered by alerts as well as by schedules.
How can I modify a scaling group?
Click on the scaling group symbol in the top right-hand corner of the virtual machine icon.
The scaling group will open as shown in the following image.
How can I make changes to the scaling group?
To edit the scaling group and rules, put it into maintenance mode by clicking the “cog” button on the scaling group icon, or in the top right hand corner of an open scaling group.
While your scaling group is in maintenance mode, Abiquo disables autoscaling operations and enables you to edit the scaling group and make changes to your virtual machines, for example, to manually undeploy machines. Note that in maintenance mode you can undeploy the master virtual machine, but you cannot delete it without deleting the scaling group. When you exit maintenance mode, Abiquo will apply your changes and then adjust the number of virtual machines in the group to within the minimum and maximum size range.
What happens during scaling?
When an autoscaling event is triggered, Abiquo will search for a scaling rule that is valid for the specific time range, or for a default rule. Abiquo will create or delete/undeploy the number of virtual machines for the scaling operation, then wait for the cooldown period before accepting another scaling request. Scaling operations are managed by action plans and subject to all standard Abiquo constraints, such as privileges and allocation limits.
When scaling in, Abiquo deletes and undeploys virtual machines without waiting for user confirmation to force the undeploy of virtual machines with disks that are not stored in the Apps library (ISO configuration drive or additional hard disk). Abiquo currently selects the virtual machines to delete or undeploy using first in, first out (FIFO), but in future releases the administrator will be able to select the scale in policy, from last in, first out (LIFO) or FIFO.
When scaling out, Abiquo will always create new clones instead of deploying virtual machines that are undeployed, for example, machines that were manually undeployed during maintenance.
Delete a scaling group
When you delete a scaling group, Abiquo will not destroy the virtual machines. It will place all the virtual machines in the virtual appliance as regular virtual machines and the scaling group constraints will no longer exist.
To delete a scaling group, first put it into maintenance mode, then click the delete button.
See the following pages: