From 38f0083b85b5d13dab37476938098a48136f29f7 Mon Sep 17 00:00:00 2001
From: =?utf8?q?H=C3=A9ctor=20Or=C3=B3n=20Mart=C3=ADnez?= <zumbi@debian.org>
Date: Fri, 15 Aug 2014 20:27:03 +0200
Subject: [PATCH] d-ports: set apache memlimit
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
---
 hieradata/common.yaml                          | 2 ++
 modules/apache2/manifests/init.pp              | 2 ++
 modules/debian-org/misc/local.yaml             | 2 ++
 modules/roles/manifests/buildd_ports_master.pp | 5 +++++
 modules/roles/manifests/init.pp                | 4 ++++
 5 files changed, 15 insertions(+)
 create mode 100644 modules/roles/manifests/buildd_ports_master.pp

diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index a80493ff..3e66dc9d 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -15,6 +15,8 @@ roles:
     - beach.debian.org
   buildd_master:
     - wuiet.debian.org
+  buildd_ports_master:
+    - portman.debian.org
   contributors:
     - nono.debian.org
   dbmaster:
diff --git a/modules/apache2/manifests/init.pp b/modules/apache2/manifests/init.pp
index 0470b644..b1f20a23 100644
--- a/modules/apache2/manifests/init.pp
+++ b/modules/apache2/manifests/init.pp
@@ -43,6 +43,8 @@ class apache2 {
 
 	if has_role('buildd_master') {
 		$memlimit = 192 * 1024 * 1024
+	} elsif has_role('buildd_ports_master') {
+		$memlimit = 192 * 1024 * 1024
 	} elsif has_role('nagiosmaster') {
 		$memlimit = 96 * 1024 * 1024
 	} elsif has_role('packagesqamaster') {
diff --git a/modules/debian-org/misc/local.yaml b/modules/debian-org/misc/local.yaml
index 6350031f..8953f496 100644
--- a/modules/debian-org/misc/local.yaml
+++ b/modules/debian-org/misc/local.yaml
@@ -298,3 +298,5 @@ host_settings:
     - storace.debian.org
   buildd_master:
     - wuiet.debian.org
+  buildd_ports_master:
+    - portman.debian.org
diff --git a/modules/roles/manifests/buildd_ports_master.pp b/modules/roles/manifests/buildd_ports_master.pp
new file mode 100644
index 00000000..b48004fb
--- /dev/null
+++ b/modules/roles/manifests/buildd_ports_master.pp
@@ -0,0 +1,5 @@
+class roles::buildd_master {
+	ssl::service { 'buildd.debian-ports.org':
+		notify => Service['apache2'],
+	}
+}
diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp
index 3d69c3fa..eed52fe8 100644
--- a/modules/roles/manifests/init.pp
+++ b/modules/roles/manifests/init.pp
@@ -168,6 +168,10 @@ class roles {
 		include roles::buildd_master
 	}
 
+	if has_role('buildd_ports_master') {
+		include roles::buildd_ports_master
+	}
+
 	if has_role('piuparts') {
 		include roles::piuparts
 	}
-- 
2.39.5