Resolve subordinate charm config with Castellan
This feature allows users to pass sensitive credentials as Vault references via subordinate storage charms (e.g. cinder-ceph, cinder-netapp, etc.) so that they aren’t printed in plaintext in cinder.conf.
When the CinderSubordinateConfigContext is built, detect if any configuration values are Vault references. If references are found, the relevant configuration is added to cinder.conf, castellan.conf, and secret_map.conf so that Cinder can resolve these options at runtime using Castellan.
To use the Vault backend, a new secrets-storage relation was added using the vault-kv interface which will generate the vault credentials and KV mountpoint for each cinder unit using VaultKVContext. The approle_id and secret_id are passed via a systemd override file.
Depends-On: https://review.opendev.org/c/openstack/castellan/+/962726 Change-Id: Ib6d2ae305158430e3be6833ce1cd0aa5c6605f46 Signed-off-by: abilash-p abi.perinparasa@canonical.com
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:
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.
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.
Storage Backend Secrets
Subordinate storage backends (e.g. cinder-ceph, cinder-netapp etc.) may send configuration values that contain sensitive credentials. Rather than writing these values directly in cinder.conf in plain text, the Cinder charm can resolve them at runtime via Castellan using Vault as a backend.
When a subordinate storage charm sends a Vault secret ref (
vault://<secret-name>) as a config value, the cinder charm automatically configures Castellan, adds the secret reference to /etc/cinder/secret_map.conf and generates /etc/cinder/castellan.conf using the Vault backend.The Cinder charm must be related to Vault over the secrets-storage interface and the secret should be created in the KV mountpoint created by the secrets-storage relation (e.g. charm-cinder/*).
Example (cinder-netapp):