PuppetDB 1.1 » Installing PuppetDB Via Module
You can install and configure all of PuppetDB’s components and prerequisites (including PuppetDB itself, PostgreSQL, firewall rules on RedHat-like systems, and the terminus plugins for your Puppet master) using the PuppetDB module from the Puppet Forge. This is the easiest method for installing PuppetDB.
Step 1: Enable the Puppet Labs Package Repository
If you haven’t already, you will need to do one of the following:
- Enable the Puppet Labs package repository on your PuppetDB server and puppet master server.
- Grab the PuppetDB and terminus plugin packages, and import them into your site’s local package repos.
To enable the Puppet Labs repos, follow the instructions linked below:
- Instructions for PE users (Note that PE support for PuppetDB is currently unofficial.)
- Instructions for open source users
Step 2: 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
andpuppetdb::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 thepuppetdb::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 thepuppetdb::database::postgresql
classes to different servers, and thepuppetdb::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, you should set the listen_address
parameter on either of the puppetdb
or puppetdb::server
classes. e.g.:
class { 'puppetdb':
listen_address => 'example.foo.com'
}
These classes automatically configure most aspects of PuppetDB. If you need to set additional settings (to change the node_ttl
, for example), see the “Playing Nice With the PuppetDB Module” section of the “Configuring” page.
For full details on how to use the module, see the README_GETTING_STARTED.md
file in the module’s GitHub repo. The module also includes some sample manifests in
the tests
directory that demonstrate its basic usage.