Skip to content

Commit

Permalink
Tools: Create separate partitions only in the Tools project
Browse files Browse the repository at this point in the history
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
  • Loading branch information
scfc authored and Yuvipanda committed Feb 2, 2016
1 parent c7e55ef commit dafe707
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions modules/toollabs/manifests/node/all.pp
Expand Up @@ -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'),
}
}

}

0 comments on commit dafe707

Please sign in to comment.