Providers refresh with MIQ


#1

Hi,

Does anybody know how often MIQ collect new information from its providers?

In particular quotas information from openstack, and is it configurable? Can we set it to be for example once an hour?

thanks,
Or


#2

For openstack you can (and may be it work out of box without any custom configuration) trigger refresh by rabbitmq event. I think that this way is best practice instead of cron-like triggers. You should just add rabbitmq address on the Event tab of OpenStack-provider configuration page.


#3

@igortiunov can you please add a screen-shot of how its done? I never done it before


#4

In the process of Cloud Provider configuration you can choose two options on the events tab. I didn’t work with ceilometer, but I can say that the AMQP option is a Jedi lightsaber for orchestration of cloud infrastructure (in the latest release of MIQ available ability to work with rabbitmq of VMWare vCloud Director). In your openstack is already running rabbitmq message broker and you need to specify the address and credentials (For most typical deployments the address of the controller.)


There is a doc from RH link
For receiving messages defined instances, they can be viewed in Automation in the following ways: ManageIQ/System/Event/EmsEvent/OpenStack

If you look at the instances for compute, you can see the refresh of provider as one of the stages:

This events and related refresh actions you can see in evm.log: http://paste.openstack.org/raw/601458/
http://paste.openstack.org/raw/601460/
Moreover, you can specify your own event handler in State Machine and inside ruby code to call the refresh method of the provider:
ems = $evm.root[‘event_stream’].ext_management_system
ems.refresh
sleep(ems_refresh_timeout)
More about event handling in this book Chapter 15:
https://access.redhat.com/webassets/avalon/d/Mastering_CloudForms_Automation_Red_Hat/Mastering_CloudForms_Automation_Red_Hat.pdf


#5

@igortiunov Wow! amazing help! Thank you so much!