Generic storage charm subordinate. Intended to aid in making charms
easier to interface with external storage solutions without having
to speak and understand each type. Presents a single mount point on
the unit, and communicates that back to your service through the data
This charm aims to allow storage to be mounted and consumed in your juju
environment. Simply attach this charm to any that supports the "block-storage"
interface, and the charmed application will start writing data into the provided
NOTE: This charm has a dependency on provider-specific metadata (like instance id).
If using the "block-storage-broker" relation to mount stroage from the cloud, you will
be limited to:
Other cloud providers are planned for the future, and patches are certainly welcome.
NOTE2: If using this charm to mount filesystems over NFS, provider-specific limitations
do not exist.
juju deploy <principal charm>
juju deploy storage --config <my_storage_config.yaml>
juju add-relation <principal_charm> storage
The Storage charm is designed to make your life easier as a charm author.
Implementing the data relation is very straightforward.
Sample Joined Hook:
Sample Changed Hook:
if [ -z "$mount" ] ; then
juju-log "wait for related service to start"
service my_service stop
service my_service start