22 KiB
Transform-the-suite-to-a-Helm-deployment-on-24.3.2_688996421
Helm upgrade procedure
| SEQ | Steps | Duration | Downtime | ||
|---|---|---|---|---|---|
Prerequisites | 1 | Make sure current suite is upgraded to version 24.3.2 | 1 min | NA | |
| 2 | Run the following command to make sure that all the OMT and suite pods are ready | 1 min | | ||
Preparation | 1 | Download the ESM helm chart to bastion | 2 mins | NA | Download & Unzip & Verify the signature |
| 2 | Get environment variables | 1 min | Run below commands to get ENV variables: NAMESPACE=`kubectl get namespace|grep itsma | cut -f1 -d " "` 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 | Backup the suite external ingress and suite integration ingress. | If you don't have Backup the ingress yaml files which will be used in helm install step to the tmp folder: NOTE: The ingress names may differ between farms. 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 | |||
| 4 | Create additional volumes Configure NFS volume | 1 min | For EKS: Run the following commands on the bastion node. NOTE: Please change the mount point with the actual value: sudo mkdir -p /mnt/efs/var/vols/itom/itsma/config-volume | ||
| 5 | Check folder permissions | 10 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 | 35 mins | NOTE: Please use the syncData.sh script which in 24.4 GA release package. NOTE: You may want to clean up the tenant-import and tenant-export folders before sync. cd ESM_Helm_Chart-2x.x/scripts/transformation Use the following command to avoid bastion connection interruption during sync data (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 For the information, 35 mins for below data size: The 'global-volume' requires an additional 33 G 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 Create a values.yaml file based on the suite environment cd ESM_Helm_Chart-2x.x/scripts/transformation 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 Copy the | |||||
| 8 | Back up OMT and SMA | 30 mins | Backup the whole SMAX (RDS/EFS/K8S) | ||
Maintain Window | 1 | Stop SMA and OMT | 10 mins | 70 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: In SaaS simulation ENV, promethues pods are under core namespace and 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 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 ing sma-ingress -n $NAMESPACE --type=json --patch='[{"op": "remove", "path": "/metadata/finalizers/0"}]' | ||
| 3 | Sync incremental data | 2 mins | NOTE: Please use the syncData.sh script which in 24.4 GA release package. 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: 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(Please change the mount point as 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 & Then watch the progress by below command: tail -f nohup.out | ||
| 4 | Update the label for the core ns | 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 NOTE: This command creates a deployment with your original suite namespace as the deployment name. | ||
| 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/ | ||
Copy vault secrets to the suite namespace
| |||||
| 8 | Start OMT | 5 mins |
| ||
| 9 | Install the ESM helm chart Create ingress for the suite (EKS only) | 35 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 --set global.nodeSelector.Worker=label -f customized_values.yaml NOTE: 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 Ops domain(**- smax.esm.com) Add the newly created service port to the EKS worker's inbound security group Reference:
| ||
| 10 | Enable helm autopass | 3 mins |
| ||
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 | |||
Post-tasks | 0 | (Optional) Reinstall lost services: Toolkit, Monitoring, Opentelemetry | After install the helm version suite, certain ports in suite will be reset. We have to re-enable them again in suite. Please run following command" 1.Run the following patch command: kubectl patch svc idm-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/2","value":{"name":"ssl","port":443,"protocol":"TCP","targetPort":8443}},{"op":"add","path":"/spec/ports/3","value":{"name":"metrics","port":444,"protocol":"TCP","targetPort":8444}}]'#expose nginx portkubectl patch svc itom-nginx-ingress-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/1","value":{"name":"http-metrics","port":10254,"protocol":"TCP","targetPort":10254}}]'#expose redis portkubectl patch svc itom-xruntime-redis-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/1","value":{"name":"https-metrics","port":9121,"protocol":"TCP","targetPort":9121}}]'#expose rabbitmq port#kubectl patch svc itom-xruntime-rabbitmq-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/4","value":{"name":"http-metrics","port":9419,"protocol":"TCP","targetPort":15691}}]'#expose port for JMX platformkubectl patch svc itom-xruntime-platform-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/3","value":{"name":"platform-metrics","port":5555,"protocol":"TCP","targetPort":5555}}]'kubectl patch svc itom-xruntime-platform-offline-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/3","value":{"name":"platform-offline-metrics","port":5555,"protocol":"TCP","targetPort":5555}}]'kubectl patch svc itom-xruntime-platform-offline-ng-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/3","value":{"name":"platform-offline-ng-metrics","port":5555,"protocol":"TCP","targetPort":5555}}]'kubectl patch svc itom-xruntime-platform-readonly-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/3","value":{"name":"platform-readonly-metrics","port":5555,"protocol":"TCP","targetPort":5555}}]'#expose port for JMX gatewaykubectl patch svc itom-xruntime-gateway-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/3","value":{"name":"gateway-metrics","port":5555,"protocol":"TCP","targetPort":5555}}]'#expose port for JMX service portalkubectl patch svc itom-xruntime-serviceportal-svc -n $(kubectl get namespace |grep itsma | cut -f1 -d " ") --type=json -p='[{"op":"add","path":"/spec/ports/3","value":{"name":"serviceportal-metrics","port":5555,"protocol":"TCP","targetPort":5555}}]' 2.Go to ITOM Marketplace to download all Service Monitor definitions 3.Unzip the package and navigate to the folder prometheus/servicemonitor and run the following command: namespace=`kubectl get namespace |grep itsma| cut -f1 -d " "` sed -i -e 's/insecureSkipVerify: false/insecureSkipVerify: true/g' *.yaml | ||
| 1 | Clean up unused pods in the OMT namespace | 5 mins | NA | Run the following command to remove cdf-apiserver, cdfapiserverdb, frontendIngress, itom-frontend-ui, and itom-mng-portal resources: helm upgrade apphub $CDF_HOME/charts/apphub-1.2*.tgz --reuse-values --set global.services.suiteDeploymentManagement=false -n core kubectl delete deploy suite-conf-pod-itsma -n core --ignore-not-found=true kubectl delete svc suite-conf-svc-itsma -n core --ignore-not-found=true kubectl delete ingress suite-conf-ing-itsma -n core --ignore-not-found=true If you are restoring a single namespace after running above command, it will fail, please do workaround with below wiki: OMT clusterrolebinding and clusterrole After 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 |
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