mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
182 lines
4.4 KiB
Plaintext
182 lines
4.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * migration/migrating_3_4/configuring-replication-repository-3-4.adoc
|
|
// * migration/migrating_4_1_4/configuring-replication-repository-4-1-4.adoc
|
|
// * migration/migrating_4_2_4/configuring-replication-repository-4-2-4.adoc
|
|
[id='migration-configuring-mcg_{context}']
|
|
= Configuring a Multi-Cloud Object Gateway storage bucket as a replication repository
|
|
|
|
You can install the OpenShift Container Storage Operator and configure a Multi-Cloud Object Gateway (MCG) storage bucket as a replication repository.
|
|
|
|
[id='installing-the-ocs-operator_{context}']
|
|
== Installing the OpenShift Container Storage Operator
|
|
|
|
You can install the OpenShift Container Storage Operator from OperatorHub.
|
|
|
|
.Procedure
|
|
|
|
. In the {product-title} web console, click *Operators* -> *OperatorHub*.
|
|
. Use *Filter by keyword* (in this case, *OCS*) to find the *OpenShift Container Storage Operator*.
|
|
. Select the *OpenShift Container Storage Operator* and click *Install*.
|
|
. Select an *Update Channel*, *Installation Mode*, and *Approval Strategy*.
|
|
. Click *Install*.
|
|
+
|
|
On the *Installed Operators* page, the *OpenShift Container Storage Operator* appears in the *openshift-storage* project with the status *Succeeded*.
|
|
|
|
[id='configuring-mcg-storage-bucket_{context}']
|
|
== Creating the Multi-Cloud Object Gateway storage bucket
|
|
|
|
You can create the Multi-Cloud Object Gateway (MCG) storage bucket's Custom Resources (CRs).
|
|
|
|
.Procedure
|
|
|
|
. Log in to the {product-title} cluster:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc login
|
|
----
|
|
|
|
. Create the `NooBaa` CR configuration file, `noobaa.yml`, with the following content:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: noobaa.io/v1alpha1
|
|
kind: NooBaa
|
|
metadata:
|
|
name: noobaa
|
|
namespace: openshift-storage
|
|
spec:
|
|
dbResources:
|
|
requests:
|
|
cpu: 0.5 <1>
|
|
memory: 1Gi
|
|
coreResources:
|
|
requests:
|
|
cpu: 0.5 <1>
|
|
memory: 1Gi
|
|
----
|
|
<1> For a very small cluster, you can change the `cpu` value to `0.1`.
|
|
|
|
. Create the `NooBaa` object:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f noobaa.yml
|
|
----
|
|
|
|
. Create the `BackingStore` CR configuration file, `bs.yml`, with the following content:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: noobaa.io/v1alpha1
|
|
kind: BackingStore
|
|
metadata:
|
|
finalizers:
|
|
- noobaa.io/finalizer
|
|
labels:
|
|
app: noobaa
|
|
name: mcg-pv-pool-bs
|
|
namespace: openshift-storage
|
|
spec:
|
|
pvPool:
|
|
numVolumes: 3 <1>
|
|
resources:
|
|
requests:
|
|
storage: 50Gi <2>
|
|
storageClass: gp2 <3>
|
|
type: pv-pool
|
|
----
|
|
<1> Specify the number of volumes in the PV pool.
|
|
<2> Specify the size of the volumes.
|
|
<3> Specify the storage class.
|
|
|
|
. Create the `BackingStore` object:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f bs.yml
|
|
----
|
|
|
|
. Create the `BucketClass` CR configuration file, `bc.yml`, with the following content:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: noobaa.io/v1alpha1
|
|
kind: BucketClass
|
|
metadata:
|
|
labels:
|
|
app: noobaa
|
|
name: mcg-pv-pool-bc
|
|
namespace: openshift-storage
|
|
spec:
|
|
placementPolicy:
|
|
tiers:
|
|
- backingStores:
|
|
- mcg-pv-pool-bs
|
|
placement: Spread
|
|
----
|
|
|
|
. Create the `BucketClass` object:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f bc.yml
|
|
----
|
|
|
|
. Create the `ObjectBucketClaim` CR configuration file, `obc.yml`, with the following content:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: objectbucket.io/v1alpha1
|
|
kind: ObjectBucketClaim
|
|
metadata:
|
|
name: migstorage
|
|
namespace: openshift-storage
|
|
spec:
|
|
bucketName: migstorage <1>
|
|
storageClassName: openshift-storage.noobaa.io
|
|
additionalConfig:
|
|
bucketclass: mcg-pv-pool-bc
|
|
----
|
|
<1> Record the bucket name for adding the replication repository to the {mtc-short} web console.
|
|
|
|
. Create the `ObjectBucketClaim` object:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f obc.yml
|
|
----
|
|
|
|
. Watch the resource creation process to verify that the `ObjectBucketClaim` status is `Bound`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ watch -n 30 'oc get -n openshift-storage objectbucketclaim migstorage -o yaml'
|
|
----
|
|
+
|
|
This process can take five to ten minutes.
|
|
|
|
. Obtain and record the following values, which are required when you add the replication repository to the {mtc-short} web console:
|
|
|
|
* S3 endpoint:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get route -n openshift-storage s3
|
|
----
|
|
|
|
* S3 provider access key:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get secret -n openshift-storage migstorage -o go-template='{{ .data.AWS_ACCESS_KEY_ID }}' | base64 -d
|
|
----
|
|
|
|
* S3 provider secret access key:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get secret -n openshift-storage migstorage -o go-template='{{ .data.AWS_SECRET_ACCESS_KEY }}' | base64 -d
|
|
----
|