|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * edge_computing/image-based-upgrade/cnf-preparing-for-image-based-upgrade.adoc |
| 3 | + |
| 4 | +:_mod-docs-content-type: PROCEDURE |
| 5 | +[id="cnf-image-based-upgrade-creating-backup-oadp-resources_{context}"] |
| 6 | += Creating OADP ConfigMap objects for the image-based upgrade with {lcao} |
| 7 | + |
| 8 | +Create your OADP resources that are used to back up and restore your resources during the upgrade. |
| 9 | + |
| 10 | +.Prerequisites |
| 11 | + |
| 12 | +* Generate a seed image from a compatible seed cluster. |
| 13 | +* Create OADP backup and restore resources. |
| 14 | +* Create a separate partition on the target cluster for the container images that is shared between stateroots. For more information about, see "Configuring a shared container directory for the image-based upgrade". |
| 15 | +* Deploy a version of {lcao} that is compatible with the version used with the seed image. |
| 16 | +* Install the OADP Operator, the `DataProtectionApplication` CR, and its secret on the target cluster. |
| 17 | +* Create an S3-compatible storage solution and a ready-to-use bucket with proper credentials configured. For more information, see "About installing OADP". |
| 18 | +
|
| 19 | +.Procedure |
| 20 | + |
| 21 | +. Create the OADP `Backup` and `Restore` CRs for platform artifacts in the same namespace where the OADP Operator is installed, which is `openshift-adp`. |
| 22 | + |
| 23 | +.. If the target cluster is managed by {rh-rhacm}, add the following YAML file for backing up and restoring {rh-rhacm} artifacts: |
| 24 | ++ |
| 25 | +-- |
| 26 | +.PlatformBackupRestore.yaml for {rh-rhacm} |
| 27 | +include::snippets/ibu-PlatformBackupRestore.adoc[] |
| 28 | +-- |
| 29 | + |
| 30 | +.. If you created persistent volumes on your cluster through {lvms}, add the following YAML file for {lvms} artifacts: |
| 31 | ++ |
| 32 | +.PlatformBackupRestoreLvms.yaml for {lvms} |
| 33 | +include::snippets/ibu-PlatformBackupRestoreLvms.adoc[] |
| 34 | + |
| 35 | +. (Optional) If you need to restore applications after the upgrade, create the OADP `Backup` and `Restore` CRs for your application in the `openshift-adp` namespace. |
| 36 | + |
| 37 | +.. Create the OADP CRs for cluster-scoped application artifacts in the `openshift-adp` namespace. |
| 38 | ++ |
| 39 | +.Example OADP CRs for cluster-scoped application artifacts for LSO and {LVMS} |
| 40 | +include::snippets/ibu-ApplicationClusterScopedBackupRestore.adoc[] |
| 41 | + |
| 42 | +.. Create the OADP CRs for your namespace-scoped application artifacts. |
| 43 | ++ |
| 44 | +-- |
| 45 | +.Example OADP CRs namespace-scoped application artifacts when LSO is used |
| 46 | +include::snippets/ibu-ApplicationBackupRestoreLso.adoc[] |
| 47 | + |
| 48 | +.Example OADP CRs namespace-scoped application artifacts when {lvms} is used |
| 49 | +include::snippets/ibu-ApplicationBackupRestoreLvms.adoc[] |
| 50 | + |
| 51 | +[IMPORTANT] |
| 52 | +==== |
| 53 | +The same version of the applications must function on both the current and the target release of {product-title}. |
| 54 | +==== |
| 55 | +-- |
| 56 | + |
| 57 | +. Create the `ConfigMap` object for your OADP CRs by running the following command: |
| 58 | ++ |
| 59 | +[source,terminal] |
| 60 | +---- |
| 61 | +$ oc create configmap oadp-cm-example --from-file=example-oadp-resources.yaml=<path_to_oadp_crs> -n openshift-adp |
| 62 | +---- |
| 63 | + |
| 64 | +. Patch the `ImageBasedUpgrade` CR by running the following command: |
| 65 | ++ |
| 66 | +[source,terminal] |
| 67 | +---- |
| 68 | +$ oc patch imagebasedupgrades.lca.openshift.io upgrade \ |
| 69 | + -p='{"spec": {"oadpContent": [{"name": "oadp-cm-example", "namespace": "openshift-adp"}]}}' \ |
| 70 | + --type=merge -n openshift-lifecycle-agent |
| 71 | +---- |
0 commit comments