README-main 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. $OpenBSD: README-main,v 1.9 2014/12/07 19:24:10 jasper Exp $
  2. +-----------------------------------------------------------------------
  3. | Running ${FULLPKGNAME} on OpenBSD
  4. +-----------------------------------------------------------------------
  5. Web frontend
  6. ------------
  7. PuppetDB comes with a web frontend which reports various metric at:
  8. http://<hostname>:8080
  9. Setting up SSL
  10. --------------
  11. In order for the PuppetDB to communicate with the Puppet Master you will need
  12. to setup SSL.
  13. As the Puppet Master need not to run on the same host as PuppetDB we will
  14. assume your configuration is stored in ${SYSCONFDIR}/puppet/ on
  15. OpenBSD or ${SYSCONFDIR}/puppet/ on most other operating systems.
  16. Now manually copy over the following .pem files from your Puppet Master into
  17. ${SYSCONFDIR}/puppetdb/ssl/ (relative to ${SYSCONFDIR}/puppet/):
  18. ssl/certs/ca.pem
  19. ssl/private_keys/<puppet master certname>.pem
  20. ssl/certs/<puppet master certname>.pem
  21. In order to finalize the setup now run these commands, though if the Puppet
  22. Master runs on the same host as PuppetDB, the first command can be skipped:
  23. # ${LOCALBASE}/libexec/puppetdb/puppetdb-ssl-setup
  24. # puppetdb ssl-setup -f
  25. PostgreSQL indexes
  26. ------------------
  27. When using the PostgreSQL database, it is strongly recommended to
  28. create the pg_trgm indexes for the PuppetDB database. This extension
  29. can be installed with:
  30. # pkg_add postgresql-contrib
  31. Then run the following command as the database super-user on the PuppetDB
  32. database:
  33. puppetdb=# CREATE EXTENSION pg_trgm;
  34. And restart puppetdb:
  35. # rcctl restart puppetdb
  36. Configuring the Puppet Master
  37. -----------------------------
  38. Several steps are needed on the Puppet Master to make use of PuppetDB for
  39. storing facts, reports as well as exported resources and stored
  40. configurations.
  41. First create ${SYSCONFDIR}/puppet/routes.yaml so Puppet can store facts to PuppetDB:
  42. ---
  43. master:
  44. facts:
  45. terminus: puppetdb
  46. cache: yaml
  47. Next create ${SYSCONFDIR}/puppet/puppetdb.conf to teach Puppet how to reach PuppetDB:
  48. [main]
  49. server = puppetdb.example.com
  50. port = 8081
  51. Finally instruct Puppet to use PuppetDB for stored configs and reports; in the
  52. '[master]' section of ${SYSCONFDIR}/puppet/puppet.conf:
  53. reports = store,puppetdb
  54. storeconfigs = true
  55. storeconfigs_backend = puppetdb
  56. PuppetDB terminus
  57. -----------------
  58. If the Puppet Master is running OpenBSD, you will need to install the PuppetDB
  59. terminus plugin:
  60. # pkg_add puppetdb-terminus
  61. Upgrade from puppetdb-2.1.0p0
  62. -----------------------------
  63. With puppetdb-2.1.0p1 the single ${SYSCONFDIR}/puppetdb/conf.d/puppetdb.ini file was
  64. split into multiple .ini files. There are now config.ini, database.ini, jetty.ini and
  65. repl.ini. The config.ini contains the [global] and [command-processing] sections,
  66. the other .ini files contain the respective sections from the puppetdb.ini with
  67. the same names. You have to update those new files matching your old configuration
  68. from the puppetdb.ini and afterwards you have to delete the
  69. puppetdb.ini file before restarting puppetdb.