aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deployment/mga_buildsystem/manifests/config.pp7
-rw-r--r--modules/buildsystem/manifests/var/scheduler.pp8
-rw-r--r--modules/buildsystem/manifests/youri_submit.pp2
-rw-r--r--modules/buildsystem/templates/youri/host.conf23
4 files changed, 39 insertions, 1 deletions
diff --git a/deployment/mga_buildsystem/manifests/config.pp b/deployment/mga_buildsystem/manifests/config.pp
index de81bb2c..17e03b44 100644
--- a/deployment/mga_buildsystem/manifests/config.pp
+++ b/deployment/mga_buildsystem/manifests/config.pp
@@ -16,6 +16,13 @@ class mga_buildsystem::config {
'i586' => [ 'jonund0', 'ecosse0', 'jonund1', 'ecosse1' ],
'x86_64' => [ 'ecosse0', 'jonund0', 'ecosse1', 'jonund1' ],
},
+ build_nodes_aliases => {
+ 'jonund0' => "jonund.${::domain}",
+ 'jonund1' => "jonund.${::domain}",
+ 'ecosse0' => "ecosse.${::domain}",
+ 'ecosse1' => "ecosse.${::domain}",
+ },
+ build_src_node => "valstar.${::domain}",
}
include buildsystem::var::repository
class { 'buildsystem::var::binrepo':
diff --git a/modules/buildsystem/manifests/var/scheduler.pp b/modules/buildsystem/manifests/var/scheduler.pp
index 087020bf..02320587 100644
--- a/modules/buildsystem/manifests/var/scheduler.pp
+++ b/modules/buildsystem/manifests/var/scheduler.pp
@@ -5,10 +5,16 @@
# hostname of the server where submitted packages are uploaded
# $build_nodes:
# a hash containing available build nodes indexed by architecture
+# $build_nodes_aliases:
+# a hash containing build nodes indexed by their alias
+# $build_src_node:
+# hostname of the server building the initial src.rpm
class buildsystem::var::scheduler(
$admin_mail = "root@${::domain}",
$pkg_uphost = "pkgsubmit.${::domain}",
- $build_nodes
+ $build_nodes,
+ $build_nodes_aliases = {},
+ $build_src_node
){
$login = 'schedbot'
$homedir = "/var/lib/$login"
diff --git a/modules/buildsystem/manifests/youri_submit.pp b/modules/buildsystem/manifests/youri_submit.pp
index f4e49412..32fc8243 100644
--- a/modules/buildsystem/manifests/youri_submit.pp
+++ b/modules/buildsystem/manifests/youri_submit.pp
@@ -26,6 +26,8 @@ class buildsystem::youri_submit {
ensure => 'directory';
'/etc/youri/acl.conf':
content => template('buildsystem/youri/acl.conf');
+ '/etc/youri/host.conf':
+ content => template('buildsystem/youri/host.conf');
}
buildsystem::youri_submit_conf{ 'upload':
diff --git a/modules/buildsystem/templates/youri/host.conf b/modules/buildsystem/templates/youri/host.conf
new file mode 100644
index 00000000..35f4043b
--- /dev/null
+++ b/modules/buildsystem/templates/youri/host.conf
@@ -0,0 +1,23 @@
+<%-
+ aliases = scope.lookupvar('buildsystem::var::scheduler::build_nodes_aliases')
+ nodes = {}
+ nodes['src'] = scope.lookupvar('buildsystem::var::scheduler::build_src_node')
+ scope.lookupvar('buildsystem::var::scheduler::build_nodes').each{|arch,n|
+ a = arch + '|noarch|src'
+ nodes[a] = []
+ n.each{|node|
+ if aliases[node] != nil
+ nodes[a] += [ aliases[node] ]
+ else
+ nodes[a] += [ node ]
+ end
+ }
+ }
+ str = ''
+ nodes.keys.sort.each{|arch|
+ nodes[arch].sort.uniq.each{|node|
+ str += node + ' ' + arch + "\n"
+ }
+ }
+-%>
+<%= str -%>