Juju Charm - Cinder
Go to file
Corey Bryant efb1a1e2d9 Update rabbit driver config options
The stein version of python-oslo.messaging (9.0.0+) has removed
the following config options from the [oslo_messaging_rabbit]
section:

rabbit_host, rabbit_port, rabbit_hosts, rabbit_userid,
rabbit_password, rabbit_virtual_host rabbit_max_retries, and
rabbit_durable_queues.

The above change requires a sync from charm-helpers.

Additionally the transport_url directive has been moved to the
[DEFAULT] section.

These have been deprecated since Ocata, therefore this change
will be provided to pre-Stein templates in order to drop
deprecation warnings.

See release notes at:
https://docs.openstack.org/releasenotes/oslo.messaging/index.html

test_300_cinder_config is also removed in this change as amulet
tests no longer need to confirm config file settings.

Change-Id: Ia93be49430e8d95c38ed521d08bbb62f47e13e59
Closes-Bug: #1817672
2019-03-05 15:26:24 -05:00
actions Migrate to python3 only charm 2019-01-30 12:36:21 +00:00
charmhelpers Update rabbit driver config options 2019-03-05 15:26:24 -05:00
hooks Ensure identity-joined execute post upgrade. 2019-03-04 11:56:27 +00:00
lib Update tox.ini files from release-tools gold copy 2016-09-09 19:22:01 +00:00
templates Update rabbit driver config options 2019-03-05 15:26:24 -05:00
tests Update rabbit driver config options 2019-03-05 15:26:24 -05:00
unit_tests Ensure identity-joined execute post upgrade. 2019-03-04 11:56:27 +00:00
.gitignore Fix _parse_block_device to return (str, int) 2017-11-15 14:12:14 +00:00
.gitreview Add gitreview prior to migration to openstack 2016-02-24 21:53:29 +00: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
.stestr.conf Fix lint in unit tests re: py3-first and py2 compat 2018-11-01 21:34:52 -05:00
.testr.conf Add support for test execution using tox 2015-06-12 16:44:29 +01:00
.zuul.yaml Added tox environment for gathering coverage 2019-03-01 11:10:26 +01:00
LICENSE Re-license charm as Apache-2.0 2016-06-28 12:09:16 +01:00
Makefile Tests dir no longer need copy of charmhelpers 2018-10-10 12:40:04 +00:00
README.md Remove deploy from source support 2018-01-12 13:59:33 +00:00
actions.yaml Remove deploy from source support 2018-01-12 13:59:33 +00:00
charm-helpers-hooks.yaml Update charm-helpers-hooks.yaml and sync ch 2019-02-12 15:56:10 -08:00
config.yaml Remove deploy from source support 2018-01-12 13:59:33 +00:00
copyright Re-license charm as Apache-2.0 2016-06-28 12:09:16 +01:00
hardening.yaml Add hardening support 2016-03-31 10:43:24 +01:00
icon.svg Update charm icon 2017-08-02 18:06:14 +01:00
metadata.yaml Update series metadata 2018-07-11 14:03:53 -05:00
requirements.txt Update requirements 2018-10-03 11:40:40 -05:00
revision added postgresql support 2014-03-25 11:34:12 +01:00
setup.cfg Add project infomation into setup.cfg 2019-01-07 15:08:34 +00:00
test-requirements.txt Update requirements 2018-10-03 11:40:40 -05:00
tox.ini Excluding unit_tests from coverage 2019-03-01 15:03:15 +01: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)

HA/Clustering

There are two mutually exclusive high availability options: using virtual IP(s) or DNS. In both cases, a relationship to hacluster is required which provides the corosync back end HA functionality.

To use virtual IP(s) the clustered nodes must be on the same subnet such that the VIP is a valid IP on the subnet for one of the node's interfaces and each node has an interface in said subnet. The VIP becomes a highly-available API endpoint.

At a minimum, the config option 'vip' must be set in order to use virtual IP HA. If multiple networks are being used, a VIP should be provided for each network, separated by spaces. Optionally, vip_iface or vip_cidr may be specified.

To use DNS high availability there are several prerequisites. However, DNS HA does not require the clustered nodes to be on the same subnet. Currently the DNS HA feature is only available for MAAS 2.0 or greater environments. MAAS 2.0 requires Juju 2.0 or greater. The clustered nodes must have static or "reserved" IP addresses registered in MAAS. The DNS hostname(s) must be pre-registered in MAAS before use with DNS HA.

At a minimum, the config option 'dns-ha' must be set to true and at least one of 'os-public-hostname', 'os-internal-hostname' or 'os-internal-hostname' must be set in order to use DNS HA. One or more of the above hostnames may be set.

The charm will throw an exception in the following circumstances: If neither 'vip' nor 'dns-ha' is set and the charm is related to hacluster If both 'vip' and 'dns-ha' are set as they are mutually exclusive If 'dns-ha' is set and none of the os-{admin,internal,public}-hostname(s) are set

Network Space support

This charm supports the use of Juju Network Spaces, allowing the charm to be bound to network space configurations managed directly by Juju. This is only supported with Juju 2.0 and above.

API endpoints can be bound to distinct network spaces supporting the network separation of public, internal and admin endpoints.

Access to the underlying MySQL instance can also be bound to a specific space using the shared-db relation.

To use this feature, use the --bind option when deploying the charm:

juju deploy cinder --bind "public=public-space internal=internal-space admin=admin-space shared-db=internal-space"

alternatively these can also be provided as part of a juju native bundle configuration:

cinder:
  charm: cs:xenial/cinder
  num_units: 1
  bindings:
    public: public-space
    admin: admin-space
    internal: internal-space
    shared-db: internal-space

NOTE: Spaces must be configured in the underlying provider prior to attempting to use them.

NOTE: Existing deployments using os-*-network configuration options will continue to function; these options are preferred over any network space binding provided if set.