It was discussed in the SRE-Foundations weekly meeting the need of integrating datacenter row/rack information into Puppet reading it from Netbox and exposing it in ways so that Grafana dashboards and Cumin could use it.
The requirement is to have a system that doesn't directly depend on Netbox, hence that if Netbox is down should continue to work just with stale data.
The various options discussed boils down to:
- Have a script that periodically generates a hiera file with that information for each host, to be merged by the puppetmasters with the public tree as we already do with the private repo
- Have a hiera backend that dynamically query Netbox (or a local file to have a cache)
- Have a Puppet function that query Netbox (TBD how to make a local cache)
- Use client side facts (require each host to contact Netbox with a token and also have a local cache)
- See if server side facts could be used for this (at first sight it seems not, but need more investigation)
As for the exposure to Cumin, it might not be needed as we've already in CR a Netbox backend for Cumin. Or could be exposed using the same trick used for $::site in profile::cumin::target.
As for the exposure to Grafana dashboards it needs investigation.