This procedure will implement a local PE PuppetDB on Compile Masters.
- Install and Configure the PE PuppetDB service on Compile Masters
Note: Replace all instances of
MASTER.EXAMPLE.COM
with the certname of your Primary Master.
Note: Replace all instances of
DATABASE.EXAMPLE.COM
with the certname of your PE Database host, by default, your Primary Master.
Note: Replace
COMPILE.MASTER.REGEX
with a regex (ex:.*-compile\..*
) that matches your Compile Master certnames.
Note: Verify Data in the Console is enabled: https://puppet.com/docs/pe/2018.1/config_console.html#task-5039
- Install
https://forge.puppet.com/whatsaranjit/node_manager
on the Primary Master - Run
puppet agent -t
on the Primary Master
~/classify_pe_puppetdb_on_compile_masters.pp
$puppetdb_database_host = $facts['migrate_database_host']
$compile_master_regex = 'COMPILE.MASTER.REGEX'
node_group { 'PE Compiler Group A':
ensure => 'present',
parent => 'PE Master',
rule => ['and', ['~', 'name', $compile_master_regex]],
# In PE_XL, the above regex rule is replaced by the following.
# rule => ['and',
# ['=', ['trusted', 'extensions', 'pp_role'], 'pe_xl::compiler'],
# ['=', ['trusted', 'extensions', 'pp_cluster'], 'A'],
# ],
classes => {
'puppet_enterprise::profile::puppetdb' => {},
'puppet_enterprise::profile::master' => {
'puppetdb_host' => [$clientcert],
'puppetdb_port' => [8081],
},
},
data => {
'puppet_enterprise::profile::puppetdb' => {
'gc_interval' => '0',
},
'puppet_enterprise::puppetdb' => {
#you can decide if you want these here or in hiera. but we do want to tune these.
'command_processing_threads' => 2,
'write_maximum_pool_size' => 4,
'read_maximum_pool_size' => 10, #this should match the number of jrubies + buffer for pql queries
},
},
}
Note, you could instead invert the
rule
commenting in the above and manually pin your Compile Masters after applying the manifest.
- Run
puppet apply classify_pe_puppetdb_on_compile_masters.pp
on the Primary Master - Run
puppet agent -t --noop
on all Compile Masters - Run
puppet agent -t
on the Database Host - Run
puppet agent -t
on the Primary Master - Run
puppet agent -t
on all Compile Masters