|
| 1 | +:_mod-docs-content-type: PROCEDURE |
| 2 | +[id="adopting-compute-services-with-dcn-backend_{context}"] |
| 3 | + |
| 4 | += Adopting {compute_service} services with multiple {Ceph} back ends (DCN) |
| 5 | + |
| 6 | +[role="_abstract"] |
| 7 | +In a Distributed Compute Node (DCN) deployment where {image_service_first_ref} and {block_storage_first_ref} services run on edge Compute nodes, each site has its own {CephCluster} cluster. The {compute_service_first_ref} nodes at each site must be configured with the {Ceph} connection details and {image_service} endpoint for their local site. Because the {image_service} has a separate API endpoint at each site, each site's `OpenStackDataPlaneNodeSet` custom resource (CR) must use a different `OpenStackDataPlaneService` CR that points to the correct {image_service}. |
| 8 | + |
| 9 | +In a DCN deployment, all node sets belong to a single {compute_service} cell. The central site and each edge site are separate `OpenStackDataPlaneNodeSet` resources within that cell. The per-site `OpenStackDataPlaneService` resources deliver different {Ceph} and {image_service} configurations to each node set while sharing the same cell-level {compute_service} configuration. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You have adopted the {image_service} with multiple {Ceph} back ends. For more information, see xref:adopting-image-service-with-dcn-backend_image-service[Adopting the Image service with multiple Ceph back ends]. |
| 14 | +* You have adopted the {block_storage} with multiple {Ceph} back ends. For more information, see xref:adopting-block-storage-service-with-dcn-backend_hsm-integration[Adopting the Block Storage service with multiple Ceph back ends]. |
| 15 | +* The `ceph-conf-files` secret contains the configuration and keyrings for all {Ceph} clusters in your DCN deployment. |
| 16 | +* Retrieve the `fsid` for each {Ceph} cluster: |
| 17 | ++ |
| 18 | +---- |
| 19 | +$ oc get secret ceph-conf-files -o json | jq -r '.data | to_entries[] | select(.key | endswith(".conf")) | "\(.key): \(.value | @base64d)"' | grep fsid |
| 20 | +---- |
| 21 | + |
| 22 | +.Procedure |
| 23 | + |
| 24 | +. Set the cell name variable. In a DCN deployment, all node sets belong to a single cell: |
| 25 | ++ |
| 26 | +---- |
| 27 | +$ DEFAULT_CELL_NAME="cell1" |
| 28 | +---- |
| 29 | + |
| 30 | +. Retrieve the `fsid` for each {Ceph} cluster and store them in shell variables: |
| 31 | ++ |
| 32 | +[subs="+quotes"] |
| 33 | +---- |
| 34 | +$ CEPH_FSID_CENTRAL=$(oc get secret ceph-conf-files -o json | jq -r '.data."<central.conf>"' | base64 -d | grep fsid | sed -e 's/fsid = //') |
| 35 | +$ CEPH_FSID_DCN1=$(oc get secret ceph-conf-files -o json | jq -r '.data."<dcn1.conf>"' | base64 -d | grep fsid | sed -e 's/fsid = //') |
| 36 | +$ CEPH_FSID_DCN2=$(oc get secret ceph-conf-files -o json | jq -r '.data."<dcn2.conf>"' | base64 -d | grep fsid | sed -e 's/fsid = //') |
| 37 | +---- |
| 38 | ++ |
| 39 | +where: |
| 40 | + |
| 41 | +`<central.conf>`:: |
| 42 | +Specifies the name of the {Ceph} configuration file for the central site in the `ceph-conf-files` secret. |
| 43 | + |
| 44 | +`<dcn1.conf>`:: |
| 45 | +Specifies the name of the {Ceph} configuration file for an edge site in the `ceph-conf-files` secret. |
| 46 | + |
| 47 | +`<dcn2.conf>`:: |
| 48 | +Specifies the name of the {Ceph} configuration file for an additional edge site in the `ceph-conf-files` secret. |
| 49 | + |
| 50 | +. Create a `ConfigMap` for each site. Each `ConfigMap` contains the {Ceph} and {image_service} configuration specific to that site. |
| 51 | ++ |
| 52 | +The following example creates `ConfigMap` resources for a central site and two edge sites. |
| 53 | ++ |
| 54 | +.. Create the `ConfigMap` for the central site: |
| 55 | ++ |
| 56 | +---- |
| 57 | +$ oc apply -f - <<EOF |
| 58 | +apiVersion: v1 |
| 59 | +kind: ConfigMap |
| 60 | +metadata: |
| 61 | + name: nova-ceph-central |
| 62 | +data: |
| 63 | + 99-nova-compute-cells-workarounds.conf: | |
| 64 | + [workarounds] |
| 65 | + disable_compute_service_check_for_ffu=true |
| 66 | + 03-ceph-nova.conf: | |
| 67 | + [libvirt] |
| 68 | + images_type=rbd |
| 69 | + images_rbd_pool=vms |
| 70 | + images_rbd_ceph_conf=/etc/ceph/central.conf |
| 71 | + images_rbd_glance_store_name=central |
| 72 | + images_rbd_glance_copy_poll_interval=15 |
| 73 | + images_rbd_glance_copy_timeout=600 |
| 74 | + rbd_user=openstack |
| 75 | + rbd_secret_uuid=${CEPH_FSID_CENTRAL} |
| 76 | + [glance] |
| 77 | + endpoint_override = http://glance-central-internal.openstack.svc:9292 |
| 78 | + valid_interfaces = internal |
| 79 | + [cinder] |
| 80 | + cross_az_attach = False |
| 81 | + catalog_info = volumev3:cinderv3:internalURL |
| 82 | +EOF |
| 83 | +---- |
| 84 | ++ |
| 85 | +Each `ConfigMap` contains three configuration sections: |
| 86 | ++ |
| 87 | +* `[libvirt]` points to the local {Ceph} cluster configuration and uses the local `fsid` as the `rbd_secret_uuid`. |
| 88 | +* `[glance]` uses `endpoint_override` to direct {image_service} requests to the local {image_service} API endpoint instead of the endpoint that is registered in the {identity_service} catalog. The examples use `http://` for the {image_service} endpoints. If your {rhos_prev_long} deployment uses TLS for internal endpoints, use `https://` instead, and ensure that you have completed the TLS migration. For more information, see xref:migrating-tls-everywhere_configuring-network[Migrating TLS-e to the RHOSO deployment]. |
| 89 | +* `[cinder]` sets `cross_az_attach = False` to prevent volumes from being attached to instances in a different availability zone. |
| 90 | + |
| 91 | +.. Create the `ConfigMap` for the first edge site: |
| 92 | ++ |
| 93 | +---- |
| 94 | +$ oc apply -f - <<EOF |
| 95 | +apiVersion: v1 |
| 96 | +kind: ConfigMap |
| 97 | +metadata: |
| 98 | + name: nova-ceph-dcn1 |
| 99 | +data: |
| 100 | + 99-nova-compute-cells-workarounds.conf: | |
| 101 | + [workarounds] |
| 102 | + disable_compute_service_check_for_ffu=true |
| 103 | + 03-ceph-nova.conf: | |
| 104 | + [libvirt] |
| 105 | + images_type=rbd |
| 106 | + images_rbd_pool=vms |
| 107 | + images_rbd_ceph_conf=/etc/ceph/dcn1.conf |
| 108 | + images_rbd_glance_store_name=dcn1 |
| 109 | + images_rbd_glance_copy_poll_interval=15 |
| 110 | + images_rbd_glance_copy_timeout=600 |
| 111 | + rbd_user=openstack |
| 112 | + rbd_secret_uuid=${CEPH_FSID_DCN1} |
| 113 | + [glance] |
| 114 | + endpoint_override = http://glance-dcn1-internal.openstack.svc:9292 |
| 115 | + valid_interfaces = internal |
| 116 | + [cinder] |
| 117 | + cross_az_attach = False |
| 118 | + catalog_info = volumev3:cinderv3:internalURL |
| 119 | +EOF |
| 120 | +---- |
| 121 | ++ |
| 122 | +.. Create the `ConfigMap` for the second edge site: |
| 123 | ++ |
| 124 | +---- |
| 125 | +$ oc apply -f - <<EOF |
| 126 | +apiVersion: v1 |
| 127 | +kind: ConfigMap |
| 128 | +metadata: |
| 129 | + name: nova-ceph-dcn2 |
| 130 | +data: |
| 131 | + 99-nova-compute-cells-workarounds.conf: | |
| 132 | + [workarounds] |
| 133 | + disable_compute_service_check_for_ffu=true |
| 134 | + 03-ceph-nova.conf: | |
| 135 | + [libvirt] |
| 136 | + images_type=rbd |
| 137 | + images_rbd_pool=vms |
| 138 | + images_rbd_ceph_conf=/etc/ceph/dcn2.conf |
| 139 | + images_rbd_glance_store_name=dcn2 |
| 140 | + images_rbd_glance_copy_poll_interval=15 |
| 141 | + images_rbd_glance_copy_timeout=600 |
| 142 | + rbd_user=openstack |
| 143 | + rbd_secret_uuid=${CEPH_FSID_DCN2} |
| 144 | + [glance] |
| 145 | + endpoint_override = http://glance-dcn2-internal.openstack.svc:9292 |
| 146 | + valid_interfaces = internal |
| 147 | + [cinder] |
| 148 | + cross_az_attach = False |
| 149 | + catalog_info = volumev3:cinderv3:internalURL |
| 150 | +EOF |
| 151 | +---- |
| 152 | ++ |
| 153 | +[IMPORTANT] |
| 154 | +==== |
| 155 | +The `endpoint_override` in the `[glance]` section is different for each site. This setting directs the {compute_service} to contact the local {image_service} API instead of the central endpoint registered in the {identity_service} catalog. Without this setting, all Compute nodes contact the central {image_service}, and image data is transferred across the WAN instead of read from the local {Ceph} cluster. |
| 156 | +
|
| 157 | +* Central Compute nodes use `glance-central-internal.openstack.svc` |
| 158 | +* DCN1 Compute nodes use `glance-dcn1-internal.openstack.svc` |
| 159 | +* DCN2 Compute nodes use `glance-dcn2-internal.openstack.svc` |
| 160 | +
|
| 161 | +These endpoint names correspond to the `GlanceAPI` instances that are created when you adopt the {image_service} with DCN back ends. |
| 162 | +==== |
| 163 | + |
| 164 | +. Create a per-site `OpenStackDataPlaneService` CR for each site. Each service references the site-specific `ConfigMap` that you created in the previous step: |
| 165 | ++ |
| 166 | +---- |
| 167 | +$ oc apply -f - <<EOF |
| 168 | +--- |
| 169 | +apiVersion: dataplane.openstack.org/v1beta1 |
| 170 | +kind: OpenStackDataPlaneService |
| 171 | +metadata: |
| 172 | + name: nova-custom-ceph-central |
| 173 | +spec: |
| 174 | + dataSources: |
| 175 | + - configMapRef: |
| 176 | + name: nova-ceph-central |
| 177 | + - secretRef: |
| 178 | + name: nova-${DEFAULT_CELL_NAME}-compute-config |
| 179 | + - secretRef: |
| 180 | + name: nova-migration-ssh-key |
| 181 | + playbook: osp.edpm.nova |
| 182 | + caCerts: combined-ca-bundle |
| 183 | + edpmServiceType: nova |
| 184 | + containerImageFields: |
| 185 | + - NovaComputeImage |
| 186 | + - EdpmIscsidImage |
| 187 | +--- |
| 188 | +apiVersion: dataplane.openstack.org/v1beta1 |
| 189 | +kind: OpenStackDataPlaneService |
| 190 | +metadata: |
| 191 | + name: nova-custom-ceph-dcn1 |
| 192 | +spec: |
| 193 | + dataSources: |
| 194 | + - configMapRef: |
| 195 | + name: nova-ceph-dcn1 |
| 196 | + - secretRef: |
| 197 | + name: nova-${DEFAULT_CELL_NAME}-compute-config |
| 198 | + - secretRef: |
| 199 | + name: nova-${DEFAULT_CELL_NAME}-metadata-neutron-config |
| 200 | + - secretRef: |
| 201 | + name: nova-migration-ssh-key |
| 202 | + playbook: osp.edpm.nova |
| 203 | + caCerts: combined-ca-bundle |
| 204 | + edpmServiceType: nova |
| 205 | + containerImageFields: |
| 206 | + - NovaComputeImage |
| 207 | + - EdpmIscsidImage |
| 208 | +--- |
| 209 | +apiVersion: dataplane.openstack.org/v1beta1 |
| 210 | +kind: OpenStackDataPlaneService |
| 211 | +metadata: |
| 212 | + name: nova-custom-ceph-dcn2 |
| 213 | +spec: |
| 214 | + dataSources: |
| 215 | + - configMapRef: |
| 216 | + name: nova-ceph-dcn2 |
| 217 | + - secretRef: |
| 218 | + name: nova-${DEFAULT_CELL_NAME}-compute-config |
| 219 | + - secretRef: |
| 220 | + name: nova-${DEFAULT_CELL_NAME}-metadata-neutron-config |
| 221 | + - secretRef: |
| 222 | + name: nova-migration-ssh-key |
| 223 | + playbook: osp.edpm.nova |
| 224 | + caCerts: combined-ca-bundle |
| 225 | + edpmServiceType: nova |
| 226 | + containerImageFields: |
| 227 | + - NovaComputeImage |
| 228 | + - EdpmIscsidImage |
| 229 | +EOF |
| 230 | +---- |
| 231 | ++ |
| 232 | +[NOTE] |
| 233 | +==== |
| 234 | +All `OpenStackDataPlaneService` CRs reference the same cell secret (`nova-cell1-compute-config`) because all node sets belong to a single cell. The per-site `ConfigMap` is what differentiates the {Ceph} and {image_service} configuration for each site. |
| 235 | +==== |
| 236 | + |
| 237 | +. When you create the `OpenStackDataPlaneNodeSet` CR for each site, reference the per-site service in the `services` list instead of `nova-$CELL`. For example: |
| 238 | ++ |
| 239 | +* The central node set uses `nova-custom-ceph-central` in its `services` list. |
| 240 | +* The DCN1 node set uses `nova-custom-ceph-dcn1` in its `services` list. |
| 241 | +* The DCN2 node set uses `nova-custom-ceph-dcn2` in its `services` list. |
| 242 | + |
| 243 | +.. If you have already created the `OpenStackDataPlaneNodeSet` CRs with the default `nova-$CELL` service, patch each node set to use the per-site service. The following example patches the central node set: |
| 244 | ++ |
| 245 | +---- |
| 246 | +$ oc patch osdpns/openstack-${DEFAULT_CELL_NAME} --type=merge --patch " |
| 247 | +spec: |
| 248 | + services: |
| 249 | + - bootstrap |
| 250 | + - download-cache |
| 251 | + - configure-network |
| 252 | + - validate-network |
| 253 | + - install-os |
| 254 | + - configure-os |
| 255 | + - ssh-known-hosts |
| 256 | + - run-os |
| 257 | + - reboot-os |
| 258 | + - install-certs |
| 259 | + - ceph-client |
| 260 | + - ovn |
| 261 | + - neutron-metadata |
| 262 | + - libvirt |
| 263 | + - nova-custom-ceph-central |
| 264 | + nodeTemplate: |
| 265 | + extraMounts: |
| 266 | + - extraVolType: Ceph |
| 267 | + volumes: |
| 268 | + - name: ceph |
| 269 | + secret: |
| 270 | + secretName: ceph-conf-files |
| 271 | + mounts: |
| 272 | + - name: ceph |
| 273 | + mountPath: "/etc/ceph" |
| 274 | + readOnly: true |
| 275 | +" |
| 276 | +---- |
| 277 | + |
| 278 | +.. Patch each DCN edge node set with the same services list, replacing `ovn` with `ovn-dcn` and `nova-custom-ceph-central` with the per-site service name. You must include the `ceph-client` service so that the {Ceph} configuration files from the `ceph-conf-files` secret are deployed into the {compute_service} containers on the edge nodes. Without `ceph-client`, the `/etc/ceph/` directory inside the {compute_service} container is empty and instances fail to launch with a `RADOS object not found (error calling conf_read_file)` error. |
| 279 | ++ |
| 280 | +For example, for the DCN1 node set named `dcn1`: |
| 281 | ++ |
| 282 | +---- |
| 283 | +$ oc patch osdpns/dcn1 --type=merge --patch " |
| 284 | +spec: |
| 285 | + services: |
| 286 | + - bootstrap |
| 287 | + - download-cache |
| 288 | + - configure-network |
| 289 | + - validate-network |
| 290 | + - install-os |
| 291 | + - configure-os |
| 292 | + - ssh-known-hosts |
| 293 | + - run-os |
| 294 | + - reboot-os |
| 295 | + - install-certs |
| 296 | + - ceph-client |
| 297 | + - ovn-dcn |
| 298 | + - neutron-metadata |
| 299 | + - libvirt |
| 300 | + - nova-custom-ceph-dcn1 |
| 301 | + nodeTemplate: |
| 302 | + extraMounts: |
| 303 | + - extraVolType: Ceph |
| 304 | + volumes: |
| 305 | + - name: ceph |
| 306 | + secret: |
| 307 | + secretName: ceph-conf-files |
| 308 | + mounts: |
| 309 | + - name: ceph |
| 310 | + mountPath: "/etc/ceph" |
| 311 | + readOnly: true |
| 312 | +" |
| 313 | +---- |
| 314 | ++ |
| 315 | +Repeat this step for each additional edge site, replacing `dcn1` and `nova-custom-ceph-dcn1` with the appropriate site name, for example, `dcn2` and `nova-custom-ceph-dcn2`. |
| 316 | + |
| 317 | +.Additional resources |
| 318 | + |
| 319 | +* xref:adopting-image-service-with-dcn-backend_image-service[Adopting the Image service with multiple Ceph back ends (DCN)] |
| 320 | +* xref:adopting-block-storage-service-with-dcn-backend_hsm-integration[Adopting the Block Storage service with multiple Ceph back ends (DCN)] |
0 commit comments