Analyzing Hiera Data can be very difficult.
HDM - Hiera Data manager is a web UI, which let's you analyze Hiera Data in a user-friendly way.
We now have built and released the HDM Foreman integration, which consists of two packages:
- Foreman HDM Smart Proxy plugin: smart_proxy_hdm
- Foreman HDM plugin: foreman_hdm
HDM Foreman Smart Proxy
Foreman needs to read data from HDM. HDM offers an API endpoint to allow remote systems to query for data and structure.
The Foreman HDM Smart Proxy plugin needs to know where it can find the HDM API endpoint and how to authorize.
HDM Foreman Plugin
The Foreman HDM plugin is an extension to the node view and adds a new tab which shows node hiera data.
Node data are fetched via HDM Smart Proxy from HDM API endpoint.
Requirements
First you need a HDM - Hiera Data manager installation. The installation can take place on an individual node or a Puppet Server.
HDM needs access to
- PuppetDB to read environments, nodes and facts
- Puppet Code to read hiera config file and hiera data
Besides this HDM requires to only make use of facts and trusted variables in hiera.yaml file.
Any variable which gets set during catalog compilation can not be evaluated by HDM and HDM will display these hierarchies as unresolvable.
The HDM Foreman integration needs at least Foreman 3.6 or newer. We don't build packages for older versions.
Older versions must use HDM integration from ruybgems.org.
Installation
You must install the packages from the Foreman Plugins repository and initialize the database:
dnf install -y rubygem-foreman_hdm rubygem-smart_proxy_hdm
foreman-rake db:migrate
Next you need to configure the HDM Smart Proxy:
# /etc/foreman-proxy/settings.d/hdm.yml
# HDM Smart Proxy
:enabled: https
:hdm_url: 'http://<HDM IP>:<HDM Port>'
:hdm_user: '<HDM API User Email>'
:hdm_password: '<HDM API User Password>'
HDM User and Password must be taken from an HDM API user!
You can omit these settings if you have disabled HDM user authentication.
Now the smart proxy must be restarted:
systemctl restart foreman-proxy
Screenshots
HDM Data view
Foreman Data View
Happy hacking on Puppet and Hiera data,
Martin
Top comments (0)