METHOD OF PROCEDURE HOST AGGREGATE AVAILABILITY ZONE FLAVOR
This section provides the introduction to basic concepts of Host Aggregate, Availability Zone and Flavor in a way which can be useful for us.
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 Zones is customer-facing and usually used for geographical partitioning.
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.
Availability Zone1 (az1)
Availability Zone2 (az2) (2 hosts)
Host wise Mapping:
- MOP – Method Of Procedure
- 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.
Create ServerGroupAntiAffinityFilter by the command
nova server-group-create antiaffinitygroup anti-affinity
Create Flavors in openstack. For the sake of POC we decide to create 4 different flavors in openstack:
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).
Create Host Aggregates and Availability Zones by using the following commands:
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
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
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
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
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
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
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
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
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
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 firstname.lastname@example.org 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.