Skip to content

Instantly share code, notes, and snippets.

@zipkid
Created March 4, 2014 09:20
Show Gist options
  • Save zipkid/9343030 to your computer and use it in GitHub Desktop.
Save zipkid/9343030 to your computer and use it in GitHub Desktop.
set puppetdb java memory
class <company>::puppetdb::server::extra (
$memory_allocation = '192m'
)
{
# Restart the PuppetDB service if settings change
Class[<company>::puppetdb::server::extra] ~> Class[puppetdb::server]
file { '/etc/sysconfig/puppetdb':
ensure => present,
content => template('mobistar/sysconfig/puppetdb.erb')
}
}
###########################################
# Init settings for puppetdb
###########################################
# Location of your Java binary (version 6 or higher)
JAVA_BIN="/usr/bin/java"
# Modify this if you'd like to change the memory allocation, enable JMX, etc
JAVA_ARGS="-Xmx<%= @memory_allocation %> -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof "
# These normally shouldn't need to be edited if using OS packages
USER="puppetdb"
INSTALL_DIR="/usr/share/puppetdb"
CONFIG="/etc/puppetdb/conf.d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment