Availability Zones (AZs) are a special case of host aggregates. Here, host aggregates are used by Nova to make scheduling decisions; they are generally only visible to operators and administrators of the OpenStack Cloud. AZs are the end-user visible component. An AZ can be configured, like host aggregates, to represent features of the hardware.
AZs are typically used to define failure domains, such as a cabinet or data center, or even geography. When configuring AZs, it is important to note that a host can only be a member of one AZ at a time.
Creating an AZ is a two-step process. First, we create an aggregate with the --zone
parameter, or add it to an existing aggregate. Second, a host needs to be added to the aggregate before instances can be scheduled into the zone.
To create an AZ, you will need the following information:
openstack
command-line clientopenrc
file containing appropriate credentialsFor our example, these values are as follows:
cookbook-az
cookbook-az
compute-01
The following steps are to be used when creating an AZ:
openstack availability zone list
This will bring back an output like the following:
--zone
parameter:openstack aggregate create --zone cookbook-az cookbook-az
This will bring back an output like the following:
openstack aggregate add host cookbook-az compute-01
This will bring back an output like the following when successful:
openstack availability zone list
This will show the following:
The first command, openstack availability zone list
, lists all AZs. Next, when creating the new aggregate, the special --zone cookbook-az
parameter is passed, telling OpenStack Nova that this aggregate is also an AZ, specifying its name. Finally, a host is added to the AZ much the same as a host is added to an aggregate.
18.222.108.185