From 222673572abbd538d73ece9f7e03bc73f0f9c7eb Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Fri, 15 May 2015 11:40:37 -0700 Subject: Rename defaults.yaml to common.yaml --- hieradata/common.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 hieradata/common.yaml (limited to 'hieradata/common.yaml') diff --git a/hieradata/common.yaml b/hieradata/common.yaml new file mode 100644 index 0000000..2baa62b --- /dev/null +++ b/hieradata/common.yaml @@ -0,0 +1,2 @@ +--- +message: "This node is using common data" -- cgit v1.2.3 From 809f68208617d1ad0695696e1ef30250a86a4c6d Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Tue, 22 Sep 2015 09:41:21 -0700 Subject: Add hiera key for tuning max_requests_per_instance https://docs.puppetlabs.com/pe/2015.2/config_puppetserver.html#tuning-maxrequestsperinstance-on-puppet-server --- hieradata/common.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hieradata/common.yaml') diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 2baa62b..18422d3 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -1,2 +1,5 @@ --- message: "This node is using common data" + +#Puppet Server Tuning +puppet_enterprise::master::puppetserver::jruby_max_requests_per_instance: 50000 -- cgit v1.2.3 From 03bfb397681a71e2b0191f5be4116a0b38e62b03 Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Tue, 6 Oct 2015 12:58:04 -0700 Subject: Change max_requests_per_instance to 10K --- hieradata/common.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hieradata/common.yaml') diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 18422d3..07fbd80 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -2,4 +2,4 @@ message: "This node is using common data" #Puppet Server Tuning -puppet_enterprise::master::puppetserver::jruby_max_requests_per_instance: 50000 +puppet_enterprise::master::puppetserver::jruby_max_requests_per_instance: 10000 -- cgit v1.2.3 From 92f8d2d251d9e6fde5c124cb9a6974b1455269f7 Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Mon, 26 Oct 2015 14:59:20 -0700 Subject: Configure the MoM to update the classifier after deploying code This entailed configring the classifier to never sync on a schedule. Changing environment_timeout to unlimited for all masters. Setting a postrun command for r10k that would update the class information in the classifier (the update-classes endpoint). --- hieradata/common.yaml | 5 +++++ hieradata/nodes/example-puppet-master.yaml | 4 ++++ site/profile/files/puppetmaster/update-classes.sh | 11 +++++++++++ site/profile/manifests/puppetmaster.pp | 16 ++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 site/profile/files/puppetmaster/update-classes.sh (limited to 'hieradata/common.yaml') diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 07fbd80..f3fb25a 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -3,3 +3,8 @@ message: "This node is using common data" #Puppet Server Tuning puppet_enterprise::master::puppetserver::jruby_max_requests_per_instance: 10000 + +#pe-console-services tuning +#https://docs.puppetlabs.com/pe/latest/console_config.html#tuning-the-classifier-synchronization-period +#disable classifier scheduled sync and rely on r10k postrun command to sync the classes +puppet_enterprise::profile::consolei::classifier_synchronization_period: 0 diff --git a/hieradata/nodes/example-puppet-master.yaml b/hieradata/nodes/example-puppet-master.yaml index 677e10d..584faac 100644 --- a/hieradata/nodes/example-puppet-master.yaml +++ b/hieradata/nodes/example-puppet-master.yaml @@ -2,3 +2,7 @@ git_management_system: 'gitlab' gms_server_url: 'https://gitlab-server' gms_api_token: 'BDkZfWWnk4LVTLHdAywd' + +#setup r10k to update classes in the console after code deploy +pe_r10k::postrun: + - '/usr/local/bin/update-classes.sh' diff --git a/site/profile/files/puppetmaster/update-classes.sh b/site/profile/files/puppetmaster/update-classes.sh new file mode 100644 index 0000000..dea10a9 --- /dev/null +++ b/site/profile/files/puppetmaster/update-classes.sh @@ -0,0 +1,11 @@ +#https://docs.puppetlabs.com/pe/latest/nc_update_classes.html#post-v1update-classes + +CONFDIR=$(puppet master --configprint confdir) + +CERT=$(puppet master --confdir ${CONFDIR} --configprint hostcert) +CACERT=$(puppet master --confdir ${CONFDIR} --configprint localcacert) +PRVKEY=$(puppet master --confdir ${CONFDIR} --configprint hostprivkey) +OPTIONS="--cert ${CERT} --cacert ${CACERT} --key ${PRVKEY}" +CONSOLE=$(awk '/server =/{print $NF}' ${CONFDIR}/console.conf) + +curl -k -X POST ${OPTIONS} "https://${CONSOLE}:4433/classifier-api/v1/update-classes" diff --git a/site/profile/manifests/puppetmaster.pp b/site/profile/manifests/puppetmaster.pp index bc52d3b..687b957 100644 --- a/site/profile/manifests/puppetmaster.pp +++ b/site/profile/manifests/puppetmaster.pp @@ -48,4 +48,20 @@ class profile::puppetmaster { } #END - Add deploy key and webhook to git management system + #Lay down update-classes.sh for use in r10k postrun_command + #This is configured via the pe_r10k::postrun key in hiera + file { '/usr/local/bin/update-classes.sh' : + ensure => file, + source => 'puppet::///modules/profile/puppetmaster/update-classes.sh', + } + + #https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html#environmenttimeout + ini_setting { "environment_timeout = unlimited": + ensure => present, + path => '/etc/puppetlabs/puppet/puppet.conf', + section => 'main', + setting => 'environment_timeout', + value => 'unlimited', + } + } -- cgit v1.2.3 From 1cb89d981a7845453529a3a86ac9a9b1254fe61f Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Mon, 26 Oct 2015 15:12:39 -0700 Subject: Fix some embarassing typos --- hieradata/common.yaml | 2 +- site/profile/manifests/puppetmaster.pp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'hieradata/common.yaml') diff --git a/hieradata/common.yaml b/hieradata/common.yaml index f3fb25a..191061c 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -7,4 +7,4 @@ puppet_enterprise::master::puppetserver::jruby_max_requests_per_instance: 10000 #pe-console-services tuning #https://docs.puppetlabs.com/pe/latest/console_config.html#tuning-the-classifier-synchronization-period #disable classifier scheduled sync and rely on r10k postrun command to sync the classes -puppet_enterprise::profile::consolei::classifier_synchronization_period: 0 +puppet_enterprise::profile::console::classifier_synchronization_period: 0 diff --git a/site/profile/manifests/puppetmaster.pp b/site/profile/manifests/puppetmaster.pp index 687b957..ec85155 100644 --- a/site/profile/manifests/puppetmaster.pp +++ b/site/profile/manifests/puppetmaster.pp @@ -52,7 +52,7 @@ class profile::puppetmaster { #This is configured via the pe_r10k::postrun key in hiera file { '/usr/local/bin/update-classes.sh' : ensure => file, - source => 'puppet::///modules/profile/puppetmaster/update-classes.sh', + source => 'puppet:///modules/profile/puppetmaster/update-classes.sh', } #https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html#environmenttimeout -- cgit v1.2.3