Skip to content

Commit 7e315a0

Browse files
authored
Merge pull request #28837 from apinnick/BZ1920404_upgrade-mtc
BZ1920404: Create migration controller in MTC upgrade
2 parents fdcebc9 + c92603b commit 7e315a0

8 files changed

+129
-67
lines changed

migration/migrating_3_4/deploying-cam-3-4.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ Optional: You can configure the {mtc-full} Operator to install the {mtc-short} l
1515

1616
In a restricted environment, you can install the {mtc-full} Operator from a local mirror registry.
1717

18-
After you have installed the {mtc-full} Operator on your clusters, you can launch the {mtc-short} web console.
18+
After you have installed the {mtc-full} Operator on your clusters, you can launch the {mtc-short} console.
1919

2020
[id='installing-cam-operator_{context}']
2121
== Installing the {mtc-full} Operator
2222

2323
You can install the {mtc-full} Operator with the Operator Lifecycle Manager (OLM) on an {product-title} {product-version} target cluster and manually on an {product-title} 3 source cluster.
2424

25+
[IMPORTANT]
26+
====
27+
You must ensure that the same Operator version is installed on the source and target clusters.
28+
====
29+
2530
include::modules/migration-installing-cam-operator-ocp-4.adoc[leveloffset=+2]
2631
include::modules/migration-installing-cam-operator-ocp-3.adoc[leveloffset=+2]
2732
:!migrating-3-4:

migration/migrating_3_4/upgrading-migration-tool-3-4.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ toc::[]
88

99
You can upgrade the {mtc-full} ({mtc-short}) by installing the latest {mtc-full} Operator.
1010

11+
[IMPORTANT]
12+
====
13+
You must ensure that the same Operator version is installed on the source and target clusters.
14+
15+
Do not enable automatic updates on the {product-title} {product-version} cluster.
16+
====
17+
1118
include::modules/migration-upgrading-migration-tool-4.adoc[leveloffset=+1]
1219
include::modules/migration-upgrading-migration-tool-3.adoc[leveloffset=+1]
1320
:migrating-3-4!:

modules/common-attributes.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ endif::[]
3333
:launch: image:app-launcher.png[title="Application Launcher"]
3434
:mtc-short: MTC
3535
:mtc-full: Migration Toolkit for Containers
36-
:mtc-version: 1.3
37-
:mtc-version-z: 1.3.2
36+
:mtc-version: 1.4
37+
:mtc-version-z: 1.4.0

modules/migration-installing-cam-operator-ocp-3.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
// Module included in the following assemblies:
22
//
33
// * migration/migrating_3_4/deploying-cam-3-4.adoc
4+
45
[id="migration-installing-cam-operator-ocp-3_{context}"]
56
ifdef::migrating-3-4[]
6-
= Installing the {mtc-full} Operator on an {product-title} 3 source cluster
7+
= Installing the {mtc-full} on an {product-title} 3 source cluster
78

8-
You can install the {mtc-full} ({mtc-short}) Operator manually on an {product-title} 3 source cluster.
9+
You can install the {mtc-full} ({mtc-short}) manually on an {product-title} 3 source cluster.
910
endif::[]
1011
ifdef::disconnected-3-4[]
11-
= Installing the {mtc-full} Operator on an {product-title} 3 source cluster in a restricted environment
12+
= Installing the {mtc-full} on an {product-title} 3 source cluster in a restricted environment
1213

1314
You can create a manifest file based on the {mtc-full} ({mtc-short}) Operator image and edit the manifest to point to your local image registry. Then, you can use the local image to create the {mtc-full} Operator on an {product-title} 3 source cluster.
1415
endif::[]
1516

1617
[IMPORTANT]
1718
====
18-
You must install the same {mtc-short} version on the {product-title} 3 and 4 clusters. The {mtc-full} Operator on the {product-title} 4 cluster is updated automatically by the Operator Lifecycle Manager.
19+
You must install the same {mtc-short} version on the {product-title} 3 and 4 clusters. The {mtc-full} Operator on the {product-title} 4 cluster is updated automatically by Operator Lifecycle Manager.
1920
2021
To ensure that you have the latest version on the {product-title} 3 cluster, download the `operator.yml` and `controller-3.yml` files when you are ready to create and run the migration plan.
2122
====
2223

2324
.Prerequisites
2425

2526
* Access to `registry.redhat.io`
27+
* Podman installed
2628
ifdef::migrating-3-4[]
2729
* {product-title} 3 cluster configured to pull images from `registry.redhat.io`
2830
+
@@ -134,7 +136,7 @@ rolebindings.rbac.authorization.k8s.io "system:image-pullers" already exists
134136
----
135137
<1> You can ignore `Error from server (AlreadyExists)` messages. They are caused by the {mtc-full} Operator creating resources for earlier versions of {product-title} 3 that are provided in later releases.
136138

137-
. Create the `MigrationController` CR object:
139+
. Create the `MigrationController` object:
138140
+
139141
[source,terminal]
140142
----

modules/migration-installing-cam-operator-ocp-4.adoc

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@
66

77
[id="migration-installing-cam-operator-ocp-4_{context}"]
88
ifdef::source-4-1-4[]
9-
= Installing the {mtc-full} Operator on an {product-title} 4.1 source cluster
9+
= Installing the {mtc-full} on an {product-title} 4.1 source cluster
1010
endif::[]
1111
ifdef::source-4-2-4[]
12-
= Installing the {mtc-full} Operator on an {product-title} 4.2 source cluster
12+
= Installing the {mtc-full} on an {product-title} 4.2 source cluster
1313
endif::[]
1414
ifdef::disconnected-source-4-1-4[]
15-
= Installing the {mtc-full} Operator on an {product-title} 4.1 source cluster in a restricted environment
15+
= Installing the {mtc-full} on an {product-title} 4.1 source cluster in a restricted environment
1616
endif::[]
1717
ifdef::disconnected-source-4-2-4[]
18-
= Installing the {mtc-full} Operator on an {product-title} 4.2 source cluster in a restricted environment
18+
= Installing the {mtc-full} on an {product-title} 4.2 source cluster in a restricted environment
1919
endif::[]
2020
ifdef::migrating-3-4,target-4-1-4,target-4-2-4[]
21-
= Installing the {mtc-full} Operator on an {product-title} {product-version} target cluster
21+
= Installing the {mtc-full} on an {product-title} {product-version} target cluster
2222
endif::[]
2323
ifdef::disconnected-3-4,disconnected-target-4-1-4,disconnected-target-4-2-4[]
24-
= Installing the {mtc-full} Operator on an {product-title} {product-version} target cluster in a restricted environment
24+
= Installing the {mtc-full} on an {product-title} {product-version} target cluster in a restricted environment
2525
endif::[]
2626

2727
ifdef::source-4-1-4,source-4-2-4,disconnected-source-4-1-4,disconnected-source-4-2-4[]
28-
You can install the {mtc-full} ({mtc-short}) Operator on an {product-title} 4 source cluster with the Operator Lifecycle Manager (OLM).
28+
You can install the {mtc-full} ({mtc-short}) on an {product-title} 4 source cluster by using Operator Lifecycle Manager (OLM) to install the {mtc-full} Operator.
2929
endif::[]
3030

3131
ifdef::migrating-3-4,target-4-1-4,target-4-2-4,disconnected-3-4,disconnected-target-4-1-4,disconnected-target-4-2-4[]
32-
You can install the {mtc-full} ({mtc-short}) Operator on an {product-title} {product-version} target cluster with the Operator Lifecycle Manager (OLM).
32+
You can install the {mtc-full} ({mtc-short}) on an {product-title} {product-version} target cluster by using Operator Lifecycle Manager (OLM) to install the {mtc-full} Operator.
3333

34-
The {mtc-full} Operator installs the {mtc-short} on the target cluster by default.
34+
{mtc-short} is installed on the target cluster by default.
3535
endif::[]
3636

3737
ifdef::disconnected-3-4,disconnected-target-4-1-4,disconnected-target-4-2-4,disconnected-source-4-1-4,disconnected-source-4-2-4[]
@@ -51,43 +51,48 @@ ifdef::source-4-1-4[]
5151
endif::[]
5252
. Use the *Filter by keyword* field to find the *{mtc-full} Operator*.
5353
. Select the *{mtc-full} Operator* and click *Install*.
54-
. On the *Install Operator* page, click *Install*.
54+
ifdef::migrating-3-4[]
55+
+
56+
[NOTE]
57+
====
58+
Do not change the subscription approval option to *Automatic*. The {mtc-full} Operator version must be the same on the source and the target clusters.
59+
====
60+
endif::[]
61+
62+
ifdef::target-4-2-4,source-4-2-4,target-4-1-4[]
63+
. In the *Subscription* tab, change the *Approval* option to *Automatic*.
64+
endif::[]
65+
. Click *Install*.
5566
+
5667
On the *Installed Operators* page, the *{mtc-full} Operator* appears in the *openshift-migration* project with the status *Succeeded*.
5768

5869
. Click *{mtc-full} Operator*.
5970
. Under *Provided APIs*, locate the *Migration Controller* tile, and click *Create Instance*.
6071

6172
ifdef::source-4-1-4[]
62-
. Set the `migration_controller` and `migration_ui` parameters to `false` and add the `deprecated_cors_configuration: true` parameter to the `spec` stanza:
73+
. Update the `migration_controller` and `migration_ui` parameters and add the `deprecated_cors_configuration` parameter to the manifest:
6374
+
6475
[source,yaml]
6576
----
6677
spec:
67-
...
78+
...
6879
migration_controller: false
6980
migration_ui: false
70-
...
81+
...
7182
deprecated_cors_configuration: true
7283
----
7384
endif::[]
7485
ifdef::source-4-2-4[]
75-
. Set the `migration_controller` and `migration_ui` parameters to `false` in the `spec` stanza:
86+
. Update the `migration_controller` and `migration_ui` parameters in the manifest:
7687
+
7788
[source,yaml]
7889
----
7990
spec:
80-
...
91+
...
8192
migration_controller: false
8293
migration_ui: false
83-
...
8494
----
8595
endif::[]
8696

8797
. Click *Create*.
88-
ifdef::source-4-1-4,source-4-2-4[]
89-
. Click *Workloads* -> *Pods* to verify that the `Restic` and `Velero` pods are running.
90-
endif::[]
91-
ifdef::disconnected-3-4,disconnected-target-4-1-4,disconnected-target-4-2-4,migrating-3-4,target-4-2-4,target-4-1-4[]
92-
. Click *Workloads* -> *Pods* to verify that the `ControllerManager`, `MigrationUI`, `Restic`, and `Velero` pods are running.
93-
endif::[]
98+
. Click *Workloads* -> *Pods* to verify that the {mtc-short} pods are running.

modules/migration-running-migration-plan-cam.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $ oc adm prune images
2929
----
3030

3131
. Log in to the {mtc-short} web console and click *Migration plans*.
32-
. Click the *Options* menu {kebab} beside a migration plan and select *Stage* to copy data from the source cluster to the target cluster without stopping the application.
32+
. Click the *Options* menu {kebab} next to a migration plan and select *Stage* to copy data from the source cluster to the target cluster without stopping the application.
3333
+
3434
You can run *Stage* multiple times to reduce the actual migration time.
3535

modules/migration-upgrading-migration-tool-3.adoc

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
// * migration/migrating_3_4/upgrading-migration-tool-3-4.adoc
44

55
[id='migration-upgrading-migration-tool-3_{context}']
6-
= Upgrading the {mtc-full} Operator on an {product-title} 3 cluster
6+
= Upgrading the {mtc-full} on an {product-title} 3 cluster
77

88
You can upgrade {mtc-full} ({mtc-short}) on an {product-title} 3 cluster by downloading the latest `operator.yml` file and replacing the existing {mtc-full} Operator.
99

10-
[NOTE]
11-
====
12-
If you remove and recreate the namespace, you must update the cluster service account token in the {mtc-short} web console.
13-
====
10+
.Prerequisites
11+
12+
* Access to `registry.redhat.io`
13+
* Podman installed
1414

1515
.Procedure
1616

@@ -35,16 +35,7 @@ $ sudo podman cp $(sudo podman create registry.redhat.io/rhmtc/openshift-migrati
3535
$ oc replace --force -f operator.yml
3636
----
3737

38-
. If you are upgrading from version 1.1.2 or earlier, delete the `Restic` pod to apply the changes:
39-
40-
.. Get the `Restic` pod names:
41-
+
42-
[source,terminal]
43-
----
44-
$ oc get pod -n openshift-migration | grep restic
45-
----
46-
47-
.. Delete each `Restic` Pod:
38+
. If you are upgrading from version 1.1.2 or earlier, delete the `Restic` pods to apply the changes:
4839
+
4940
[source,terminal]
5041
----
@@ -65,9 +56,43 @@ $ oc scale -n openshift-migration --replicas=0 deployment/migration-operator
6556
$ oc scale -n openshift-migration --replicas=1 deployment/migration-operator
6657
----
6758

68-
. Verify that the operator was upgraded to the latest version:
59+
. Verify that the `migration-operator` was upgraded to {mtc-version-z}:
6960
+
7061
[source,terminal]
7162
----
7263
$ oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'
7364
----
65+
66+
. Download the latest `controller-3.yml` file:
67+
+
68+
[source,terminal,subs="attributes+"]
69+
----
70+
$ sudo podman cp $(sudo podman create registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v{mtc-version-z}):/controller-3.yml ./
71+
----
72+
73+
. Create the `MigrationController` object:
74+
+
75+
[source,terminal]
76+
----
77+
$ oc create -f controller-3.yml
78+
----
79+
80+
. Verify that the {mtc-short} pods are running:
81+
+
82+
[source,terminal]
83+
----
84+
$ oc get pods -n openshift-migration
85+
----
86+
87+
. If you have already added your {product-title} 3 source cluster to the {mtc-short} console, you must update the service account token because the upgrade deletes and restores the `openshift-migration` namespace:
88+
89+
.. Obtain the service account token:
90+
+
91+
[source,terminal]
92+
----
93+
$ oc sa get-token migration-controller -n openshift-migration
94+
----
95+
96+
.. In the {mtc-short} console, click *Clusters*, click the Options menu {kebab} next to the source cluster, and select *Edit*.
97+
98+
.. Enter the new service account token in the *Service account token* field, click *Update cluster*, and then click *Close*.

modules/migration-upgrading-migration-tool-4.adoc

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,62 @@
44
// * migration/migrating_4_2_4/upgrading-migration-tool-4-2-4.adoc
55

66
[id='migration-upgrading-migration-tool-4_{context}']
7-
= Upgrading the {mtc-full} Operator on an {product-title} 4 cluster
7+
= Upgrading the {mtc-full} on an {product-title} 4 cluster
88

9-
ifeval::["{mtc-version}" > "1.3"]
10-
You can upgrade the {mtc-full} ({mtc-short}) Operator on an {product-title} 4 cluster with the Operator Lifecycle Manager.
9+
You can upgrade the {mtc-full} ({mtc-short}) on an {product-title} 4 cluster using the {product-title} console.
1110

11+
ifdef::migrating-4-1-4,migrating-4-2-4[]
1212
If you selected the *Automatic* approval option when you installed the {mtc-full} Operator, the Operator is updated automatically.
1313

1414
The following procedure enables you to change the *Manual* approval option to *Automatic* or to change the release channel.
15+
endif::[]
1516

1617
.Procedure
1718

18-
. In the {product-title} console, navigate to *Operators* > *Installed Operators*.
19+
. In the {product-title} console, navigate to *Operators* -> *Installed Operators*.
1920
. Click *{mtc-full} Operator*.
21+
ifdef::migrating-4-1-4,migrating-4-2-4[]
2022
. In the *Subscription* tab, change the *Approval* option to *Automatic*.
2123
. Optional: Edit the *Channel*.
2224
+
2325
Updating the subscription deploys the updated {mtc-full} Operator and updates the {mtc-short} components.
2426
endif::[]
25-
ifeval::["{mtc-version}" <= "1.3"]
26-
You can upgrade to {mtc-full} ({mtc-short}) {mtc-version} on an {product-title} 4 cluster by deleting the `MigrationController` custom resource (CR), uninstalling the CAM Operator, and then installing the {mtc-full} Operator.
27-
28-
.Procedure
2927

30-
. Delete the `MigrationController` CR:
28+
. Under *Provided APIs*, locate the *Migration Controller* tile, and click *Create Instance*.
29+
ifdef::migrating-4-1-4[]
30+
. If you are upgrading {mtc-short} on a 4.1 _source_ cluster, update the `migration_controller` and `migration_ui` parameters and add the `deprecated_cors_configuration` parameter to the `migration_controller` manifest:
3131
+
32-
[source,terminal]
32+
[source,yaml]
3333
----
34-
$ oc delete migrationcontroller -n openshift-migration migration-controller
34+
spec:
35+
...
36+
migration_controller: false
37+
migration_ui: false
38+
deprecated_cors_configuration: true
3539
----
40+
+
41+
[NOTE]
42+
====
43+
You do not need to update the manifest of the target cluster.
44+
====
45+
endif::[]
3646

37-
. In the {product-title} console, navigate to *Operators* > *Installed Operators*.
38-
. Click *CAM Operator*.
39-
. On the right side of the *Operator Details* page, select *Uninstall Operator* from the *Actions* list.
40-
. Select *Uninstall*. This Operator stops running and no longer receives updates.
41-
. Navigate to *Operators* -> *OperatorHub*.
42-
. Use the *Filter by keyword* field to find the *{mtc-full} Operator*.
43-
. Select the *{mtc-full} Operator* and click *Install*.
44-
. On the *Install Operator* page, click *Install*.
47+
ifdef::migrating-4-2-4[]
48+
. If you are upgrading {mtc-short} on a 4.2 _source_ cluster, update the `migration_controller` and `migration_ui` parameters in the `migration_controller` manifest:
4549
+
46-
On the *Installed Operators* page, verify that the *{mtc-full} Operator* appears in the *openshift-migration* project with the status *Succeeded*.
50+
[source,yaml]
51+
----
52+
spec:
53+
...
54+
migration_controller: false
55+
migration_ui: false
56+
----
57+
+
58+
[NOTE]
59+
====
60+
You do not need to update the manifest of the target cluster.
61+
====
4762
endif::[]
63+
64+
. Click *Create*.
65+
. Click *Workloads* -> *Pods* to verify that the {mtc-short} pods are running.

0 commit comments

Comments
 (0)