summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2013-06-23 08:43:58 -0400
committerJames Shubin <james@shubin.ca>2013-06-23 08:43:58 -0400
commit94454ea365fb1f97eeb3f81759ae6e33567971aa (patch)
tree9ffd742119962f3fadea19b811882ab666f732ab /examples
parent781df95c9a4bdf12d10344c99378f1dea71dfb07 (diff)
downloadpuppet-gluster-94454ea365fb1f97eeb3f81759ae6e33567971aa.tar.gz
puppet-gluster-94454ea365fb1f97eeb3f81759ae6e33567971aa.tar.xz
puppet-gluster-94454ea365fb1f97eeb3f81759ae6e33567971aa.zip
Added a puppet-{gluster,nfs,ipa} example.
At the moment, the NFS and IPA portions are not HA.
Diffstat (limited to 'examples')
-rw-r--r--examples/gluster-nfs-ipa-example.pp47
1 files changed, 47 insertions, 0 deletions
diff --git a/examples/gluster-nfs-ipa-example.pp b/examples/gluster-nfs-ipa-example.pp
new file mode 100644
index 0000000..739c5c4
--- /dev/null
+++ b/examples/gluster-nfs-ipa-example.pp
@@ -0,0 +1,47 @@
+# gluster::client example using puppet-nfs and puppet-ipa to serve up your data
+# NOTE: you'll need to consult puppet-ipa/examples/ to setup the freeipa server
+
+# mount a share on your nfs server, at the moment that nfs server is a SPOF :-(
+$gvip = '203.0.113.42'
+gluster::client { '/export/homes':
+ server => "${gvip}:/homes",
+ rw => true,
+ mounted => true,
+ require => Gluster::Volume['homes'], # TODO: too bad this can't ensure it's started
+}
+
+class { '::nfs::server':
+ domain => "${::domain}",
+ ipa => 'nfs', # the ipa::client::service name
+ kerberos => 'ipa', # optional when we're using ipa
+ shorewall => true,
+}
+
+# the $name here is the client mountpoint when we use: safety => false!
+nfs::server::export { '/homes/': # name is the client mountpoint
+ export => '/export/homes/',
+ rw => true,
+ async => false,
+ wdelay => true, # if false then async must be false too
+ rootsquash => true,
+ sec => true, # set true for automatic kerberos magic
+ options => [], # add any other options you might want!
+ hosts => ["ws*.${domain}"], # export to these hosts only...
+ exported => true, # create exported resources for clients
+ tagas => 'homes',
+ safety => false, # be super clever (see the module docs)
+ comment => 'Export home directories for ws*',
+ require => Gluster::Client['/export/homes/'],
+}
+
+# and here is how you can collect / mount ~automatically on the client:
+class { '::nfs::client':
+ kerberos => true,
+}
+
+nfs::client::mount::collect { 'homes': # match the $tagas from export!
+ server => "${::hostname}.${::domain}",
+ #suid => false,
+ #clientaddr => "${::ipaddress}", # use this if you want!
+}
+