Uninstalling watsonx Orchestrate

An instance administrator and cluster administrator can work together to uninstall watsonx Orchestrate.

Who needs to complete this task?

Instance administrator To uninstall watsonx Orchestrate, you must be an instance administrator. An instance administrator has permission to manage software in the following projects:

The operators project for the instance

The operators for this instance of IBM® Software Hub are installed in the operators project. In the uninstall commands, the ${PROJECT_CPD_INST_OPERATORS} environment variable refers to the operators project.

The operands project for the instance

The IBM Software Hub control plane and the services for this instance of IBM Software Hub are installed in the operands project. In the uninstall commands, the ${PROJECT_CPD_INST_OPERANDS} environment variable refers to the operands project.

When do you need to complete this task?

Complete this task if you want to remove watsonx Orchestrate from an instance of IBM Software Hub.

Repeat as needed If you are responsible for multiple instances of IBM Software Hub, you can repeat this task to remove other instances of watsonx Orchestrate on the cluster.

Information you need to complete this task

Review the following information before you uninstall watsonx Orchestrate:

Environment variables
The commands in this task use environment variables so that you can run the commands exactly as written.
  • If you don't have the script that defines the environment variables, see Setting up installation environment variables.
  • To use the environment variables from the script, you must source the environment variables before you run the commands in this task. For example, run:
    source ./cpd_vars.sh

Procedure

Complete the following tasks to uninstall watsonx Orchestrate:

  1. Deleting the service instance
  2. Uninstalling the service
  3. Cleaning up resources

Deleting the service instance

Who needs to complete this task?
A user with the Manage service instances permission must complete this task.
When do you need to complete this task?
Complete this task before you uninstall watsonx Orchestrate.

From the IBM Software Hub web client:

  1. Log in to the web client as a user with sufficient permissions to complete the task.
  2. From the menu, select Services > Instances.
  3. Filter the list to show the watsonx Assistant type.
  4. Delete each watsonx Assistant instance in the list.
  5. Filter the list to show the orchestrate type.
  6. Delete the orchestrate instance.

Uninstalling the service

To uninstall watsonx Orchestrate:

  1. Log the cpd-cli in to the Red Hat® OpenShift® Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. Delete the custom resource for watsonx Orchestrate.
    cpd-cli manage delete-cr \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --components=watsonx_orchestrate 
    Wait for the cpd-cli to return the following message before you proceed to the next step:
    [SUCCESS]... The delete-cr command ran successfully
  3. Delete watsonx.data™ custom resource wxdengine:
    oc delete wxdengine wo-milvus -n "${PROJECT_CPD_INST_OPERANDS}"
    After successful deletion, you can see the following output:
    wxdengine.watsonxdata.ibm.com "wo-milvus" deleted
  4. Delete watsonx.ai™ custom resource watsonxaiifm:
    Important: Before deleting, ensure that watsonxaiifm-cr is not used by any other services.
    oc delete watsonxaiifm watsonxaiifm-cr -n "${PROJECT_CPD_INST_OPERANDS}"
    After successful deletion, you can see the following output:
    watsonxaiifm.watsonxaiifm.cpd.ibm.com "watsonxaiifm-cr" deleted
  5. Delete the OLM objects for watsonx Orchestrate:
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
    --components=watsonx_orchestrate
    Wait for the cpd-cli to return the following message:
    [SUCCESS]... The delete-olm-artifacts command ran successfully

Cleaning up resources

Who needs to complete this task?
You must be an administrator of the project where watsonx Orchestrate is installed.
When do you need to complete this task?
Complete this task to clean up resources after you remove watsonx Orchestrate from your deployment.
To delete the remaining resources:
  1. Check for the remaining resources in the ${PROJECT_CPD_INST_OPERANDS} namespace:
    oc get pods -l "app.kubernetes.io/instance=wo"
    Output:
    
    NAME                                                  READY   STATUS      RESTARTS   AGE
    wo-archer-server-db-schema-job-dh9n8                  0/1     Completed   0          7d14h
    wo-multi-skill-orchestration-ai-db-schema-job-nbnhl   0/1     Completed   0          7d14h
    wo-s3-create-bucket-tvwv6                             0/1     Completed   0          7d14h
  2. Delete if the output has leftover pods:
    oc delete pods -l "app.kubernetes.io/instance=wo" -n ${PROJECT_CPD_INST_OPERANDS}
  3. Check for the remaining Persistent Volume Claim (PVC) on the system:
    oc get pvc -n ${PROJECT_CPD_INST_OPERANDS} -o name | grep "wo-"
  4. Delete all the PVC from the preceding command's output, if any:
    oc delete $(oc get pvc -n ${PROJECT_CPD_INST_OPERANDS} -o name | grep "wo-") -n ${PROJECT_CPD_INST_OPERANDS}