Puppet Enterprise

Before we inspect and tune our system, we will find a set of recommended settings based on the hardware available. Thomas Kishel at Puppet has designed a Puppet Face that queries PuppetDB for Puppet Enterprise Infrastructure. This command inspects available resources on the system and provides a sane default for the following Puppet Enterprise installations:

  • Monolithic infrastructure
  • Monolithic with compile masters
  • Monolithic with external PostgreSQL
  • Monolithic with compile masters with external PostgreSQL
  • Monolithic with HA
  • Monolithic with compile masters with HA
  • Split infrastructure
  • Split with compile masters
  • Split with external PostgreSQL
  • Split with compile masters with external PostgreSQL

To get started with tkishel/pe_tune, we'll want to clone the Git repository onto our Puppet Enterprise on our primary master, and make the tune.rb script executable:

git clone https://github.com/tkishel/pe_tune.git
chmod +x ./pe_tune/lib/puppet_x/puppetlabs/tune.rb 

When we have the binary cloned and executable, we'll want to run tune.rb to get information back about our system and return sane Puppet Enterprise settings in Hiera:

[root@pe-puppet-master ~]# ./pe_tune/lib/puppet_x/puppetlabs/tune.rb
### Puppet Infrastructure Summary: Found a Monolithic Infrastructure

## Found: 4 CPU(s) / 9839 MB RAM for Primary Master pe-puppet-master
## Specify the following optimized settings in Hiera in nodes/pe-puppet-master.yaml

---
puppet_enterprise::profile::database::shared_buffers: 3072MB
puppet_enterprise::puppetdb::command_processing_threads: 2
puppet_enterprise::master::puppetserver::jruby_max_active_instances: 2
puppet_enterprise::master::puppetserver::reserved_code_cache: 1024m
puppet_enterprise::profile::master::java_args:
Xms: 2048m
Xmx: 2048m
puppet_enterprise::profile::puppetdb::java_args:
Xms: 1024m
Xmx: 1024m
puppet_enterprise::profile::console::java_args:
Xms: 768m
Xmx: 768m
puppet_enterprise::profile::orchestrator::java_args:
Xms: 768m
Xmx: 768m

## CPU Summary: Total/Used/Free: 4/4/0 for pe-puppet-master
## RAM Summary: Total/Used/Free: 9839/8704/1135 for pe-puppet-master
## JVM Summary: Using 768 MB per Puppet Server JRuby for pe-puppet-master

We can then place these values in Hiera anywhere that the Puppet Enterprise installation would be able to pick them up. I recommend common.yaml, unless you have a Hiera layer specifically set aside for Puppet settings.

This script will fail to run by default on infrastructure hosts with less than 4 CPUs or 8 GB of RAM. You can run the command with the --force flag to get results, even on nodes that are smaller than the recommended 4 CPUs and 8GB of memory.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.90.44