Skip to content

Commit 62ced23

Browse files
committed
MIG-834: Update PVs in MigPlan CR
1 parent 949041f commit 62ced23

15 files changed

+123
-41
lines changed

migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,46 @@ You can automate your migrations and modify the `MigPlan` and `MigrationControll
1010

1111
include::modules/migration-terminology.adoc[leveloffset=+1]
1212

13-
[id="migrating-your-applications-api_{context}"]
14-
== Migrating applications by using the CLI
13+
[id="migrating-applications-cli_{context}"]
14+
== Migrating applications by using the command line
1515

1616
You can migrate applications with the {mtc-short} API by using the command line interface (CLI) in order to automate the migration.
1717

1818
include::modules/migration-prerequisites.adoc[leveloffset=+2]
1919
include::modules/migration-creating-registry-route-for-dim.adoc[leveloffset=+2]
2020
include::modules/migration-configuring-proxies.adoc[leveloffset=+2]
2121
include::modules/migration-migrating-applications-api.adoc[leveloffset=+2]
22+
include::modules/migration-state-migration-cli.adoc[leveloffset=+2]
2223

23-
include::modules/migration-state-migration-cli.adoc[leveloffset=+1]
24-
include::modules/migration-excluding-pvcs.adoc[leveloffset=+2]
25-
include::modules/migration-mapping-pvcs.adoc[leveloffset=+2]
26-
include::modules/migration-kubernetes-objects.adoc[leveloffset=+2]
24+
[id="additional-resources-for-state-migration_{context}"]
25+
[discrete]
26+
=== Additional resources for state migration
27+
28+
* See xref:../migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc#migration-excluding-pvcs_advanced-migration-options-3-4[Excluding PVCs from migration] to select PVCs for state migration.
29+
* See xref:../migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc#migration-mapping-pvcs_advanced-migration-options-3-4[Mapping PVCs] to migrate source PV data to provisioned PVCs on the destination cluster.
30+
* See xref:../migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc#migration-kubernetes-objects_advanced-migration-options-3-4[Migrating Kubernetes objects] to migrate the Kubernetes objects that constitute an application's state.
2731

2832
include::modules/migration-hooks.adoc[leveloffset=+1]
2933
include::modules/migration-writing-ansible-playbook-hook.adoc[leveloffset=+2]
3034

31-
[id="configuration-options_{context}"]
32-
== Configuration options
35+
[id="migration-plan-options_{context}"]
36+
== Migration plan options
3337

34-
You can configure the following options for the `MigPlan` and `MigrationController` custom resources (CRs) to perform large-scale migrations and to improve performance.
38+
You can exclude, edit, and map components in the `MigPlan` custom resource (CR).
3539

36-
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+2]
3740
include::modules/migration-excluding-resources.adoc[leveloffset=+2]
41+
include::modules/migration-mapping-destination-namespaces-in-the-migplan-cr.adoc[leveloffset=+2]
42+
include::modules/migration-excluding-pvcs.adoc[leveloffset=+2]
43+
include::modules/migration-mapping-pvcs.adoc[leveloffset=+2]
44+
include::modules/migration-editing-pvs-in-migplan.adoc[leveloffset=+2]
45+
include::modules/migration-kubernetes-objects.adoc[leveloffset=+2]
46+
47+
[id="migration-controller-options_{context}"]
48+
== Migration controller options
49+
50+
You can edit migration plan limits, enable persistent volume resizing, or enable cached Kubernetes clients in the `MigrationController` custom resource (CR) for large migrations and improved performance.
51+
52+
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+2]
3853
include::modules/migration-enabling-pv-resizing-dvm.adoc[leveloffset=+2]
3954
include::modules/migration-enabling-cached-kubernetes-clients.adoc[leveloffset=+2]
4055

migrating_from_ocp_3_to_4/migrating-applications-3-4.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include::modules/common-attributes.adoc[]
66

77
toc::[]
88

9-
You can migrate your applications by using the {mtc-full} ({mtc-short}) web console or from the xref:../migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc#migrating-your-applications-api_advanced-migration-options-3-4[command line].
9+
You can migrate your applications by using the {mtc-full} ({mtc-short}) web console or from the xref:../migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc#migrating-applications-cli_advanced-migration-options-3-4[command line].
1010

1111
You can use stage migration and cutover migration to migrate an application between clusters:
1212

migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ This section describes resources for troubleshooting the {mtc-full} ({mtc-short}
1111
For known issues, see the xref:../migration_toolkit_for_containers/mtc-release-notes.adoc#mtc-release-notes[{mtc-short} release notes].
1212

1313
include::modules/migration-mtc-workflow.adoc[leveloffset=+1]
14+
15+
[discrete]
1416
include::modules/migration-about-mtc-custom-resources.adoc[leveloffset=+2]
15-
include::modules/migration-mtc-cr-manifests.adoc[leveloffset=+2]
17+
18+
include::modules/migration-mtc-cr-manifests.adoc[leveloffset=+1]
1619

1720
[id="logs-and-debugging-tools_{context}"]
1821
== Logs and debugging tools

migration_toolkit_for_containers/advanced-migration-options-mtc.adoc

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,47 @@ You can automate your migrations and modify the `MigPlan` and `MigrationControll
99

1010
include::modules/migration-terminology.adoc[leveloffset=+1]
1111

12-
[id="migrating-your-applications-api_{context}"]
13-
== Migrating applications by using the CLI
12+
[id="migrating-applications-cli_{context}"]
13+
== Migrating applications by using the command line
1414

1515
You can migrate applications with the {mtc-short} API by using the command line interface (CLI) in order to automate the migration.
1616

1717
include::modules/migration-prerequisites.adoc[leveloffset=+2]
1818
include::modules/migration-creating-registry-route-for-dim.adoc[leveloffset=+2]
1919
include::modules/migration-configuring-proxies.adoc[leveloffset=+2]
2020
include::modules/migration-migrating-applications-api.adoc[leveloffset=+2]
21-
include::modules/migration-mapping-destination-namespaces-in-the-migplan-cr.adoc[leveloffset=+2]
21+
include::modules/migration-state-migration-cli.adoc[leveloffset=+2]
2222

23-
include::modules/migration-state-migration-cli.adoc[leveloffset=+1]
24-
include::modules/migration-excluding-pvcs.adoc[leveloffset=+2]
25-
include::modules/migration-mapping-pvcs.adoc[leveloffset=+2]
26-
include::modules/migration-kubernetes-objects.adoc[leveloffset=+2]
23+
[id="additional-resources-for-state-migration_{context}"]
24+
[discrete]
25+
=== Additional resources for state migration
26+
27+
* See xref:../migration_toolkit_for_containers/advanced-migration-options-mtc.adoc#migration-excluding-pvcs_advanced-migration-options-mtc[Excluding PVCs from migration] to select PVCs for state migration.
28+
* See xref:../migration_toolkit_for_containers/advanced-migration-options-mtc.adoc#migration-mapping-pvcs_advanced-migration-options-mtc[Mapping PVCs] to migrate source PV data to provisioned PVCs on the destination cluster.
29+
* See xref:../migration_toolkit_for_containers/advanced-migration-options-mtc.adoc#migration-kubernetes-objects_advanced-migration-options-mtc[Migrating Kubernetes objects] to migrate the Kubernetes objects that constitute an application's state.
2730

2831
include::modules/migration-hooks.adoc[leveloffset=+1]
2932
include::modules/migration-writing-ansible-playbook-hook.adoc[leveloffset=+2]
3033

31-
[id="configuration-options_{context}"]
32-
== Configuration options
34+
[id="migration-plan-options_{context}"]
35+
== Migration plan options
3336

34-
You can configure the following options for the `MigPlan` and `MigrationController` custom resources (CRs) to perform large-scale migrations and to improve performance.
37+
You can exclude, edit, and map components in the `MigPlan` custom resource (CR).
3538

36-
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+2]
3739
include::modules/migration-excluding-resources.adoc[leveloffset=+2]
40+
include::modules/migration-mapping-destination-namespaces-in-the-migplan-cr.adoc[leveloffset=+2]
41+
include::modules/migration-excluding-pvcs.adoc[leveloffset=+2]
42+
include::modules/migration-mapping-pvcs.adoc[leveloffset=+2]
43+
include::modules/migration-editing-pvs-in-migplan.adoc[leveloffset=+2]
44+
include::modules/migration-kubernetes-objects.adoc[leveloffset=+2]
45+
46+
[id="migration-controller-options_{context}"]
47+
== Migration controller options
48+
49+
You can edit migration plan limits, enable persistent volume resizing, or enable cached Kubernetes clients in the `MigrationController` custom resource (CR) for large migrations and improved performance.
50+
51+
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+2]
3852
include::modules/migration-enabling-pv-resizing-dvm.adoc[leveloffset=+2]
3953
include::modules/migration-enabling-cached-kubernetes-clients.adoc[leveloffset=+2]
54+
55+
:advanced-migration-options-mtc!:

migration_toolkit_for_containers/migrating-applications-with-mtc.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include::modules/common-attributes.adoc[]
55

66
toc::[]
77

8-
You can migrate your applications by using the {mtc-full} ({mtc-short}) web console or from the xref:../migration_toolkit_for_containers/advanced-migration-options-mtc.adoc#migration-migrating-applications-api_advanced-migration-options-mtc[command line].
8+
You can migrate your applications by using the {mtc-full} ({mtc-short}) web console or the xref:../migration_toolkit_for_containers/advanced-migration-options-mtc.adoc#migrating-applications-cli_advanced-migration-options-mtc[command line].
99

1010
Most cluster-scoped resources are not yet handled by {mtc-short}. If your applications require cluster-scoped resources, you might have to create them manually on the target cluster.
1111

migration_toolkit_for_containers/troubleshooting-mtc.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ This section describes resources for troubleshooting the {mtc-full} ({mtc-short}
1111
For known issues, see the xref:../migration_toolkit_for_containers/mtc-release-notes.adoc#mtc-release-notes[{mtc-short} release notes].
1212

1313
include::modules/migration-mtc-workflow.adoc[leveloffset=+1]
14+
15+
[discrete]
1416
include::modules/migration-about-mtc-custom-resources.adoc[leveloffset=+2]
15-
include::modules/migration-mtc-cr-manifests.adoc[leveloffset=+2]
17+
18+
include::modules/migration-mtc-cr-manifests.adoc[leveloffset=+1]
1619

1720
[id="logs-and-debugging-tools_{context}"]
1821
== Logs and debugging tools
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * migration_toolkit_for_containers/advanced-migration-options-mtc.adoc
4+
// * migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc
5+
6+
[id="migration-editing-pvs-in-migplan_{context}"]
7+
= Editing persistent volume attributes
8+
9+
You can edit the storage class and the access mode of persistent volumes (PVs) in the `MigPlan` custom resource (CR) after the PVs have been discovered by the `MigrationController` CR.
10+
11+
.Prerequisites
12+
13+
* `MigPlan` CR is in a `Ready` state.
14+
15+
.Procedure
16+
17+
* Edit the values of `spec.persistentVolumes.selection.storageClass` and `spec.persistentVolumes.selection.accessMode` in the `MigPlan` CR:
18+
+
19+
[source,yaml]
20+
----
21+
apiVersion: migration.openshift.io/v1alpha1
22+
kind: MigPlan
23+
metadata:
24+
name: <migplan>
25+
namespace: openshift-migration
26+
spec:
27+
persistentVolumes:
28+
- capacity: 10Gi
29+
name: pvc-095a6559-b27f-11eb-b27f-021bddcaf6e4
30+
proposedCapacity: 10Gi
31+
pvc:
32+
accessModes:
33+
- ReadWriteMany
34+
hasReference: true
35+
name: mysql
36+
namespace: mysql-persistent
37+
selection:
38+
action: copy
39+
copyMethod: filesystem
40+
storageClass: cephrbd <1>
41+
accessMode: ReadWriteMany <2>
42+
storageClass: cephfs
43+
----
44+
<1> Destination storage class.
45+
<2> Destination access mode.

modules/migration-excluding-pvcs.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You select persistent volume claims (PVCs) for state migration by excluding the
1010

1111
.Prerequisites
1212

13-
* `MigPlan` CR with discovered PVs.
13+
* `MigPlan` CR is in a `Ready` state.
1414

1515
.Procedure
1616

modules/migration-excluding-resources.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// * migration_toolkit_for_containers/advanced-migration-options-mtc.adoc
55

66
[id="migration-excluding-resources_{context}"]
7-
= Excluding resources from a migration plan
7+
= Excluding resources
88

99
You can exclude resources, for example, image streams, persistent volumes (PVs), or subscriptions, from a {mtc-full} ({mtc-short}) migration plan to reduce the resource load for migration or to migrate images or PVs with a different tool.
1010

modules/migration-kubernetes-objects.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ metadata:
3131
name: <migplan>
3232
namespace: openshift-migration
3333
spec:
34-
includedResources: <1>
35-
- kind: <Secret>
34+
includedResources:
35+
- kind: <kind> <1>
3636
group: ""
37-
- kind: <ConfigMap>
37+
- kind: <kind>
3838
group: ""
3939
...
4040
labelSelector:
4141
matchLabels:
42-
<app: frontend> <2>
42+
<label> <2>
4343
----
44-
<1> Specify the `kind` and `group` of each resource.
45-
<2> Specify the label of the resources to migrate.
44+
<1> Specify the Kubernetes object, for example, `Secret` or `ConfigMap`.
45+
<2> Specify the label of the resources to migrate, for example, `app: frontend`.

0 commit comments

Comments
 (0)