Puppet Class: puppetmaster::puppetdb
- Defined in:
- modules/puppetmaster/manifests/puppetdb.pp
Overview
Class puppetmaster::puppetdb
Sets up a puppetdb instance and the corresponding database server. TODO: fold this class into profile::puppetdb
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'modules/puppetmaster/manifests/puppetdb.pp', line 30
class puppetmaster::puppetdb(
Stdlib::Host $master,
Stdlib::Port $port = 443,
Stdlib::Port $jetty_port = 8080,
String $jvm_opts ='-Xmx4G',
Optional[Stdlib::Unixpath] $ssldir = undef,
Stdlib::Unixpath $ca_path = '/etc/ssl/certs/Puppet_Internal_CA.pem',
String $puppetdb_pass = '',
String $puppetdb_ro_pass = '',
Optional[Stdlib::Host] $db_ro_host = undef,
Puppetdb::Loglevel $log_level = 'info',
Boolean $tmpfs_stockpile_queue = false,
Array[String] $facts_blacklist = [],
Enum['literal', 'regex'] $facts_blacklist_type = 'literal',
Integer[0] $gc_interval = 20,
Pattern[/\d+[dhms]/] $node_ttl = '7d',
Pattern[/\d+[dhms]/] $node_purge_ttl = '14d',
Pattern[/\d+[dhms]/] $report_ttl = '1d',
Nginx::SSL::Verify_client $ssl_verify_client = 'optional',
Optional[String[1]] $ca_content = undef,
) {
## TLS Termination
# Set up nginx as a reverse-proxy
# TODO: consider using profile::pki::get_cert
puppet::expose_agent_certs { '/etc/nginx':
ensure => present,
provide_private => true,
ssldir => $ssldir,
}
if $ca_content {
file { $ca_path:
ensure => file,
content => $ca_content,
mode => '0444',
}
}
$ssl_settings = ssl_ciphersuite('nginx', 'mid')
include sslcert::dhparam
nginx::site { 'puppetdb':
ensure => present,
content => template('puppetmaster/nginx-puppetdb.conf.erb'),
require => [
Class['::sslcert::dhparam'],
Puppet::Expose_agent_certs['/etc/nginx'],
],
}
# T209709
nginx::status_site { 'status':
port => 10080,
require => Puppet::Expose_agent_certs['/etc/nginx'],
}
class { 'puppetdb::app':
db_rw_host => $master,
db_ro_host => $db_ro_host,
db_password => $puppetdb_pass,
db_ro_password => $puppetdb_ro_pass,
jvm_opts => $jvm_opts,
ssldir => $ssldir,
ca_path => $ca_path,
log_level => $log_level,
tmpfs_stockpile_queue => $tmpfs_stockpile_queue,
facts_blacklist => $facts_blacklist,
facts_blacklist_type => $facts_blacklist_type,
gc_interval => $gc_interval,
node_ttl => $node_ttl,
node_purge_ttl => $node_purge_ttl,
report_ttl => $report_ttl,
}
}
|