Save money from Windows Licensing on Openstack

With Windows 2016 a big licensing change happen , pls read from here

What should you do ?  You have two ways ..

First way is using Isolation Filter

This is very static and painful because each time you need to update something like which image which host not easy configurable and i guess its useful when very very specific things need to manage.

We need to check/modify our nova.conf first, for to do this jump in your terminal screen and connect your one of management client/server or for HPE Helion users Lifecycle Manager.

Set environment variables by hand or execute Openstack OpenRC file (We need administrator credentials)

i will continue with HPE Helion way but its not much more then update nova.conf and execute some manual commands for others.

Edit you nova.conf and find out related line “scheduler_default_filters”

You should have “IsolatedHostsFilter” option set as a scheduler_default_filters and need more two configurations which are “isolated_hosts” and “isolated_images

Example :

scheduler_default_filters = AvailabilityZoneFilter,RetryFilter,ComputeFilter,DiskFilter,RamFilter,ImagePropertiesFilter,ServerGroupAffinityFilter,ServerGroupAntiAffinityFilter,ComputeCapabilitiesFilter,NUMATopologyFilter,AggregateImagePropertiesIsolation,IsolatedHostsFilter

isolated_hosts = helion-cp1-compute0001-mgmt

isolated_images = c560d67b-3c9f-4137-aa5b-38f58f198141, d6df3340-4d55-4163-8954-7f8896af9767

What i did here , i have to images which are described below always need to be provision on compute0001 node, but this does not restrict any other images provisioned on compute0001 node but related images always provisioned on compute0001

After all you need to restart nova api services on controllers side and nova service on computes side.

Second way is using AggregateImagePropertiesIsolation

Set environment variables by hand or execute Openstack OpenRC file (We need administrator credentials)

What we will do we will divide compute nodes to specific Host Aggregates and set some metadata then also we will update glance images metadata values too !

Do you have any already created aggregation group ?

stack@helion-cp1-c0-m1-mgmt:~$ nova aggregate-list

Also need to learn availability zones too , maybe creation time of aggregate you want to specify ! 

stack@helion-cp1-c0-m1-mgmt:~$ nova availability-zone-list

List Compute nodes ! 

stack@helion-cp1-c0-m1-mgmt:~$ nova host-list

Create aggregate by OS type

stack@helion-cp1-c0-m1-mgmt:~$ nova aggregate-create linuxinstances nova

stack@helion-cp1-c0-m1-mgmt:~$ nova aggregate-create windowsinstances nova

Assign hosts by aggregate

stack@helion-cp1-c0-m1-mgmt:~$ nova aggregate-add-host linuxinstances helion-cp1-compute0001-mgmt

stack@helion-cp1-c0-m1-mgmt:~$ nova aggregate-add-host windowsinstances helion-cp1-compute0002-mgmt

Set Metadata to Host Aggregates

stack@helion-cp1-c0-m1-mgmt:~$ nova aggregate-set-metadata 6 os=linux

stack@helion-cp1-c0-m1-mgmt:~$ nova aggregate-set-metadata 9 os=windows

Not : 6 and 9 is ID of host aggregates pls check it on your side

Need to know something about Filter Scheduler

Not %100 like VMware DRS but Openstack use Filter Scheduler for filtering and weighting . Best link is this.

You should see and modify your nova.conf , scheduler_default_filters section. For this article we should know something about “AggregateImagePropertiesIsolation” and “AggregateInstanceExtraSpecsFilter” .

AggregateImagePropertiesIsolation provides us isolation image properties based and aggregate metadata, support multiple comma separated values.

AggregateInstanceExtraSpecsFilter provides same manner like above but instance type specific.

I am using HPE Helion Openstack and i will modify all from lifecycle manager like below

  • Edit  ~/helion/my_cloud/config/nova/nova.conf.j2 template file and modify “scheduler_default_filters” like below
    • scheduler_default_filters = AvailabilityZoneFilter,RetryFilter,ComputeFilter,DiskFilter,RamFilter,ImagePropertiesFilter,ServerGroupAffinityFilter,ServerGroupAntiAffinityFilter,ComputeCapabilitiesFilter,NUMATopologyFilter,AggregateImagePropertiesIsolation
    • cd helion/
    • git add -A
    • git commit -a -m “editing nova schedule filters”
    • cd ~/helion/hos/ansible
    • ansible-playbook -i hosts/localhost config-processor-run.yml
    • ansible-playbook -i hosts/localhost ready-deployment.yml
    • cd ~/scratch/ansible/next/hos/ansible
    • ansible-playbook -i hosts/verb_hosts nova-reconfigure.yml

Update cirros-0.3.3-x86_64 image metadata

stack@helion-cp1-c0-m1-mgmt:~$ glance image-update d6df3340-4d55-4163-8954-7f8896af9767 –property os=”linux”

Update Ubuntu-Xenial image metadata

stack@helion-cp1-c0-m1-mgmt:~$ glance image-update c560d67b-3c9f-4137-aa5b-38f58f198141 –property os=”linux”

Update windows2012 image metadata

stack@helion-cp1-c0-m1-mgmt:~$ glance image-update 3b7713d6-7f7c-433b-8565-4a080b385a75 –property os=”windows”

Now start to create new instances and see whats happening !

Good readings


Posted on 29/11/2016, in Openstack and tagged , , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: