You can install and configure all of PuppetDB’s components and prerequisites (including PuppetDB itself, PostgreSQL, firewall rules on RedHat-like systems, and the PuppetDB-termini for your Puppet master) using the PuppetDB module from the Puppet Forge.
Enable the Puppet Platform package repository:
-
If you haven’t done so already, you will need to do one of the following:
-
Enable the puppet platform package repository on your PuppetDB server and Puppet master server.
-
Grab the PuppetDB and PuppetDB-termini packages, and import them into your site’s local package repos.
Assign classes to nodes:
Using the normal methods for your site, assign the PuppetDB module’s classes to your servers.
You have three main options for deploying PuppetDB:
-
If you are installing PuppetDB on the same server as your Puppet master, assign the puppetdb and puppetdb::master::config classes to it.
-
If you want to run PuppetDB on its own server with a local PostgreSQL instance, assign the puppetdb class to it, and assign the puppetdb::master::config class to your Puppet master. Make sure to set the class parameters as necessary.
-
If you want PuppetDB and PostgreSQL to each run on their own servers, assign the puppetdb::server class and the puppetdb::database::postgresql classes to different servers, and the puppetdb::master::config class to your Puppet master. Make sure to set the class parameters as necessary.
Note: By default, the module sets up the PuppetDB dashboard to be accessible only via localhost.
If you’d like to allow access to the PuppetDB dashboard via an external network interface, set the listen_address parameter on either of the puppetdb or puppetdb::server classes as follows:
class { 'puppetdb':
listen_address => 'example.foo.com'
}