summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2014-03-06 00:19:06 -0500
committerJames Shubin <james@shubin.ca>2014-03-16 22:38:47 -0400
commit12df64beeb2f2bf003c86ca39ddb368a53afafee (patch)
treec2398c8fa16f810d6845b0d4d749085cf2026f13 /examples
parent06454f4f4d61d9c77fe1155c3c9e7de70fbc43b8 (diff)
downloadpuppet-gluster-12df64beeb2f2bf003c86ca39ddb368a53afafee.tar.gz
puppet-gluster-12df64beeb2f2bf003c86ca39ddb368a53afafee.tar.xz
puppet-gluster-12df64beeb2f2bf003c86ca39ddb368a53afafee.zip
Allow specifying brick device and other parameters in gluster::simple.
This patch adds support to specify the brick device values as a hash. It also allows for separate defaults that apply to the whole cluster.
Diffstat (limited to 'examples')
-rw-r--r--examples/gluster-simple-physical-example.pp40
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/gluster-simple-physical-example.pp b/examples/gluster-simple-physical-example.pp
new file mode 100644
index 0000000..377958b
--- /dev/null
+++ b/examples/gluster-simple-physical-example.pp
@@ -0,0 +1,40 @@
+#
+# simple gluster setup for physical provisioning.
+# (yeah, that's it-- for iron!)
+#
+
+node /^annex\d+$/ { # annex{1,2,..N}
+
+ class { '::gluster::simple':
+ # by allowing you to enumerate these things here in this class,
+ # you're able to specify all of these from a provisioning tool.
+ # this is useful in a tool like foreman which only lets you set
+ # class variables, and doesn't let you define individual types!
+ replica => 2,
+ vip = '192.168.1.42',
+ vrrp = true,
+ # NOTE: this example will show you different possibilities, but
+ # it is probably not sane to define your devices in a mixed way
+ brick_params => {
+ 'fqdn1.example.com' => [
+ {dev => '/dev/disk/by-uuid/01234567-89ab-cdef-0123-456789abcdef'},
+ {dev => '/dev/sde', partition => false},
+ ],
+ 'fqdn2.example.com' => [
+ {dev => '/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:0', raid_su => 256, raid_sw => 10}
+ {dev => '/dev/disk/by-id/wwn-0x600508e0000000002b012b744715743a', lvm => true},
+ ],
+ #'fqdnN.example.com' => [...],
+ },
+
+ # these will get used by every brick, even if only specified by
+ # the count variable... keep in mind that without the $dev var,
+ # some of these parameters aren't used by the filesystem brick.
+ brick_param_defaults => {
+ lvm => false,
+ xfs_inode64 => true,
+ force => true,
+ },
+ }
+}
+