|
1 | | -# Class: puppetdb::server |
2 | | -# |
3 | 1 | # This class provides a simple way to get a puppetdb instance up and running |
4 | 2 | # with minimal effort. It will install and configure all necessary packages for |
5 | 3 | # the puppetdb server, but will *not* manage the database (e.g., postgres) server |
|
20 | 18 | # |
21 | 19 | # You'll also need to configure your puppet master to use puppetdb. You can |
22 | 20 | # use the `puppetdb::master::config` class to accomplish this. |
23 | | -# |
24 | | -# Parameters: |
25 | | -# ['listen_address'] - The address that the web server should bind to |
26 | | -# for HTTP requests. (defaults to `localhost`.) |
27 | | -# Set to '0.0.0.0' to listen on all addresses. |
28 | | -# ['listen_port'] - The port on which the puppetdb web server should |
29 | | -# accept HTTP requests (defaults to 8080). |
30 | | -# ['open_listen_port'] - If true, open the http listen port on the firewall. |
31 | | -# (defaults to false). |
32 | | -# ['ssl_listen_address'] - The address that the web server should bind to |
33 | | -# for HTTPS requests. (defaults to `$::fqdn`.) |
34 | | -# Set to '0.0.0.0' to listen on all addresses. |
35 | | -# ['ssl_listen_port'] - The port on which the puppetdb web server should |
36 | | -# accept HTTPS requests (defaults to 8081). |
37 | | -# ['disable_ssl'] - If true, disable HTTPS and only serve |
38 | | -# HTTP requests. Defaults to false. |
39 | | -# ['open_ssl_listen_port'] - If true, open the ssl listen port on the firewall. |
40 | | -# (defaults to true). |
41 | | -# ['database'] - Which database backend to use; legal values are |
42 | | -# `postgres` (default) or `embedded`. (The `embedded` |
43 | | -# db can be used for very small installations or for |
44 | | -# testing, but is not recommended for use in production |
45 | | -# environments. For more info, see the puppetdb docs.) |
46 | | -# ['database_host'] - The hostname or IP address of the database server. |
47 | | -# (defaults to `localhost`; ignored for `embedded` db) |
48 | | -# ['database_port'] - The port that the database server listens on. |
49 | | -# (defaults to `5432`; ignored for `embedded` db) |
50 | | -# ['database_username'] - The name of the database user to connect as. |
51 | | -# (defaults to `puppetdb`; ignored for `embedded` db) |
52 | | -# ['database_password'] - The password for the database user. |
53 | | -# (defaults to `puppetdb`; ignored for `embedded` db) |
54 | | -# ['database_name'] - The name of the database instance to connect to. |
55 | | -# (defaults to `puppetdb`; ignored for `embedded` db) |
56 | | -# ['node_ttl'] - The length of time a node can go without receiving |
57 | | -# any new data before it's automatically deactivated. |
58 | | -# (defaults to '0', which disables auto-deactivation) |
59 | | -# This option is supported in PuppetDB >= 1.1.0. |
60 | | -# ['node_purge_ttl'] - The length of time a node can be deactivated before |
61 | | -# it's deleted from the database. |
62 | | -# (defaults to '0', which disables purging) |
63 | | -# This option is supported in PuppetDB >= 1.2.0. |
64 | | -# ['report_ttl'] - The length of time reports should be stored before |
65 | | -# being deleted. |
66 | | -# (defaults to '7d', which is a 7-day period) |
67 | | -# This option is supported in PuppetDB >= 1.1.0. |
68 | | -# ['puppetdb_package'] - The puppetdb package name in the package manager |
69 | | -# ['puppetdb_version'] - The version of the `puppetdb` package that should |
70 | | -# be installed. You may specify an explicit version |
71 | | -# number, 'present', or 'latest'. Defaults to |
72 | | -# 'present'. |
73 | | -# ['puppetdb_service'] - The name of the puppetdb service. |
74 | | -# ['manage_redhat_firewall'] - DEPRECATED: Use open_ssl_listen_port instead. |
75 | | -# boolean indicating whether or not the module |
76 | | -# should open a port in the firewall on redhat-based |
77 | | -# systems. Defaults to `true`. This parameter is |
78 | | -# likely to change in future versions. Possible |
79 | | -# changes include support for non-RedHat systems and |
80 | | -# finer-grained control over the firewall rule |
81 | | -# (currently, it simply opens up the postgres port to |
82 | | -# all TCP connections). |
83 | | -# ['confdir'] - The puppetdb configuration directory; defaults to |
84 | | -# `/etc/puppetdb/conf.d`. |
85 | | -# ['java_args'] - Java VM options used for overriding default Java VM |
86 | | -# options specified in PuppetDB package. |
87 | | -# (defaults to `{}`). |
88 | | -# e.g. { '-Xmx' => '512m', '-Xms' => '256m' } |
89 | | -# Actions: |
90 | | -# - Creates and manages a puppetdb server |
91 | | -# |
92 | | -# Requires: |
93 | | -# - `inkling/postgresql` |
94 | | -# |
95 | | -# Sample Usage: |
96 | | -# class { 'puppetdb::server': |
97 | | -# database_host => 'puppetdb-postgres', |
98 | | -# } |
99 | | -# |
100 | 21 | class puppetdb::server( |
101 | 22 | $listen_address = $puppetdb::params::listen_address, |
102 | 23 | $listen_port = $puppetdb::params::listen_port, |
|
114 | 35 | $node_ttl = $puppetdb::params::node_ttl, |
115 | 36 | $node_purge_ttl = $puppetdb::params::node_purge_ttl, |
116 | 37 | $report_ttl = $puppetdb::params::report_ttl, |
| 38 | + $gc_interval = $puppetdb::params::gc_interval, |
| 39 | + $log_slow_statements = $puppetdb::params::log_slow_statements, |
| 40 | + $conn_max_age = $puppetdb::params::conn_max_age, |
| 41 | + $conn_keep_alive = $puppetdb::params::conn_keep_alive, |
| 42 | + $conn_lifetime = $puppetdb::params::lifetime, |
117 | 43 | $puppetdb_package = $puppetdb::params::puppetdb_package, |
118 | 44 | $puppetdb_version = $puppetdb::params::puppetdb_version, |
119 | 45 | $puppetdb_service = $puppetdb::params::puppetdb_service, |
|
175 | 101 | node_ttl => $node_ttl, |
176 | 102 | node_purge_ttl => $node_purge_ttl, |
177 | 103 | report_ttl => $report_ttl, |
| 104 | + gc_interval => $gc_interval, |
| 105 | + log_slow_statements => $log_slow_statements, |
| 106 | + conn_max_age => $conn_max_age, |
| 107 | + conn_keep_alive => $conn_keep_alive, |
| 108 | + conn_lifetime => $conn_lifetime, |
178 | 109 | confdir => $confdir, |
179 | 110 | notify => Service[$puppetdb_service], |
180 | 111 | } |
|
0 commit comments