Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/manifests/buildmaster.pp

Issue 29325436: Issue 1281 - Introduce module buildbot (Closed)
Patch Set: Issue 1281 - Address review feedback Created Oct. 20, 2015, 8:35 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/adblockplus/manifests/buildmaster.pp
diff --git a/modules/adblockplus/manifests/buildmaster.pp b/modules/adblockplus/manifests/buildmaster.pp
new file mode 100644
index 0000000000000000000000000000000000000000..d6092fd7cbcd48ff2c9e6b7cd0dc42dc82aba910
--- /dev/null
+++ b/modules/adblockplus/manifests/buildmaster.pp
@@ -0,0 +1,82 @@
+# == Class: adblockplus::buildmaster
+#
+# 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.
+#
+# [*project*]
+# A hash to optionally contain a 'title' and 'url' for the project;
+# translats directly into the $buildbot::master::project option.
Felix Dahlke 2015/11/19 19:50:00 Typo: "translats"
mathias 2016/01/20 16:13:51 Acknowledged.
+#
+# [*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.
+#
+# [*slave_credentials*]
+# Name => password pairs of e.g. remote build slaves.
Felix Dahlke 2015/11/19 19:50:01 Why "e.g.", do we need credentials for local slave
mathias 2016/01/20 16:13:51 Yes.
+#
+# === Examples:
+#
+# class {'adblockplus::buildmaster':
+# domain => 'localhost',
+# is_default_domain => true,
+# }
+#
+class adblockplus::buildmaster (
+ $domain,
+ $is_default_domain = false,
+ $project = {},
+ $ssl_cert = hiera('adblockplus::buildmaster::ssl_cert', 'undef'),
+ $ssl_key = hiera('adblockplus::buildmaster::ssl_key', 'undef'),
+ $slaves = hiera('adblockplus::buildmaster::slaves', {}),
+ $slave_credentials = hiera('adblockplus::buildmaster::slave_credentials', {}),
+) {
+
+ include nginx
+
+ # change default behavior, but still recognize hiera values
+ class {'buildbot':
+ master_service => hiera('buildbot::master_service', 'running'),
+ slave_service => hiera('buildbot::slave_service', 'running'),
+ }
+
+ buildbot::master {'default':
+ project => $project,
+ slaves => $slaves,
+ slave_credentials => $slave_credentials,
+ system => true,
+ }
+
+ buildbot::fragment {'custom':
+ authority => Buildbot::Master['default'],
+ content => template('adblockplus/buildmaster.erb'),
+ }
+
+ nginx::hostconfig {$domain:
+ certificate => $ssl_cert ? {
+ 'undef' => undef,
+ default => $ssl_cert,
+ },
+ source => 'puppet:///modules/adblockplus/nginx/buildmaster.conf',
+ is_default => $is_default_domain,
+ log => 'access_log_buildbot',
+ private_key => $ssl_key ? {
+ 'undef' => undef,
+ default => $ssl_key,
+ },
+ }
+}

Powered by Google App Engine
This is Rietveld