Puppet: How do i install PuppetDB?

0 votes
I have configured my puppet infrastructure as a part of which i have a puppet master server running on ubuntu 18.04 VM and two puppet agent nodes running on 2 different ubuntu 18.04 VM's. I want to extend this setup by adding a PuppetDB to this.

What's the way to install PuppetDB and where exactly should I install it? On the puppet master server or puppet agent?
related to an answer for: How do I install puppet on Ubuntu?
Aug 27 in Puppet by Nancy
48 views

1 answer to this question.

0 votes

You need to install puppetDB on the same server which is used as puppet master.

There are 2 ways to install puppetDB. You can install it from puppet module or from packages. 

Here let's see how to install puppetDB from packages. 

  • 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
  • Install puppetDB

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

The latest version of puppetDB will be installed which is compatible to your current installed puppet version.

  • 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.

Add these lines to the [master]section of /etc/puppet/puppet.conf, :

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 :

[main]
server = name.of.server
port = 8081
  • 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.

  • 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
  • Restart Puppet master

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

Now you have succesfully installed PuppetDB.

answered Aug 27 by Sirajul
• 37,480 points
Puppet: Installing PuppetDB via Puppet module.

Related Questions In Puppet

0 votes
1 answer

How do I install puppet on Ubuntu?

Hey @Alia, follow these steps to install ...READ MORE

answered Feb 21 in Puppet by Priya

edited Feb 21 117 views
0 votes
1 answer

How do I install factor and puppet using Ruby Gem?

Hey @Kiara, execute these commands to install ...READ MORE

answered Mar 8 in Puppet by Yogesh
54 views
0 votes
1 answer

How do I install Puppet directly from the source?

Hey @Laksha,  First, install the Puppet tarball from ...READ MORE

answered Mar 8 in Puppet by Yesha
51 views
0 votes
1 answer

How do I Install puppet agent on linux?

Install the puppet-agent package on your Puppet agent nodes ...READ MORE

answered Mar 12 in Puppet by Yesha
87 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
212 views
0 votes
1 answer
0 votes
1 answer

Docker with Puppet: How do I install Docker EE on a Debian System?

Docker provides a enterprise addition of the ...READ MORE

answered Aug 16 in Puppet by Sirajul
• 37,480 points
33 views
0 votes
1 answer

Puppet in Docker: How do I query PuppetDB API in a container setup?

PuppetDB exposes a dashboard, showing various operational ...READ MORE

answered Aug 20 in Puppet by Sirajul
• 37,480 points
34 views