Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Various updates to storage docs #411
Conversation
anastasiamac
reviewed
May 6, 2015
| @@ -31,19 +31,21 @@ juju storage volume list | ||
| As previously mentioned, a charm which requires storage will automatically allocate the default storage (unit filesystem) by default. It is possible to instead specify the storage to be used when the service is deployed, using constraints. | ||
| -The constraints can specify the type/pool and size of the storage required. | ||
| +The constraints can specify the type/pool and size, and optionally a count, of the storage required. |
anastasiamac
May 6, 2015
Member
From what I have seen, type/pool and size have reasonable defaults as well. So, they could be "optionally" specified as well :)
anastasiamac
reviewed
May 6, 2015
| ``` | ||
| -For example, to deploy the postgresql service and have it use the unit’s local filesystem for 10 Gigabytes of storage for its ‘data’ storage requirement: | ||
| +Unless specified, the count is 1; this means that only one instance of the specified store will be created. |
anastasiamac
May 6, 2015
Member
Well, if store in charm specifies that minimum count is 0, then, when not specified, the count would be 0 not 1.
axw
May 6, 2015
Member
It's definitely 1. If you don't specify any storage constraints for a store with min=0, then it won't create anything. But if you do specify constraints without count, it'll default to just creating 1.
wallyworld
reviewed
May 6, 2015
| -### Persistence (not working!) | ||
| +### Persistence (incomplete!) | ||
| + | ||
| +Some providers have the option to detach storage from the lifespan of the instance(s) which created/used it. This means that even after services have been removed, the storage and its contents still exist in your cloud, which may be useful for backup, recovery or transport purposes. Juju will not allow you to completely destroy an environment which contains such storage (except by using the --force option). To create persistent volumes, create a storage pool with the "persistent" attribute set to "true". Persistent volumes are currently supported by the EBS and Cinder storage providers. Currently, all Cinder volumes are considered persistent, whether the pool is configured as such. |
wallyworld
reviewed
May 6, 2015
| -OpenStack | ||
| -MAAS | ||
| +The EC2/EBS provider currently supports the following pool configuration attributes: | ||
| + - volume-type: specifies the EBS volume type to create (gp2 (ssd), io1 (provisioned-iops), standard (magnetic)). By default, magnetic/standard volumes will be created. An 'ebs-ssd' pool is created in all EC2 environments, which defaults the volume-type to ssd/gp2. |
wallyworld
May 6, 2015
Owner
it's not 100% clear to a new user what the EBS option is vs the Juju one ie what does a user type into the juju create pool command gp2 or ssd
wallyworld
reviewed
May 6, 2015
| -MAAS | ||
| +The EC2/EBS provider currently supports the following pool configuration attributes: | ||
| + - volume-type: specifies the EBS volume type to create (gp2 (ssd), io1 (provisioned-iops), standard (magnetic)). By default, magnetic/standard volumes will be created. An 'ebs-ssd' pool is created in all EC2 environments, which defaults the volume-type to ssd/gp2. | ||
| + - iops: the number of IOPS for provisioned-iops volume types. |
wallyworld
May 6, 2015
Owner
i think we could/should add a note that iops restrictions exist, see http://blah for more details
wallyworld
reviewed
May 6, 2015
| @@ -107,29 +120,45 @@ Storage requirements _may_ be added to the 'metadata.yaml' of the charm as follo | ||
| storage: | ||
| data: | ||
| type: filesystem | ||
| + description: junk storage | ||
| + shared: false |
wallyworld
May 6, 2015
Owner
if we add shared and read-only can we add a note here that they're not supported yet
axw
added some commits
May 6, 2015
wallyworld
reviewed
May 6, 2015
| location: /srv/data | ||
| ``` | ||
| -Here the charm is asking for storage it is calling 'data', and it further defines a type and location. It is possible to specify as many entries as desired for storage, and all of the related keys are optional. | ||
| +Here the charm is asking for storage it is calling 'data', and it further defines a type and location. It is possible to specify as many entries as desired for storage, and all but the 'type' key are optional. The 'type' attribute specifies the type of the storage: filesystem or block (i.e. block device/disk). The 'minimum-size' attribute specifies the minimum size of the store, overriding the default of 1G if the user does not specify a size. The location specifies the path at which to mount filesystem-type storage. The 'read-only' and 'shared' attributes are currently not handled. Support will be added in a future version of Juju. |
wallyworld
May 6, 2015
Owner
instead of 1G, can we say either 1GiB or 1GB (I can't recall which OTTOMH) just to be 100% explicit. or does 1G mean the same as 1GB
axw
May 6, 2015
Member
We define 1G to be 1GiB. I've changed instances of 1G in descriptions to 1GiB, but left as 1G in the example CLI invocations.
wallyworld
reviewed
May 6, 2015
| +The storage-attached hooks will be run before the install and upgrade-harm hooks, so that installation and upgrade routines may use the storage. The storage-detaching hooks will be run before storage is detached, and always before the stop hook is run, to allow the charm to gracefully release resources before they are removed and before the unit terminates. |
wallyworld
reviewed
May 6, 2015
| - Charm upgrade does not currently check for incompatible changes to storage requirements in deployed charms. | ||
| -- No X-storage-detach(ing|ed) hook yet; it hopefully goes without saying, but anyway: since storage destruction isn't yet done, you won't be notified when storage is destroyed. | ||
| - storage-add command: this is being worked on now, and will hopefully be ready soon. |
axw
reviewed
May 6, 2015
| - - volume-type: may be "magnetic", "ssd", or "provisioned-iops" | ||
| - - iops: number of provisioned IOPS (requires volume-type=provisioned-iops) | ||
| - | ||
| -Some storage providers also support a "persistent=<bool>" pool attribute. By using this, Juju will not tie the lifetime of storage entities (volumes, filesystems) to the lifetime of the machines that they are attached to. In EC2/EBS terms, a persistent volume is one without any attachments having the DeleteOnTermination flag set. Juju will not allow you to cleanly destroy an environment with persistent volumes; you may use "--force" to subvert this as usual, but please be aware that this will leak the resource. | ||
| UNIMPLEMENTED/CAVEATS |
axw
May 6, 2015
Member
already did:
"Charm upgrade does not currently check for incompatible changes to storage requirements in deployed charms."
axw
added some commits
May 6, 2015
|
Excellent. Thanks for the updates on this! |
axw commentedMay 6, 2015
No description provided.