$OpenBSD: README-main,v 1.4 2014/05/07 10:59:53 jasper Exp $

+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} 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 ${SYSCONFDIR}/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 ${SYSCONFDIR}/puppet/ on
OpenBSD or ${SYSCONFDIR}/puppet/ on most other operating systems.

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

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

Now run to finalize the setup:

    ${LOCALBASE}/libexec/puppetdb/puppetdb-ssl-setup

You may need to merge ${SYSCONFDIR}/puppetdb/conf.d/jetty.ini into
${SYSCONFDIR}/puppetdb/conf.d/puppetdb.ini

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 ${SYSCONFDIR}/puppet/routes.yaml so Puppet can store facts to PuppetDB:

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

Next create ${SYSCONFDIR}/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 ${SYSCONFDIR}/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
