Install and configure PuppetDB from packages

Madeesha’s Tech Space
2 min readApr 18, 2018

--

you can either install puppetDB from puppet module or from packages. Here I’m going to explain how to install puppetDB from packages. It is very easy and you do not need expertise puppet knowledge to carry these steps on. You can install puppetDB on the same server which is used as puppet master.

  1. Enabling the puppet labs package repository.
sudo wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb
sudo dpkg -i puppetlabs-release-precise.deb
sudo apt-get update

2. Install puppetDB

sudo puppet resource package puppetdb ensure=latest
sudo apt-get install puppetdb-terminus

This will install the latest puppetDB version which is compatible to your current installed puppet version. You do not want to worry about the puppetDB version anymore.

3. Configure puppet to find puppetDB

You can install PostgresSQL DB for storing the puppetDB data. However, PuppetDB also supports an embedded HSQLDB database. Therefore you do not need to install separate database like PostgresSQL. But this embedded HSQLDB will be deprecated in future puppet versions. If so you need to configure separate PostgresSQL. Here I am using 3.8.7 puppet version. Therefore I am configuring embeded HSQLDB.

To the [master]section of /etc/puppet/puppet.conf, add following lines :

storeconfigs = true
storeconfigs_backend = puppetdb

Create /etc/puppet/routes.yaml and add following content :

---
master:
facts:
terminus: puppetdb
cache: yaml

Create /etc/puppet/puppetdb.conf and add following content :

Create /etc/puppet/puppetdb.conf and add following content :

[main]
server = name.of.server
port = 8081

5. Start PuppetDB service

sudo puppet resource service puppetdb ensure=running enable=true

You must also configure your PuppetDB server’s firewall to accept incoming connections on port 8081 since this puppetDB runs on port 8081.

6. Update /etc/puppetdb/conf.d/jetty.ini

You may run following command. It will updated the jetty.ini file accordingly.

sudo /usr/sbin/puppetdb ssl-setup

7. Restart Puppet master

for i in puppetdb puppetmaster ; do sudo service $i restart ; done

Now you have succesfully installed PuppetDB. cheers !!

--

--

No responses yet