Giter Club home page Giter Club logo

puppetlabs-puppetdb's Introduction

puppetdb

Table of Contents

  1. Overview - What is the PuppetDB module?
  2. Module Description - What does the module do?
  3. Setup - The basics of getting started with PuppetDB module
  4. Upgrading - Guide for upgrading from older revisions of this module
  5. Usage - The classes and parameters available for configuration
  6. Implementation - An under-the-hood peek at what the module is doing
  7. Limitations - OS compatibility, etc.
  8. Development - Guide for contributing to the module
  9. Release Notes - Notes on the most recent updates to the module

Overview

By guiding puppetdb setup and configuration with a Puppet master, the PuppetDB module provides fast, streamlined access to data on puppetized infrastructure.

Module Description

The PuppetDB module provides a quick way to get started using PuppetDB, an open source inventory resource service that manages storage and retrieval of platform-generated data. The module will install PostgreSQL and PuppetDB if you don't have them, as well as set up the connection to Puppet master. The module will also provide a dashboard you can use to view the current state of your system.

For more information about PuppetDB please see the official PuppetDB documentation.

Setup

What PuppetDB affects:

  • package/service/configuration files for PuppetDB
  • package/service/configuration files for PostgreSQL (optional, but set as default)
  • Puppet master's runtime (via plugins)
  • Puppet master's configuration
    • note: Using the puppetdb::master::config class will cause your routes.yaml file to be overwritten entirely (see Usage below for options and more information )
  • system firewall (optional)
  • listened-to ports

Introductory Questions

To begin using PuppetDB, you’ll have to make a few decisions:

  • Should I run the database on the same node that I run PuppetDB on?
  • Should I run PuppetDB on the same node that I run my master on?

The answers to those questions will be largely dependent on your answers to questions about your Puppet environment:

  • How many nodes are you managing?
  • What kind of hardware are you running on?
  • Is your current load approaching the limits of your hardware?

Depending on your answers to all of the questions above, you will likely fall under one of these set-up options:

  1. Single Node (Testing and Development)
  2. Multiple Node (Recommended)

Single Node Setup

This approach assumes you will use our default database (PostgreSQL) and run everything (PostgreSQL, PuppetDB, Puppet master) all on the same node. This setup will be great for a testing or experimental environment. In this case, your manifest will look like:

node <hostname> {
  # Configure puppetdb and its underlying database
  class { 'puppetdb': }
  
  # Configure the Puppet master to use puppetdb
  class { 'puppetdb::master::config': }
}

You can provide some parameters for these classes if you’d like more control, but that is literally all that it will take to get you up and running with the default configuration.

Multiple Node Setup

This approach is for those who prefer not to install PuppetDB on the same node as the Puppet master. Your environment will be easier to scale if you are able to dedicate hardware to the individual system components. You may even choose to run the puppetdb server on a different node from the PostgreSQL database that it uses to store its data. So let’s have a look at what a manifest for that scenario might look like:

This is an example of a very basic 3-node setup for PuppetDB.

$puppetdb_host = 'puppetdb.example.lan'
$postgres_host = 'postgres.example.lan'
node 'master.example.lan' {
  # Here we configure the Puppet master to use PuppetDB,
  # telling it the hostname of the PuppetDB node
  class { 'puppetdb::master::config':
    puppetdb_server => $puppetdb_host,
  }
}
node 'postgres.example.lan' {
  # Here we install and configure PostgreSQL and the PuppetDB
  # database instance, and tell PostgreSQL that it should
  # listen for connections to the `$postgres_host`
  class { 'puppetdb::database::postgresql':
    listen_addresses => $postgres_host,
  }
}
node 'puppetdb.example.lan' {
  # Here we install and configure PuppetDB, and tell it where to
  # find the PostgreSQL database.
  class { 'puppetdb::server':
    database_host => $postgres_host,
  }
}

This should be all it takes to get a 3-node, distributed installation of PuppetDB up and running. Note that, if you prefer, you could easily move two of these classes to a single node and end up with a 2-node setup instead.

Enable SSL connections

To use SSL connections for the single node setup, use the following manifest:

node <hostname> {
  # Here we configure puppetdb and PostgreSQL to use ssl connections
  class { 'puppetdb':
    postgresql_ssl_on => true,
    database_host => '<hostname>',
    database_listen_address => '0.0.0.0'
  }
  
  # Configure the Puppet master to use puppetdb
  class { 'puppetdb::master::config': }

To use SSL connections for the multiple nodes setup, use the following manifest:

$puppetdb_host = 'puppetdb.example.lan'
$postgres_host = 'postgres.example.lan'

node 'master.example.lan' {
  # Here we configure the Puppet master to use PuppetDB,
  # telling it the hostname of the PuppetDB node.
  class { 'puppetdb::master::config':
    puppetdb_server => $puppetdb_host,
  }
}

node 'postgres.example.lan' {
  # Here we install and configure PostgreSQL and the PuppetDB
  # database instance, and tell PostgreSQL that it should
  # listen for connections to the `$postgres_host`. 
  # We also enable SSL connections.
  class { 'puppetdb::database::postgresql':
    listen_addresses => $postgres_host,
    postgresql_ssl_on => true,
    puppetdb_server => $puppetdb_host
  }
}

node 'puppetdb.example.lan' {
  # Here we install and configure PuppetDB, and tell it where to
  # find the PostgreSQL database. We also enable SSL connections.
  class { 'puppetdb::server':
    database_host => $postgres_host,
    postgresql_ssl_on => true
  }
}

Beginning with PuppetDB

Whether you choose a single node development setup or a multi-node setup, a basic setup of PuppetDB will cause: PostgreSQL to install on the node if it’s not already there; PuppetDB postgres database instance and user account to be created; the postgres connection to be validated and, if successful, PuppetDB to be installed and configured; PuppetDB connection to be validated and, if successful, the Puppet master config files to be modified to use PuppetDB; and the Puppet master to be restarted so that it will pick up the config changes.

If your logging level is set to INFO or finer, you should start seeing PuppetDB-related log messages appear in both your Puppet master log and your puppetdb log as subsequent agent runs occur.

Cross-node Dependencies

It is worth noting that there are some cross-node dependencies, which means that the first time you add the module's configurations to your manifests, you may see a few failed puppet runs on the affected nodes.

PuppetDB handles cross-node dependencies by taking a sort of "eventual consistency" approach. There’s nothing that the module can do to control the order in which your nodes check in, but the module can check to verify that the services it depends on are up and running before it makes configuration changes--so that’s what it does.

When your Puppet master node checks in, it will validate the connectivity to the puppetdb server before it applies its changes to the Puppet master config files. If it can’t connect to puppetdb, then the puppet run will fail and the previous config files will be left intact. This prevents your master from getting into a broken state where all incoming puppet runs fail because the master is configured to use a puppetdb server that doesn’t exist yet. The same strategy is used to handle the dependency between the puppetdb server and the postgres server.

Hence the failed puppet runs. These failures should be limited to 1 failed run on the puppetdb node, and up to 2 failed runs on the Puppet master node. After that, all of the dependencies should be satisfied and your puppet runs should start to succeed again.

You can also manually trigger puppet runs on the nodes in the correct order (Postgres, PuppetDB, Puppet master), which will avoid any failed runs.

Upgrading

Upgrading from 4.x to 5.x

Significant parameter changes are listed below:

  • The PuppetDB module defaults to Puppet 4 pathing and assumes puppetserver is the master service by default
  • The PuppetDB module manages Postgres repos by default. To turn this behavior off, set manage_package_repo to false.
  • To specify a specific version of PuppetDB to manage, you'll need to use the puppetdb::globals class to set the version of PuppetDB you're using explicitly. The ability to configure the version in the puppetdb::server and puppetdb class have been removed.

For example if your config looked like this before:

class {'puppetdb':
    puppetdb_version => '3.2.4-1.el7',
}
class { 'puppetdb::master::config': }

and you'd still like to use the module with PuppetDB 3.2.4, all you'd have to change would be:

class { 'puppetdb::globals':
    version => '3.2.4-1.el7',
}
class { 'puppetdb' : }
class { 'puppetdb::master::config' : }

The globals class above takes into account the following PuppetDB 3 and Puppet 4 related changes: * The puppetdb::master:puppetdb_conf class has added a $legacy_terminus to support the PuppetDB 2.x terminus configuration. * The default test_url for the PuppetDBConnValidator has also been changed to /pdb/meta/v1/version but will default to /v3/version when using a PuppetDB 2.x version. * The configuration pathing for Puppet and PuppetDB has changed with Puppet 4 and PuppetDB 3, using PuppetDB 2.x or older assumes the old configuration pathing.

See the CHANGELOG file for more detailed information on changes for each release.

Upgrading from 3.x to 4.x

For this release, all dependency versions have been bumped to their latest. Significant parameter changes are listed below:

  • The PuppetDB module now only supports Puppet 3.7.1 or later
  • puppetlabs/postgresql 4.0.0 or later is now required
  • puppetlabs/inifile 1.1.3 or later is now required
  • puppetlabs/firewall 1.1.3 or later is now required
  • puppetlabs/stdlib 4.2.2 or later is now required
  • The parameter manage_firewall for the class puppetdb::database::postgresql has now been removed, since the PostgreSQL module no longer supports this.
  • The parameter open_postgres_port for the class puppetdb has also been removed, due to PostgreSQL changes.

See the CHANGELOG file for more detailed information on changes for each release.

Upgrading from 2.x to 3.x

For this release a major dependency has changed. The module pupppetlabs/postgresql must now be version 3.x. Upgrading the module should upgrade the puppetlabs/postgresql module for you, but if another module has a fixed dependency that module will have to be fixed before you can continue.

Some other changes include:

  • The parameter manage_redhat_firewall for the class puppetdb has now been removed completely in favor of open_postgres_port and open_ssl_listen_port.
  • The parameter manage_redhat_firewall for the class puppetdb::database::postgresql, has now been renamed to manage_firewall.
  • The parameter manage_redhat_firewall for the class puppetdb::server has now been removed completely in favor of open_listen_port and open_ssl_listen_port.
  • The internal class: puppetdb::database::postgresql_db has been removed. If you were using this, it is now defunct.
  • The class puppetdb::server::firewall has been marked as private, do not use it directly.
  • The class puppetdb::server::jetty_ini and puppetdb::server::database_ini have been marked as private, do not use it directly.

Upgrading from 1.x to 2.x

A major dependency has been changed, so now when you upgrade to 2.0 the dependency cprice404/inifile has been replaced with puppetlabs/inifile. This may interfere with other modules as they may depend on the old cprice404/inifile instead, so upgrading should be done with caution. Check that your other modules use the newer puppetlabs/inifile module as interoperation with the old cprice404/inifile module will no longer be supported by this module.

Depending on how you install your modules, changing the dependency may require manual intervention. Double check your modules contain the newer puppetlabs/inifile after installing this latest module.

Otherwise, all existing parameters from 1.x should still work correctly.

Usage

PuppetDB supports a large number of configuration options for both configuring the puppetdb service and connecting that service to the Puppet master.

puppetdb::globals

The puppetdb::globals class is intended to provide similar functionality to the postgresql::globals class in the puppetlabs-postgresql module by exposing a top-level entry-point into the module so that we can properly set defaults for the puppetdb::params class based on the version of puppetdb you are using. This setting defaults to present.

You must declare the class to use it:

class { 'puppetdb::globals': }

puppetdb

The puppetdb class is intended as a high-level abstraction (sort of an 'all-in-one' class) to help simplify the process of getting your puppetdb server up and running. It wraps the slightly-lower-level classes puppetdb::server and puppetdb::database::*, and it'll get you up and running with everything you need (including database setup and management) on the server side. For maximum configurability, you may choose not to use this class. You may prefer to use the puppetdb::server class directly, or manage your puppetdb setup on your own.

You must declare the class to use it:

class { 'puppetdb': }

puppetdb::server

The puppetdb::server class manages the PuppetDB server independently of the underlying database that it depends on. It will manage the PuppetDB package, service, config files, etc., but will still allow you to manage the database (e.g. PostgreSQL) however you see fit.

class { 'puppetdb::server':
  database_host => 'pg1.mydomain.com',
}

puppetdb::master::config

The puppetdb::master::config class directs your Puppet master to use PuppetDB, which means that this class should be used on your Puppet master node. It’ll verify that it can successfully communicate with your PuppetDB server, and then configure your master to use PuppetDB.

Using this class allows the module to manipulate the puppet configuration files puppet.conf and routes.yaml. The puppet.conf changes are supplemental and should not affect any of your existing settings, but the routes.yaml file will be overwritten entirely. If you have an existing routes.yaml file, you will want to take care to use the manage_routes parameter of this class to prevent the module from managing that file, and you’ll need to manage it yourself.

class { 'puppetdb::master::config':
  puppetdb_server => 'my.host.name',
  puppetdb_port   => 8081,
}

puppetdb::database::postgresql

The puppetdb::database::postgresql class manages a PostgreSQL server for use by PuppetDB. It can manage the PostgreSQL packages and service, as well as creating and managing the PuppetDB database and database user accounts.

class { 'puppetdb::database::postgresql':
  listen_addresses => 'my.postgres.host.name',
}

Implementation

Resource overview

In addition to the classes and variables mentioned above, PuppetDB includes:

puppetdb::master::routes

Configures the Puppet master to use PuppetDB as the facts terminus. WARNING: the current implementation simply overwrites your routes.yaml file; if you have an existing routes.yaml file that you are using for other purposes, you should not use this.

class { 'puppetdb::master::routes':
  puppet_confdir => '/etc/puppet'
}

The optional parameter routes can be used to specify a custom route configuration. For example to configure routes for masterless puppet.

class { 'puppetdb::master::routes':
  routes => {
    'apply' => {
      'facts' => {
        'terminus' => 'facter',
        'cache'    => 'puppetdb_apply',
      }
    }
  }
}

puppetdb::master::storeconfigs

Configures the Puppet master to enable storeconfigs and to use PuppetDB as the storeconfigs backend.

class { 'puppetdb::master::storeconfigs':
  puppet_conf => '/etc/puppet/puppet.conf'
}

puppetdb::server::validate_db

Validates that a successful database connection can be established between the node on which this resource is run and the specified PuppetDB database instance (host/port/user/password/database name).

puppetdb::server::validate_db { 'validate my puppetdb database connection':
  database_host     => 'my.postgres.host',
  database_username => 'mydbuser',
  database_password => 'mydbpassword',
  database_name     => 'mydbname',
}

Custom Types

puppetdb_conn_validator

Verifies that a connection can be successfully established between a node and the PuppetDB server. Its primary use is as a precondition to prevent configuration changes from being applied if the PuppetDB server cannot be reached, but it could potentially be used for other purposes such as monitoring.

Limitations

Currently, PuppetDB is compatible with:

Puppet Version: 4.10+

Platforms:

  • EL 5, 6, 7
  • Debian 6, 7
  • Ubuntu 10.04, 12.04, 14.04

Community Maintained Platforms:

  • Archlinux
  • OpenBSD 5.6-current and newer
  • SLES 11 SP1

Development

Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.

We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.

You can read the complete contribution guide.

puppetlabs-puppetdb's People

Contributors

ajroetker avatar austb avatar bastelfreak avatar binford2k avatar buzzdeee avatar christianberg avatar cprice404 avatar csmithatsquiz avatar david22swan avatar dhollinger avatar ekohl avatar filipovici-andrei avatar gcoxmoz avatar ghoneycutt avatar h0tw1r3 avatar hunner avatar jhooyberghs avatar jhunt-steds avatar jonathannewman avatar kbarber avatar mcanevet avatar mullr avatar nicklewis avatar reidmv avatar rwaffen avatar senior avatar smortex avatar stdietrich avatar wkalt avatar zak-kent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppetlabs-puppetdb's Issues

Should support specifying the paths to the SSL cert, key & CA

There doesn't seem to be a way to specify the path to the SSL certificate, key or CA. In the mean time, I've made this 🎉 (many thanks to @insertjokehere for basicca)

  $puppetdb_keydir = '/etc/puppetdb/ssl'

  file { $puppetdb_keydir:
    ensure  => directory,
    require => Package[$puppetdb::params::puppetdb_package]
  }

  basicca::selfsignedcert { "puppetdbcert":
    keypath     => "${puppetdb_keydir}/private.key",
    csrpath     => "${puppetdb_keydir}/request.csr",
    certpath    => "${puppetdb_keydir}/public.crt",
    keysize     => 2048,
    issuelength => 365,
    subject     => "/commonName=${fqdn}/",
    require     => File[$puppetdb_keydir]
  }

  class { 'puppetdb': }

  ini_setting { 'puppetdb_ssl_key':
    path    => "${puppetdb::params::confdir}/jetty.ini",
    ensure  => present,
    section => 'jetty',
    setting => 'ssl-key',
    value   => "${puppetdb_keydir}/private.key",
    require => Basicca::Selfsignedcert['puppetdbcert'],
  }

  ini_setting { 'puppetdb_ssl_cert':
    path    => "${puppetdb::params::confdir}/jetty.ini",
    ensure  => present,
    section => 'jetty',
    setting => 'ssl-cert',
    value   => "${puppetdb_keydir}/public.crt",
    require => Basicca::Selfsignedcert['puppetdbcert'],
  }

  # Make sure the certs are generated before starting PuppetDB
  Basicca::Selfsignedcert['puppetdbcert'] ->
  Class['puppetdb::server::jetty_ini'] ->
  Ini_Setting['puppetdb_ssl_key'] ->
  Ini_Setting['puppetdb_ssl_cert'] ->
  Service[$puppetdb::params::puppetdb_service]

Update and add spec tests

The current spec tests don't pass and are not current to the design of the module.

The current tests should be updated for the current design of the module, and new tests should be added for the many un-spec-coveraged components.

Unable to set multiple -XX JVM options

I want to be able to set the following JVM options:

-XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution

When I tried using

$java_args = {'-Xmx' => '11g', '-Xmn' => '2g', '-XX:TargetSurvivorRatio' => '=90', '-XX:' => '+PrintGCDateStamps', '-XX:' => '+PrintGCDetails', '-XX:' => '+PrintTenuringDistribution' }
class { 'puppetdb::server':
  java_args => $java_args,
}

I got some settings multiple times:

$ grep ARGS /etc/default/puppetdb
JAVA_ARGS="-Xmx11g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -XX:TargetSurvivorRatio=90 -Xmn2g"
# puppetd -t
[...]
notice: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:']/value: value changed '+HeapDumpOnOutOfMemoryError' to '+PrintGCDetails'
info: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:']: Scheduling refresh of Service[puppetdb]
notice: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:TargetSurvivorRatio']/ensure: created
info: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:TargetSurvivorRatio']: Scheduling refresh of Service[puppetdb]
[...]
$ grep ARGS /etc/default/puppetdb
JAVA_ARGS="-Xmx11g -XX:+PrintGCDetails -XX:+PrintGCDetails -XX:+PrintGCDetails -Xmn2g -XX:TargetSurvivorRatio=90"

Doing another puppet run with the same settings results in:

# puppetd -t
[...]
notice: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:']/value: value changed '+PrintGCDetails' to '+PrintGCDateStamps'
info: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:']: Scheduling refresh of Service[puppetdb]
notice: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:TargetSurvivorRatio']/ensure: created
info: /Stage[main]/Puppetdb::Server/Ini_subsetting['-XX:TargetSurvivorRatio']: Scheduling refresh of Service[puppetdb]
[...]
$ grep ARGS /etc/default/puppetdb
JAVA_ARGS="-Xmx11g -XX:+PrintGCDateStamps -XX:+PrintGCDateStamps -XX:+PrintGCDateStamps -Xmn2g -XX:+PrintGCDateStamps -XX:TargetSurvivorRatio=90"

For some extra points: I also want to set a GC logfile like so:

'-Xloggc:' => '/var/tmp/puppetdb-gc-`date +\'%Y-%m-%d-%H_%M\'`.log'

At this moment I would feel better with having a simple $java_args_string parameter that simply sets the JAVA_ARGS in /etc/default/puppetdb, because people who tune these settings normally know what they are doing (or should).

Error while resolving custom fact fact='puppetdb_version'

Debian 12, Puppetserver 7.9.5, PuppetDB 7.12.1.

Error: Facter: Error while resolving custom fact fact='puppetdb_version', resolution='<anonymous>': undefined method `strip' for nil:NilClass

    output.split(':').last.strip
setcode do
  output = Facter::Core::Execution.execute('puppetdb --version')
  output.split(':').last.strip                                                                                                                                                                                                                                                                      
end
$ /usr/sbin/puppetdb --version
Available subcommands:
  version                 Display version information
  services                Run PuppetDB
  upgrade                 Upgrade to latest version and exit
  benchmark               Run development-only benchmarking tool
  fact-storage-benchmark
  help                    Display usage summary
For help on a given subcommand, invoke it with -h

$ /usr/sbin/puppetdb version
version=7.12.1
target_schema_version=80

Add option to specify postgresql version

I'd like to be able to use postgressql v9.3 with puppetdb.

This module can only install the default version that comes with the OS as it installs, eg. postgresql-server. Later versions are available direct from the postgres project and use packages with the version in them, eg. postgresql93-server.

A lot of warnings and errors on the puppet-lint output

Puppet-lint is failing with a lot of errors and warnings.

$ puppet-lint --with-filename --no-80chars-check modules/puppetdbmodules/puppetdb
/manifests/database/postgresql.pp - WARNING: class inheriting from params class on line 47
modules/puppetdb/manifests/database/postgresql_db.pp - WARNING: class inheriting from params class on line 32
modules/puppetdb/manifests/init.pp - WARNING: class inheriting from params class on line 114
modules/puppetdb/manifests/init.pp - WARNING: selector inside resource block on line 176
modules/puppetdb/manifests/init.pp - WARNING: indentation of => is not properly aligned on line 171
modules/puppetdb/manifests/master/config.pp - WARNING: class inheriting from params class on line 78
modules/puppetdb/manifests/master/config.pp - WARNING: selector inside resource block on line 88
modules/puppetdb/manifests/master/config.pp - WARNING: selector inside resource block on line 89
modules/puppetdb/manifests/master/config.pp - WARNING: selector inside resource block on line 106
modules/puppetdb/manifests/master/config.pp - WARNING: selector inside resource block on line 116
modules/puppetdb/manifests/master/config.pp - WARNING: selector inside resource block on line 127
modules/puppetdb/manifests/master/config.pp - WARNING: selector inside resource block on line 138
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 85
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 86
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 87
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 88
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 89
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 90
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 91
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 92
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 94
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 95
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 96
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 97
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 98
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 132
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 133
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 134
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 135
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 136
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 137
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 138
modules/puppetdb/manifests/master/config.pp - ERROR: tab character found on line 139
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 85
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 86
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 87
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 88
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 89
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 90
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 91
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 92
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 94
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 95
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 96
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 97
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 98
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 132
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 133
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 134
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 135
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 136
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 137
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 138
modules/puppetdb/manifests/master/config.pp - ERROR: two-space soft tabs not used on line 139
modules/puppetdb/manifests/master/config.pp - WARNING: indentation of => is not properly aligned on line 88
modules/puppetdb/manifests/master/config.pp - WARNING: indentation of => is not properly aligned on line 89
modules/puppetdb/manifests/master/config.pp - WARNING: indentation of => is not properly aligned on line 106
modules/puppetdb/manifests/master/config.pp - WARNING: indentation of => is not properly aligned on line 116
modules/puppetdb/manifests/master/config.pp - WARNING: indentation of => is not properly aligned on line 127
modules/puppetdb/manifests/master/config.pp - WARNING: indentation of => is not properly aligned on line 138
modules/puppetdb/manifests/master/puppetdb_conf.pp - WARNING: class inheriting from params class on line 29
modules/puppetdb/manifests/master/report_processor.pp - WARNING: class inheriting from params class on line 25
modules/puppetdb/manifests/master/report_processor.pp - WARNING: selector inside resource block on line 33
modules/puppetdb/manifests/master/report_processor.pp - WARNING: double quoted string containing no variables on line 27
modules/puppetdb/manifests/master/report_processor.pp - WARNING: indentation of => is not properly aligned on line 31
modules/puppetdb/manifests/master/report_processor.pp - WARNING: indentation of => is not properly aligned on line 32
modules/puppetdb/manifests/master/report_processor.pp - WARNING: indentation of => is not properly aligned on line 33
modules/puppetdb/manifests/master/report_processor.pp - WARNING: ensure found on line but it's not the first attribute on line 33
modules/puppetdb/manifests/master/routes.pp - WARNING: class inheriting from params class on line 24
modules/puppetdb/manifests/master/storeconfigs.pp - WARNING: class inheriting from params class on line 23
modules/puppetdb/manifests/params.pp - ERROR: trailing whitespace found on line 81
modules/puppetdb/manifests/params.pp - ERROR: trailing whitespace found on line 92
modules/puppetdb/manifests/params.pp - ERROR: trailing whitespace found on line 101
modules/puppetdb/manifests/server/database_ini.pp - WARNING: class inheriting from params class on line 51
modules/puppetdb/manifests/server/firewall.pp - WARNING: class inheriting from params class on line 8
modules/puppetdb/manifests/server/firewall.pp - WARNING: class not documented on line 1
modules/puppetdb/manifests/server/firewall.pp - ERROR: trailing whitespace found on line 3
modules/puppetdb/manifests/server/firewall.pp - ERROR: trailing whitespace found on line 30
modules/puppetdb/manifests/server/firewall.pp - ERROR: trailing whitespace found on line 38
modules/puppetdb/manifests/server/jetty_ini.pp - WARNING: class inheriting from params class on line 41
modules/puppetdb/manifests/server/jetty_ini.pp - ERROR: trailing whitespace found on line 36
modules/puppetdb/manifests/server/validate_db.pp - WARNING: class inheriting from params class on line 52
modules/puppetdb/manifests/server.pp - WARNING: class inheriting from params class on line 123
modules/puppetdb/manifests/server.pp - ERROR: trailing whitespace found on line 193
modules/puppetdb/tests/puppetdb-postgres-distributed.pp - ERROR: trailing whitespace found on line 14
modules/puppetdb/tests/puppetdb-postgres-distributed.pp - ERROR: trailing whitespace found on line 26
modules/puppetdb/tests/puppetdb-postgres-distributed.pp - ERROR: trailing whitespace found on line 2

default location for embedded database violates the FHS

The default location for the embedded database defaults to /usr/share/puppetdb/db/db
This is the worst place to put this and it violates the LSB and FHS and most sensible defaults for databases.
According to the FHS (the Filesystem Hierarchy Standard) /usr/share is for Architecture-independent data.

It should be in /var/lib/puppetdb which is the default location in the installed package.
/var/lib is for Variable state information according to the FHS.

It is also impossible to override this without editing the params class please make it editible or change the default to a more sensible location.

Thanks

installing puppetdb and puppetmaster at the same time fails

I'm trying to create a Puppet manifest that will install the puppetmaster package/service and PuppetDB for me at the same time. It seems this is not possible because of a dependency cycle issue. Basically I want the puppetdb and puppetdb::master::config class to depend on a started puppetmaster service. This however results in a dependency cycle because of the following code: http://pastebin.com/b75MUCsk

The puppetmaster needs to be started to create the certificates which are required by the puppetdb class to create a keystore.

Any suggestions/tips/fixes are welcome since I don't see a proper solution yet. I'm using this manifest file on a clean CentOS 6.4: http://pastebin.com/95tcv1Jj

Declaring puppetdb::server does not inherit params.pp

We have configured the puppetdb::params.pp with the settings for our postgresql server. When we attempt to install the puppetdb server via declaring puppetdb::server, it does not properly inherit the parameters from params.pp, which results in the following errors:

Notice: /Stage[main]/Puppetdb::Server::Validate_db/Postgresql::Validate_db_connection[validate puppetdb postgres connection]/Exec[validate postgres connection for localhost/puppetdb]/returns: Unable to connect to defined database using: /usr/pgsql-9.3/bin/psql --tuples-only --quiet -h localhost -U puppetdb -p 5432 --dbname puppetdb
Error: echo 'Unable to connect to defined database using: /usr/pgsql-9.3/bin/psql --tuples-only --quiet -h localhost -U puppetdb -p 5432 --dbname puppetdb ' && false returned 1 instead of one of [0]

Manifest should validate the passed parameters

I did something stupid:

  class { 'puppetdb':
    disable_ssl    => true,
    listen_port    => 'localhost',
    listen_address => '8000'
  }

Of course, 'localhost' isn't a valid port identifier and I don't have any devices called '8000'. Since I messed up, I got this error from PuppetDB:

2013-11-28 13:11:18,959 ERROR [main] [puppetlabs.utils] Uncaught exception
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
        at com.puppetlabs.jetty$plaintext_connector.invoke(jetty.clj:61)
        at com.puppetlabs.jetty$create_server.invoke(jetty.clj:70)
        at ring.adapter.jetty$run_jetty.invoke(jetty.clj:79)
        at com.puppetlabs.jetty$run_jetty$fn__4565.invoke(jetty.clj:96)
        at clojure.core$with_redefs_fn.invoke(core.clj:6751)
        at com.puppetlabs.jetty$run_jetty.invoke(jetty.clj:95)
        at com.puppetlabs.puppetdb.cli.services$_main$fn__12093.invoke(services.clj:512)
        at clojure.core$binding_conveyor_fn$fn__4107.invoke(core.clj:1836)
        at clojure.lang.AFn.call(AFn.java:18)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)
2013-11-28 13:11:18,963 INFO  [Thread-4] [cli.services] Shutdown request received; puppetdb exiting.

Which could have been avoided if puppet threw an error since I passed a string as a port number. 😄

Add support for enabling report processor

This will entail modifying the puppetdb::master::config class in such a way as to support adding the "puppetdb" report processor to the list of report processor. Big "gotchas":

  1. Must be backward compatible with previous versions of puppetdb (so basically, it can't add the report processor if the version of puppetdb does not support it, or something similar).
  2. Must leave any existing report processors intact (meaning that it will somehow need to parse the existing puppet.conf file before considering modifying the setting).

puppetdb and puppet postgres authentication method mismatch

Fresh installation of puppet 7 with puppetdb and postgres backend caused a reoccurring puppet change to appear

/Stage[main]/Puppetdb::Database::Postgresql/Postgresql::Server::Db[puppetdb]/Postgresql::Server::Role[puppetdb]/Postgresql_psql[ALTER ROLE puppetdb ENCRYPTED PASSWORD ****]/command: changed [redacted] to [redacted]

Packages in use

puppetserver-7.15.0-1.el7.noarch
puppetdb-termini-7.16.0-1.el7.noarch
puppet-agent-7.28.0-1.el7.x86_64
puppetdb-7.17.1-1.el7.noarch
postgresql15-server-15.6-1PGDG.rhel7.x86_64
postgresql15-libs-15.6-1PGDG.rhel7.x86_64
postgresql15-contrib-15.6-1PGDG.rhel7.x86_64
postgresql15-15.6-1PGDG.rhel7.x86_64

With basic puppetdb config

    class { 'puppetdb': }
    class { 'puppetdb::master::config': }

and in hiera node definition
puppetdb::postgres_version: '15'

I think the issue is due to the following change made for postgres puppet module puppetlabs/puppetlabs-postgresql#1402

To fix I had to set in hiera

postgresql::server::password_encryption: 'md5'

puppetdb basic configuration in theory should be matching configuration or documentation at https://www.puppet.com/docs/puppetdb/7/configure_postgres should be considered updating.

Error 'has no parameter named port'

Describe the Bug

When trying to compile the catalog with puppetdb 8.0.0 and postgresql 9.2.0, it fails with error 'has no parameter named 'port'.

The error is located in file /etc/puppetlabs/code/environments/prod/modules/puppetdb/manifests/database/postgresql.pp at line 149

node_ttl and node_purge_ttl not working

The parameters are set in the class puppetdb or puppetdb::server however it is not being sent to the puppetdb::server::database_ini.

And in puppetdb::server::database_ini it uses the default value from params.pp instead of any value being received by the class.

Service {'puppetdb': } on Ubuntu 12.04 will try to start the service even though it seems to be up

While working on #54 I found that specifically on Ubuntu 12.04 that the second run after PuppetDB is installed and running is convinced the service is not running, and tries to start it again.

This occurs even though ps auxw, service puppetdb status and even puppet resource service puppetdb show it to be running right before the puppet run. I spent a day trying to track it down with no luck, but it still exists. The workaround for me was to run the second puppet run with --debug, which alludes to an attenuation solution - however putting in sleeps beforehand do not work. Its a strange one, but needs fixing none-the-less.

Modules version 7.14.0 not uploaded to the forge

Hello,

The last release in the forge is 7.13.0, but here there is a version 7.14.0 tagged.

This version should be uploaded to the forge as 7.13.0 is not installable due to dependency issues

Please upload 7.14.0 to the forge

Module is broken due to $::is_pe on puppet opensource

When trying to use this module it complains due to not being able to install pe-puppetdb and pe-puppetdb-terminus.

I think the problem is this line in params.pp:

  if $::is_pe {

The problem as far as I can see is that $::is_pe is not a bool but a string.

Possible fix would be something like:

if $::is_pe == 'true' {

But might be that is better to change the fact and make it return bool which is in stdlib

Define multiple puppetdb servers in hiera

Use Case

As far as I know as of now you can only define a single PuppetDB server in hieradata, I have two PuppetDB servers for the same Puppet Master. It would be good to support two or more.

Describe the Solution You Would Like

support something like the following in hiera:

puppet_db:
  server
    - server1
    - server2
    - server N

Then in the manifest file we can do the following:

$puppet_db = hiera_hash('puppet_db')

  class { 'puppet::server::puppetdb':
      * => $puppet_db 
    }

Describe Alternatives You've Considered

Not managing /etc/puppetlabs/puppet/puppetdb.conf with this module

Additional Context

Maybe there is a solution for this that I couldn't find in the documentation

manage_redhat_firewall does not seem to be working

When I run a manifest that contains:

class { 'puppetdb':
      database               => 'postgres',
      manage_redhat_firewall => false,
}

It appears that the module is actually still attempting to manage the firewall for both puppetdb and postgres.

Improve params.pp to detect PE

Currently it is possible (thanks to @hunner ) to use this module with PE by passing in parameters for the pe-related paths/package names. We should be able to do some stuff in params.pp to try to detect PE automatically and set up the appropriate defaults; thus the params would be available for explicit override but wouldn't be required.

puppetdb postgresql-server version parameter

I would like to be able to set the postgresql version that would be used by puppetdb
At the moment puppetdb module just calls postgresql::server and
installs the default postgresql server for the os.

I would like to be able to say postgresqlversion = 9.1 and
puppetdb would call:

class { 'postgresql':
  $version = $postgresqlversion_from_puppetdb
}->
class { 'postgresql::server': }

Support puppetlabs-postgresql version 10

Could support for puppetlabs-postgresql version 10 be added?

In the latest version of puppetlabs-puppetdb 7.14.0, versions < 10.0.0 are supported.

I'd like to use Puppet 8 - which is supported by puppetlabs-puppetdb, however when looking through the dependency chain:

puppetlabs-puppetdb requires puppetlabs-postgresql <=10
The latest version < 10 => 9.2.0 requires systemd less than < 6.0.0
The latest version of systemd < 6.0.0 => 5.2.0 states that it requires some version of Puppet 7 Puppet >= 7.0.0 < 8.0.0, not Puppet 8

So there is a mismatch here.

Create accurate dependency on stdlib

The dependency in Modulefile has gone from >= 3.2.x to >= 1.0.0 neither of which seem like they're the proper dependency. Some testing should be done to verify which version of stdlib this module will work with, and set the dependencies to those.

btw, >= 3.2.x is not a valid dependency, but 3.2.x is.

Install fails if postgres_version is not set

Describe the Bug

Automatic setup of PostgreSQL does not work unless an updated version is specified

Expected Behavior

Minimal install works:

class { 'puppetdb':
}

Steps to Reproduce

Steps to reproduce the behavior:

  1. Try a minimal install
class { 'puppetdb':
}

PostgreSQL install fails as packages are not in the repositories

  1. Specify a supported PostgreSQL version (>= 12)
class { 'puppetdb':
  postgres_version  => '13',
}

and install succeeds

Environment

  • Version [7.13.0]
  • Platform [EL 9.x]

Additional Context

The most up-to-date puppetlabs-postgresql supported by this module (8.3.0) defaults to postgres 11, as it was supported at release time. Now it is EOL, so packages have been removed from the repositories and install fails

puppetdb fails to start after switching to v8.1.0

Describe the Bug

Upgrading to module v8.1.0 renders puppetdb unoperational , service doesn't start
The following log entries are observed in puppetdb.log

2024-06-01T14:24:13.865Z INFO  [p.p.c.services] PuppetDB version 8.5.1
2024-06-01T14:24:13.867Z INFO  [p.p.c.services] Ensuring default database is up to date
2024-06-01T14:24:13.869Z INFO  [c.z.h.HikariDataSource] PDBMigrationsPool: default - Starting...
2024-06-01T14:24:13.883Z INFO  [c.z.h.HikariDataSource] PDBMigrationsPool: default - Start completed.
2024-06-01T14:24:16.900Z ERROR [p.p.c.services] Will retry database connection after temporary failure: java.sql.SQLTransientConnectionException: PDBMigrationsPool: default - Connection is not available, request timed out after 3014ms.
2024-06-01T14:24:19.900Z ERROR [p.p.c.services] Will retry database connection after temporary failure: java.sql.SQLTransientConnectionException: PDBMigrationsPool: default - Connection is not available, request timed out after 3000ms.

Reverting back to v8.0.1 restores functionality

Environment

postgresql14-libs-14.12-1PGDG.rhel9.x86_64
postgresql14-14.12-1PGDG.rhel9.x86_64
postgresql14-server-14.12-1PGDG.rhel9.x86_64
postgresql14-contrib-14.12-1PGDG.rhel9.x86_64
puppet8-release-1.0.0-8.el9.noarch
puppet-agent-8.6.0-1.el9.x86_64
puppetdb-termini-8.5.1-1.el9.noarch
puppetserver-8.6.0-1.el9.noarch
puppetdb-8.5.1-1.el9.noarch

AlmaLinux 9.4

Stop overwriting the routes.yaml file

The current implementation of this module overwrite routes.yaml with the exact settings needed by PuppetDB. If a user already has a routes.yaml file that is managing other things besides the the facts terminus, their settings will be blown away.

We should handle this more gracefully. It ought to be pretty simple to put together a yaml module that had a resource type for dealing with an individual yaml setting. If we did that, then the PuppetDB module could use that to set only the relevant settings without overriding any existing settings.

puppetdb::master::config tries to validate using SSL port even when SSL is disabled

Manifest:

class { 'puppetdb':
  listen_address => $fqdn,
  disable_ssl    => true,
  before         => Class["puppetdb::master::config"],
}

Puppet run:

$ sudo puppet agent -t --environment=puppetdb
...
Info: /File[puppet_config]: Scheduling refresh of Service[puppet_service]
Notice: /Stage[main]/Puppet/Service[puppet_service]: Would have triggered 'refresh' from 1 events
Notice: Unable to connect to puppetdb server (fqdn:8081): Connection refused - connect(2)
...

Expected:
Validator attempts a plaintext connection to port 8080 when $puppetdb::disble_ssl = true.

module does not properly setup keystore

on ubuntu precise, with a clean install, and this version of puppetdb

# dpkg-query --show puppetdb
puppetdb    1.3.2-1puppetlabs1

When using master from the module like this:

apt::source { 'puppetlabs':
  location   => 'http://apt.puppetlabs.com',
  repos      => 'main',
  key        => '4BD6EC30',
  key_server => 'pgp.mit.edu',
  tag        => ['puppet'],
}
apt::source { 'puppetlabs-deps':
  location   => 'http://apt.puppetlabs.com',
  repos      => 'dependencies',
  key        => '4BD6EC30',
  key_server => 'pgp.mit.edu',
  tag        => ['puppet'],
}

class { 'puppetdb':
  listen_address     => '127.0.0.1',
  ssl_listen_address => '127.0.0.1',
  database_password  => 'datapass',
}

The module indicates that everything works as expected (including the puppetdb service), but in reality, the service fails b/c the ssl certificates are not setup correctly.

2013-06-05 23:29:56,772 WARN [ActiveMQ Task-3] [broker.TransportConnection] Failed to add Connection ID:build-server-60050-1370474996008-5:1, reason: java.lang.IllegalStateException: Timer already cancelled.
2013-06-05 23:29:57,962 ERROR [main] [puppetlabs.utils] Uncaught exception
java.lang.IllegalStateException: SSL doesn't have a valid keystore
at org.eclipse.jetty.util.ssl.SslContextFactory.checkKeyStore(SslContextFactory.java:1167)
at org.eclipse.jetty.server.ssl.SslSelectChannelConnector.doStart(SslSelectChannelConnector.java:606)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.Server.doStart(Server.java:272)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at ring.adapter.jetty$run_jetty.invoke(jetty.clj:85)
at com.puppetlabs.jetty$run_jetty$fn__4108.invoke(jetty.clj:92)
at clojure.core$with_redefs_fn.invoke(core.clj:6585)
at com.puppetlabs.jetty$run_jetty.invoke(jetty.clj:91)
at com.puppetlabs.puppetdb.cli.services$_main$fn__10304.invoke(services.clj:423)
at clojure.core$binding_conveyor_fn$fn__3989.invoke(core.clj:1819)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)

Add option to disable SSL in Jetty

When connecting standalone Puppet nodes to PuppetDB, one option suggested by the PuppetDB documentation is to disable SSL in the jetty section of PuppetDB and to setup a reverse HTTP proxy like Apache or Nginx to handle the SSL encryption (see http://docs.puppetlabs.com/puppetdb/1.2/connect_puppet_apply.html#option-a-set-up-an-ssl-proxy-for-puppetdb).

The puppetdb module currently doesn't support removing the SSL-related settings from the configuration, causing PuppetDB to fail on startup when no Java keystore is present.

The attached pull request introduces an option to disable SSL serving completely.

Puppetdb module always trigger a change event even when postgress was installed and configured successfully in previous iterations

The following can be seen on my puppet dashboard logs:
"
Execvalidate postgres connection for localhost/puppetdb
Property Message
returns executed successfully
"
This creates a change event in every puppet agent run, so the puppet dashboard will always be blue (instead of green) for the afected node.

Here you are the nodes.pp
node 'puppetdb.example.com' inherits default {
class { 'puppetdb': }
class { 'puppetdb::master::config': }
}

PE 2.7.0: redeclaring pe-httpd service

Using the puppetdb module on a PE-2.7.0 node causes the following error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Service[pe-httpd] is already declared in file /etc/puppetlabs/puppet/modules/puppetdb/manifests/master/config.pp at line 116; cannot redeclare at /opt/puppet/share/puppet/modules/request_manager/manifests/init.pp:23 on node classroom.puppetlabs.vm

request_manager is a part of Puppet Enterprise, and adds the new "node requests" certificate management feature.

ALTER ROLE query is always ran

I'm not sure if this is a puppetlabs-puppetdb or a puppetlabs-postgresql bug, but...

Every time I run the puppetdb class with or without a specified password, the "ALTER ROLE" query is always run. This could be because the puppetdb user doesn't have proper access to the tables to check for user existence?

Override puppet_service_name

The puppet_service_name should be more flexible for the community version. Based on installation recommendations, it should be possible to swap out puppetmaster for httpd or nginx.

With the current detection code in params.pp puppet_service_name appears to be hard coded:

  if $::puppetversion =~ /Puppet Enterprise/ {
    $puppetdb_package     = 'pe-puppetdb'
    $puppetdb_service     = 'pe-puppetdb'
    $confdir              = '/etc/puppetlabs/puppetdb/conf.d'
    $puppet_service_name  = 'pe-httpd'
    $puppet_confdir       = '/etc/puppetlabs/puppet'
    $terminus_package     = 'pe-puppetdb-terminus'
    $embedded_subname     = 'file:/opt/puppet/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
  } else {
    $puppetdb_package     = 'puppetdb'
    $puppetdb_service     = 'puppetdb'
    $confdir              = '/etc/puppetdb/conf.d'
    $puppet_service_name  = 'puppetmaster'
    $puppet_confdir       = '/etc/puppet'
    $terminus_package     = 'puppetdb-terminus'
    $embedded_subname     = 'file:/usr/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.