This commit removes the dependency cycle caused by a typo in the config
name for config.ini and properly threads through the vardir setting to
the puppetdb::server::global class.
Much like read-database.ini, we need to ensure the permissions for puppetdb.ini and others are set explicitly
to ensure permissions are still correct after configuration. Without this users with different umask
settings may find their files are no longer accessible after the module runs.
This patch fixes the globally for all the ini files we currently manage (repl.ini is not managed fwiw).
This also fixes a bug whereby we were missing puppetdb::server::global from the main server class, it adds this
back and fixes the tests to ensure we don't lose it.
Signed-off-by: Ken Barber <ken@bob.sh>
Add the option to set up a certificate whitelist file and configure it
in PuppetDB so that only specific hosts (i.e. the Puppet master(s)) have
access.
This patch fixes some of the lint warnings/errors we've been getting on the
forge.
In some cases I've fixed real bugs also, in particular double quotes/single
quotes in cases, which would have broken variable interpolation.
Signed-off-by: Ken Barber <ken@bob.sh>
This commit adds a globals class to PuppetDB which allows us to change
the param defaults for the module depending on what version of PuppetDB
they are using (similar to the PostgreSQL module).
This commit also changes the default PuppetDB 3.x configuration pathing
to assume AIO Puppet.
This commit updates the handling of the `test_url` parameter to be
smarter, using the PuppetDB `2.x` default for PuppetDB `2.x` and using
the `3.x` default for PuppetDB `3.x`.
This provides an override mechanism for providing a custom path to HSQLDB.
This allows users to provide any path to their HSQLDB database. It is needed
specifically for managing the as-yet-unreleased version of PuppetDB as well.
Signed-off-by: Ken Barber <ken@bob.sh>
This fixes the ordering for the read_database_ini class, and fixes a small
notification problem with config_ini as well.
Signed-off-by: Ken Barber <ken@bob.sh>
command-processing section.
Added new class server/config_ini.pp to manage contents of the config.ini.
Three new parameters added:
* command_threads
* store_usage
* temp_usage
All three default to 'undef'. This makes sure (potential) custom settings
done to that file with regard to above three variables are 'absent',
and let PuppetDB built-in defaults take care.
Documentation to the README.md added, as well as unit tests.
My use-case was, that I have on some nodes a too small /var partition,
so I had to lower the values of store-usage and temp-usage in the config.ini
manually.
puppetdb::server calls puppetdb::server:jetty_ini,
jetty_ini is able to set ssl_protocols, but this param isn't
present in the puppetdb::server class nor in the puppetdb class
This provides a number of cleanups as the code has been unloved for a while.
I've added the ssl-* parameters the robinbowes added in his last patch to the
docs, and found some other cleanups as well where applicable.
I've added the ability to override the test_url also, so that in the future
if a user wishes to they can customize this.
Signed-off-by: Ken Barber <ken@bob.sh>
is_pe being a fact, its smarter her to coerce the value of it too a boolean, in
case we still receive the value as a string. In the future structured facts
will become the norm.
I've also removed the patch against the values for puppetdb_service_status, matching
against a bareword boolean while it looks good, if the value is indeed a boolean the
in will fail in the current parser. This can be brought up again in the future.
Signed-off-by: Ken Barber <ken@bob.sh>
The tests were failing on Ubuntu, and I noticed that the OOM killer
was killing java. This patch increases the memory size for each
image to avoid this.
Signed-off-by: Ken Barber <ken@bob.sh>
This updates the module to be able to use puppetlabs-postgresql.
Since this change is a major change, it marks this patch as a breaking change.
I have prepared a suitable amount of upgrade notes for upgrading to this later
version of the module plus removed anything marked deprecated.
As cleanup, I've removed the troublesome 'tests' directory in favour of good
README.md documentation. I've also removed any puppet docs from each module
until such times as puppet docs become automated through the forge. This is
just to avoid contributors having to double their efforts - the README.md
is the authority now.
Signed-off-by: Ken Barber <ken@bob.sh>
PostgreSQL supports secure connections through SSL. For PuppetDB
to connect with SSL, "?ssl=true" has to be specified on the
connection string.
This patch adds such a switch, by default PuppetDB will not use SSL
to connect to the database.
This patch adds all the missing parameters now defined in the 1.4.0 release.
This includes some new database parameters mainly, but also adds gc_interval
to the `puppetdb` and `puppetdb::server` classes, as previously this wasn't
configurable using this method.
To avoid documentation duplication the Puppet headers have been removed in
favour of documenting classes from the README.md. Until such times as the
forge can turn Puppet docs into HTML automatically, this is just duplicate
noise and prone to update slippage. The README.md is more authoritative in
this area and is pubicly displayed on the forge project page so it should be
used for now.
Signed-off-by: Ken Barber <ken@bob.sh>
Chris Barker reported that the default value of `$::clientcert`
was not the best choice for some things we were using it for
in the module; specifically, for the default value of
the jetty ssl listen address. He suggested using `$::fqdn` instead.
This commit makes that change; rspec-system tests pass, but I'm
not 100% sure that there aren't edge cases that would be
affected by this.
This patch introduces the optional parameter $disable_ssl, which
defaults to false. If set to true, the settings ssl-host and ssl-port
are completely removed from the Jetty section of the PuppetDB config
files.
This disables serving of HTTPS requests by PuppetDB, which can be useful
when SSL handling is offloaded to a reverse proxy server like Apache or
Nginx, as suggested in the PuppetDB documentation (see
http://docs.puppetlabs.com/puppetdb/1.2/connect_puppet_apply.html#option-a-set-up-an-ssl-proxy-for-puppetdb).
Prior to this commit the module did not provide a way to set a bind address for the HTTP port. This
commit allows users to not only bind to an address and port other than localhost and 8080, but it also
opens the firewall if explicitly requested.
Prior to this commit, all of the puppetdb packages were being
installed with 'ensure=present'. This commit changes things
so that you can explicitly specify a version if you desire;
the default is still 'present'.
This commit does the following:
* Use the new inifile module to manage puppet.conf
* More comprehensive management of config files
* Validate database connectivity before applying puppetdb
config changes
* Validate puppetdb connectivity before applying puppet
master config changes
* Documentation