Apply Hotfixes to Digital.ai Deploy Pods
Here's how you can apply hotfixes step-by-step to Digital.ai Deploy on Kubernetes.
The following instructions are tailored for the Digital.ai Deploy setup installed with the default settings such as the default namespace, digitalai, and the default Custom Resource (CR), dai-xld. Use the right namespace and CR file name per your Deploy setup.
Enable Hotfix in the Deploy operator
Patch the CR with additional persistence paths. The persistent folder is reports by default.
-
Create a patch file with the additional persistence paths. Here's an example.
cat << EOF >> patch-cr-hotfix-24.1.patch.yamlspec:master:persistence:paths:# default value for 24.1/opt/xebialabs/xl-deploy-server/work# custom- /opt/xebialabs/xl-deploy-server/hotfix- /opt/xebialabs/xl-deploy-server/hotfix/libworker:persistence:paths:# default value for 24.1- /opt/xebialabs/deploy-task-engine/work# custom- /opt/xebialabs/deploy-task-engine/hotfix- /opt/xebialabs/deploy-task-engine/hotfix/libEOF -
Apply the patch to update the configuration for Deploy pods by running the following command. Suppose, the CR name is
dai-xld.kubectl patch -n digitalai digitalaideploys dai-xld \--type=merge --patch-file "patch-cr-hotfix-24.1.patch.yaml" -
After applying the patch, the Deploy pods will restart automatically. Wait for a minute (reconciliation period).
kubectl delete sts dai-xld-digitalai-deploy-master -n digitalaikubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai
Copy the Hotfix Libraries to the Deploy Pods
Copy the hotfix JAR file to the persisted folder on each pod after adding the hotfix libraries to the CR as discussed earlier.
-
Copy the hotfix JAR file to the master pods by running the following command:
kubectl cp -n digitalai hotfix.jar \dai-xld-digitalai-deploy-master-0:/opt/xebialabs/xl-deploy-server/hotfix/libkubectl cp -n digitalai hotfix.jar \dai-xld-digitalai-deploy-master-1:/opt/xebialabs/xl-deploy-server/hotfix/lib -
Copy the hotfix JAR file to the worker pods by running the following command:
kubectl cp -n digitalai hotfix.jar\dai-xld-digitalai-deploy-worker-0:/opt/xebialabs deploy-task-engine/hotfix/libkubectl cp -n digitalai hotfix.jar \dai-xld-digitalai-deploy-worker-1:/opt/xebialabs/deploy-task-engine/hotfix/lib -
Restart the Deploy pods by running the following command:
kubectl delete sts dai-xld-digitalai-deploy-master -n digitalaikubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai -
Verify the hotfix JAR file is copied to the Deploy master pods by running the following command:
kubectl exec -it sts/dai-xld-digitalai-deploy-master -n digitalai \-- ls -l /opt/xebialabs/xl-deploy-server/hotfix/lib -
Verify the hotfix JAR file is copied to the Deploy worker pods by running the following command:
kubectl exec -it sts/dai-xld-digitalai-deploy-worker -n digitalai \-- ls -l /opt/xebialabs deploy-task-engine/hotfix/lib