Skip to content

Commit 6eb6a48

Browse files
authored
Merge pull request #45441 from sbeskin-redhat/MIG_1045_Instructions_for_state_only_transfer_and_CD_migration
MIG-1045 Instructions for state-only transfer and CD migration
2 parents fc6e0d5 + 4c73655 commit 6eb6a48

File tree

1 file changed

+76
-3
lines changed

1 file changed

+76
-3
lines changed

modules/migration-state-migration-cli.adoc

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,91 @@
33
// * migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc
44
// * migration_toolkit_for_containers/advanced-migration-options-mtc.adoc
55

6+
:_content-type: PROCEDURE
67
[id="migration-state-migration-cli_{context}"]
78
= State migration
89

9-
You can perform repeatable, state-only migrations by using {mtc-full} ({mtc-short}) to migrate persistent volume claims (PVCs) that constitute an application's state. You migrate specified PVCs by excluding other PVCs from the migration plan. Persistent volume (PV) data is copied to the target cluster. The PV references are not moved. The application pods continue to run on the source cluster. You can map the PVCs to ensure that the source and target PVCs are synchronized.
10+
You can perform repeatable, state-only migrations by using {mtc-full} ({mtc-short}) to migrate persistent volume claims (PVCs) that constitute an application's state. You migrate specified PVCs by excluding other PVCs from the migration plan. You can map the PVCs to ensure that the source and the target PVCs are synchronized. Persistent volume (PV) data is copied to the target cluster. The PV references are not moved, and the application pods continue to run on the source cluster.
1011

11-
You can perform a one-time migration of Kubernetes objects that constitute an application's state.
12+
State migration is specifically designed to be used in conjunction with external CD mechanisms, such as OpenShift Gitops. You can migrate application manifests using GitOps while migrating the state using {mtc-short}.
1213

1314
If you have a CI/CD pipeline, you can migrate stateless components by deploying them on the target cluster. Then you can migrate stateful components by using {mtc-short}.
1415

15-
You can perform a state migration between clusters or within the same cluster.
16+
You can perform a state migration between clusters or within the same cluster.
1617

1718
[IMPORTANT]
1819
====
1920
State migration migrates only the components that constitute an application's state. If you want to migrate an entire namespace, use stage or cutover migration.
2021
====
22+
23+
.Prerequisites
24+
25+
* The state of the application on the source cluster is persisted in `PersistentVolumes` provisioned through `PersistentVolumeClaims`.
26+
27+
* The manifests of the application are available in a central repository that is accessible from both the source and the target clusters.
28+
29+
30+
.Procedure
31+
32+
. Migrate persistent volume data from the source to the target cluster.
33+
+
34+
You can perform this step as many times as needed. The source application continues running.
35+
36+
. Quiesce the source application.
37+
+
38+
You can do this by setting the replicas of workload resources to `0`, either directly on the source cluster or by updating the manifests in GitHub and re-syncing the Argo CD application.
39+
40+
. Clone application manifests to the target cluster.
41+
+
42+
You can use Argo CD to clone the application manifests to the target cluster.
43+
44+
. Migrate the remaining volume data from the source to the target cluster.
45+
+
46+
Migrate any new data created by the application during the state migration process by performing a final data migration.
47+
48+
. If the cloned application is in a quiesced state, unquiesce it.
49+
50+
. Switch the DNS record to the target cluster to re-direct user traffic to the migrated application.
51+
52+
[NOTE]
53+
====
54+
{mtc-short} 1.6 cannot quiesce applications automatically when performing state migration. It can only migrate PV data. Therefore, you must use your CD mechanisms for quiescing or unquiescing applications.
55+
56+
{mtc-short} 1.7 introduces explicit Stage and Cutover flows. You can use staging to perform initial data transfers as many times as needed. Then you can perform a cutover, in which the source applications are quiesced automatically.
57+
====
58+
59+
.Prerequisites
60+
61+
* The state of the application on the source cluster is persisted in `PersistentVolumes` provisioned through `PersistentVolumeClaims`.
62+
63+
* The manifests of the application are available in a central repository that is accessible from both the source and the target clusters.
64+
65+
66+
.Procedure
67+
68+
. Migrate persistent volume data from the source to the target cluster.
69+
+
70+
You can perform this step as many times as needed. The source application continues running.
71+
72+
. Quiesce the source application.
73+
+
74+
You can do this by setting the replicas of workload resources to `0`, either directly on the source cluster or by updating the manifests in GitHub and re-syncing the Argo CD application.
75+
76+
. Clone application manifests to the target cluster.
77+
+
78+
You can use Argo CD to clone the application manifests to the target cluster.
79+
80+
. Migrate the remaining volume data from the source to the target cluster.
81+
+
82+
Migrate any new data created by the application during the state migration process by performing a final data migration.
83+
84+
. If the cloned application is in a quiesced state, unquiesce it.
85+
86+
. Switch the DNS record to the target cluster to re-direct user traffic to the migrated application.
87+
88+
[NOTE]
89+
====
90+
{mtc-short} 1.6 cannot quiesce applications automatically when performing state migration. It can only migrate PV data. Therefore, you must use your CD mechanisms for quiescing or unquiescing applications.
91+
92+
{mtc-short} 1.7 introduces explicit Stage and Cutover flows. You can use staging to perform initial data transfers as many times as needed. Then you can perform a cutover, in which the source applications are quiesced automatically.
93+
====

0 commit comments

Comments
 (0)