We have implemented CloudForms with multiple Regions and Zones, all commanded by the Master Region (99)… and everything looks fine, we’re able to lunch a provisioning of a vm based on template thrhough service catalog in any target zone of any region. So, good at this point, the out-of-the-box provisioning workflow works!.
Now, we’ve developed a custom service catalog (generic type) and a custom provisioning statemachine (generic lifecycle) that connects with RH Satellite 6 via API to provision VMs (customised totally on-demand) in some provider (vmware or rhev) through Compute Resource of Satellite. Once the VM is created, the statemachine execute an EMS Refresh and loops until the object is recognized in VMDB (of the same region), then the email_complete method ends the workflow.
This process works fine when a provision of a new vm is triggered from its own region (scope local), but when we trigger the automation from the master region (this is our objective) the state machine doesn’t work as intended because the master doesn’t know how must execute the request, but I think this is normal because the out-of-the-box provisioning workflow looks at the template to find the target provider and zone, but in this automation we don’t use virtualization templates… (I almost sure that this is how the automation define where to provision a new VM, please let me know if I’m wrong)
So, to workaround we are trying to integrate in our code the new “create_automation_request” method but with some difficulties and here begin the questions…
I can see that approvement and quota validation happens before the service request is being created, so the approvement should be proccessed for Master or subourdinated/target Remote Region?
“create_automation_request” should be implemented to relocate the request to the target region/zone right? but in the master or remote code? in the provisioning generic statemachine or in some “proxy” top level method??
In case of “create_automation_request” method need to be implemented on master, I must send the catalog options like an array via “attrs” hash of the method??
Currently, when we submit a request in the Master catalog, the request begin but the dialog is still in the form and show us an error message like this: “Error during ‘Provisioning’: Failed to retrieve MiqRequest instance with id 1000000000688”… we should write a method that return the MiqRequest value in somewhere/somehow?
Some important details…
- The master workers has active automation and provider operations roles.
- Workers on remote regions has automation, provider operations and all the other infra roles.
- Service Catalog, company tags, users, groups, and automation namespaces are the same in Master and Remote Regions.
Beforehand, thank you so much!!
@pemcg, What do you think about this?