Availability Zones used to be used for this, however despite the name this is not the ideal way and will be strictly limited in VIO Multi-VC type deployments.
Instead of using availability zones, use host aggregates and metadata combined with flavors. See the links below.
For example, if we wanted to define flavor that uses "Gold" compute cluster do the following for VIO type deployments:
In the filter_scheduler
section, update enabled_filters by adding AggregateInstanceExtraSpecsFilter to the end. The following example shows the enabled_filters parameter with the values listed.
-
viocli update nova
conf:
nova:
filter_scheduler:
enabled_filters: "RetryFilter, AvailabilityZoneFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, PciPassthroughFilter, AggregateInstanceExtraSpecsFilter"
neutron:
metadata_proxy_shared_secret: ".Secret:managedencryptedpasswords:data.metadata_proxy_shared_secret"
vmware:
network_passthrough: "true"
tenant_vdc: "true"
Then follow the step to create the aggregate and metadata and create the corresponding flavor and metadata using your preferred method via CLI client or Horizon Dashboard. Below is an example using the Openstack Client CLI.
- Create the aggregate. This name will not been seen by the user during normal operation unless they specifically list aggregate groups.
example:
# openstack aggregate create computeGold
+-------------------+----------------------------+
| Field | Value |
+-------------------+----------------------------+
| availability_zone | None |
| created_at | 2023-05-11T21:36:15.175714 |
| deleted | False |
| deleted_at | None |
| hosts | None |
| id | 8 |
| name | computeGold |
| properties | None |
| updated_at | None |
+-------------------+----------------------------+
- Create some metadata. This is what will link the flavor to the aggregate.
example:
#openstack aggregate set --property tierGroup=Gold 8
#openstack aggregate show 8
+-------------------+----------------------------+
| Field | Value |
+-------------------+----------------------------+
| availability_zone | None |
| created_at | 2023-05-11T21:36:15.000000 |
| deleted | False |
| deleted_at | None |
| hosts | |
| id | 8 |
| name | computeGold |
| properties | tierGroup='Gold' |
| updated_at | None |
+-------------------+----------------------------+
- Add host to the aggregate
example:
# openstack aggregate add host 8 "compute-f154d6c2-c28"
+-------------------+----------------------------+
| Field | Value |
+-------------------+----------------------------+
| availability_zone | None |
| created_at | 2023-05-11T21:36:15.000000 |
| deleted | False |
| deleted_at | None |
| hosts | compute-f154d6c2-c28 |
| id | 8 |
| name | computeGold |
| properties | tierGroup='Gold' |
| updated_at | None |
+-------------------+----------------------------+
- Create the flavor
example:
# openstack flavor create --ram 256 --disk 1 --vcpus 1 --public s1.Gold
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 1 |
| id | c7bd9004-f9f3-4ed6-8bfb-cb3131ea7145 |
| name | s1.Gold |
| os-flavor-access:is_public | True |
| properties | |
| ram | 256 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+--------------------------------------+
- Add the metadata to the flavor. Must have the syntax of FilterClass:Key=Value. Here we use FilterClass aggregate_instance_extra_specs.
example:
# openstack flavor set --property aggregate_instance_extra_specs:tierGroup='Gold' c7bd9004-f9f3-4ed6-8bfb-cb3131ea7145
# openstack flavor show c7bd9004-f9f3-4ed6-8bfb-cb3131ea7145
+----------------------------+-------------------------------------------------+
| Field | Value |
+----------------------------+-------------------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| access_project_ids | None |
| disk | 1 |
| id | c7bd9004-f9f3-4ed6-8bfb-cb3131ea7145 |
| name | s1.Gold |
| os-flavor-access:is_public | True |
| properties | aggregate_instance_extra_specs:tierGroup='Gold' |
| ram | 256 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+-------------------------------------------------+
Along with using flavors to define what Nova uses, Cinder volume placement likely will need to be controlled too. Use storage profiles and cinder volume-types to define cinder volume placement according to access.
Working with Volumes and Volume Types in OpenStack