Juju Charm - Cinder
Go to file
Nobuto Murata 9a6ab28af2 Install lsscsi by default for zed or older
lsscsi is a dependency of os-brick for volume related operations
including creating a boot volume with iSCSI/FC backends. However, it
wasn't installed by default until jammy-antelope (lunar) due to a
packaging bug. It hasn't been an obvious issue especially when the
cinder-volume unit and the nova-compute unit are co-located since
nova-compute charm installs the package. Instead of applying a
workaround to all backend charms, let's apply the workaround in the
cinder charm since lsscsi is installed by default for later OpenStack
releases anyway and it's a small package.

Closes-Bug: #1939390
Change-Id: I131e12c53c78957873b6a75a3b1b67b1725b43ed
2024-08-20 12:22:14 +09:00
actions Check if the newhost exists instead of currenthost 2022-04-25 16:22:53 +08:00
charmhelpers Add keystone audit middleware API logging 2024-06-25 10:02:57 -07:00
files Sync charm/ceph helpers, tox, and requirements 2019-09-30 22:09:55 -05:00
hooks Install lsscsi by default for zed or older 2024-08-20 12:22:14 +09:00
lib Update tox.ini files from release-tools gold copy 2016-09-09 19:22:01 +00:00
templates Add keystone audit middleware API logging 2024-06-25 10:02:57 -07:00
tests Add keystone audit middleware API logging 2024-06-25 10:02:57 -07:00
unit_tests Fix missing assert_ prefix on called_with 2023-02-03 10:46:04 +08:00
.gitignore Update to classic charms to build using charmcraft in CI 2022-02-17 12:30:05 -05:00
.gitreview Updates for zed stable branch creation 2022-10-20 16:22:05 -07: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
.zuul.yaml Add Kinetic and Zed support 2022-08-26 18:40:29 +00:00
actions.yaml Add security-checklist action 2019-03-13 10:32:25 +01:00
bindep.txt Add Kinetic and Zed support 2022-08-26 18:40:29 +00:00
build-requirements.txt Update to classic charms to build using charmcraft in CI 2022-02-17 12:30:05 -05:00
charm-helpers-hooks.yaml Updates for zed stable branch creation 2022-10-20 16:22:05 -07:00
charmcraft.yaml Ensure that kinetic/22.10 is enabled 2022-08-31 19:47:04 +01:00
config.yaml Add keystone audit middleware API logging 2024-06-25 10:02:57 -07: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
LICENSE Re-license charm as Apache-2.0 2016-06-28 12:09:16 +01:00
Makefile Sync helpers for 20.05 2020-05-18 14:40:01 +02:00
metadata.yaml Add identity-credentials relation support 2023-01-25 11:25:22 +08:00
osci.yaml Add Kinetic and Zed support 2022-08-26 18:40:29 +00:00
pip.sh Add xena bundles 2021-09-22 10:31:35 +01:00
README.md Add identity-credentials relation support 2023-01-25 11:25:22 +08:00
rename.sh Update to classic charms to build using charmcraft in CI 2022-02-17 12:30:05 -05:00
requirements.txt Add Kinetic and Zed support 2022-08-26 18:40:29 +00:00
revision added postgresql support 2014-03-25 11:34:12 +01:00
setup.cfg Update metadata in setup.cfg 2022-09-26 04:23:17 +00:00
test-requirements.txt Use service_domain in [service_user] section 2023-07-06 12:24:59 -04:00
tox.ini [zed] Ensure get_requests_for_local_unit doesn't fail on incomplete relation 2023-08-18 17:40:17 +01:00

Overview

The cinder charm deploys Cinder, the Block Storage (volume) service for OpenStack. The charm works alongside other Juju-deployed OpenStack services.

Usage

Configuration

To display all configuration option information run juju config <application>. If the application is not deployed then see the charm's Configure tab in the Charmhub. Finally, the Juju documentation provides general guidance on configuring applications.

Deployment

The cinder application requires the following applications to be present: keystone, nova-cloud-controller, nova-compute, rabbitmq-server, and a cloud database.

The database application is determined by the series. Prior to focal percona-cluster is used, otherwise it is mysql-innodb-cluster. In the example deployment below mysql-innodb-cluster has been chosen.

Deploy Cinder itself (here, to a container on machine '1'), add relations to the core cloud applications, and then connect it to the cloud database:

juju deploy --to lxd:1 --config cinder.yaml cinder
juju add-relation cinder:identity-service keystone:identity-service
juju add-relation cinder:cinder-volume-service nova-cloud-controller:cinder-volume-service
juju add-relation cinder:amqp rabbitmq-server:amqp

juju deploy mysql-router cinder-mysql-router
juju add-relation cinder-mysql-router:db-router mysql-innodb-cluster:db-router
juju add-relation cinder-mysql-router:shared-db cinder:shared-db

Multiple backend storage solutions are described next.

Ceph-backed storage

Cinder can be backed by Ceph, which is the recommended storage method for production Cinder deployments. This functionality is provided by the [cinder-ceph][cinder-ceph-charm] subordinate charm.

LVM-backed storage

Cinder can be backed by storage local to the cinder unit, where local block devices are used as LVM physical volumes, and volumes are offered via iSCSI. This functionality is provided by the cinder-lvm subordinate charm.

Note

: Built-in support for LVM in the cinder charm is deprecated.

NetApp-backed storage

Cinder can be backed by a NetApp appliance local to the cinder unit, where volumes are offered via iSCSI or NFS. This functionality is provided by the cinder-netapp subordinate charm.

Pure Storage-backed storage

Cinder can be backed by a Pure Storage appliance reachable by its API endpoint. This functionality is provided by the cinder-purestorage subordinate charm.

Separate Volume Service

For certain operations when an instance is not involved, the cinder application will connect directly to the storage for operations such as cloning a volume from a glance image. You can deploy a second cinder application for the volume service only where the primary cinder application cannot connect to this storage. This may be required for iSCSI connections because LXD containers cannot create iSCSI connections or where you need a physical Fibre Channel connection. This is not required for Ceph deployments which use userspace RBD tools.

  1. Deploy cinder with enabled-services=api,scheduler

  2. Deploy a second application of cinder named 'cinder-volume' with enabled-services=volume

  3. Relate the storage subordinate (e.g. cinder-purestorage) to the cinder-volume application only (not to the 'cinder' application)

  4. Keystone should be related to cinder:identity-service but cinder-volume:identity-credentials

    The primary cinder application gets keystone credentials when registering a service endpoint via the identity-service relation. The cinder-volume application does not register a service, so we need to relate identity-credentials instead. The image volume cache will not work without this relation.

  5. Both cinder and cinder-volume should otherwise have the same relations

High availability

This charm supports high availability via HAcluster.

When more than one unit is deployed with the hacluster application the charm will bring up an HA active/active cluster.

Network spaces

This charm supports the use of Juju network spaces (Juju v.2.0). This feature optionally allows specific types of the application's network traffic to be bound to subnets that the underlying hardware is connected to.

Note

: Spaces must be configured in the backing cloud prior to deployment.

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.

For example, providing that spaces 'public-space', 'internal-space', and 'admin-space' exist, the deploy command above could look like this:

juju deploy --config cinder.yaml cinder \
   --bind "public=public-space internal=internal-space admin=admin-space shared-db=internal-space"

Alternatively, configuration can be provided as part of a bundle:

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

Note

: Existing cinder units configured with the os-admin-network, os-internal-network, or os-public-network options will continue to honour them. Furthermore, these options override any space bindings, if set.

Actions

This charm supports actions.

Actions allow specific operations to be performed on a per-unit basis. To display actions and their descriptions run juju actions --schema <application>. If the application is not deployed then see the charm's Actions tab in the Charmhub.

Policy overrides

This charm supports the policy overrides feature.

Policy overrides allow an operator to override the default policy of an OpenStack service. See Policy overrides for more information on this feature.

Documentation

The OpenStack Charms project maintains two documentation guides:

Bugs

Please report bugs on Launchpad.