Documenting how to use miq-infoblox custom domain from Red Hat

I can’t find any guides or docs on how to use the Red Hat miq-infoblox custom domain found on GitHub to integrate MIQ with InfoBlox. So I’m starting this thread to solicit input and provide an answer to others searching for the same thing.

Note, this article from @jhardy from 2013 is the closest thing I can find to a guide, but it apparently predates the current miq-infoblox domain. But thanks to John for providing this starting point.

Backup your Automate Datastore code in case the following changes mess it up:
You should always do this before editing your code.

Install Prerequisites:
The miq-infoblox domain requires you first install miq-utilities, found here. The readme provides simple install instructions.

Install miq-infoblox:
Found here. Again the readme tells you what to do.

Unlock the RedHatConsulting_Infoblox Domain
You have to unlock the RedHatConsulting_Infoblox domain before you can edit it. Use the following from a rails console MiqAeDomain.where(:name => 'RedHatConsulting_Infoblox').update_attributes(:source => 'user')
FYI to lock the ManageIQ domain use the following from a rails console
MiqAeDomain.where(:name => 'RedHatConsulting_Infoblox').update_attributes(:source => 'system')

Configure the Infoblox > Configuration class:
Go to RedHatConsulting_Infoblox > Integration > Infoblox > Configuration class in the Automate Datastore. Add your username, password and server to the schema attributes.

Adjust the VM Provisioning State Machine:
Copy the OOTB Class ‘VMProvision_VM’ found at ManageIQ (Domain) > Cloud > VM > Provisioning > StateMachines > VMProvision_VM to a custom domain if it doesn’t already exist in one of your custom domains.

Add acquire_ip_address to the AcquireIPAddress state value
add /RedHatConsulting_Infoblox/Integration/Infoblox/Operations/Methods/acquire_ip_address here:

Save changes. I will edit/add to this post based on further research, testing, and feedback from others who feel inclined to provide it. Thanks!

1 Like

Hello Michael,

I have worked on CloudForms with Infoblox integration using Ansible Playbooks. As Ansible is super compatible with newer versions of CloudForms so I found it really simple and effective approach for Integration.

You can refer the playbooks here: https://github.com/cNeha/infoblox

This has been tested on CloudForms 4.7 and it works as expected.

Let me know if you need more information regarding the same, would be happy to help you.

Regards,
Neha Chugh

1 Like

Thank you @cNeha! What would the pros and cons be of using miq-infoblox vs using Ansible? I guess I’m assuming that direct integration from MIQ would be easier, but I’m open to another approach. Ansible was my first approach before learning of this domain from Red Hat.

Hello Michael,

Any approach would be fine as far as you are comfortable with. I chose Ansible as it is more compatible now with newer versions and due to syncrou-role which can be used to get/set attribute from one state to another state.

Ansible was introduced in Cloudforms 4.5 version, before that, miq-infoblox was the only solution to integrate with Infoblox using ruby scripts.

With the help of available ansible modules for Infoblox and syncrou roles, it is quite easy to work with Ansible playbooks and integrate cloudforms with Infoblox.

Both the approaches are equally good in terms of performance. So, you can choose any approach which suits your need.

If you want to opt for Ansible, would happy to assist you in achieving the same.

Regards,
Neha Chugh

Thank you @cNeha that is very generous of you. I will let you know if I explore the Ansible path and get stuck!

@cNeha do you use the embedded Ansible or Ansible Tower?

I think Neha used Embedded Ansible for this.

Thanks,
pemcg

Thank you @pemcg