Skip to content
Tim Pepper edited this page Jul 28, 2016 · 8 revisions

Potential Storage Use Cases

  1. User creates volume ahead and attach at launch
  2. User creates volume ahead and attaches later
  3. Boot from volume
  4. Create automatcially at launch time using cloud init
  5. Detach volume
  6. Destroy volume
  7. Destroy when VM exits

Initial implementation will utilize ceph. ISCSI will be supported later.


Initially Supported Use Cases / Usage Flows

Attach pre-created volume at launch

Expectation is this should be easy to implement and will follow easily after the next case. The implementation will include changes to:

  • Controller
  • Verify user permission
  • Get image URI
  • Create workload yaml with image URI included
  • Launcher
  • Insure volume is attachable (eg: local rbd commands)
  • Pass volume as qemu command line argument, if vm workload
  • Local mount of volume and pass volume as fs overlay, if container workload

Attach pre-created volume after launch

This is harder to implement than attachment of a volume ahead of workload launch. We'll focus on implementing it first. The implementation will include changes to:

  • Controller
  • Verify user permission
  • request will be made by UI using the /v2.1/​{tenant_id}​/servers/​{server_id}​/os-volume_attachments endpoint
  • ssntp command dispatched to node hosting the workload
  • Scheduler
  • routes ssntp command to node hosting the workload
  • Launcher
  • send qemu QMP commands for volume attachment (needs qemu >= 2.5?), if vm workload
  • ???, if container workload

Setup of Your Dev Environment for ceph

The easiest way to get going with ceph is to run a ceph cluster in a container on your dev box.

  • Start the docker ceph/demo image: Run docker run -d --net=host -v /etc/ceph:/etc/ceph -e MON_IP=10.0.1.4 -e CEPH_PUBLIC_NETWORK=10.0.1.0/24 ceph/demo. If your IP address changes, you need to delete /etc/ceph before restarting the container.

  • Add a ciao user: Run ceph auth get-or-create client.ciao -o /etc/ceph/ceph.client.ciao.keyring mon 'allow *' osd 'allow *' mds 'allow'

Ciao specific ceph configuration (to be implemented):

  • Configure the ciao-storage block driver to use the location of the ceph keyring and ID.
  • Controller and launcher will need to pass this information to the ciao-storage block driver at init time.