Launch automation task from a master region appliance

Hi team,

I’m newbie in ManageIQ & CFME. I’m planning a multi-regional architecture and I need to know if there are some kind of troubles or if is possible to launch automation tasks from a master region appliance (with IU role included on it) to a subordinate region in a multi-regional architecture. Could you help me commenting your experience with this kind of issues please?

Thanks a lot!! (Sorry for my poor English)

1 Like

The Master Region is designed as a read-only, reporting region aggregating information from the other regions. People have tried launching things from Master Region, but, since this was not designed into the core architecture, they usually run into issues. So, use at your own risk.


1 Like

Thank you @chessbyte

I’ve just been dealing with some related stuff and it occurs to me that you could implement some automation that calls the REST API on your sub-regions CFME appliances, from your master region appliance…

For instance, say you have a VM button in your sub-region that calls some automation, then in your master region you could make that button run a different piece of code that calls the sub-region’s REST API to run that same automation, and passing it the necessary parameters.

Have a look at: from Peter McG’s gitbook …

I love this product - you can make it do anything. (But you need to think about it. Just because you can doesn’t always mean you should … ) :smile: heheh.

Hi Stephen

I’ve also thought that this should in theory be possible, I just haven’t had the chance to try it out yet.

Many objects in the VMDB have a ‘region_number’ virtual column that could be used to determine the target miq_server to direct the REST calls to. You could even have a service dialog containing a dynamically populated drop-down list of child-region target MIQ servers to target REST requests to, say from a button.

There are a couple of useful attributes from an miq_server object in this context:

$evm.root[‘miq_server’].region_number (type: Fixnum)
$evm.root[‘miq_server’].has_active_webservices (type: TrueClass)

So it would be straightforward to use $evm.vmdb to enumerate all miq_servers to find the REST-callable server in each region.

As ever the possibilities with MIQ are endless!