Index: modules/adblockplus/manifests/buildserver.pp |
diff --git a/modules/adblockplus/manifests/buildserver.pp b/modules/adblockplus/manifests/buildserver.pp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dd77c278aaa5d85047ee68d2174a6fb2b72abaf5 |
--- /dev/null |
+++ b/modules/adblockplus/manifests/buildserver.pp |
@@ -0,0 +1,78 @@ |
+# == Class: adblockplus::buildserver |
+# |
+# An authoritative build-server setup based on Buildbot and Nginx. |
+# |
+# === Parameters: |
+# |
+# [*domain*] |
+# The domain name associated with the Buildbot waterfall page. |
+# |
+# [*is_default_domain*] |
+# Whether the Buildbot page should serve as the default content |
+# handler with the HTTP server setup. |
+# |
+# [*ssl_cert*] |
+# The SSL certificate file name within the private module, if any. |
+# Requires an $ssl_key to be provided as well. |
+# |
+# [*ssl_key*] |
+# The SSL key file name within the private module, if any. |
+# Requires an $ssl_cert to be provided as well. |
+# |
+# [*slaves*] |
+# Local buildbot::slave records to setup with the master. |
+# |
+# [*slots*] |
+# Name => password pairs of e.g. remote build slaves. |
+# |
+# === Examples: |
+# |
+# class {'adblockplus::buildserver': |
+# domain => 'localhost', |
+# is_default_domain => true, |
+# } |
+# |
+class adblockplus::buildserver ( |
Felix Dahlke
2015/09/29 14:04:22
I'm wondering if we should call the module "buildm
Felix Dahlke
2015/09/29 14:04:22
Why is the module called "adblockplus" and not "bu
mathias
2015/09/29 14:18:56
Acknowledged.
mathias
2015/09/29 14:18:56
The first part (adblockplus::) is considered a nam
Felix Dahlke
2015/10/02 12:16:26
That's news to me, but fine by me - as long as we
mathias
2015/10/02 13:47:40
Acknowledged.
|
+ $domain, |
+ $is_default_domain = false, |
+ $project = {}, |
Felix Dahlke
2015/09/29 14:04:22
This one isn't documented above.
mathias
2015/09/29 14:18:56
Acknowledged.
|
+ $ssl_cert = hiera('adblockplus::buildserver::ssl_cert', 'undef'), |
+ $ssl_key = hiera('adblockplus::buildserver::ssl_key', 'undef'), |
+ $slaves = hiera('adblockplus::buildserver::slaves', {}), |
+ $slots = hiera('adblockplus::buildserver::slots', {}), |
+) { |
+ |
+ include nginx |
+ |
+ # change default behavior, but still recognize hiera values |
+ class {'buildbot': |
+ master_service => hiera('buildbot::master_service', 'running'), |
Felix Dahlke
2015/09/29 14:04:21
Wrong indentation?
mathias
2015/09/29 14:18:56
Acknowledged.
|
+ slave_service => hiera('buildbot::slave_service', 'running'), |
+ } |
+ |
+ buildbot::master {'default': |
+ project => $project, |
+ slaves => $slaves, |
+ slots => $slots, |
+ system => true, |
+ } |
+ |
+ buildbot::fragment {'custom': |
+ authority => Buildbot::Master['default'], |
+ content => template('adblockplus/buildserver.erb'), |
+ } |
+ |
+ nginx::hostconfig {$domain: |
+ certificate => $ssl_cert ? { |
+ 'undef' => undef, |
+ default => $ssl_cert, |
+ }, |
+ source => 'puppet:///modules/adblockplus/nginx/buildserver.conf', |
+ is_default => $is_default_domain, |
+ log => 'access_log_buildbot', |
+ private_key => $ssl_key ? { |
+ 'undef' => undef, |
+ default => $ssl_key, |
+ }, |
+ } |
+} |