Juju Charm - Cinder
Go to file
David Ames 4b4e066154 [1chb1n, r=thedac] wait for unit status and turn on releases for amulet tests 2016-01-21 11:58:50 -08:00
actions Import CONFIGS instead of calling register_configs() again. 2015-09-22 21:03:02 +00:00
hooks [corey.bryant,r=osci] Add hooks/charmhelpers/payload/archive.py 2016-01-11 13:22:39 +00:00
templates Add keymgr encryption_auth_url as a workaround for bug 1516085 2015-12-15 10:20:01 +00:00
tests rebase 2016-01-20 04:39:18 +00:00
unit_tests Tidy lint 2016-01-07 09:37:37 +00:00
.bzrignore Add extra ignores 2015-06-12 16:45:04 +01:00
.coveragerc Improve unit testing coverage 2013-10-19 17:58:37 +01:00
.project Merging python-redux and havana work. 2013-10-17 14:48:08 -07:00
.pydevproject Merging python-redux and havana work. 2013-10-17 14:48:08 -07:00
.testr.conf Add support for test execution using tox 2015-06-12 16:44:29 +01:00
Makefile Move 00-setup to prevent extra, unnecessary bootstrap in test runs. 2016-01-08 21:44:52 +00:00
README.md [corey.bryant,trivial] Update deploy from source README samples. 2015-04-30 10:49:30 +00:00
actions.yaml update actions.yaml 2015-09-15 02:21:20 +00:00
charm-helpers-hooks.yaml [corey.bryant,r=trivial] Enable sync of payload.archive 2016-01-08 02:32:19 +00:00
charm-helpers-tests.yaml sync with charm helpers 2014-07-28 14:41:38 +00:00
config.yaml Fix lp:1522130 Add sane haproxy timeout defaults and make them configurable. 2015-12-03 14:58:37 -08:00
copyright Add README, copyright. Drop example and deployer logs. 2012-11-28 16:03:42 -08:00
icon.svg Update icon.svg 2013-10-23 13:14:56 -07:00
metadata.yaml Update maintainer 2015-11-18 10:32:13 +00:00
requirements.txt Add missing files, lint actions 2015-11-03 11:00:36 +00:00
revision added postgresql support 2014-03-25 11:34:12 +01:00
setup.cfg [yolanda] Add support for postgresql 2014-03-31 12:11:01 +01:00
test-requirements.txt Add missing files, lint actions 2015-11-03 11:00:36 +00:00
tox.ini Add missing files, lint actions 2015-11-03 11:00:36 +00:00

README.md

Overview

This charm provides the Cinder volume service for OpenStack. It is intended to be used alongside the other OpenStack components, starting with the Folsom release.

Cinder is made up of 3 separate services: an API service, a scheduler and a volume service. This charm allows them to be deployed in different combination, depending on user preference and requirements.

This charm was developed to support deploying Folsom on both Ubuntu Quantal and Ubuntu Precise. Since Cinder is only available for Ubuntu 12.04 via the Ubuntu Cloud Archive, deploying this charm to a Precise machine will by default install Cinder and its dependencies from the Cloud Archive.

Usage

Cinder may be deployed in a number of ways. This charm focuses on 3 main configurations. All require the existence of the other core OpenStack services deployed via Juju charms, specifically: mysql, rabbitmq-server, keystone and nova-cloud-controller. The following assumes these services have already been deployed.

Basic, all-in-one using local storage and iSCSI

The api server, scheduler and volume service are all deployed into the same unit. Local storage will be initialized as a LVM phsyical device, and a volume group initialized. Instance volumes will be created locally as logical volumes and exported to instances via iSCSI. This is ideal for small-scale deployments or testing:

cat >cinder.cfg <<END
cinder:
    block-device: sdc
    overwrite: true
END
juju deploy --config=cinder.cfg cinder
juju add-relation cinder keystone
juju add-relation cinder mysql
juju add-relation cinder rabbitmq-server
juju add-relation cinder nova-cloud-controller

Separate volume units for scale out, using local storage and iSCSI

Separating the volume service from the API service allows the storage pool to easily scale without the added complexity that accompanies load-balancing the API server. When we've exhausted local storage on volume server, we can simply add-unit to expand our capacity. Future requests to allocate volumes will be distributed across the pool of volume servers according to the availability of storage space.

cat >cinder.cfg <<END
cinder-api:
    enabled-services: api, scheduler
cinder-volume:
    enabled-services: volume
    block-device: sdc
    overwrite: true
END
juju deploy --config=cinder.cfg cinder cinder-api
juju deploy --config=cinder.cfg cinder cinder-volume
juju add-relation cinder-api mysql
juju add-relation cinder-api rabbitmq-server
juju add-relation cinder-api keystone
juju add-relation cinder-api nova-cloud-controller
juju add-relation cinder-volume mysql
juju add-relation cinder-volume rabbitmq-server

# When more storage is needed, simply add more volume servers.
juju add-unit cinder-volume

All-in-one using Ceph-backed RBD volumes

All 3 services can be deployed to the same unit, but instead of relying on local storage to back volumes an external Ceph cluster is used. This allows scalability and redundancy needs to be satisified and Cinder's RBD driver used to create, export and connect volumes to instances. This assumes a functioning Ceph cluster has already been deployed using the official Ceph charm and a relation exists between the Ceph service and the nova-compute service.

cat >cinder.cfg <<END
cinder:
    block-device: None
END
juju deploy --config=cinder.cfg cinder
juju add-relation cinder ceph
juju add-relation cinder keystone
juju add-relation cinder mysql
juju add-relation cinder rabbitmq-server
juju add-relation cinder nova-cloud-controller

Configuration

The default value for most config options should work for most deployments.

Users should be aware of three options, in particular:

openstack-origin: Allows Cinder to be installed from a specific apt repository. See config.yaml for a list of supported sources.

block-device: When using local storage, a block device should be specified to back a LVM volume group. It's important this device exists on all nodes that the service may be deployed to.

overwrite: Whether or not to wipe local storage that of data that may prevent it from being initialized as a LVM phsyical device. This includes filesystems and partition tables. CAUTION

enabled-services: Can be used to separate cinder services between service service units (see previous section)

Deploying from source

The minimum openstack-origin-git config required to deploy from source is:

openstack-origin-git: include-file://cinder-juno.yaml

cinder-juno.yaml
    repositories:
    - {name: requirements,
       repository: 'git://github.com/openstack/requirements',
       branch: stable/juno}
    - {name: cinder,
       repository: 'git://github.com/openstack/cinder',
       branch: stable/juno}

Note that there are only two 'name' values the charm knows about: 'requirements' and 'cinder'. These repositories must correspond to these 'name' values. Additionally, the requirements repository must be specified first and the cinder repository must be specified last. All other repostories are installed in the order in which they are specified.

The following is a full list of current tip repos (may not be up-to-date):

openstack-origin-git: include-file://cinder-master.yaml

cinder-master.yaml
    repositories:
    - {name: requirements,
       repository: 'git://github.com/openstack/requirements',
       branch: master}
    - {name: oslo-concurrency,
       repository: 'git://github.com/openstack/oslo.concurrency',
       branch: master}
    - {name: oslo-config,
       repository: 'git://github.com/openstack/oslo.config',
       branch: master}
    - {name: oslo-context,
       repository': 'git://github.com/openstack/oslo.context',
       branch: master}
    - {name: oslo-db,
       repository: 'git://github.com/openstack/oslo.db',
       branch: master}
    - {name: oslo-i18n,
       repository: 'git://github.com/openstack/oslo.i18n',
       branch: master}
    - {name: oslo-messaging,
       repository: 'git://github.com/openstack/oslo.messaging',
       branch: master}
    - {name: oslo-serialization,
       repository: 'git://github.com/openstack/oslo.serialization',
       branch: master}
    - {name: oslo-utils,
       repository: 'git://github.com/openstack/oslo.utils',
       branch: master}
    - {name: oslo-rootwrap,
       repository: 'git://github.com/openstack/oslo.rootwrap',
       branch: master}
    - {name: oslo-vmware,
       repository: 'git://github.com/openstack/oslo.vmware',
       branch: master}
    - {name: osprofiler,
       repository: 'git://github.com/stackforge/osprofiler',
       branch: master}
    - {name: pbr,
       repository: 'git://github.com/openstack-dev/pbr',
       branch: master}
    - {name: python-barbicanclient,
       repository: 'git://github.com/openstack/python-barbicanclient',
       branch: master}
    - {name: python-glanceclient,
       repository: 'git://github.com/openstack/python-glanceclient',
       branch: master}
    - {name: python-novaclient,
       repository: 'git://github.com/openstack/python-novaclient',
       branch: master}
    - {name: python-swiftclient:
       repository: 'git://github.com/openstack/python-swiftclient',
       branch: master}
    - {name: sqlalchemy-migrate,
       repository: 'git://github.com/stackforge/sqlalchemy-migrate',
       branch: master}
    - {name: stevedore,
       repository: 'git://github.com/openstack/stevedore',
       branch: master}
    - {name: taskflow,
       repository: 'git://github.com/openstack/taskflow',
       branch: master}
    - {name: keystonemiddleware,
       repository: 'git://github.com/openstack/keystonemiddleware',
       branch: master}
    - {name: cinder,
       repository: 'git://github.com/openstack/cinder',
       branch: master}