Permalink
Please sign in to comment.
Browse files
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.
- Loading branch information...
Showing
with
94 additions
and 17 deletions.
- +51 −0 examples/filesystem-backed-bricks-example.pp
- +43 −17 manifests/brick.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'], | ||
| + } | ||
| +} | ||
| + |
0 comments on commit
231e4b9