Uninstalling Watson Machine Learning Accelerator

A project administrator can uninstall Watson Machine Learning Accelerator.

What permissions do you need to complete this task?
The permissions that you need depend on which tasks you must complete:
  • To uninstall Watson Machine Learning Accelerator, you must be an administrator of the project where Watson Machine Learning Accelerator is installed. This project is identified by the ${PROJECT_CPD_INSTANCE} environment variable.
  • To uninstall the Watson Machine Learning Accelerator operators, you must be an administrator of the project where the Cloud Pak for Data operators are installed. This project is identified by the ${PROJECT_CPD_OPS} environment variable.
When do you need to complete this task?
Complete this task if you want to remove a running instance of Watson Machine Learning Accelerator from your environment.

Information you need to complete this task

Review the following information before you uninstall Watson Machine Learning Accelerator:

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:
    source ./cpd_vars.sh
Installation location
Watson Machine Learning Accelerator is installed in the same project (namespace) as the Cloud Pak for Data control plane. This project is identified by the ${PROJECT_CPD_INSTANCE} environment variable.
Watson Machine Learning Accelerator is installed in a tethered project (namespace). This project is identified by the ${PROJECT_TETHERED} environment variable.

Procedure

Complete the following tasks to uninstall Watson Machine Learning Accelerator:

  1. Logging in to the cluster
  2. Uninstalling the service
  3. Uninstalling the operator

Logging in to the cluster

To run cpd-cli manage commands, you must log in to the cluster.

To log in to the cluster:

  1. Run the cpd-cli manage login-to-ocp command to log in to the cluster as a user with sufficient permissions to complete this task. For example:
    cpd-cli manage login-to-ocp \
    --username=${OCP_USERNAME} \
    --password=${OCP_PASSWORD} \
    --server=${OCP_URL}
    Tip: The login-to-ocp command takes the same input as the oc login command. Run oc login --help for details.

Uninstalling the service

Who needs to complete this task?
You must be an administrator of the project where Watson Machine Learning Accelerator is installed.
When do you need to complete this task?
Complete this task if you want to remove Watson Machine Learning Accelerator from your deployment.
  • If Watson Machine Learning Accelerator is installed in the same project (namespace) as the Cloud Pak for Data control plane:
    1. Delete the custom resource for Watson Machine Learning Accelerator instance:
      cpd-cli manage delete-cr --components=wml_accelerator_instance --cpd_instance_ns=${PROJECT_CPD_INSTANCE}
    2. Delete the custom resource for Watson Machine Learning Accelerator:
      cpd-cli manage delete-cr --components=wml_accelerator --cpd_instance_ns=${PROJECT_CPD_INSTANCE}
    3. Run the following command to verify that the resources that were created by Watson Machine Learning Accelerator are deleted:
      cpd-cli manage get-cr-status --components=wml_accelerator,wml_accelerator_instance --cpd_instance_ns=${PROJECT_CPD_INSTANCE}
      If Watson Machine Learning Accelerator was uninstalled successfully, the component list is empty. For example:
      # component,CR-kind,CR-name,status,version,creationtimestamp,reconciled-version,operator-info
      
      [SUCCESS] The get-cr-status command ran successfully.
    4. Verify that the pods are removed, run:
      oc get po -n ${PROJECT_CPD_INSTANCE}
    5. After uninstalling Watson Machine Learning Accelerator, delete the etcd PVCs:
      oc delete pvc data-wmla-etcd-0 data-wmla-etcd-1 data-wmla-etcd-2 -n ${PROJECT_CPD_INSTANCE}
  • If Watson Machine Learning Accelerator service instance is deployed in a tethered project:
    1. Delete the custom resource for the Watson Machine Learning Accelerator instance:
      cpd-cli manage delete-cr --components=wml_accelerator_instance --cpd_instance_ns=${PROJECT_CPD_INSTANCE} --tethered_instance_ns=${PROJECT_TETHERED}
    2. Delete the custom resource for Watson Machine Learning Accelerator:
      cpd-cli manage delete-cr --components=wml_accelerator --cpd_instance_ns=${PROJECT_CPD_INSTANCE}
    3. Run the following commands to verify that the resources that were created by Watson Machine Learning Accelerator are deleted.
      1. Verify that Watson Machine Learning Accelerator instance was deleted, run:
        cpd-cli manage get-cr-status --components=wml_accelerator_instance --cpd_instance_ns=${PROJECT_TETHERED}
      2. Verify that Watson Machine Learning Accelerator was deleted, run:
        cpd-cli manage get-cr-status --components=wml_accelerator cpd_instance_ns=${PROJECT_CPD_INSTANCE}
      If Watson Machine Learning Accelerator was uninstalled successfully, the component list is empty. For example:
      # component,CR-kind,CR-name,status,version,creationtimestamp,reconciled-version,operator-info
      
      [SUCCESS] The get-cr-status command ran successfully.
    4. Verify that the pods are removed, run:
      oc get po -n ${PROJECT_TETHERED}
    5. After uninstalling Watson Machine Learning Accelerator, delete the etcd PVCs:
      oc delete pvc data-wmla-etcd-0 data-wmla-etcd-1 data-wmla-etcd-2 -n ${PROJECT_TETHERED}

Uninstalling the operator

Who needs to complete this task?
You must be an administrator with the appropriate permissions to manage OLM objects.
When do you need to complete this task?
Complete this task only if you want to completely remove the Watson Machine Learning Accelerator software from the cluster.

To uninstall the operator and other OLM objects:

  1. Delete the OLM objects for Watson Machine Learning Accelerator:
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_OPS} \
    --components=wml_accelerator
    • If the command succeeds, it returns [SUCCESS]... The delete-olm-artifacts command ran successfully.
    • If the command fails, it returns [ERROR] and includes information about the cause of the failure.