Foreman Smart Proxy Integration
This page is for administrators who want Foreman to request IP addresses from Device42 instead of a separate DHCP server. By the end, Foreman-based automation gets the next available IP address from Device42 through a standard DHCP request, and Device42 records the new object automatically.
Get even more from Device42 by integrating Device42's IP Address Management (IPAM) features with the Foreman. Device42 already knows all about your subnets as well as the used and free IP addresses on each – so let it provide the next free IP address automatically! Foreman's Smart proxies allow your Puppet and Foreman-based configuration scripts and other automation to request the next available IP on your network directly from Device42, transparently, via a standard DHCP request! The Device42-Foreman Smart-proxy plugin handles the transparent passing of DHCP requests to the D42 API!
From the point of view of the server making the DHCP request, the smart proxy is transparent. It has no idea, nor any need to know, that it is actually getting an IP address from Device42. As far as Device42 can tell, it just received a normal API request for the next available IP. The new object, including its name, IP, and MAC address, is also recorded in Device42 automatically. Visit the Device42-Foreman Smart Proxy Integration page to download.
Prerequisites
Before installing the plugin, make sure you have:
- A running Foreman installation with Smart Proxy 1.16 or later, and root or
sudoaccess to install theforeman-proxypackage and edit its settings files - The Device42 server IP address, and an API username and password for the plugin to authenticate with
- Network connectivity between the smart proxy server and Device42
- The Device42-Foreman Smart Proxy plugin downloaded
Visit the Device42-Foreman Smart Proxy Integration page to download the plugin.
Set Up the Foreman Smart Proxy Plugin
Installing the smart proxy plugin is the same as installing any smart proxy plugin in Foreman. The instructions below were adapted from the Foreman user manual. Consult the Foreman manual directly for more details.
Click to expand the code block
# Debian Linux (as root)
apt-get update
apt-get install foreman-proxy
# Ubuntu Linux (as normal user)
sudo aptitude update
sudo aptitude install foreman-proxy
Once you have installed the Foreman Smart Proxy package, add the following Device42-specific configuration:
-
To enable this DHCP provider, edit
/etc/foreman-proxy/settings.d/dhcp.ymland set::use_provider: dhcp_device42
:subnets: subnets you want to use (optional unless you set device42_subnets to false) -
Configuration options for this plugin are in
/etc/foreman-proxy/settings.d/dhcp_device42.ymland include:Click to expand the code block
:scheme: server scheme
:verify: secure verification ( bool )
:server: IP of device42 server
:username: API Username
:password: API Password
Note that you can find the above configuration details in the README.MD file included with the Device42-Foreman Smart Proxy plugin download on the plugin repository page.
Should you have issues, please check to see installation instructions haven't changed per the Foreman manual (linked above). If they have changed, or if they have not changed and you are still experiencing trouble, email support@device42.com.