PuppetDB & exported resources
Cross-node orchestration.
PuppetDB is a database that stores everything Puppet knows — every node’s facts, catalogs, and run reports — and makes it queryable. That powers a lot: fast fact queries across the fleet (“which nodes run this kernel”), reporting and dashboards, and the standout feature, exported resources, which let one node declare a resource that other nodes collect and realize. It is how Puppet does cross-node coordination.
# on each web node: EXPORT a load-balancer backend entry@@haproxy::balancermember { $facts['networking']['fqdn']:ipaddress => $facts['networking']['ip'],port => 8080,}# on the load balancer: COLLECT all exported entriesHaproxy::Balancermember <<| |>> # realizes every web node’s backend automatically
Orchestration without a central list
Exported resources solve the classic “each backend registers itself with the load balancer” problem without maintaining a manual list: web nodes export their backend entry as they are provisioned, the LB collects them on its next run, and the pool stays current automatically. PuppetDB also feeds the puppet query language (PQL) for ad-hoc fleet questions, useful for audits and incident response.
$ puppet query 'inventory[certname] { facts.os.family = "Debian" }'[ {"certname":"web1.acme.internal"}, {"certname":"web2.acme.internal"} ]# ask the fleet a question directly from PuppetDB