-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user guide documentation to perform upgrade
Signed-off-by: Saeid Askari <[email protected]>
- Loading branch information
1 parent
561e9a0
commit 0a0787c
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
## Example upgrade from 4.16.x to 4.16.y | ||
### starting conditions: | ||
- A compatible seed image with target cluster is created. Seed image has `4.16.y` ocp version. [Both target cluster and seed image has configured a shared container partition for IBU.](https://docs.openshift.com/container-platform/4.17/edge_computing/image_based_upgrade/preparing_for_image_based_upgrade/cnf-image-based-upgrade-shared-container-partition.html) | ||
- spoke cluster is successfully deployed and configured using a `ProvisioningRequest`: | ||
```bash | ||
$ oc get provisioningrequests.o2ims.provisioning.oran.org | ||
NAME AGE PROVISIONSTATE PROVISIONDETAILS | ||
cluster-name 37m fulfilled Provisioning request has completed successfully | ||
``` | ||
- [OADP and LCA is installed on the spoke cluster. OADP backend is configured on the spoke cluster.](https://docs.openshift.com/container-platform/4.17/edge_computing/image_based_upgrade/preparing_for_image_based_upgrade/cnf-image-based-upgrade-install-operators.html) | ||
```yaml | ||
# policytemplates/version_4.16.x/sno-ran-du/sno-ran-du-pg-v4-16-x-v1.yaml | ||
|
||
policies: | ||
- name: operator-subscriptions | ||
manifests: | ||
# LCA | ||
- path: source-crs/LcaOperatorStatus.yaml | ||
- path: source-crs/LcaSubscriptionNS.yaml | ||
- path: source-crs/LcaSubscriptionOperGroup.yaml | ||
- path: source-crs/LcaSubscription.yaml | ||
# OADP | ||
- path: source-crs/OadpOperatorStatus.yaml | ||
- path: source-crs/OadpSubscriptionNS.yaml | ||
- path: source-crs/OadpSubscriptionOperGroup.yaml | ||
- path: source-crs/OadpSubscription.yaml | ||
- name: oadp-backend | ||
manifests: | ||
- path: source-crs/OadpSecret.yaml | ||
patches: | ||
- data: <FILL> | ||
- path: source-crs/OadpDataProtectionApplication.yaml | ||
patches: | ||
- spec: | ||
backupLocations: | ||
<FILL> | ||
``` | ||
### steps: | ||
- create new clustertemplates and policytemplates directories for the new release according to sample git-setup. | ||
- update release version in new clustertemplates files | ||
```yaml | ||
# clustertemplates/version_4.16.y/sno-ran-du/clusterinstance-defaults-v1.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: clusterinstance-defaults-v1 | ||
namespace: sno-ran-du-v4-16-y | ||
data: | ||
clusterinstance-defaults: | | ||
clusterImageSetNameRef: "4.16.y" | ||
--- | ||
# clustertemplates/version_4.16.y/sno-ran-du/sno-ran-du-v4-16-y-1.yaml | ||
kind: ClusterTemplate | ||
metadata: | ||
name: sno-ran-du.v4-16-y-1 | ||
namespace: sno-ran-du-v4-16-y | ||
spec: | ||
name: sno-ran-du | ||
version: v4-16-y-1 | ||
release: 4.16.y | ||
--- | ||
# clustertemplates/version_4.16.y/sno-ran-du/upgrade-defaults-v1.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: upgrade-defaults-v1 | ||
namespace: sno-ran-du-v4-16-y | ||
data: | ||
ibgu: | | ||
ibuSpec: | ||
seedImageRef: | ||
image: "quay.io/seed-repo/seed-image:4.16.y" | ||
version: "4.16.y" | ||
oadpContent: | ||
- name: sno-ran-du-ibu-platform-backup-v4-16-y-1 | ||
namespace: openshift-adp | ||
``` | ||
- sync ztp repo to the hub cluster. | ||
- patch `ProvisioningRequest.spec.templateName` and `ProvisioningRequest.spec.templateVersion` to point to the new `ClusterTemplate`. This will trigger the image based upgrade. | ||
- Wait for upgrade to be completed. | ||
```yaml | ||
status: | ||
conditions: | ||
message: Upgrade is completed | ||
reason: Completed | ||
status: "True" | ||
type: UpgradeCompleted | ||
provisioningStatus: | ||
provisionedResources: | ||
provisioningDetails: Provisioning request has completed successfully | ||
provisioningState: fulfilled | ||
``` |