-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #426 from klgill/BetaDocs-RestructureImageServiceP…
…rocedure Beta docs restructure image service procedure
- Loading branch information
Showing
9 changed files
with
612 additions
and
600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
docs_user/assemblies/assembly_adopting-the-image-service.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
docs_user/modules/proc_adopting-image-service-with-block-storage-backend.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
---- |
71 changes: 71 additions & 0 deletions
71
docs_user/modules/proc_adopting-image-service-with-ceph-backend.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
---- |
Oops, something went wrong.