From 20e5d5b58dbd4566d5e79777d372001f8d47d18d Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 25 Feb 2016 13:50:16 -0500 Subject: [PATCH] Add puppetdb.o.o trusty support Changes include changing upstream git clone and pinning to the version we run in production. Also new apache 2.4 syntax. Change-Id: I3a214a42d3c49a1ea36fe84d21a275d736dfb889 Signed-off-by: Paul Belanger --- manifests/site.pp | 12 ++++++++++++ modules/openstack_project/manifests/puppetboard.pp | 6 ++++++ modules/openstack_project/manifests/puppetdb.pp | 14 ++++++++++++++ .../templates/puppetboard/puppetboard.vhost.erb | 3 +++ 4 files changed, 35 insertions(+) diff --git a/manifests/site.pp b/manifests/site.pp index 16783a7f40..306d11e1f6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -249,6 +249,18 @@ node 'puppetdb.openstack.org' { include openstack_project::puppetdb } +# Node-OS: trusty +node 'puppetdb01.openstack.org' { + $open_ports = [8081, 80] + class { 'openstack_project::server': + iptables_public_tcp_ports => $open_ports, + sysadmins => hiera('sysadmins', []), + } + class { 'openstack_project::puppetdb': + version => '4.0.2-1puppetlabs1', + } +} + # Node-OS: precise node 'graphite.openstack.org' { $statsd_hosts = ['git.openstack.org', diff --git a/modules/openstack_project/manifests/puppetboard.pp b/modules/openstack_project/manifests/puppetboard.pp index 8f35edf1d2..a02ee76db9 100644 --- a/modules/openstack_project/manifests/puppetboard.pp +++ b/modules/openstack_project/manifests/puppetboard.pp @@ -14,6 +14,8 @@ class openstack_project::puppetboard( class { '::puppetboard': unresponsive => '1.5', enable_query => 'False', # This being a python false + git_source => 'https://github.com/voxpupuli/puppetboard', + revision => '3042e22a1b4dfc0e3b7f3850c77da5a9398a8a52', } $docroot = "${basedir}/puppetboard" @@ -40,6 +42,10 @@ class openstack_project::puppetboard( docroot => $docroot, priority => '50', template => 'openstack_project/puppetboard/puppetboard.vhost.erb', + require => [ + User[$user], + Group[$group], + ], } } diff --git a/modules/openstack_project/manifests/puppetdb.pp b/modules/openstack_project/manifests/puppetdb.pp index 60dde0c462..aa9401d7ff 100644 --- a/modules/openstack_project/manifests/puppetdb.pp +++ b/modules/openstack_project/manifests/puppetdb.pp @@ -2,6 +2,7 @@ # class openstack_project::puppetdb ( $puppetboard = true, + $version = '2.3.8-1puppetlabs1', ) { # The puppetlabs postgres module does not manage the postgres user @@ -28,6 +29,7 @@ class openstack_project::puppetdb ( database_host => 'localhost', ssl_listen_address => '0.0.0.0', # works for ipv6 too java_args => { '-Xmx' => '512m', '-Xms' => '256m' }, + puppetdb_version => $version, require => [ User['postgres'], Class['puppetdb::database::postgresql'],], } @@ -36,4 +38,16 @@ class openstack_project::puppetdb ( class { 'openstack_project::puppetboard': } } + if versioncmp($version, '2.3.8') > 0 { + apt::source { 'puppetlabs-pc1': + location => 'http://apt.puppetlabs.com', + repos => 'PC1', + key => { + 'id' =>'47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30', + 'server' => 'pgp.mit.edu', + }, + before => Class['::puppetdb::server'], + } + } + } diff --git a/modules/openstack_project/templates/puppetboard/puppetboard.vhost.erb b/modules/openstack_project/templates/puppetboard/puppetboard.vhost.erb index 54e052e2aa..cd7d6be025 100644 --- a/modules/openstack_project/templates/puppetboard/puppetboard.vhost.erb +++ b/modules/openstack_project/templates/puppetboard/puppetboard.vhost.erb @@ -9,5 +9,8 @@ WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all + = 2.4> + Require all granted +