Skip to content

Commit 3409963

Browse files
committed
OSDOCS-3754: Document RHODF registry storage
1 parent 7091c35 commit 3409963

7 files changed

+309
-9
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,8 @@ Topics:
13781378
File: configuring-registry-storage-baremetal
13791379
- Name: Configuring the registry for vSphere
13801380
File: configuring-registry-storage-vsphere
1381+
- Name: Configuring the registry for OpenShift Data Foundation
1382+
File: configuring-registry-storage-rhodf
13811383
Distros: openshift-enterprise,openshift-origin
13821384
- Name: Accessing the registry
13831385
File: accessing-the-registry
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * registry/configuring_registry_storage/configuring-registry-storage-vsphere.adoc
4+
//
5+
// * registry/configuring_registry_storage/configuring-registry-storage-baremetal.adoc
6+
//
7+
// * registry/configuring_registry_storage/Configuring-the-registry-for-rhodf.adoc
8+
9+
:_content-type: PROCEDURE
10+
[id="registry-configuring-registry-storage-rhodf-cephfs_{context}"]
11+
= Configuring the Image Registry Operator to use CephFS storage with Red Hat OpenShift Data Foundation
12+
13+
{rh-storage-first} integrates multiple storage types that you can use with the internal image registry:
14+
15+
* Ceph, a shared and distributed file system and on-premises object storage
16+
* NooBaa, providing a Multicloud Object Gateway
17+
18+
This document outlines the procedure to configure the image registry to use CephFS storage.
19+
20+
[NOTE]
21+
====
22+
CephFS uses persistent volume claim (PVC) storage. It is not recommended to use PVCs for image registry storage if there are other options are available, such as Ceph RGW or Noobaa.
23+
====
24+
25+
.Prerequisites
26+
27+
* You have access to the cluster as a user with the `cluster-admin` role.
28+
* You have access to the {product-title} web console.
29+
* You installed the `oc` CLI.
30+
* You installed the link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.10[{rh-storage} Operator] to provide object storage and CephFS file storage.
31+
32+
33+
.Procedure
34+
35+
. Create a PVC to use the `cephfs` storage class. For example:
36+
+
37+
[source,terminal]
38+
----
39+
cat <<EOF | oc apply -f -
40+
apiVersion: v1
41+
kind: PersistentVolumeClaim
42+
metadata:
43+
name: registry-storage-pvc
44+
namespace: openshift-image-registry
45+
spec:
46+
accessModes:
47+
- ReadWriteMany
48+
resources:
49+
requests:
50+
storage: 100Gi
51+
storageClassName: ocs-storagecluster-cephfs
52+
EOF
53+
----
54+
55+
. Configure the image registry to use the CephFS file system storage by entering the following command:
56+
+
57+
[source,terminal]
58+
----
59+
$ oc patch config.image/cluster -p '{"spec":{"managementState":"Managed","replicas":2,"storage":{"managementState":"Unmanaged","pvc":{"claim":"registry-storage-pvc"}}}}' --type=merge
60+
----
61+
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * registry/configuring_registry_storage/configuring-registry-storage-vsphere.adoc
4+
//
5+
// * registry/configuring_registry_storage/configuring-registry-storage-baremetal.adoc
6+
//
7+
// * registry/configuring_registry_storage/Configuring-the-registry-for-rhodf.adoc
8+
9+
:_content-type: PROCEDURE
10+
[id="registry-configuring-registry-storage-rhodf-cephrgw_{context}"]
11+
= Configuring the Image Registry Operator to use Ceph RGW storage with Red Hat OpenShift Data Foundation
12+
13+
{rh-storage-first} integrates multiple storage types that you can use with the internal image registry:
14+
15+
* Ceph, a shared and distributed file system and on-premises object storage
16+
* NooBaa, providing a Multicloud Object Gateway
17+
18+
This document outlines the procedure to configure the image registry to use Ceph RGW storage.
19+
20+
21+
.Prerequisites
22+
23+
* You have access to the cluster as a user with the `cluster-admin` role.
24+
* You have access to the {product-title} web console.
25+
* You installed the `oc` CLI.
26+
* You installed the link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.10[{rh-storage} Operator] to provide object storage and Ceph RGW object storage.
27+
28+
.Procedure
29+
30+
. Create the object bucket claim using the `ocs-storagecluster-ceph-rgw` storage class. For example:
31+
+
32+
[source,terminal]
33+
----
34+
cat <<EOF | oc apply -f -
35+
apiVersion: objectbucket.io/v1alpha1
36+
kind: ObjectBucketClaim
37+
metadata:
38+
name: rgwtest
39+
namespace: openshift-storage
40+
spec:
41+
storageClassName: ocs-storagecluster-ceph-rgw
42+
generateBucketName: rgwtest
43+
EOF
44+
----
45+
46+
. Get the bucket name by entering the following command:
47+
+
48+
[source,terminal]
49+
----
50+
$ bucket_name=$(oc get obc -n openshift-storage rgwtest -o jsonpath='{.spec.bucketName}')
51+
----
52+
53+
. Get the AWS credentials by entering the following commands:
54+
+
55+
[source,terminal]
56+
----
57+
$ AWS_ACCESS_KEY_ID=$(oc get secret -n openshift-storage rgwtest -o yaml | grep -w "AWS_ACCESS_KEY_ID:" | head -n1 | awk '{print $2}' | base64 --decode)
58+
----
59+
+
60+
[source,terminal]
61+
----
62+
$ AWS_SECRET_ACCESS_KEY=$(oc get secret -n openshift-storage rgwtest -o yaml | grep -w "AWS_SECRET_ACCESS_KEY:" | head -n1 | awk '{print $2}' | base64 --decode)
63+
----
64+
65+
. Create the secret `image-registry-private-configuration-user` with the AWS credentials for the new bucket under `openshift-image-registry project` by entering the following command:
66+
+
67+
[source,terminal]
68+
----
69+
$ oc create secret generic image-registry-private-configuration-user --from-literal=REGISTRY_STORAGE_S3_ACCESSKEY=${AWS_ACCESS_KEY_ID} --from-literal=REGISTRY_STORAGE_S3_SECRETKEY=${AWS_SECRET_ACCESS_KEY} --namespace openshift-image-registry
70+
----
71+
72+
. Create a encryption route for Ceph RGW by entering the following command:
73+
+
74+
[source,terminal]
75+
----
76+
$ oc create route reencrypt <route_name> --service=rook-ceph-rgw-ocs-storagecluster-cephobjectstore --port=https -n openshift-storage
77+
----
78+
+
79+
.. Get the route host by entering the following command:
80+
+
81+
[source,terminal]
82+
----
83+
$ route_host=$(oc get route <route_name> -n openshift-storage -o=jsonpath='{.spec.host}')
84+
----
85+
. Create a config map that uses an ingress certificate by entering the following commands:
86+
+
87+
[source,terminal]
88+
----
89+
$ oc extract secret/router-certs-default -n openshift-ingress --confirm
90+
----
91+
+
92+
[source,terminal]
93+
----
94+
$ oc create configmap image-registry-s3-bundle --from-file=ca-bundle.crt=./tls.crt -n openshift-config
95+
----
96+
97+
. Configure the image registry to use the Ceph RGW object storage by entering the following command:
98+
+
99+
[source,terminal]
100+
----
101+
$ oc patch config.image/cluster -p '{"spec":{"managementState":"Managed","replicas":2,"storage":{"managementState":"Unmanaged","s3":{"bucket":'\"${bucket_name}\"',"region":"us-east-1","regionEndpoint":'\"https://${route_host}\"',"virtualHostedStyle":false,"encrypt":true,"trustedCA":{"name":"image-registry-s3-bundle"}}}}}' --type=merge
102+
----
103+
104+
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * registry/configuring_registry_storage/configuring-registry-storage-vsphere.adoc
4+
//
5+
// * registry/configuring_registry_storage/configuring-registry-storage-baremetal.adoc
6+
//
7+
// * registry/configuring_registry_storage/Configuring-the-registry-for-rhodf.adoc
8+
9+
:_content-type: PROCEDURE
10+
[id="registry-configuring-registry-storage-rhodf-nooba_{context}"]
11+
= Configuring the Image Registry Operator to use Noobaa storage with Red Hat OpenShift Data Foundation
12+
13+
{rh-storage-first} integrates multiple storage types that you can use with the internal image registry:
14+
15+
* Ceph, a shared and distributed file system and on-premises object storage
16+
* NooBaa, providing a Multicloud Object Gateway
17+
18+
This document outlines the procedure to configure the image registry to use Noobaa storage.
19+
20+
.Prerequisites
21+
22+
* You have access to the cluster as a user with the `cluster-admin` role.
23+
* You have access to the {product-title} web console.
24+
* You installed the `oc` CLI.
25+
* You installed the link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.10[{rh-storage} Operator] to provide object storage and Noobaa object storage.
26+
27+
.Procedure
28+
29+
. Create the object bucket claim using the `openshift-storage.noobaa.io` storage class. For example:
30+
+
31+
[source,terminal]
32+
----
33+
cat <<EOF | oc apply -f -
34+
apiVersion: objectbucket.io/v1alpha1
35+
kind: ObjectBucketClaim
36+
metadata:
37+
name: noobaatest
38+
namespace: openshift-storage
39+
spec:
40+
storageClassName: openshift-storage.noobaa.io
41+
generateBucketName: noobaatest
42+
EOF
43+
----
44+
45+
. Get the bucket name by entering the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ bucket_name=$(oc get obc -n openshift-storage noobaatest -o jsonpath='{.spec.bucketName}')
50+
----
51+
52+
. Get the AWS credentials by entering the following commands:
53+
+
54+
[source,terminal]
55+
----
56+
$ AWS_ACCESS_KEY_ID=$(oc get secret -n openshift-storage noobaatest -o yaml | grep -w "AWS_ACCESS_KEY_ID:" | head -n1 | awk '{print $2}' | base64 --decode)
57+
----
58+
+
59+
[source,terminal]
60+
----
61+
$ AWS_SECRET_ACCESS_KEY=$(oc get secret -n openshift-storage noobaatest -o yaml | grep -w "AWS_SECRET_ACCESS_KEY:" | head -n1 | awk '{print $2}' | base64 --decode)
62+
----
63+
64+
. Create the secret `image-registry-private-configuration-user` with the AWS credentials for the new bucket under `openshift-image-registry project` by entering the following command:
65+
+
66+
[source,terminal]
67+
----
68+
$ oc create secret generic image-registry-private-configuration-user --from-literal=REGISTRY_STORAGE_S3_ACCESSKEY=${AWS_ACCESS_KEY_ID} --from-literal=REGISTRY_STORAGE_S3_SECRETKEY=${AWS_SECRET_ACCESS_KEY} --namespace openshift-image-registry
69+
----
70+
71+
. Get the route host by entering the following command:
72+
+
73+
[source,terminal]
74+
----
75+
$ route_host=$(oc get route s3 -n openshift-storage -o=jsonpath='{.spec.host}')
76+
----
77+
. Create a config map that uses an ingress certificate by entering the following commands:
78+
+
79+
[source,terminal]
80+
----
81+
$ oc extract secret/router-certs-default -n openshift-ingress --confirm
82+
----
83+
+
84+
[source,terminal]
85+
----
86+
$ oc create configmap image-registry-s3-bundle --from-file=ca-bundle.crt=./tls.crt -n openshift-config
87+
----
88+
89+
. Configure the image registry to use the Nooba object storage by entering the following command:
90+
+
91+
[source,terminal]
92+
----
93+
$ oc patch config.image/cluster -p '{"spec":{"managementState":"Managed","replicas":2,"storage":{"managementState":"Unmanaged","s3":{"bucket":'\"${bucket_name}\"',"region":"us-east-1","regionEndpoint":'\"https://${route_host}\"',"virtualHostedStyle":false,"encrypt":true,"trustedCA":{"name":"image-registry-s3-bundle"}}}}}' --type=merge
94+
----
95+

registry/configuring_registry_storage/configuring-registry-storage-baremetal.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@ include::modules/registry-change-management-state.adoc[leveloffset=+1]
1212

1313
include::modules/installation-registry-storage-config.adoc[leveloffset=+1]
1414

15-
include::modules/registry-configuring-storage-baremetal.adoc[leveloffset=+1]
15+
include::modules/registry-configuring-storage-baremetal.adoc[leveloffset=+2]
1616

17-
include::modules/installation-registry-storage-non-production.adoc[leveloffset=+1]
17+
include::modules/installation-registry-storage-non-production.adoc[leveloffset=+2]
1818

19-
include::modules/installation-registry-storage-block-recreate-rollout-bare-metal.adoc[leveloffset=+1]
19+
include::modules/installation-registry-storage-block-recreate-rollout-bare-metal.adoc[leveloffset=+2]
2020

21+
include::modules/registry-configuring-registry-storage-rhodf-cephrgw.adoc[leveloffset=+2]
22+
23+
include::modules/registry-configuring-registry-storage-rhodf-nooba.adoc[leveloffset=+2]
24+
25+
include::modules/registry-configuring-registry-storage-rhodf-cephfs.adoc[leveloffset=+1]
2126

2227
[id="configuring-registry-storage-baremetal-addtl-resources"]
2328
[role="_additional-resources"]
2429
== Additional resources
2530

26-
For more details about configuring registry storage for bare metal, see xref:../../scalability_and_performance/optimizing-storage.adoc#recommended-configurable-storage-technology_persistent-storage[Recommended configurable storage technology].
31+
* xref:../../scalability_and_performance/optimizing-storage.adoc#recommended-configurable-storage-technology_persistent-storage[Recommended configurable storage technology]
32+
* link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.10/html-single/managing_and_allocating_storage_resources/index#configuring-image-registry-to-use-openshift-data-foundation_rhodf[Configuring Image Registry to use OpenShift Data Foundation]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
:_content-type: ASSEMBLY
2+
[id="configuring-registry-storage-rhodf"]
3+
= Configuring the registry for Red Hat OpenShift Data Foundation
4+
include::_attributes/common-attributes.adoc[]
5+
:context: configuring-registry-storage-rhodf
6+
7+
toc::[]
8+
9+
To configure the internal image registry on bare metal and vSphere to use {rh-storage-first} storage, you must install {rh-storage} and then configure image registry using Ceph or Noobaa.
10+
11+
include::modules/registry-configuring-registry-storage-rhodf-cephrgw.adoc[leveloffset=+1]
12+
13+
include::modules/registry-configuring-registry-storage-rhodf-nooba.adoc[leveloffset=+1]
14+
15+
include::modules/registry-configuring-registry-storage-rhodf-cephfs.adoc[leveloffset=+1]
16+
17+
[id="configuring-registry-storage-ocs"]
18+
[role="_additional-resources"]
19+
== Additional resources
20+
21+
* link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.10/html-single/managing_and_allocating_storage_resources/index#configuring-image-registry-to-use-openshift-data-foundation_rhodf[Configuring Image Registry to use OpenShift Data Foundation]
22+
* link:https://access.redhat.com/solutions/6719951[Performance tuning guide for Multicloud Object Gateway (NooBaa)]

registry/configuring_registry_storage/configuring-registry-storage-vsphere.adoc

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,28 @@ include::modules/registry-removed.adoc[leveloffset=+1]
1010

1111
include::modules/registry-change-management-state.adoc[leveloffset=+1]
1212

13-
include::modules/installation-registry-storage-config.adoc[leveloffset=+2]
13+
include::modules/installation-registry-storage-config.adoc[leveloffset=+1]
1414

15-
include::modules/registry-configuring-storage-vsphere.adoc[leveloffset=+1]
15+
include::modules/registry-configuring-storage-vsphere.adoc[leveloffset=+2]
1616

17-
include::modules/installation-registry-storage-non-production.adoc[leveloffset=+1]
17+
include::modules/installation-registry-storage-non-production.adoc[leveloffset=+2]
1818

19-
include::modules/installation-registry-storage-block-recreate-rollout.adoc[leveloffset=+1]
19+
include::modules/installation-registry-storage-block-recreate-rollout.adoc[leveloffset=+2]
2020

2121
For instructions about configuring registry storage so that it references the correct PVC, see xref:../../registry/configuring_registry_storage/configuring-registry-storage-vsphere.adoc#registry-configuring-storage-vsphere_configuring-registry-storage-vsphere[Configuring the registry for vSphere].
2222

23+
include::modules/registry-configuring-registry-storage-rhodf-cephrgw.adoc[leveloffset=+2]
24+
25+
include::modules/registry-configuring-registry-storage-rhodf-nooba.adoc[leveloffset=+2]
26+
27+
include::modules/registry-configuring-registry-storage-rhodf-cephfs.adoc[leveloffset=+1]
28+
2329
[id="configuring-registry-storage-vsphere-addtl-resources"]
2430
[role="_additional-resources"]
2531
== Additional resources
2632

27-
* For more details about configuring registry storage for vSphere, see xref:../../scalability_and_performance/optimizing-storage.adoc#recommended-configurable-storage-technology_persistent-storage[Recommended configurable storage technology].
33+
* xref:../../scalability_and_performance/optimizing-storage.adoc#recommended-configurable-storage-technology_persistent-storage[Recommended configurable storage technology]
34+
* link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.10/html-single/managing_and_allocating_storage_resources/index#configuring-image-registry-to-use-openshift-data-foundation_rhodf[Configuring Image Registry to use OpenShift Data Foundation]
35+
36+
37+

0 commit comments

Comments
 (0)