<commit_before>// 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 for the {mtc-full} ({mtc-short}).

[id='installing-the-ocs-operator_{context}']
== Installing the OpenShift Container Storage Operator

You can install the OpenShift Container Storage Operator from OperatorHub.

ifdef::openshift-origin[]
.Prerequisites

* Ensure that you have downloaded the link:https://cloud.redhat.com/openshift/install/pull-secret[pull secret from the Red Hat OpenShift Cluster Manager site] as shown in _Obtaining the installation program_ in the installation documentation for your platform.
+
If you have the pull secret, add the `redhat-operators` catalog to the OperatorHub custom resource (CR) as shown in _Configuring {product-title} to use Red Hat Operators_.
endif::[]

.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]
----<commit_msg>Update oc login command<commit_after>// 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 for the {mtc-full} ({mtc-short}).

[id='installing-the-ocs-operator_{context}']
== Installing the OpenShift Container Storage Operator

You can install the OpenShift Container Storage Operator from OperatorHub.

ifdef::openshift-origin[]
.Prerequisites

* Ensure that you have downloaded the link:https://cloud.redhat.com/openshift/install/pull-secret[pull secret from the Red Hat OpenShift Cluster Manager site] as shown in _Obtaining the installation program_ in the installation documentation for your platform.
+
If you have the pull secret, add the `redhat-operators` catalog to the OperatorHub custom resource (CR) as shown in _Configuring {product-title} to use Red Hat Operators_.
endif::[]

.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 -u <username>
----

. 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]
----
{'fraction_non_alphanumeric': 0.1059898872034228, 'fraction_numerical': 0.011279657720731234, 'mean_word_length': 4.548004314994606, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5201814', 'n_tokens_mistral': 1575, 'n_tokens_neox': 1502, 'n_words': 549}