File: install_from_packages.markdown

package info (click to toggle)
puppetdb 8.8.1-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 19,692 kB
  • sloc: javascript: 23,285; ruby: 5,620; sh: 3,457; python: 389; xml: 114; makefile: 38
file content (133 lines) | stat: -rw-r--r-- 5,834 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
title: "Installing from packages"
layout: default
---
# Installing from packages

[connect_server]: ./connect_puppet_server.markdown
[connect_apply]: ./connect_puppet_apply.markdown
[ssl_script]: ./maintain_and_tune.markdown#redo-ssl-setup-after-changing-certificates
[configure_postgres]: ./configure.markdown#using-postgresql
[configure_heap]: ./configure.markdown#configuring-the-java-heap-size
[configure_jetty]: ./configure.markdown#jetty-http-settings
[requirements]: ./overview.markdown#standard-install-rhel-centos-debian-and-ubuntu
[install_module]: ./install_via_module.markdown
[module]: http://forge.puppet.com/puppetlabs/puppetdb
[postgres_ssl]: ./postgres_ssl.markdown
[package_repos]: https://puppet.com/docs/puppet/latest/install_puppet.html#enable_the_puppet_platform_repository
[known-issues]: ./known_issues.markdown

> **Note:** If you are running Puppet Enterprise version 3.0 or later, you do
> not need to install PuppetDB, as it is already installed as part of PE.

This page describes how to manually install and configure PuppetDB
from the official packages. Users are encouraged to install PuppetDB
via the [PuppetDB module][module] instead of installing the packages
directly. Using the module for setting up PuppetDB is much easier and
less error prone. See [Installing PuppetDB via Puppet
module][install_module] for more info.

Additionally, these instructions may be useful for understanding PuppetDB's
various moving parts, and can be helpful if you need to create your own PuppetDB
module.

> **Notes:**
>
> * After following these instructions, you must
>   [connect your Puppet Server(s) to PuppetDB][connect_server]. (If you use a
>   standalone Puppet deployment, you will need to
>   [connect every node to PuppetDB][connect_apply].)
> * These instructions are for
>   [platforms with official PuppetDB packages][requirements]. To install on
>   other systems, follow
>   [our instructions for installing from source](./install_from_source.markdown).
> * If this is a production deployment,
>   [review the scaling recommendations](./scaling_recommendations.markdown) before
>   installing. You should ensure that your PuppetDB server will be able to
>   comfortably handle your site's load.

## Platform specific install notes

**Ubuntu 18.04**
* Enable the [universe repository](https://help.ubuntu.com/community/Repositories/Ubuntu), which contains packages necessary for PuppetDB
* Ensure Java 8 is installed

**RHEL 8**
* RedHat's openjdk 11 package's dependency on tzdata-java was broken, see
  PuppetDB's [known issues][known-issues] for more more information and a
  workaround.

## Step 1: Install and configure Puppet

If Puppet isn't fully installed and configured on your PuppetDB server,
[install it][installpuppet] and request/sign/retrieve a certificate for the
node.

[installpuppet]: https://puppet.com/docs/puppet/latest/install_pre.html

Your PuppetDB server should be running Puppet agent and have a signed
certificate from your Puppet Server. If you run `puppet agent --test`, it
should successfully complete a run, ending with `Notice: Applied catalog in X.XX
seconds`.

> Note: If Puppet doesn't have a valid certificate when PuppetDB is installed,
> you will have to
> [run the SSL config script and edit the config file][ssl_script], or
> [manually configure PuppetDB's SSL credentials][postgres_ssl] before
> the Puppet Server will be able to connect to PuppetDB.

## Step 2: Enable the Puppet Platform package repository

If you didn't already use it to install Puppet, you will need to
[enable the Puppet Platform package repository][package_repos].

## Step 3: Install PuppetDB

Use Puppet to install PuppetDB:

    $ sudo puppet resource package puppetdb ensure=latest

## Step 4: Configure database

- [Set up a PostgreSQL server and configure PuppetDB to use it][configure_postgres].
  If your PostgreSQL node is on a separate server than PuppetDB, you should
  [configure an SSL connection][postgres_ssl], otherwise your database
  communication will happen in plaintext over the network. This can be made
  much simpler by installing using the [PuppetDB module][module].

## Step 5: Start the PuppetDB service

Use Puppet to start the PuppetDB service and enable it on startup.

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

> PuppetDB is now fully functional and ready to receive facts, catalogs, and
> reports from any number of Puppet Servers.

## Finish: Connect Puppet to PuppetDB

[You should now configure your Puppet Server(s) to connect to PuppetDB][connect_server].

If you use a standalone Puppet site,
[you should configure every node to connect to PuppetDB][connect_apply].

## Troubleshooting installation problems

* Check the log file (`/var/log/puppetlabs.puppetdb/puppetdb.log`), and see
  whether PuppetDB knows what the problem is.
* If PuppetDB is running but the Puppet Server can't reach it, check
  [PuppetDB's `[jetty]` configuration][configure_jetty] to see which port(s) it
  is listening on, then attempt to reach it by Telnet (`telnet <HOST> <PORT>`)
  from the Puppet Server. If you can't connect, the firewall may be
  blocking connections. If you can, Puppet may be attempting to use the wrong
  port, or PuppetDB's keystore may be misconfigured (see below).
* Check whether any other service is using PuppetDB's port and interfering with
  traffic.
* Check [PuppetDB's `[jetty]` configuration][configure_jetty] and the
  `/etc/puppetlabs/puppetdb/ssl` directory, and make sure it has the necesary
  SSL files created. If it didn't create these during installation, you will
  need to [run the SSL config script and edit the config file][ssl_script]
  before a Puppet Server can contact PuppetDB.