This is tested against phpIPAM 1.2 and ManageIQ Darga using self-service provisioning on VMware
It doesn't require any patches to phpIPAM code
In phpIPAM take the following steps:
-
Create a user with admin permissions and a password
-
Enable API (Administration>phpIPAM settings>Feature Settings>API)
-
Create an API key (Administration>API) with either SSL or none as the App security (crypt does not work with this extension)
Install the httparty ruby gem on the manageIQ server
gem install httparty
After importing the extension:
Edit the default values in the schema for phpIPAM class
- url should be set to the URL to access your phpipam API. If you access your phpipam install att https://server your url will be https://server/aip/ Include the trailing slash
- user should be set to the user created in phpIPAM
- password should be set to the password for the user created in phpIPAM
- context is the App id in phpIPAM API key
- domain should be your hosts DNS domain. This is used to set the domain name in provisioning
- The description of your Subnet in phpIPAM must match the vlan value in manageIQ provisioning variable (see below)
- Do not have duplicate Subnet descriptions in ManageIQ
The logic this follows is:
- Get all sections in phpIPAM
- Get all subnets of all sections in phpIPAM
- Loop through each subnet to find one that matches the $evm.root['miq_provision']['vlan'] variable
- Get first address in this subnet
- Reserve this address with the hostname and return it to the provisioning process
I tagged logging info in the automation.log with IPAM so it is easy to find when troubleshooting