|
| 1 | +# Ceph Backend Configuration |
| 2 | + |
| 3 | +This guide describes how to enable Ceph backend for OpenStack services. Ceph support is **optional** and provides storage for Cinder, Glance, and Nova. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +When enabled, Ceph provides: |
| 8 | +- **Cinder Volume**: RBD backend for block storage |
| 9 | +- **Glance**: RBD backend for image storage |
| 10 | +- **Nova Compute**: RBD backend for ephemeral storage |
| 11 | + |
| 12 | +## Prerequisites |
| 13 | + |
| 14 | +1. A Ceph cluster must be deployed and accessible via storage network. |
| 15 | +2. The following Ceph configuration must be available: |
| 16 | + - Ceph configuration file (`ceph.conf`) |
| 17 | + - Ceph client keyring (`ceph.client.openstack.keyring`) |
| 18 | + - Ceph FSID (from `ceph.conf`) |
| 19 | +3. Ceph pools must be created: |
| 20 | + - `volumes` - for Cinder volumes |
| 21 | + - `images` - for Glance images |
| 22 | + - `vms` - for Nova ephemeral storage |
| 23 | + |
| 24 | +## Configuration Steps |
| 25 | + |
| 26 | +### 1. Prepare Ceph Configuration Values |
| 27 | + |
| 28 | +Retrieve and encode the Ceph configuration from your Ceph cluster: |
| 29 | + |
| 30 | +```bash |
| 31 | +# Get base64-encoded Ceph configuration |
| 32 | +CEPH_CONF=$(cat /etc/ceph/ceph.conf | base64 -w 0) |
| 33 | +CEPH_KEYRING=$(cat /etc/ceph/ceph.client.openstack.keyring | base64 -w 0) |
| 34 | + |
| 35 | +# Extract FSID from secret/ alternatively can be fetched from ceph.conf |
| 36 | +FSID=$(oc get secret ceph-conf-files -o json | jq -r '.data."ceph.conf"' | base64 -d | grep fsid | sed -e 's/fsid = //') |
| 37 | +``` |
| 38 | + |
| 39 | +### 2. Enable Ceph in Control Plane |
| 40 | + |
| 41 | +Edit `examples/dt/perfscale/scalelab/kustomization.yaml` and uncomment: |
| 42 | + |
| 43 | +```yaml |
| 44 | +components: |
| 45 | + - ../../../../dt/perfscale/scalelab/ |
| 46 | + # To enable Ceph, uncomment the following line: |
| 47 | + - ../../../../dt/perfscale/scalelab/ceph/ # ← Uncomment this |
| 48 | + |
| 49 | +resources: |
| 50 | + - networking/nncp/values.yaml |
| 51 | + - service-values.yaml |
| 52 | + # To enable Ceph, uncomment the following line: |
| 53 | + - service-values-ceph.yaml # ← Uncomment this |
| 54 | +``` |
| 55 | +
|
| 56 | +Edit `service-values-ceph.yaml` and replace the following values: |
| 57 | + |
| 58 | +```yaml |
| 59 | +data: |
| 60 | + # Ceph conf and keyring |
| 61 | + ceph: |
| 62 | + conf: CHANGEME_CEPH_CONF # Replace with $CEPH_CONF |
| 63 | + keyring: CHANGEME_CEPH_KEYRING # Replace with $CEPH_KEYRING |
| 64 | +
|
| 65 | + # Cinder RBD backend |
| 66 | + cinderVolumes: |
| 67 | + ceph: |
| 68 | + customServiceConfig: | |
| 69 | + [DEFAULT] |
| 70 | + enabled_backends = ceph |
| 71 | + [ceph] |
| 72 | + volume_backend_name = ceph |
| 73 | + volume_driver = cinder.volume.drivers.rbd.RBDDriver |
| 74 | + rbd_ceph_conf = /etc/ceph/ceph.conf |
| 75 | + rbd_user = openstack |
| 76 | + rbd_pool = volumes |
| 77 | + rbd_flatten_volume_from_snapshot = False |
| 78 | + rbd_secret_uuid = CHANGEME # Replace with $CEPH_FSID |
| 79 | +``` |
| 80 | + |
| 81 | +### 3. Enable Ceph in Data Plane |
| 82 | + |
| 83 | +Edit `examples/dt/perfscale/scalelab/edpm/nodeset/kustomization.yaml` and uncomment: |
| 84 | + |
| 85 | +```yaml |
| 86 | +components: |
| 87 | + - ../../../../../../dt/perfscale/scalelab/edpm/nodeset |
| 88 | + # To enable Ceph, uncomment the following line: |
| 89 | + - ../../../../../../dt/perfscale/scalelab/ceph/edpm-nodeset # ← Uncomment this |
| 90 | +
|
| 91 | +resources: |
| 92 | + - values.yaml |
| 93 | + # To enable Ceph, uncomment the following line: |
| 94 | + - values-ceph.yaml # ← Uncomment this |
| 95 | +``` |
| 96 | + |
| 97 | +Edit `edpm/nodeset/values-ceph.yaml` and configure: |
| 98 | + |
| 99 | +```yaml |
| 100 | +data: |
| 101 | + nova: |
| 102 | + ceph: |
| 103 | + conf: | # Replace CHANGEME_NOVA_CEPH_CONF with: |
| 104 | + [libvirt] |
| 105 | + images_type=rbd |
| 106 | + images_rbd_pool=vms |
| 107 | + images_rbd_ceph_conf=/etc/ceph/ceph.conf |
| 108 | + images_rbd_glance_store_name=default_backend |
| 109 | + images_rbd_glance_copy_poll_interval=15 |
| 110 | + images_rbd_glance_copy_timeout=600 |
| 111 | + rbd_user=openstack |
| 112 | + rbd_secret_uuid=<FSID> # Replace with $CEPH_FSID |
| 113 | +``` |
| 114 | + |
| 115 | +## Deployment |
| 116 | + |
| 117 | +After enabling and configuring Ceph, deploy as normal following the main [README.md](README.md): |
| 118 | + |
| 119 | +1. Deploy control plane: [control-plane.md](control-plane.md) |
| 120 | +2. Deploy data plane: [dataplane.md](dataplane.md) |
| 121 | + |
| 122 | +The Ceph configuration will be automatically integrated into the generated CRs. |
| 123 | + |
| 124 | +## What Gets Configured |
| 125 | + |
| 126 | +### Control Plane |
| 127 | + |
| 128 | +- **Ceph Secret**: `ceph-conf-files` secret with Ceph configuration and keyring |
| 129 | +- **Cinder**: |
| 130 | + - Ceph volume backend configured |
| 131 | +- **Glance**: RBD backend for image storage |
| 132 | +- **Extra Mounts**: Ceph configuration files mounted in CinderVolume and GlanceAPI pods |
| 133 | + |
| 134 | +### Data Plane |
| 135 | + |
| 136 | +- **Ceph Client**: Installed and configured on compute nodes |
| 137 | +- **Nova**: |
| 138 | + - Custom service `nova-custom-ceph` replaces standard `nova` service |
| 139 | + - RBD backend for ephemeral storage |
| 140 | + - Ceph configuration mounted in Nova compute containers |
| 141 | + |
| 142 | +## Disabling Ceph |
| 143 | + |
| 144 | +To deploy without Ceph (default Swift backend for Glance): |
| 145 | + |
| 146 | +1. Ensure Ceph lines remain commented in both kustomization.yaml files |
| 147 | +2. Do not include `service-values-ceph.yaml` or `values-ceph.yaml` resources |
| 148 | +3. Deploy normally - Swift will be used as Glance backend |
| 149 | + |
| 150 | +## Architecture |
| 151 | + |
| 152 | +The Ceph integration uses a modular kustomize component structure: |
| 153 | + |
| 154 | +``` |
| 155 | +dt/perfscale/scalelab/ceph/ # Control plane Ceph component |
| 156 | + ├── kustomization.yaml # Ceph replacements for control plane |
| 157 | + ├── ceph-secret.yaml # Ceph secret template |
| 158 | + └── edpm-nodeset/ # Data plane Ceph component |
| 159 | + ├── kustomization.yaml # Ceph replacements for EDPM |
| 160 | + └── nova-ceph.yaml # Nova Ceph service definition |
| 161 | +
|
| 162 | +examples/dt/perfscale/scalelab/ |
| 163 | + ├── service-values-ceph.yaml # Control plane Ceph values |
| 164 | + └── edpm/nodeset/values-ceph.yaml # Data plane Ceph values |
| 165 | +``` |
| 166 | + |
| 167 | +This modular design allows Ceph to be enabled/disabled by simply commenting/uncommenting two lines in the kustomization files. |
| 168 | + |
0 commit comments