puppetDB x Foreman database

Hello

I have a foreman / puppet installation with some smartproxys and ~12k hosts registered. What is the advantage, if it exists, in using puppetdb or just the foreman database?

Thanks

Hey @alysson

Welcome to the community.

Can you please list your Foreman version, plugins, and anything else that is relevant.

Are you experiencing something that you want to change?
I’m wondering what provoked the question. What is your overall goal that you’re working towards?

I know there are some users who prefer Puppet DB, IIRC it was necessary if you want to use external resources. It’s still possible to use some Foreman functionality even if you use Puppet DB, most likely you wouldn’t use the ENC (smart class parameters or classes assignment) functionality though.

We are using both PuppetDB and Foremans Puppet integration alongside each other.
Foreman offers a nice GUI frontend to facts and reports and has a great ENC for Puppet.
PuppetDB on the other hand offers the ability to use exported resources (which require having PuppetDB) and it has a very potent API for querying facts, which is where Foreman is somewhat lacking (or I have just not found out how to use it properly).
We are also using the Foreman PuppetDB plugin to ensure deleted hosts from Foreman also get disabled in PuppetDB.

1 Like

@alysson - if you’re using more of the native Puppet tooling (i.e. Bolt, specifically for inventory) or using storeconfigs and the like in Puppet, PuppetDB is definitely helpful, because the Puppet tools expect that and are designed to integrate with it. It will duplicate a lot of data with Foreman. Basically, you only need puppetdb if you’re using the storeconfigs functions (which require puppetdb lookups in puppet code).

The puppetdb plugin just makes sure that inventories match between foreman and puppetdb - such that if you decom a node in foreman, that it sends the puppetdb delete command and so on.

2 Likes

Thanks for sharing guys, I wish you could wrote a blog post about how you use such mix. I’m sure we’d be happy to publish it. I think we’re missing some “recommended solutions” in case user wants to do xyz. Everyone need to figure it out themselves.

2 Likes