Masterless Puppet and exported resources

32 views
Skip to first unread message

Alex C

unread,
Jan 30, 2023, 4:18:01 PM1/30/23
to Puppet Users
Hi,

Mostly thanks to this awesome resource:


I got a pretty effective masterless setup. It even collects facts from nodes. I'd like to set up exported resources (I still use Nagios, and the exported resources magic with Nagios looks great!), but I'm hitting a lack of documentation.

Is there any way to set up this without a full-blown PuppetDB? I see that acceptance tests exert this:


, but pson_storeconfigs is not available to me.

Any ideas?

Álex

p.s. I got my setup published here:


I thought I could maybe package this somewhat so others can reproduce this setup...

Alex C

unread,
Feb 1, 2023, 3:44:21 PM2/1/23
to Puppet Users
Hi again,

I got a pretty effective masterless setup. It even collects facts from nodes. I'd like to set up exported resources (I still use Nagios, and the exported resources magic with Nagios looks great!), but I'm hitting a lack of documentation.

In case anyone comes across this by Googling, I implemented an alternative to exported resources. It's a terrible hack, but sufficient for my purposes. Basically, after declaring Nagios resources directly in a node, without exporting, I compile the catalog... then manipulate the catalogs to move the Nagios resources to the Nagios host.

I got a generic script to do Puppet catalog compilation, which is probably easy to reuse, and a custom script to do the catalog manipulation (not reusable, but possibly can be emulated).


Cheers,

Álex

austin...@puppet.com

unread,
Feb 1, 2023, 4:52:24 PM2/1/23
to Puppet Users
Hi Álex,

pson_storeconfigs is just a mock installed for that one acceptance test, and not a real storeconfigs backend. I could be wrong, but the only backend I'm aware of for exported resources is the PuppetDB backend.

Based on your post, I'm not sure it would work perfectly because it sounds like you compile catalogs on your laptop and not on the agent nodes (and it does require PuppetDB), but I just wanted to make sure you are aware that you can use PuppetDB to store your data even without a centralized Puppetserver.

https://www.puppet.com/docs/puppetdb/7/connect_puppet_apply.html

Austin Blatt
Developer, Puppet by Perforce

Alex C

unread,
Feb 2, 2023, 5:35:09 AM2/2/23
to Puppet Users
Hi, Austin,

Thanks!


pson_storeconfigs is just a mock installed for that one acceptance test, and not a real storeconfigs backend. I could be wrong, but the only backend I'm aware of for exported resources is the PuppetDB backend.

Yeah, I saw that soon after writing the post :) It's a shame, I understand this kind of thing is not in the roadmap, but making that mock a bit more functional and making it available would be useful. Albeit in a very limited scope :D
 
Based on your post, I'm not sure it would work perfectly because it sounds like you compile catalogs on your laptop and not on the agent nodes (and it does require PuppetDB), but I just wanted to make sure you are aware that you can use PuppetDB to store your data even without a centralized Puppetserver.

https://www.puppet.com/docs/puppetdb/7/connect_puppet_apply.html

Yeah, I've read about that. I think it's not interesting to me, but I'll have a go and see if I grok the use case for that.

Cheers,

Alex
Reply all
Reply to author
Forward
0 new messages