Introduction
This document is one that I have created by using multiple sources as reference.
Availability Zones
- Typically used for separating failure domains
- Availability Zones are the end-user visible logical abstraction for partitioning a cloud without knowing the physical infrastructure.
- An availability zone is a way in which the user can specify a particular “location” in which a host should boot.
- Availability zones are fairly straightforward; pick a zone, start a VM.
- Availability zones serve as a bucket
- Host Aggregate has no conflict with Availability Zone.
- Choose availability zone when booting a VM.
Host Aggregates
- Typically used for grouping servers with similar capabilities
- Host aggregates can be regarded as a mechanism to further partition an availability zone; while availability zones are visible to users, host aggregates are only visible to administrators
- Host aggregates also allow higher availability of a single guest instance within an availability zone, it enables advanced VM placement strategies, and more importantly it enables hosts’ zero-downtime upgrades.
- Host aggregates are in the administrator’s domain
- Host aggregates are intended as a way to group servers that have a particular quality to them.
- Host aggregates serve as an intelligent way for schedulers to know where to place VM’s based on some sort of characteristic
- Use Keys set at flavor level.
- Host Aggregate has no conflict with Availability Zone.
Configure Nova to Use Host Aggregates
AggregateInstanceExtraSpecsFilter set in scheduler_default_filters in /etc/nova/nova.conf. Example below.
[simterm]
scheduler_default_filters=AggregateInstanceExtraSpecsFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter
[/simterm]
Host Aggregate Workflow
In general, the workflow for using host aggregates looks like this:
- Create a new aggregate.
- Set a particular property for that aggregate, such as ssd=true , or in our case, joeistheboss=true .
- Add qualifying hosts to this aggregate.
- Create a flavor that requires this particular property.
- Instantiate hosts using this flavor.
Planning
As an admin planning for your customers, however, you have a decision to make. In general, you’ll need to consider the following:
- Is there a clear physical separation between hosts, either physically or redundantly? If so, you will probably want to use availability zones.
- Is the separation based on hardware capabilities? If so, you will probably want to use hardware aggregates.
- Are hosts within a particular “category” spread across multiple locations? If so, you will probably want to use hardware aggregates so that you can group together hosts from multiple availability zones. (In this case, you can create an aggregate with the appropriate metadata in each zone.)
- Do you want users to consciously choose a “category” for their VMs? If so, you will probably want to use availability zones, as users can specify them directly.
Creating and Using Host Aggregates
Create a host aggregate in an availability zone as shown below.
[simterm] nova aggregate-create
[/simterm]
Example:
[simterm]
nova aggregate-create ssd-disk nova
[/simterm]
Add a host to your aggregate.
[simterm]nova aggregate-add-host
[/simterm]
Add metadata to be associated with the aggregate
[simterm]nova aggregate-set-metadata <key=value>
[/simterm]
Create flavor using key=value pair
[simterm] nova flavor-create ssd.large 6 8192 80 4
nova flavor-key set_key –name=ssd.large –key=ssd –value=true
[/simterm]