2 ms·
Puppet has an inventory system. They call it PuppetDB, but it's basically an interface to an SQL database (eg., PostgreSQL) where the main Puppetmaster process
by lobster_johnson 13y ago
Puppet has an inventory system. They call it PuppetDB, but it's basically an interface to an SQL database (eg., PostgreSQL) where the main Puppetmaster process will stores all the information it compiles from manifests. It's a simple schema which allows you to easily query all the hosts, resources and so on.
An interesting side effect of PuppetDB is that it can be exploited within the manifests themselves, via what's known as "exported resources" [2], allowing nodes to gather information from each other. For example, a web server module can declare that it exports a URL endpoint that needs to be monitored. Then the Nagios module can declare that it wants to know about all URLs to be monitored. The syntax is a bit weird, but it's a rather elegant system.
[1] http://docs.puppetlabs.com/puppetdb/1/ http://docs.puppetlabs.com/puppetdb/1/
[2] http://docs.puppetlabs.com/puppet/2.7/reference/lang_exported.html http://docs.puppetlabs.com/puppet/2.7/reference/lang_exporte...