summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2013-09-07 16:32:27 -0400
committerJames Shubin <james@shubin.ca>2013-09-07 16:32:27 -0400
commit231e4b9ff771d33514d78518e14fe13148e7b431 (patch)
tree865e68b7967e9ca45a32b940a28efd5c10a26b70 /examples
parent4345cf9e625259585f7f8541e08c0e79a914e78c (diff)
downloadpuppet-gluster-231e4b9ff771d33514d78518e14fe13148e7b431.tar.gz
puppet-gluster-231e4b9ff771d33514d78518e14fe13148e7b431.tar.xz
puppet-gluster-231e4b9ff771d33514d78518e14fe13148e7b431.zip
Make it easier to use simple filesystem paths for bricks.
The added example should make this obvious. Heed the warning in using this feature. I find it most useful for rapid prototyping using vm's.
Diffstat (limited to 'examples')
-rw-r--r--examples/filesystem-backed-bricks-example.pp51
1 files changed, 51 insertions, 0 deletions
diff --git a/examples/filesystem-backed-bricks-example.pp b/examples/filesystem-backed-bricks-example.pp
new file mode 100644
index 0000000..461283c
--- /dev/null
+++ b/examples/filesystem-backed-bricks-example.pp
@@ -0,0 +1,51 @@
+#
+# example of a simple replicate with 2 hosts, and filesystem path bricks
+# NOTE: this should be put on *every* gluster host
+#
+
+class gluster_base {
+
+ class { '::gluster::server':
+ hosts => ['annex1.example.com', 'annex2.example.com'],
+ ips => ['192.168.123.101', '192.168.123.102'],
+ shorewall => true,
+ }
+
+ gluster::host { 'annex1.example.com':
+ # use uuidgen to make these
+ uuid => '1f660ca2-2c78-4aa0-8f4d-21608218c69c',
+ }
+
+ # note that this is using a folder on your existing filesystem...
+ # this can be useful for prototyping gluster using virtual machines
+ # if this isn't a separate partition, remember that your root fs will
+ # run out of space when your gluster volume does!
+ gluster::brick { 'annex1.example.com:/data/gluster-storage1':
+ areyousure => true,
+ }
+
+ gluster::host { 'annex2.example.com':
+ uuid => '2fbe6e2f-f6bc-4c2d-a301-62fa90c459f8',
+ }
+
+ gluster::brick { 'annex2.example.com:/data/gluster-storage2':
+ areyousure => true,
+ }
+
+ $brick_list = [
+ 'annex1.example.com:/data/gluster-storage1',
+ 'annex2.example.com:/data/gluster-storage2',
+ ]
+
+ gluster::volume { 'examplevol':
+ replica => 2,
+ bricks => $brick_list,
+ start => undef, # i'll start this myself
+ }
+
+ # namevar must be: <VOLNAME>#<KEY>
+ gluster::volume::property { 'examplevol#auth.reject':
+ value => ['192.0.2.13', '198.51.100.42', '203.0.113.69'],
+ }
+}
+