summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2014-03-24 14:25:06 -0400
committerJames Shubin <james@shubin.ca>2014-03-24 14:33:45 -0400
commitcc6db62e5a7ee0b783f59755a30d8cef134eb35a (patch)
tree05015ab65d8c896b33d0caa3bdab68b2ce39c052 /examples
parent7c423fa725f804e15060fce85208e5861e970c6d (diff)
downloadpuppet-gluster-cc6db62e5a7ee0b783f59755a30d8cef134eb35a.tar.gz
puppet-gluster-cc6db62e5a7ee0b783f59755a30d8cef134eb35a.tar.xz
puppet-gluster-cc6db62e5a7ee0b783f59755a30d8cef134eb35a.zip
Add per brick defaults to gluster::simple for easier [physical] clusters.
I've had most of this patch in my head for at least a week, and I finally got the time to implement it! If you are building a symmetrical cluster, that has consistent device naming across all of the hosts, then this patch is the magic that should make your life _significantly_ easier. (*cough, cough*: Ben England...) In the corner case that some of your device have different names, you can still use this feature in conjunction with the other parameters to first set global defaults, and then override as needed. If you don't specify an overriding parameter (such as $count) then the number of elements in this array will be used as the brick count! Please note that this patch provides the $brick_params_defaults option which is different from the $brick_param_defaults option which will still work, and is useful in conjunction with this option as the way to set brick defaults across the whole cluster. For more questions you'll be happy to see that this patch comes with documentation and example updates.
Diffstat (limited to 'examples')
-rw-r--r--examples/gluster-simple-physical-example-best.pp28
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/gluster-simple-physical-example-best.pp b/examples/gluster-simple-physical-example-best.pp
new file mode 100644
index 0000000..06be1ed
--- /dev/null
+++ b/examples/gluster-simple-physical-example-best.pp
@@ -0,0 +1,28 @@
+#
+# really simple gluster setup for physical provisioning.
+# (yeah, that's it-- for iron!)
+#
+
+node /^annex\d+$/ { # annex{1,2,..N}
+
+ class { '::gluster::simple':
+ replica => 2,
+ vip = '192.168.1.42',
+ vrrp = true,
+ # NOTE: _each_ host will have four bricks with these devices...
+ brick_params_defaults = [ # note the spelling and type...
+ {'dev' => '/dev/sdb'},
+ {'dev' => '/dev/sdc'},
+ {'dev' => '/dev/sdd'},
+ {'dev' => '/dev/sde'},
+ ],
+ brick_param_defaults => { # every brick will use these...
+ lvm => false,
+ xfs_inode64 => true,
+ force => true,
+ },
+ #brick_params => {}, # NOTE: you can also use this option to
+ # override a particular fqdn with the options that you need to!
+ }
+}
+