Juju Charm - Cinder
Go to file
Zhang Hua 0443960b5a Support disabling apache wsgi socket rotation
Bug LP 1863232 introduced a new Apache configuration option called
WSGISocketRotation which allows users to disable wsgi socket
rotation. This patch makes this configurable with a new
wsgi-socket-rotation config option that defaults to the Apache
default and can optionally be set to False.

Closes-Bug: #2021550
Change-Id: Ib249be7f03ed3156c81fffb6cbac251c502e9b80
2023-11-22 13:12:41 +08:00
actions Check if the newhost exists instead of currenthost 2023-02-17 02:41:35 +00:00
charmhelpers Support disabling apache wsgi socket rotation 2023-11-22 13:12:41 +08:00
files Sync charm/ceph helpers, tox, and requirements 2019-09-30 22:09:55 -05:00
hooks Add identity-credentials relation support 2023-02-14 10:04:08 +08:00
lib Update tox.ini files from release-tools gold copy 2016-09-09 19:22:01 +00:00
templates Render [service_user] only for identity-service relation 2023-06-29 15:33:40 -04:00
tests Re-enable AppArmor enforcement 2022-09-29 04:35:10 +00:00
unit_tests Check if the newhost exists instead of currenthost 2023-02-17 02:41:35 +00:00
.gitignore Update to build using charmcraft - xena batch 2022-03-24 06:10:27 +00:00
.gitreview Update to build using charmcraft - xena batch 2022-03-24 06:10:27 +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
.zuul.yaml Update the bundles to use the stable track, edge risk for xena 2022-06-30 15:38:54 +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
README.md Add identity-credentials relation support 2023-02-14 10:04:08 +08:00
actions.yaml Add security-checklist action 2019-03-13 10:32:25 +01:00
bindep.txt Process subordinate releases packages map 2021-09-28 10:44:26 +02:00
build-requirements.txt Update to build using charmcraft - xena batch 2022-03-24 06:10:27 +00:00
charm-helpers-hooks.yaml [xena] Ensure get_requests_for_local_unit doesn't fail on incomplete relation 2023-08-17 13:57:14 +01:00
charmcraft.yaml Update the charmcraft.yaml for xena (no 22.04 base) 2022-05-16 18:44:57 +01:00
config.yaml Support disabling apache wsgi socket rotation 2023-11-22 13:12:41 +08: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 Add identity-credentials relation support 2023-02-14 10:04:08 +08:00
osci.yaml Update to build using charmcraft - xena batch 2022-03-24 06:10:27 +00:00
pip.sh Add xena bundles 2021-09-22 10:31:35 +01:00
rename.sh Update to build using charmcraft - xena batch 2022-03-24 06:10:27 +00:00
requirements.txt Sync release-tools 2021-07-22 14:53:03 +02:00
revision added postgresql support 2014-03-25 11:34:12 +01:00
setup.cfg setup.cfg: Replace dashes with underscores 2021-05-28 08:39:12 +00:00
test-requirements.txt Support disabling apache wsgi socket rotation 2023-11-22 13:12:41 +08:00
tox.ini [xena] Ensure get_requests_for_local_unit doesn't fail on incomplete relation 2023-08-17 13:57:14 +01:00

README.md

Overview

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

Usage

Configuration

This section covers common and/or important configuration options. See file config.yaml for the full list of options, along with their descriptions and default values. See the Juju documentation for details on configuring applications.

block-device

Specifies the storage source. Setting this option to 'None' will allow for storage to be managed by separate charms. See sections Ceph-backed storage, LVM-backed storage, and NetApp-backed storage.

Important: The practice of setting the block-device option to a local block device is deprecated. Doing so enacts the charm's built-in support for LVM storage. This feature will soon be removed from the charm, along with the option's default value of 'sdb'.

openstack-origin

States the software sources. A common value is an OpenStack UCA release (e.g. 'cloud:bionic-ussuri' or 'cloud:focal-wallaby'). See Ubuntu Cloud Archive. The underlying host's existing apt sources will be used if this option is not specified (this behaviour can be explicitly chosen by using the value of 'distro').

Deployment

This section includes two different deployment scenarios, each of which requires these 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.

Ceph-backed storage

Cinder can be backed by Ceph, which provides volumes with scalability and redundancy.

Note: Ceph is the recommended storage method for production Cinder deployments.

These instructions assume a pre-existing Ceph cluster.

File cinder.yaml contains the following:

    cinder:
        block-device: None

Option block-device must be set to 'None' to disable the local block device.

Here, Cinder is deployed to a container on machine '1' and related to the Ceph cluster via the cinder-ceph subordinate charm:

juju deploy --to lxd:1 --config cinder.yaml cinder
juju deploy cinder-ceph
juju add-relation cinder-ceph:storage-backend cinder:storage-backend
juju add-relation cinder-ceph:ceph ceph-mon:client
juju add-relation cinder-ceph:ceph-access nova-compute:ceph-access

Proceed with a group of commands common to both scenarios:

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

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][cinder-purestorage-charm] 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.

There are two mutually exclusive high availability options: using virtual IP(s) or DNS. In both cases the hacluster subordinate charm is used to provide the Corosync and Pacemaker backend HA functionality.

See OpenStack high availability in the OpenStack Charms Deployment Guide for details.

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 section covers Juju actions supported by the charm. Actions allow specific operations to be performed on a per-unit basis. To display action descriptions run juju actions --schema cinder. If the charm is not deployed then see file actions.yaml.

  • openstack-upgrade
  • pause
  • remove-services
  • rename-volume-host
  • resume
  • security-checklist
  • volume-host-add-driver

Policy overrides

Policy overrides is an advanced feature that allows an operator to override the default policy of an OpenStack service. The policies that the service supports, the defaults it implements in its code, and the defaults that a charm may include should all be clearly understood before proceeding.

Caution: It is possible to break the system (for tenants and other services) if policies are incorrectly applied to the service.

Policy statements are placed in a YAML file. This file (or files) is then (ZIP) compressed into a single file and used as an application resource. The override is then enabled via a Boolean charm option.

Here are the essential commands (filenames are arbitrary):

zip overrides.zip override-file.yaml
juju attach-resource cinder policyd-override=overrides.zip
juju config cinder use-policyd-override=true

See Policy overrides in the OpenStack Charms Deployment Guide for a thorough treatment of this feature.

Documentation

The OpenStack Charms project maintains two documentation guides:

Bugs

Please report bugs on Launchpad.