diff --git a/install_modules.sh b/install_modules.sh index c09d95269d..5920d3401e 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -42,11 +42,14 @@ MODULES["puppetlabs-apache"]="0.0.4" MODULES["puppetlabs-apt"]="1.1.0" MODULES["puppetlabs-haproxy"]="0.4.1" MODULES["puppetlabs-mysql"]="0.6.1" -MODULES["puppetlabs-postgresql"]="3.0.0" +MODULES["puppetlabs-postgresql"]="3.1.0" MODULES["puppetlabs-stdlib"]="3.2.0" MODULES["saz-memcached"]="2.0.2" MODULES["spiette-selinux"]="0.5.1" MODULES["rafaelfc-pear"]="1.0.3" +MODULES["puppetlabs-inifile"]="1.0.0" +MODULES["puppetlabs-firewall"]="0.0.4" +MODULES["puppetlabs-puppetdb"]="3.0.1" MODULE_LIST=`puppet module list` diff --git a/manifests/site.pp b/manifests/site.pp index 309a93be48..c0a9645c6b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -214,6 +214,12 @@ node 'ci-puppetmaster.openstack.org' { } } +node 'puppetdb.openstack.org' { + class { 'openstack_project::puppetdb': + sysadmins => hiera('sysadmins'), + } +} + node 'graphite.openstack.org' { class { 'openstack_project::graphite': sysadmins => hiera('sysadmins'), diff --git a/modules/openstack_project/manifests/puppetdb.pp b/modules/openstack_project/manifests/puppetdb.pp new file mode 100644 index 0000000000..723568739b --- /dev/null +++ b/modules/openstack_project/manifests/puppetdb.pp @@ -0,0 +1,36 @@ +# == Class: openstack_project::puppetdb +# +class openstack_project::puppetdb ( + $sysadmins = [], +) { + + # The puppetlabs postgres module does not manage the postgres user + # and group for us. Create them here to ensure concat can create + # dirs and files owned by this user and group. + user { 'postgres': + ensure => present, + gid => 'postgres', + system => true, + require => Group['postgres'], + } + + group { 'postgres': + ensure => present, + system => true, + } + + class { 'openstack_project::server': + iptables_public_tcp_ports => [8081], + sysadmins => $sysadmins, + } + + class { 'puppetdb::database::postgresql': + require => [User['postgres'], Class['openstack_project::base'],], + } + + class { '::puppetdb::server': + database_host => 'localhost', + require => [ User['postgres'], Class['puppetdb::database::postgresql'],], + } + +}