Give wuiet.d.o access to the ubc projectb replica
[mirror/dsa-puppet.git] / modules / roles / manifests / buildd_master.pp
1 # wanna-build
2 #
3 # @param db_address     hostname of the postgres server for this service
4 # @param db_port        port of the postgres server for this service
5 # @param qa_buildlogchecks_db_address     hostname of the postgres server for this service
6 # @param qa_buildlogchecks_db_port        port of the postgres server for this service
7 class roles::buildd_master (
8   String  $qa_buildlogchecks_db_address,
9   Integer $qa_buildlogchecks_db_port,
10   String  $db_address = $roles::buildd_master::params::db_address,
11   Integer $db_port    = $roles::buildd_master::params::db_port,
12 ) inherits roles::buildd_master::params {
13   include apache2
14   include roles::sso_rp
15
16   ssl::service { 'buildd.debian.org':
17     notify => Exec['service apache2 reload'],
18     key    => true,
19   }
20
21   ssh::authorized_key_collect { 'buildd-master':
22     target_user => 'wb-buildd',
23     collect_tag => 'buildd_master',
24   }
25
26   exim::vdomain { 'buildd.debian.org':
27     owner => 'wbadm',
28     group => 'wbadm',
29   }
30
31   class { 'roles::buildd_master::db_guest_access':
32     database => ['wanna-build', 'wanna-build-test'],
33   }
34
35   @@postgres::cluster::hba_entry { "buildd_master-${::fqdn}":
36     tag      => "postgres::cluster::${db_port}::hba::${db_address}",
37     pg_port  => $db_port,
38     database => ['wanna-build', 'wanna-build-test'],
39     user     => 'all',
40     address  => $base::public_addresses,
41   }
42
43   # The UDD database is used to display FTBFS bugs on the web interface
44   include roles::udd::db_guest_access
45
46   include roles::postgresql::ftp_master_dak_replica::db_guest_access::bm
47   include roles::postgresql::ftp_master_dak_replica::db_guest_access::ubc
48
49   @@postgres::cluster::hba_entry { "qa-buildlogchecks-${::fqdn}":
50     tag      => "postgres::cluster::${qa_buildlogchecks_db_port}::hba::${qa_buildlogchecks_db_address}",
51     pg_port  => $qa_buildlogchecks_db_port,
52     database => 'qa-buildlogchecks',
53     user     => 'qa-buildlogchecks',
54     address  => $base::public_addresses,
55   }
56 }