Skip to main content
Version: Early Access

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.

  1. Create a patch file with the additional persistence paths. Here's an example.

    cat << EOF >> patch-cr-hotfix-24.1.patch.yaml
    spec:
    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/lib
    worker:
    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/lib
    EOF
  2. 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"
  3. 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 digitalai
    kubectl 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.

  1. 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/lib

    kubectl cp -n digitalai hotfix.jar \dai-xld-digitalai-deploy-master-1:/opt/xebialabs/xl-deploy-server/hotfix/lib
  2. 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/lib

    kubectl cp -n digitalai hotfix.jar \dai-xld-digitalai-deploy-worker-1:/opt/xebialabs/deploy-task-engine/hotfix/lib
  3. Restart the Deploy pods by running the following command:

    kubectl delete sts dai-xld-digitalai-deploy-master -n digitalai
    kubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai
  4. 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
  5. 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