Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/267831

Change subject: Tools: Create separate partitions only in the Tools project
......................................................................

Tools: Create separate partitions only in the Tools project

Currently on each execution node a 16 GByte partition for /tmp and a
swap partition of three times the physical memory are created.  In
practice this means that all execution nodes must be of type m1.large
or m1.xlarge because only they provide enough disk space.

This makes testing setups involving multiple execution nodes in
Toolsbeta more difficult as those types of instances consume a huge
portion of the CPU and RAM quotas, while for testing the interactions
between grid nodes instances of type m1.small would be more than
sufficient.

This change conditions the creation of those partitions on class
parameters which can be disabled for Toolsbeta via wikitech.

Change-Id: Ia2505aaa96cca1e0fb0799e29dfaba68a0bb3c9e
---
M modules/toollabs/manifests/node/all.pp
1 file changed, 15 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/267831/1

diff --git a/modules/toollabs/manifests/node/all.pp 
b/modules/toollabs/manifests/node/all.pp
index e248350..92d85ba 100644
--- a/modules/toollabs/manifests/node/all.pp
+++ b/modules/toollabs/manifests/node/all.pp
@@ -10,19 +10,24 @@
 #
 # Sample Usage:
 #
-class toollabs::node::all {
-
+class toollabs::node::all(
+    $swap_partition = true,
+    $tmp_partition = true,
+) {
     include toollabs
 
-    labs_lvm::volume { 'separate-tmp':
-        size      => '16GB',
-        mountat   => '/tmp',
-        mountmode => '1777',
-        options   => 'nosuid,noexec,nodev,rw',
+    if $tmp_partition {
+        labs_lvm::volume { 'separate-tmp':
+            size      => '16GB',
+            mountat   => '/tmp',
+            mountmode => '1777',
+            options   => 'nosuid,noexec,nodev,rw',
+        }
     }
 
-    labs_lvm::swap { 'big':
-        size => inline_template('<%= @memorysize_mb.to_i * 3 %>MB'),
+    if $swap_partition {
+        labs_lvm::swap { 'big':
+            size => inline_template('<%= @memorysize_mb.to_i * 3 %>MB'),
+        }
     }
-
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/267831
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2505aaa96cca1e0fb0799e29dfaba68a0bb3c9e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to