19 KiB
Transform-the-suite-to-a-Helm-deployment-on-24.2.FP1_688996419
Helm upgrade procedure
| SEQ | Steps | Duration | Downtime | ||
|---|---|---|---|---|---|
Prerequisites | 1 | Make sure current suite is upgraded to version 24.2.fp1 | 1 min | NA | |
| 2 | Run the following command to make sure that all the OMT and suite pods are ready | 1 min | kubectl get pod --all-namespaces|grep -v 1/1|grep -v 2/2|grep -v 3/3|grep -v 4/4|grep -v 6/6|grep -v Completed | ||
Preparation | 1 | Download the ESM helm chart to bastion | 2 mins | NA | Download helm chart (24.2.FP1) & Unzip & Verify the signature s3://deploy-packages/artifacts/24.2/24.2.FP1-04-29-2024-Build-185/ESM_Helm_Chart-24.2.1.zip |
| 2 | Get environment variables | 1 min | NOTE: If your bastion session is expired, run this get ENV variables again. If it expires after you delete the ns, replace the variables manually when executing the command | ||
| 3 | (Optional) Backup the suite external ingress and suite integration ingress | 2 mins | For ESK ENV, you will create the ingresses (suite and integration) after helm installation. If you don't have the backup files, please do the backup in advance. For example: NOTE: The ingress names may vary across environments kubectl get ingress sma-ingress -n $NAMESPACE -o yaml > suite-ingress-backup.yaml kubectl get ingress sma-int-ingress -n $NAMESPACE -o yaml > sma-int-ingress-backup.yaml Note: After helm installation you have to re-create related ingress and alb. | ||
| 4 | Create additional volumes | 1 min | For EKS: Run the following commands on the bastion node. NOTE: Please replace the mount point with the actual value: sudo mkdir -p /mnt/efs/var/vols/itom/itsma/config-volume sudo mkdir -p /mnt/efs/var/vols/itom/itsma/logging-volume sudo chown -R $SYSTEM_USER_ID:$SYSTEM_GROUP_ID /mnt/efs/var/vols/itom/itsma/config-volume | ||
| 5 | Check folder permissions | 5 mins | Using the following command to check and change folder permission (Please replace the mount point with actual value:): Check folder permission: sudo find /mnt/efs/var/vols/itom -type d -exec stat --format='%u:%g %A %n' '{}' \;| grep -v $SYSTEM_USER_ID:$SYSTEM_GROUP_ID If the result doesn't include For example (the command find and update the folders' permission exclude the log folder): sudo find /mnt/efs/var/vols/itom -type d -not -path "/mnt/efs/var/vols/itom/itsma/global-volume/logs/*" -exec chown $SYSTEM_USER_ID:$SYSTEM_GROUP_ID {} + | ||
| 6 | Sync data to new Helm persistent volumes | 6 mins | NOTE: You may want to clean up the tenant-import and tenant-export folders if the size of these 2 volumes are too large before sync. Sync data to new PV: cd ESM_Helm_Chart-2x.x/scripts/transformation Run sycnData command with your own path, for example: sudo./syncData.sh --globalVolumePath /mnt/efs/var/vols/itom/itsma/global-volume --smartanalyticsVolumePath /mnt/efs/var/vols/itom/itsma/smartanalytics-volume --configVolumePath /mnt/efs/var/vols/itom/itsma/config-volume NOTE: you need to press 'y' twice to complete the script Also you could use the following command to avoid bastion connection interruption during data sync NOTE: Please replace the mount point to actual value you use: nohup sh -c "printf 'y\ny\ny\ny\n' | sudo./syncData.sh --globalVolumePath /mnt/efs/var/vols/itom/itsma/global-volume --smartanalyticsVolumePath /mnt/efs/var/vols/itom/itsma/smartanalytics-volume --configVolumePath /mnt/efs/var/vols/itom/itsma/config-volume" </dev/null >nohup.out 2>&1 & Watch the progress by below command: tail -f nohup.out Gov Cloud ENV took 6 mins with below data size: The 'global-volume' requires an additional 77 MB of free disk space. | ||
| 7 | Retrieve system configurations and generate values.yaml file
| 5 mins | Before you begin, ensure that the jq and yq tools are installed Generate basic values.yaml file based on the suite environment cd ESM_Helm_Chart-2x.x/scripts/transformation NOTE: you need to press 'y' twice to complete the script Copy the Save a copy of the | ||
Generate customized values.yaml Go to the cd ESM_Helm_Chart-2x.x/esm-1.0.0+2x.x-xxx/scripts/ custom_settings chmod u+x generateCustomSettings.sh ./generateCustomSettings.sh The script generates a Copy the Save the | |||||
| 7 | Back up OMT and SMA | 30 mins | Backup the whole SMAX (RDS/EFS/K8S) | ||
Maintain Window | 1 | Stop SMA and OMT | 5 mins | 45 mins | 1.Stop OMT & SMA: $CDF_HOME/bin/cdfctl runlevel set -l DOWN -n $NAMESPACE 2.Check the pods of OMT & SMA are all stopped. kubectl get pod -n $NAMESPACE|grep -v -E 'throttling|opentelemetry|toolkit|Completed' NOTE: If your promethues pods are under core namespace, it takes time to shut down these pods |
| 2 | Clean up classic SMA resources | 5 mins | Use the below command to clean the SMA resource: kubectl delete ns $NAMESPACE NOTE: Deleting the ns will re-created the ingress and ALB. You will create new ingress and ALB for EKS in helm installation step. Then bound the newly created the ingress alb to FedRAMP domain Verify the ns is deleted: kubectl get ns Use the following command to check what resources are being used: kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found -n $NAMESPACE Patch the ingress use the following command: kubectl patch -n $NAMESPACE --type=json --patch='[{"op": "remove", "path": "/metadata/finalizers/0"}]' | ||
| 3 | Sync incremental data | 2 mins | Sync incremental data: Go to the sudo./syncData.sh --globalVolumePath /mnt/efs/var/vols/itom/itsma/global-volume --smartanalyticsVolumePath /mnt/efs/var/vols/itom/itsma/smartanalytics-volume --configVolumePath /mnt/efs/var/vols/itom/itsma/config-volume NOTE: to sync incremental data you only need to press y for one time The incremental sync should not cost long time as the first sync, while still you can use the below command to avoid bastion connection interruption during sync data NOTE: Please replace the mount point with your actual environment: nohup sh -c "printf 'y\ny\ny\ny\n' | sudo./syncData.sh --globalVolumePath /mnt/efs/var/vols/itom/itsma/global-volume --smartanalyticsVolumePath /mnt/efs/var/vols/itom/itsma/smartanalytics-volume --configVolumePath /mnt/efs/var/vols/itom/itsma/config-volume" </dev/null >nohup.out 2>&1 & | ||
| 4 | Update the label for the core namespace | 1 min | Update the label for core: kubectl patch ns core -p '{"metadata":{"labels":{" deployments.microfocus.com/deployment-name":"cdf "}}}' | ||
| 5 | Create a deployment for the suite | 1 min | Create a deployment for suite: $CDF_HOME/bin/cdfctl deployment create -d $NAMESPACE | ||
| 6 | Refine existing PVs | 1 min |
| ||
| 7 | Restore vault data
| 5 mins | Copy vault data from core-volume to global-volume sudo cp -R /mnt/efs/var/vols/itom/itsma/core/vault /mnt/efs/var/vols/itom/itsma/global-volume/ NOTE: Please replace the mount point with your actual environment | ||
Copy vault secrets to the suite namespace
| |||||
| 8 | Start OMT | 5 mins |
| ||
| 9 | Install the ESM helm chartCreate ingress for the suite (EKS only) | 15 mins | Login Bastion and change folder to the ESM_Helm_Chart-2x.x/charts/ directory. helm install esm-1.0.0+2x.x-xxx.tgz -n $NAMESPACE -f values.yaml -f customized_values.yaml --set global.nodeSelector.Worker=label N OTE: This release name is the one you gave in step 7 During the helm installation, monitor the status of the itom-nginx-ingress service by running the below command: kubectl get svc -n $NAMESPACE|grep itom-nginx-ingress-svc [EKS Only] Once the service is available, create the ingress for the suite & ingress for the SMAX integration. For example: kubectl create -f sma-ingress.yaml NOTE: The ingress yaml files are the ones you exported in Preparation - Step 3 Bound the newly created the ingress alb to FedRAMP domain Add the newly created service port to the EKS worker's inbound security group Reference:
| ||
| 10 | Enable helm autopass | 3 mins |
| ||
| 11 | Ensure all suite pods & job are ready | 2 mins | Check helm install pod status kubectl get pod -n $NAMESPACE|grep -v 1/1|grep -v 2/2|grep -v 3/3|grep -v 4/4|grep -v Completed kubectl get job -n $NAMESPACE Note: please run the following command t o delete the xruntime-upgrade-tenants job if it is 0/1: kubectl delete job -n $ns `kubectl get job -n $ns | grep xruntime-upgrade-tenants | awk '{print $1}'` | ||
Post-tasks | 1 | Clean up unused pods in the OMT namespace | 1 mins | NA | Clean up unused pods in the OMT namespace via below command: helm upgrade apphub $CDF_HOME/charts/apphub-1.2*.tgz --reuse-values --set global.services.suiteDeployment NOTE: If you are going to restore a single namespace after running above command, please run below workaround to fix this issue Fix OMT clusterrolebinding and clusterroleAfter helm transformation, OMT 5443 portal will no longer be in use. |
| 2 | Delete unused PVs | 1 mins | | ||
| 3 | Delete unused nfs folders | 15 mins | Run the following command to clean unused nfs folder: dbVolume= globalVolume= smartanalyticsVolume= Where: For example: dbVolume=/mnt/efs/var/vols/itom/itsma/db-volume globalVolume=/mnt/efs/var/vols/itom/itsma/global-volume smartanalyticsVolume=/mnt/efs/var/vols/itom/itsma/smartanalytics-volume
| ||
Verification | 1 | SMAX | 30 mins | NA | |
| 2 | NSACM Sanity | ||||
| 3 | Audit Sanity | ||||
| 4 | Audit-Collector Sanity |
Build Info:
| Product | Build/Chart |
|---|---|
| OMT | 24.2-159 |
| SMAX/HCMX Metadata | 24.2.FP1-b11 |
| SMAX/HCMX Helm chart | esm-1.0.1+24.2.1-38 |
Doc Link:
Related pages
- Page: ESM Cloud Farm Version Tracking
- Page: How to get an Opentext Confluence account
- Page: ITOM APM AppPluse Cloud Farm Information
- Page: ITOM Cloud Service Ops Doc Management Process
- Page: ITOM ESM Cloud Service Catalog
- Page: ITOM OpsB NOM Cloud Service Catalog
- Page: OpsB and NOM Cloud Deployments Version Tracking