METHOD OF PROCEDURE HOST AGGREGATE AVAILABILITY ZONE FLAVOR
- INTRODUCTION
This section provides the introduction to basic concepts of Host Aggregate, Availability Zone and Flavor in a way which can be useful for us.
Host Aggregate:
Administrators use Host Aggregates to group hardware according to various properties. Most commonly, host aggregates are used to differentiate between physical host configurations. These are not visible to the customers.
Availability Zone:
Availability Zones is customer-facing and usually used for geographical partitioning.
Flavor:
Once an aggregate is created, administrators can then define specific public flavors from which clients can choose to run their virtual machines. Flavors are used by customers and clients to choose the type of hardware that will host their instance.
- ACTIVITY OVERVIEW
This section provides a logical view of relationships between Host Aggregates, Availability Zones and Flavors as we intend to implement in the current POC.
We will take 4 properties viz: CPU Frequency, RAM Speed, Disk Size & Hardware Acceleration and create Host aggregates and subsequent Flavors in this work.
At the end of this activity we should be able to instantiate virtual machines on servers lying in appropriate Availability Zones and appropriate host.
Logical Mapping:
Availability Zone1 (az1) (2 hosts) | Availability Zone2 (az2) (2 hosts) | |
Host Aggregates | HostAggrAz1Small | HostAggrAz2Small |
HostAggrAz1Large | HostAggrAz2Large | |
HostAggrAz1SmallHWAcc | HostAggrAz2SmallHWAcc | |
HostAggrAz1LargeHWAcc | HostAggrAz2LargeHWAcc |
Host wise Mapping:
Host 1 | Host 2 | Host 3 | Host 4 |
az1 | az1 | az2 | az2 |
HostAggrAz1Small | HostAggrAz1Large | HostAggrAz2Small | HostAggrAz2Large |
HostAggrAz1SmallHWAcc | HostAggrAz1LargeHWAcc | HostAggrAz2SmallHWAcc | HostAggrAz2LargeHWAcc |
- MOP – Method Of Procedure
STEP 1:
- Enable the following filters on nova controller nodes – AvailabilityZoneFilter, ServerGroupAntiAffinityFilter, AggregateInstanceExtraFilter by adding a line in the file /etc/nova/nova.conf
scheduler_default_filters= AvailabilityZoneFilter, ServerGroupAntiAffinityFilter, AggregateInstanceExtraFilter
- Restart scheduler service on all the nova controller nodes by the command
service nova-scheduler restart
Pls Note: ServerGroupAntiAffinityFilter & ServerGroupAffinityFilter are useful only when multiple instances are launched simultaneously. Since there is no existing use case where all instances of the same vnfc should be launched on the same server, I am omitting ServerGroupAffinityFilter.
STEP 2:
Create ServerGroupAntiAffinityFilter by the command
nova server-group-create antiaffinitygroup anti-affinity
STEP 3:
Create Flavors in openstack. For the sake of POC we decide to create 4 different flavors in openstack:
p1.small | p1.smallHWAcc | p1.large | p1.largeHWAcc |
ram 256 disk 16 vcpus 1 aggregate_instance_extra_specs:mem=400 aggregate_instance_extra_specs:cpu=2.5 | ram 256 disk 16 vcpus 1 aggregate_instance_extra_specs:mem=400 aggregate_instance_extra_specs:cpu=2.5 aggregate_instance_extra_specs:sriov=true aggregate_instance_extra_specs:dpdk=true | ram 512 disk 32 vcpus 2 aggregate_instance_extra_specs:mem=600 aggregate_instance_extra_specs:cpu=3.0 | ram 512 disk 32 vcpus 2 aggregate_instance_extra_specs:mem=600 aggregate_instance_extra_specs:cpu=3.0 aggregate_instance_extra_specs:sriov=true aggregate_instance_extra_specs:dpdk=true |
Use the following command for creating flavor:
openstack flavor create –public p1.small –id auto –ram <ram_size_in_mb> –disk <disk_size_in_gb> –vcpus <number_of_vcpus>
Use the following command for setting extra specs properties:
openstack flavor-key p1.small set aggregate_instance_extra_specs:mem=400,cpu=2.5
Pls create similarly the other three types of flavors (p1.smallHWAcc, p1.large, p1largeHWAcc).
STEP 4:
Create Host Aggregates and Availability Zones by using the following commands:
- HostAggrAz1Small
nova aggregate-create HostAggrAz1Small
nova aggregate-set-metadata HostAggrAz1Small az1
nova aggregate-set-metadata HostAggrAz1Small mem=400
nova aggregate-set-metadata HostAggrAz1Small cpu=2.5
- HostAggrAz1SmallHWAcc
nova aggregate-create HostAggrAz1SmallHWAcc
nova aggregate-set-metadata HostAggrAz1SmallHWAcc az1
nova aggregate-set-metadata HostAggrAz1SmallHWAcc mem=400
nova aggregate-set-metadata HostAggrAz1SmallHWAcc cpu=2.5
nova aggregate-set-metadata HostAggrAz1SmallHWAcc dpdk=true
nova aggregate-set-metadata HostAggrAz1SmallHWAcc sriov=true
- HostAggrAz1Large
nova aggregate-create HostAggrAz1Large
nova aggregate-set-metadata HostAggrAz1Large az1
nova aggregate-set-metadata HostAggrAz1Large mem=600
nova aggregate-set-metadata HostAggrAz1Large cpu=3.0
- HostAggrAz1LargeHWAcc
nova aggregate-create HostAggrAz1LargeHWAcc
nova aggregate-set-metadata HostAggrAz1LargeHWAcc az1
nova aggregate-set-metadata HostAggrAz1LargeHWAcc mem=600
nova aggregate-set-metadata HostAggrAz1LargeHWAcc cpu=3.0
nova aggregate-set-metadata HostAggrAz1LargeHWAcc dpdk=true
nova aggregate-set-metadata HostAggrAz1LargeHWAcc sriov=true
- HostAggrAz2Small
nova aggregate-create HostAggrAz2Small
nova aggregate-set-metadata HostAggrAz2Small az2
nova aggregate-set-metadata HostAggrAz2Small mem=400
nova aggregate-set-metadata HostAggrAz2Small cpu=2.5
- HostAggrAz2SmallHWAcc
nova aggregate-create HostAggrAz2SmallHWAcc
nova aggregate-set-metadata HostAggrAz2SmallHWAcc az2
nova aggregate-set-metadata HostAggrAz2SmallHWAcc mem=400
nova aggregate-set-metadata HostAggrAz2SmallHWAcc cpu=2.5
nova aggregate-set-metadata HostAggrAz2SmallHWAcc dpdk=true
nova aggregate-set-metadata HostAggrAz2SmallHWAcc sriov=true
- HostAggrAz2Large
nova aggregate-create HostAggrAz2Large
nova aggregate-set-metadata HostAggrAz2Large az2
nova aggregate-set-metadata HostAggrAz2Large mem=600
nova aggregate-set-metadata HostAggrAz2Large cpu=3.0
- HostAggrAz2LargeHWAcc
nova aggregate-create HostAggrAz2LargeHWAcc
nova aggregate-set-metadata HostAggrAz2LargeHWAcc az2
nova aggregate-set-metadata HostAggrAz2LargeHWAcc mem=600
nova aggregate-set-metadata HostAggrAz2LargeHWAcc cpu=3.0
nova aggregate-set-metadata HostAggrAz2LargeHWAcc dpdk=true
nova aggregate-set-metadata HostAggrAz2LargeHWAcc sriov=true
STEP 5:
Add hosts to Host Aggregates. Pls note that one host can be added to multiple host aggregates.
nova aggregate-add-host HostAggrAz1Small Host1
nova aggregate-add-host HostAggrAz1SmallHWAcc Host1
nova aggregate-add-host HostAggrAz1Large Host2
nova aggregate-add-host HostAggrAz1LargeHWAcc Host2
nova aggregate-add-host HostAggrAz2Small Host3
nova aggregate-add-host HostAggrAz2SmallHWAcc Host3
nova aggregate-add-host HostAggrAz2Large Host4
nova aggregate-add-host HostAggrAz2LargeHWAcc Host4
STEP 6:
Instantiate virtual machines with the above created flavors (p1.small, p1.smallHWAcc, p1.large, p1.largeHWAcc) and check on which host (out of Host1, Host2, Host3, Host4) the vm is instantiated in each case
nova boot –flavor <flavor-name> –image <image-name> –availability-zone <availability-zone>
flavor-name is either of p1.small, p1.smallHWAcc, p1.large, p1.largeHWAcc
image-name is any of the public bootable image present in glance
availability-zone is either az1 or az2
Resolving technical problems:
Solve your technical problems instantly
We provide Remote Technical Support from Monday to Sunday, 7:00PM to 1:00 AM
Mail your problem details at [email protected] along with your mobile numberand we will give you a call for further details. We usually attend your problems within 60 minutes and solve it in maximum 2 days.