1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/cnf-image-based-upgrade-prep-oadp.adoc
2024-10-10 15:15:46 +00:00

71 lines
3.2 KiB
Plaintext

// Module included in the following assemblies:
// * edge_computing/image-based-upgrade/cnf-preparing-for-image-based-upgrade.adoc
:_mod-docs-content-type: PROCEDURE
[id="cnf-image-based-upgrade-prep-oadp_{context}"]
= Creating {oadp-short} ConfigMap objects for the image-based upgrade with {lcao}
Create your {oadp-short} resources that are used to back up and restore your resources during the upgrade.
.Prerequisites
* You have generated a seed image from a compatible seed cluster.
* You have created {oadp-short} backup and restore resources.
* You have created a separate partition on the target cluster for the container images that is shared between stateroots. For more information, see "Configuring a shared container partition for the image-based upgrade".
* You have deployed a version of {lcao} that is compatible with the version used with the seed image.
* You have installed the {oadp-short} Operator, the `DataProtectionApplication` CR, and its secret on the target cluster.
* You have created an S3-compatible storage solution and a ready-to-use bucket with proper credentials configured. For more information, see "About installing {oadp-short}".
.Procedure
. Create the {oadp-short} `Backup` and `Restore` CRs for platform artifacts in the same namespace where the {oadp-short} Operator is installed, which is `openshift-adp`.
.. If the target cluster is managed by {rh-rhacm}, add the following YAML file for backing up and restoring {rh-rhacm} artifacts:
+
--
.PlatformBackupRestore.yaml for {rh-rhacm}
include::snippets/ibu-PlatformBackupRestore.adoc[]
--
.. If you created persistent volumes on your cluster through {lvms}, add the following YAML file for {lvms} artifacts:
+
.PlatformBackupRestoreLvms.yaml for {lvms}
include::snippets/ibu-PlatformBackupRestoreLvms.adoc[]
. If you need to restore applications after the upgrade, create the {oadp-short} `Backup` and `Restore` CRs for your application in the `openshift-adp` namespace.
.. Create the {oadp-short} CRs for cluster-scoped application artifacts in the `openshift-adp` namespace.
+
.Example {oadp-short} CRs for cluster-scoped application artifacts for LSO and {LVMS}
include::snippets/ibu-ApplicationClusterScopedBackupRestore.adoc[]
.. Create the {oadp-short} CRs for your namespace-scoped application artifacts.
+
--
.Example {oadp-short} CRs namespace-scoped application artifacts when LSO is used
include::snippets/ibu-ApplicationBackupRestoreLso.adoc[]
.Example {oadp-short} CRs namespace-scoped application artifacts when {lvms} is used
include::snippets/ibu-ApplicationBackupRestoreLvms.adoc[]
[IMPORTANT]
====
The same version of the applications must function on both the current and the target release of {product-title}.
====
--
. Create the `ConfigMap` object for your {oadp-short} CRs by running the following command:
+
[source,terminal]
----
$ oc create configmap oadp-cm-example --from-file=example-oadp-resources.yaml=<path_to_oadp_crs> -n openshift-adp
----
. Patch the `ImageBasedUpgrade` CR by running the following command:
+
[source,terminal]
----
$ oc patch imagebasedupgrades.lca.openshift.io upgrade \
-p='{"spec": {"oadpContent": [{"name": "oadp-cm-example", "namespace": "openshift-adp"}]}}' \
--type=merge -n openshift-lifecycle-agent
----