nfs client #0
Description
Installs and configures an nfs4 daemon with the standard accompanying services, portmapd and idmapd.
To use this, client services must implement hooks for a storage relation that is compatible with the 'mount' interface ( 'http://juju.ubuntu.com/Interfaces/mount' ).
Exported shares get created as new services are joined.
Service units with the same servicename share the same exported filesystem.
Here's a simple example
#!/bin/bash
juju bootstrap
# spin up an app... wiki for example
juju deploy mysql
juju deploy mediawiki
juju add-relation mysql mediawiki
# spin up storage
juju deploy nfs
# add storage to the app
juju deploy --config nfs-client.yaml nfs-client
# config tells it where to mount
juju add-relation mediawiki nfs-client
juju add-relation nfs-client:nfs nfs
but with more than one client service, you've really got to name the sub
#!/bin/bash
juju bootstrap
# spin up a couple of wikis
juju deploy mysql
juju deploy mediawiki wiki1
juju add-relation mysql wiki1
juju deploy mediawiki wiki2
juju add-relation mysql wiki2
# spin up storage
juju deploy nfs uploadstore
juju deploy --config etc/wiki1-nfs-client.yaml nfs-client wiki1-nfs-client
juju add-relation wiki1 wiki1-nfs-client
juju add-relation wiki1-nfs-client:nfs uploadstore
juju deploy --config etc/wiki2-nfs-client.yaml nfs-client wiki2-nfs-client
juju add-relation wiki2 wiki2-nfs-client
juju add-relation wiki2-nfs-client:nfs uploadstore
where wiki1-nfs-client.yaml
looks like:
wiki1-nfs-client:
mountpoint: "/var/lib/mediawiki/images"
Configuration
- mount_options
- (string) Default mount options
- mount_owner
- (string) Default mount owner
- ubuntu
- mountpoint
- (string) Where to mount the remote share
- /tmp/data