From 8d9ebffe10aa5bd1fa415f5b15563f7c86df1b87 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Fri, 14 Feb 2014 11:48:49 +1100 Subject: [PATCH] Set up opportunistic bare-metal postgres db Currently only MySQL is being opportunistically tested for bare-metal migrations. This change configures the Jenkins slaves to have a postgresql database openstack_baremetal_ci. Change-Id: Ifb2eb7b1ef15b28a326a7d7eb1f99dc675cc40b6 --- modules/jenkins/manifests/slave.pp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/jenkins/manifests/slave.pp b/modules/jenkins/manifests/slave.pp index aec58c3240..05c844d08b 100644 --- a/modules/jenkins/manifests/slave.pp +++ b/modules/jenkins/manifests/slave.pp @@ -348,6 +348,25 @@ class jenkins::slave( refreshonly => true, subscribe => Postgresql::Server::Db['openstack_citest'], } + + postgresql::server::db { 'openstack_baremetal_citest': + user => 'openstack_citest', + password => postgresql_password('openstack_citest', 'openstack_citest'), + grant => 'all', + require => [ + Class['postgresql::server'], + Postgresql::Server::Role['openstack_citest'], + ], + } + + # Alter the new database giving the test DB user ownership of the DB. + # This is necessary to make the nova unittests run properly. + postgresql_psql { 'ALTER DATABASE openstack_baremetal_citest OWNER TO + openstack_citest': + db => 'postgres', + refreshonly => true, + subscribe => Postgresql::Server::Db['openstack_baremetal_citest'], + } } file { '/usr/local/jenkins':