OLD | NEW |
(Empty) | |
| 1 # == Class: adblockplus::buildserver |
| 2 # |
| 3 # An authoritative build-server setup based on Buildbot and Nginx. |
| 4 # |
| 5 # === Parameters: |
| 6 # |
| 7 # [*domain*] |
| 8 # The domain name associated with the Buildbot waterfall page. |
| 9 # |
| 10 # [*is_default_domain*] |
| 11 # Whether the Buildbot page should serve as the default content |
| 12 # handler with the HTTP server setup. |
| 13 # |
| 14 # [*ssl_cert*] |
| 15 # The SSL certificate file name within the private module, if any. |
| 16 # Requires an $ssl_key to be provided as well. |
| 17 # |
| 18 # [*ssl_key*] |
| 19 # The SSL key file name within the private module, if any. |
| 20 # Requires an $ssl_cert to be provided as well. |
| 21 # |
| 22 # [*slaves*] |
| 23 # Local buildbot::slave records to setup with the master. |
| 24 # |
| 25 # [*slots*] |
| 26 # Name => password pairs of e.g. remote build slaves. |
| 27 # |
| 28 # === Examples: |
| 29 # |
| 30 # class {'adblockplus::buildserver': |
| 31 # domain => 'localhost', |
| 32 # is_default_domain => true, |
| 33 # } |
| 34 # |
| 35 class adblockplus::buildserver ( |
| 36 $domain, |
| 37 $is_default_domain = false, |
| 38 $project = {}, |
| 39 $ssl_cert = hiera('adblockplus::buildserver::ssl_cert', 'undef'), |
| 40 $ssl_key = hiera('adblockplus::buildserver::ssl_key', 'undef'), |
| 41 $slaves = hiera('adblockplus::buildserver::slaves', {}), |
| 42 $slots = hiera('adblockplus::buildserver::slots', {}), |
| 43 ) { |
| 44 |
| 45 include nginx |
| 46 |
| 47 # change default behavior, but still recognize hiera values |
| 48 class {'buildbot': |
| 49 master_service => hiera('buildbot::master_service', 'running'), |
| 50 slave_service => hiera('buildbot::slave_service', 'running'), |
| 51 } |
| 52 |
| 53 buildbot::master {'default': |
| 54 project => $project, |
| 55 slaves => $slaves, |
| 56 slots => $slots, |
| 57 system => true, |
| 58 } |
| 59 |
| 60 buildbot::fragment {'custom': |
| 61 authority => Buildbot::Master['default'], |
| 62 content => template('adblockplus/buildserver.erb'), |
| 63 } |
| 64 |
| 65 nginx::hostconfig {$domain: |
| 66 certificate => $ssl_cert ? { |
| 67 'undef' => undef, |
| 68 default => $ssl_cert, |
| 69 }, |
| 70 source => 'puppet:///modules/adblockplus/nginx/buildserver.conf', |
| 71 is_default => $is_default_domain, |
| 72 log => 'access_log_buildbot', |
| 73 private_key => $ssl_key ? { |
| 74 'undef' => undef, |
| 75 default => $ssl_key, |
| 76 }, |
| 77 } |
| 78 } |
OLD | NEW |