$OpenBSD: README-main,v 1.3 2014/01/30 18:29:51 jasper Exp $

+-----------------------------------------------------------------------
| Running puppetdb-1.6.2 on OpenBSD
+-----------------------------------------------------------------------

Web frontend
------------
PuppetDB comes with a web frontend which reports various metric at:

    http://<hostname>:8080

Setting up SSL
--------------
In order for the PuppetDB to communicate with the Puppet Master you will need
to setup SSL. First create an empty jetty.ini:

    touch /etc/puppetdb/conf.d/jetty.ini

As the Puppet Master need not to run on the same host as PuppetDB we will
assume your configuration is stored in /etc/puppet/ on
OpenBSD or /etc/puppet/ on most other operating systems.

Now manually copy over the following .pem files from your Puppet Master into
/etc/puppetdb/ssl/ (relative to /etc/puppet/):

    ssl/certs/ca.pem
    ssl/private_keys/<puppet master certname>.pem
    ssl/certs/<puppet master certname>.pem

Now run to finalize the setup:

    /usr/local/libexec/puppetdb/puppetdb-ssl-setup

You may need to merge /etc/puppetdb/conf.d/jetty.ini into
/etc/puppetdb/conf.d/puppetdb.conf

Configuring the Puppet Master
-----------------------------
Several steps are needed on the Puppet Master to make use of PuppetDB for
storing facts, reports as well as exported resources and stored
configurations.

First create /etc/puppet/routes.yaml so Puppet can store facts to PuppetDB:

    ---
      master:
        facts:
          terminus: puppetdb
          cache: yam

Next create /etc/puppet/puppetdb.conf to teach Puppet how to reach PuppetDB:

    [main]
      server = puppetdb.example.com
      port   = 8081

Finally instruct Puppet to use PuppetDB for stored configs and reports; in the
'[master]' section of /etc/puppet/puppet.conf:

    reports      = store,puppetdb
    storeconfigs = true
    storeconfigs_backend = puppetdb

PuppetDB terminus
-----------------
If the Puppet Master is running OpenBSD, you will need to install the PuppetDB
terminus plugin:

    pkg_add puppetdb-terminus
