Skip to content

Commit

Permalink
Merge pull request #426 from klgill/BetaDocs-RestructureImageServiceP…
Browse files Browse the repository at this point in the history
…rocedure

Beta docs restructure image service procedure
  • Loading branch information
jistr authored May 2, 2024
2 parents d37f7b1 + 2c2c00f commit 31f8fee
Show file tree
Hide file tree
Showing 9 changed files with 612 additions and 600 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include::../modules/proc_adopting-the-networking-service.adoc[leveloffset=+1]

include::../modules/proc_adopting-the-object-storage-service.adoc[leveloffset=+1]

include::../modules/proc_adopting-the-image-service.adoc[leveloffset=+1]
include::../assemblies/assembly_adopting-the-image-service.adoc[leveloffset=+1]

include::../modules/proc_adopting-the-placement-service.adoc[leveloffset=+1]

Expand Down
34 changes: 34 additions & 0 deletions docs_user/assemblies/assembly_adopting-the-image-service.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[id="adopting-the-image-service_{context}"]

:context: image-service
//Check xref context."Reviewing the OpenStack configuration" xref does not work.

= Adopting the {image_service}

Adopting {image_service_first_ref} means that an existing `OpenStackControlPlane` custom resource (CR), where {image_service}
is supposed to be disabled, should be patched to start the service with the
configuration parameters provided by the source environment.

When the procedure is over, the expectation is to see the `GlanceAPI` service
up and running: the {identity_service} endpoints are updated and the same backend of the source Cloud is available. If the conditions above are met, the adoption is considered concluded.

This guide also assumes that:

* A `TripleO` environment (the source Cloud) is running on one side.
* A `SNO` / `CodeReadyContainers` is running on the other side.
* (optional) An internal/external `Ceph` cluster is reachable by both `crc` and `TripleO`.

ifeval::["{build}" != "downstream"]
//This link goes to a 404. Do we need this text downstream?
As already done for https://github.com/openstack-k8s-operators/data-plane-adoption/blob/main/keystone_adoption.md[Keystone], the Glance Adoption follows the same pattern.
endif::[]

include::../modules/proc_adopting-image-service-with-object-storage-backend.adoc[leveloffset=+1]

include::../modules/proc_adopting-image-service-with-block-storage-backend.adoc[leveloffset=+1]

include::../modules/proc_adopting-image-service-with-nfs-ganesha-backend.adoc[leveloffset=+1]

include::../modules/proc_adopting-image-service-with-ceph-backend.adoc[leveloffset=+1]

include::../modules/proc_verifying-the-image-service-adoption.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

:context: reviewing-configuration

= Reviewing the {rhos_prev_long} control plane configruation
= Reviewing the {rhos_prev_long} control plane configuration

Before starting the adoption workflow, pull the configuration from the {rhos_prev_long} services and {OpenStackPreviousInstaller} on your file system to back up the configuration files. You can then use the files later, during the configuration of the adopted services, and for the record to compare and make sure nothing has been missed or misconfigured.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[id="adopting-image-service-with-block-storage-backend_{context}"]

= Adopting the {image_service} that is deployed with a {block_storage} backend

Adopt the {image_service_first_ref} that you deployed with an {block_storage_first_ref} backend. When {image_service} is deployed with {block_storage} as a backend in the {rhos_prev_long} environment based on {OpenStackPreviousInstaller}, the control plane `glanceAPI` instance is deployed with the following configuration:

----
..
spec
glance:
...
customServiceConfig: |
[DEFAULT]
enabled_backends = default_backend:cinder
[glance_store]
default_backend = default_backend
[default_backend]
rootwrap_config = /etc/glance/rootwrap.conf
description = Default cinder backend
cinder_store_auth_address = {{ .KeystoneInternalURL }}
cinder_store_user_name = {{ .ServiceUser }}
cinder_store_password = {{ .ServicePassword }}
cinder_store_project_name = service
cinder_catalog_info = volumev3::internalURL
cinder_use_multipath = true
----

.Prerequisites

* Previous Adoption steps completed. Notably, MariaDB, Keystone and Barbican
should be already adopted.

.Procedure

. Write the patch manifest into a file, for example `glance_cinder.patch`.
For example:
+
----
spec:
glance:
enabled: true
apiOverride:
route: {}
template:
databaseInstance: openstack
storageClass: "local-storage"
storageRequest: 10G
customServiceConfig: |
[DEFAULT]
enabled_backends = default_backend:cinder
[glance_store]
default_backend = default_backend
[default_backend]
rootwrap_config = /etc/glance/rootwrap.conf
description = Default cinder backend
cinder_store_auth_address = {{ .KeystoneInternalURL }}
cinder_store_user_name = {{ .ServiceUser }}
cinder_store_password = {{ .ServicePassword }}
cinder_store_project_name = service
cinder_catalog_info = volumev3::internalURL
cinder_use_multipath = true
glanceAPIs:
default:
replicas: 1
override:
service:
internal:
metadata:
annotations:
metallb.universe.tf/address-pool: internalapi
metallb.universe.tf/allow-shared-ip: internalapi
metallb.universe.tf/loadBalancerIPs: 172.17.0.80
spec:
type: LoadBalancer
networkAttachments:
- storage
----
+
Having {block_storage} as a backend establishes a dependency between the two services, and any deployed `GlanceAPI` instance would not work if the {image_service} is configured with {block_storage} that is still not available in the `OpenStackControlPlane`.
Once {block_storage}, and in particular `CinderVolume`, has been adopted through the procedure described in <<adopting-the-block-storage-service>>, it is possible to proceed with the `GlanceAPI` adoption.

. Verify that `CinderVolume` is available:
+
----
$ oc get pod -l component=cinder-volume | grep Running
cinder-volume-75cb47f65-92rxq 3/3 Running 0
----

. Patch the `GlanceAPI` service deployed in the control plane context:
+
----
oc patch openstackcontrolplane openstack --type=merge --patch-file=glance_cinder.patch
----
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[id="adopting-image-service-with-ceph-backend_{context}"]

= Adopting the {image_service} that is deployed with a {Ceph} backend

Adopt the {image_service_first_ref} that you deployed with a {Ceph} backend. Use the `customServiceConfig` parameter to inject the right configuration to the `GlanceAPI` instance.

.Prerequisites

* Previous Adoption steps completed. Notably, MariaDB, Keystone and Barbican
should be already adopted.
* Make sure the Ceph-related secret (`ceph-conf-files`) was created in
the `openstack` namespace and that the `extraMounts` property of the
`OpenStackControlPlane` custom resource (CR) has been configured properly. These tasks are described in an earlier Adoption step xref:configuring-a-ceph-backend_migrating-databases[Configuring a Ceph backend].
+
----
cat << EOF > glance_patch.yaml
spec:
glance:
enabled: true
template:
databaseInstance: openstack
customServiceConfig: |
[DEFAULT]
enabled_backends=default_backend:rbd
[glance_store]
default_backend=default_backend
[default_backend]
rbd_store_ceph_conf=/etc/ceph/ceph.conf
rbd_store_user=openstack
rbd_store_pool=images
store_description=Ceph glance store backend.
storageClass: "local-storage"
storageRequest: 10G
glanceAPIs:
default:
replicas: 1
override:
service:
internal:
metadata:
annotations:
metallb.universe.tf/address-pool: internalapi
metallb.universe.tf/allow-shared-ip: internalapi
metallb.universe.tf/loadBalancerIPs: 172.17.0.80
spec:
type: LoadBalancer
networkAttachments:
- storage
EOF
----

[NOTE]
====
If you have previously backed up your {OpenStackShort} services configuration file from the old environment, you can use os-diff to compare and make sure the configuration is correct.
For more information, see xref:reviewing-the-openstack-control-plane-configuration_adopt-control-plane[Reviewing the OpenStack control plane configuration].
----
pushd os-diff
./os-diff cdiff --service glance -c /tmp/collect_tripleo_configs/glance/etc/glance/glance-api.conf -o glance_patch.yaml
----
This produces the difference between both ini configuration files.
====

.Procedure

* Patch `OpenStackControlPlane` CR to deploy {image_service} with a {Ceph} backend:
+
----
$ oc patch openstackcontrolplane openstack --type=merge --patch-file glance_patch.yaml
----
Loading

0 comments on commit 31f8fee

Please sign in to comment.