Skip to content

Commit 77f94e5

Browse files
committed
Configuring MCG as a replication repository and adding it to the CAM web console
1 parent 9cccfe7 commit 77f94e5

File tree

6 files changed

+226
-31
lines changed

6 files changed

+226
-31
lines changed

migration/migrating_3_4/configuring-replication-repository.adoc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ You must configure an object storage to use as a replication repository. The Clu
1010

1111
The following storage providers are supported:
1212

13-
* Generic S3 object storage, for example, NooBaa, Minio, Ceph S3
14-
* xref:../../migration/migrating_3_4/configuring-replication-repository.adoc#migration-configuring-aws-s3_{context}[AWS S3]
15-
* xref:../../migration/migrating_3_4/configuring-replication-repository.adoc#migration-configuring-gcp_{context}[Google Cloud Provider]
16-
* xref:../../migration/migrating_3_4/configuring-replication-repository.adoc#migration-configuring-azure_{context}[Microsoft Azure]
13+
* Generic S3 object storage, for example, Minio or Ceph S3
14+
* Multi-Cloud Object Gateway (MCG)
15+
* Amazon Web Services (AWS) S3
16+
* Google Cloud Provider (GCP)
17+
* Microsoft Azure
1718

1819
include::modules/migration-understanding-data-copy-methods.adoc[leveloffset=+1]
20+
21+
ifeval::["{product-version}" == "4.2"]
22+
:FeatureName: Configuring Multi-Cloud Object Gateway as a replication repository for migration
23+
include::modules/technology-preview.adoc[leveloffset=+1]
24+
endif::[]
25+
26+
include::modules/migration-configuring-mcg.adoc[leveloffset=+1]
1927
include::modules/migration-configuring-aws-s3.adoc[leveloffset=+1]
2028
include::modules/migration-configuring-gcp.adoc[leveloffset=+1]
2129
include::modules/migration-configuring-azure.adoc[leveloffset=+1]

migration/migrating_4_1_4/configuring-replication-repository.adoc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ You must configure an object storage to use as a replication repository. The Clu
1010

1111
The following storage providers are supported:
1212

13-
* Generic S3 object storage, for example, NooBaa, Minio, Ceph S3
14-
* xref:../../migration/migrating_4_1_4/configuring-replication-repository.adoc#migration-configuring-aws-s3_{context}[AWS S3]
15-
* xref:../../migration/migrating_4_1_4/configuring-replication-repository.adoc#migration-configuring-gcp_{context}[Google Cloud Provider]
16-
* xref:../../migration/migrating_4_1_4/configuring-replication-repository.adoc#migration-configuring-azure_{context}[Microsoft Azure]
13+
* Generic S3 object storage, for example, Minio or Ceph S3
14+
* Multi-Cloud Object Gateway (MCG)
15+
* Amazon Web Services (AWS) S3
16+
* Google Cloud Provider (GCP)
17+
* Microsoft Azure
1718

1819
include::modules/migration-understanding-data-copy-methods.adoc[leveloffset=+1]
20+
21+
ifeval::["{product-version}" == "4.2"]
22+
:FeatureName: Configuring Multi-Cloud Object Gateway as a replication repository for migration
23+
include::modules/technology-preview.adoc[leveloffset=+1]
24+
endif::[]
25+
26+
include::modules/migration-configuring-mcg.adoc[leveloffset=+1]
1927
include::modules/migration-configuring-aws-s3.adoc[leveloffset=+1]
2028
include::modules/migration-configuring-gcp.adoc[leveloffset=+1]
2129
include::modules/migration-configuring-azure.adoc[leveloffset=+1]

migration/migrating_4_2_4/configuring-replication-repository.adoc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ You must configure an object storage to use as a replication repository. The Clu
1010

1111
The following storage providers are supported:
1212

13-
* Generic S3 object storage, for example, NooBaa, Minio, Ceph S3
14-
* xref:../../migration/migrating_4_2_4/configuring-replication-repository.adoc#migration-configuring-aws-s3_{context}[AWS S3]
15-
* xref:../../migration/migrating_4_2_4/configuring-replication-repository.adoc#migration-configuring-gcp_{context}[Google Cloud Provider]
16-
* xref:../../migration/migrating_4_2_4/configuring-replication-repository.adoc#migration-configuring-azure_{context}[Microsoft Azure]
13+
* Generic S3 object storage, for example, Minio or Ceph S3
14+
* Multi-Cloud Object Gateway (MCG)
15+
* Amazon Web Services (AWS) S3
16+
* Google Cloud Provider (GCP)
17+
* Microsoft Azure
1718

1819
include::modules/migration-understanding-data-copy-methods.adoc[leveloffset=+1]
20+
21+
ifeval::["{product-version}" == "4.2"]
22+
:FeatureName: Configuring Multi-Cloud Object Gateway as a replication repository for migration
23+
include::modules/technology-preview.adoc[leveloffset=+1]
24+
endif::[]
25+
26+
include::modules/migration-configuring-mcg.adoc[leveloffset=+1]
1927
include::modules/migration-configuring-aws-s3.adoc[leveloffset=+1]
2028
include::modules/migration-configuring-gcp.adoc[leveloffset=+1]
2129
include::modules/migration-configuring-azure.adoc[leveloffset=+1]

modules/migration-adding-replication-repository-to-cam.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ You can add an object storage bucket as a replication repository to the CAM web
1818
. In the *Replication repositories* section, click *Add repository*.
1919
. Select a *Storage provider type* and fill in the following fields:
2020

21-
* *AWS* for AWS S3 and generic S3 providers:
21+
* *AWS* for AWS S3, MCG, and generic S3 providers:
2222

23-
** *Repository name*: Specify the repository name in the CAM web console.
24-
** *S3 bucket name*: Specify the name of the S3 bucket.
25-
** *S3 bucket region*: Specify the S3 bucket region. *Required* for AWS S3. *Optional* for a generic S3 provider.
26-
** *S3 endpoint*: Specify the URL of the S3 service, not the bucket, for example, `\https://<s3-storage.apps.cluster.com>`. *Required* for a generic S3 provider.
23+
** *Replication repository name*: Specify the replication repository name in the CAM web console.
24+
** *S3 bucket name*: Specify the name of the S3 bucket you created.
25+
** *S3 bucket region*: Specify the S3 bucket region. *Required* for AWS S3. *Optional* for other S3 providers.
26+
** *S3 endpoint*: Specify the URL of the S3 service, not the bucket, for example, `\https://<s3-storage.apps.cluster.com>`. *Required* for a generic S3 provider. You must use the `https://` prefix.
2727

28-
** *S3 provider access key*: Specify the `<AWS_SECRET_ACCESS_KEY>`.
29-
** *S3 provider secret access key*: Specify the `<AWS_ACCESS_KEY_ID>`.
28+
** *S3 provider access key*: Specify the `<AWS_SECRET_ACCESS_KEY>` for AWS or the S3 provider access key for MCG.
29+
** *S3 provider secret access key*: Specify the `<AWS_ACCESS_KEY_ID>` for AWS or the S3 provider secret access key for MCG.
3030
** *Require SSL verification*: Clear this check box if you are using a generic S3 provider.
3131

3232
* *GCP*:
3333

34-
** *Repository name*: Specify the repository name in the CAM web console.
34+
** *Replication repository name*: Specify the replication repository name in the CAM web console.
3535
** *GCP bucket name*: Specify the name of the GCP bucket.
3636
** *GCP credential JSON blob*: Specify the string in the `credentials-velero` file.
3737

3838
* *Azure*:
3939

40-
** *Repository name*: Specify the repository name in the CAM web console.
40+
** *Replication repository name*: Specify the replication repository name in the CAM web console.
4141
** *Azure resource group*: Specify the resource group of the Azure Blob storage.
42-
** *Azure storage account name*: Specify the Azure Blob storage account name
42+
** *Azure storage account name*: Specify the Azure Blob storage account name.
4343
** *Azure credentials - INI file contents*: Specify the string in the `credentials-velero` file.
4444

4545
. Click *Add repository* and wait for connection validation.
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
// Module included in the following assemblies:
2+
//
3+
// migration/migrating_3_4/configuring-replication-repository.adoc
4+
// migration/migrating_4_1_4/configuring-replication-repository.adoc
5+
// migration/migrating_4_2_4/configuring-replication-repository.adoc
6+
[id='migration-configuring-mcg_{context}']
7+
= Configuring a Multi-Cloud Object Gateway storage bucket as a replication repository
8+
9+
You can install the OpenShift Container Storage Operator and configure a Multi-Cloud Object Gateway (MCG) storage bucket as a replication repository on the CAM tool cluster.
10+
11+
[id='installing-the-ocs-operator_{context}']
12+
== Installing the OpenShift Container Storage Operator
13+
14+
You can install the OpenShift Container Storage Operator from OperatorHub on the CAM tool cluster.
15+
16+
.Procedure
17+
18+
. In the {product-title} web console, click *Administration* -> *Namespaces*.
19+
. Click *Create Namespace*.
20+
. Enter `openshift-storage` in the *Name* field and click *Create*.
21+
. Click *Operators* -> *OperatorHub*.
22+
. Use *Filter by keyword* (in this case, *OCS*) to find the *OpenShift Container Storage Operator*.
23+
. Select the *OpenShift Container Storage Operator* and click *Install*.
24+
. On the *Create Operator Subscription* page, select the `openshift-storage` namespace.
25+
. Specify your update channel and approval strategy.
26+
. Click *Subscribe*.
27+
+
28+
On the *Installed Operators* page, the *OpenShift Container Storage Operator* appears in the *openshift-storage* project with the status *Succeeded*.
29+
30+
[id='configuring-mcg-storage-bucket_{context}']
31+
== Creating the Multi-Cloud Object Gateway storage bucket
32+
33+
You can create the Multi-Cloud Object Gateway (MCG) storage bucket's Custom Resources (CRs) on the CAM tool cluster.
34+
35+
.Procedure
36+
37+
. Log in to the CAM tool cluster.
38+
. Create the `NooBaa` CR configuration file, `noobaa.yml`, with the following content:
39+
+
40+
[source,yaml]
41+
----
42+
apiVersion: noobaa.io/v1alpha1
43+
kind: NooBaa
44+
metadata:
45+
name: noobaa
46+
namespace: openshift-storage
47+
spec:
48+
dbResources:
49+
requests:
50+
cpu: 0.5 <1>
51+
memory: 1Gi
52+
coreResources:
53+
requests:
54+
cpu: 0.5 <1>
55+
memory: 1Gi
56+
----
57+
<1> For a very small cluster, you can change the `cpu` value to `0.1`.
58+
59+
. Create the `NooBaa` object:
60+
+
61+
----
62+
$ oc create -f noobaa.yml
63+
----
64+
65+
. Create the `BackingStore` CR configuration file, `bs.yml`, with the following content:
66+
+
67+
[source,yaml]
68+
----
69+
apiVersion: noobaa.io/v1alpha1
70+
kind: BackingStore
71+
metadata:
72+
finalizers:
73+
- noobaa.io/finalizer
74+
labels:
75+
app: noobaa
76+
name: mcg-pv-pool-bs
77+
namespace: openshift-storage
78+
spec:
79+
pvPool:
80+
numVolumes: 3 <1>
81+
resources:
82+
requests:
83+
storage: 50Gi <2>
84+
storageClass: gp2 <3>
85+
type: pv-pool
86+
----
87+
<1> Specify the number of volumes in the PV pool.
88+
<2> Specify the size of the volumes.
89+
<3> Specify the storage class.
90+
91+
. Create the `BackingStore` object:
92+
+
93+
----
94+
$ oc create -f bs.yml
95+
----
96+
97+
. Create the `BucketClass` CR configuration file, `bc.yml`, with the following content:
98+
+
99+
[source,yaml]
100+
----
101+
apiVersion: noobaa.io/v1alpha1
102+
kind: BucketClass
103+
metadata:
104+
labels:
105+
app: noobaa
106+
name: mcg-pv-pool-bc
107+
namespace: openshift-storage
108+
spec:
109+
placementPolicy:
110+
tiers:
111+
- backingStores:
112+
- mcg-pv-pool-bs
113+
placement: Spread
114+
----
115+
116+
. Create the `BucketClass` object:
117+
+
118+
----
119+
$ oc create -f bc.yml
120+
----
121+
122+
. Create the `ObjectBucketClaim` CR configuration file, `obc.yml`, with the following content:
123+
+
124+
[source,yaml]
125+
----
126+
apiVersion: objectbucket.io/v1alpha1
127+
kind: ObjectBucketClaim
128+
metadata:
129+
name: migstorage
130+
namespace: openshift-storage
131+
spec:
132+
bucketName: migstorage <1>
133+
storageClassName: openshift-storage.noobaa.io
134+
additionalConfig:
135+
bucketclass: mcg-pv-pool-bc
136+
----
137+
<1> Record the bucket name for adding the replication repository to the CAM web console.
138+
139+
. Create the `ObjectBucketClaim` object:
140+
+
141+
----
142+
$ oc create -f obc.yml
143+
----
144+
145+
. Watch the resource creation process to verify that the `ObjectBucketClaim` status is `Bound`:
146+
+
147+
----
148+
$ watch -n 30 'oc get -n openshift-storage objectbucketclaim migstorage -o yaml'
149+
----
150+
+
151+
This process can take five to ten minutes.
152+
153+
. Obtain and record the following values, which are required when you add the replication repository to the CAM web console:
154+
155+
* S3 endpoint:
156+
+
157+
----
158+
$ oc get route -n openshift-storage s3
159+
----
160+
161+
* S3 provider access key:
162+
+
163+
----
164+
$ oc get secret -n openshift-storage migstorage -o go-template='{{ .data.AWS_ACCESS_KEY_ID }}' | base64 -d
165+
----
166+
167+
* S3 provider secret access key:
168+
+
169+
----
170+
$ oc get secret -n openshift-storage migstorage -o go-template='{{ .data.AWS_SECRET_ACCESS_KEY }}' | base64 -d
171+
----

modules/migration-understanding-cam.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ The Cluster Application Migration (CAM) tool enables you to migrate Kubernetes r
1010

1111
Migrating an application with the CAM web console involves the following steps:
1212

13-
. Installing the Cluster Application Migration Operator on all clusters
13+
. Install the Cluster Application Migration Operator on all clusters.
1414
+
1515
[NOTE]
1616
====
17-
The Cluster Application Migration Operator installs the CAM tool (CAM web console and Migration controller) on the target cluster by default. You can change this configuration in order to install the CAM tool on another cluster.
17+
The Cluster Application Migration Operator installs the CAM tool (CAM web console and Migration controller) on the target cluster by default. You can configure the Migration controller to install the CAM tool on another cluster. The cluster on which the CAM tool is installed is referred to as the CAM tool cluster.
1818
====
1919

20-
. Configuring the replication repository, an intermediate object storage that the CAM tool uses to migrate data
21-
. Adding the source cluster to the CAM web console
22-
. Adding the replication repository to the CAM web console
23-
. Creating a migration plan, with one of the following data migration options:
20+
. Configure the replication repository, an intermediate object storage that the CAM tool uses to migrate data.
21+
. Add the source cluster to the CAM web console.
22+
. Add the replication repository to the CAM web console.
23+
. Create a migration plan, with one of the following data migration options:
2424

25-
* *Copy*: The CAM tool copies the data from the source cluster to the replication repository, and from there to the target cluster.
25+
* *Copy*: The CAM tool copies the data from the source cluster to the replication repository, and from the replication repository to the target cluster.
2626
+
2727
image::migration-PV-copy.png[]
2828

@@ -35,12 +35,12 @@ Although the replication repository does not appear in this diagram, it is requi
3535
+
3636
image::migration-PV-move.png[]
3737

38-
. Running the migration plan, with one of the following options:
38+
. Run the migration plan, with one of the following options:
3939

4040
* *Stage* (optional) copies data to the target cluster without stopping the application.
4141
+
4242
Staging can be run multiple times so that most of the data is copied to the target before migration. This minimizes the actual migration time and application downtime.
4343

44-
* *Migrate* stops the application on the source cluster and recreates its resources on the target cluster. You have the option of migrating the workload without stopping the application.
44+
* *Migrate* stops the application on the source cluster and recreates its resources on the target cluster. Optionally, you can migrate the workload without stopping the application.
4545

4646
image::OCP_3_to_4_App_migration.png[]

0 commit comments

Comments
 (0)