Uninstalling Watson Assistant
A project administrator can uninstall Watson Assistant.
- What permissions do you need to complete this task?
- The permissions that you need depend on which tasks you must complete:
- To uninstall Watson
Assistant, you must be an administrator of the project where Watson
Assistant is installed. This project is identified by the
${PROJECT_CPD_INSTANCE}
environment variable. - To uninstall the Watson
Assistant 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.
- To uninstall Watson
Assistant, you must be an administrator of the project where Watson
Assistant is installed. This project is identified by the
- When do you need to complete this task?
- Complete this task if you want to remove a running instance of Watson Assistant from your environment.
Information you need to complete this task
Review the following information before you uninstall Watson Assistant:
- 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
Assistant 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.
Procedure
Complete the following tasks to uninstall Watson Assistant:
Deleting service instances
Before you uninstall Watson Assistant, you must delete any service instances that are associated with Watson Assistant. This ensures that each instance releases the resources that it reserved.
- 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 Watson Assistant.
From the Cloud Pak for Data web client:
- Log in to the web client as a user with sufficient permissions to complete the task.
- From the menu, select .
- Filter the list to show the assistant type.
-
Delete each assistant instance in the list.
Logging in to the cluster
To run cpd-cli
manage
commands, you must log in to the cluster.
To log in to the cluster:
-
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: Thelogin-to-ocp
command takes the same input as theoc login
command. Runoc login --help
for details.
Uninstalling the service
- Who needs to complete this task?
- You must be an administrator of the project where Watson Assistant is installed.
- When do you need to complete this task?
- Complete this task if you want to remove Watson
Assistant from your deployment.
If you installed Watson Assistant in multiple projects, you must complete this task for each instance of Watson Assistant that you want to uninstall.
To uninstall the service:
- Export the name of your Watson
Assistant instance as an environment
variable:
export INSTANCE=`oc get wa -n ${PROJECT_CPD_INSTANCE} |grep -v NAME| awk '{print $1}'`
- Delete the custom resource for Watson
Assistant.
cpd-cli manage delete-cr \ --components=watson_assistant \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE}
Cleaning up resources
- Who needs to complete this task?
- You must be an administrator of the project where Watson Assistant is installed.
- When do you need to complete this task?
- Complete this task to clean up resources after you remove Watson Assistant from your deployment.
To delete remaining resources:
-
- Check whether a deployment verification test
exists:
oc get dvt -n ${PROJECT_CPD_INSTANCE}
-
If a deployment verification test exists, run the following command to delete it. When you run the command, replace {dvt-name} with the name of the test:
oc delete dvt {dvt-name} -n ${PROJECT_CPD_INSTANCE}
- Check whether a deployment verification test
exists:
- Delete the remaining Dynamic Workflow
components:
oc delete deployment,secret -l release=${INSTANCE}-dwf -n ${PROJECT_CPD_INSTANCE}
-
- Get the remaining persistent volume claims for your
instance:
oc get pvc -n ${PROJECT_CPD_INSTANCE} |grep ${INSTANCE}-
- Run the following command for each persistent volume claim to delete them one at a time. When
you run the command, replace {pvc-name} with the name of the persistent volume
claim:
oc delete pvc {pvc-name} -n ${PROJECT_CPD_INSTANCE}
- Get the remaining persistent volume claims for your
instance:
-
- Get the temporary patches for your
instance:
oc get temporarypatch -n ${PROJECT_CPD_INSTANCE} |grep ${INSTANCE}-
- Run the following command for each temporary patch to delete them one at a time. When you run
the command, replace {temporarypatch-name} with the name of the temporary
patch:
oc delete temporarypatch {temporarypatch-name} -n ${PROJECT_CPD_INSTANCE}
- If the deletion gets hung up, press
Ctrl+C
to exit the command. Then, run the following command. When you run the command, replace {temporarypatch-name} with the name of the temporary patch:oc patch temporarypatch {temporarypatch-name} -n ${PROJECT_CPD_INSTANCE} --type=merge -p '{"metadata": {"finalizers":null}}'
- Get the temporary patches for your
instance:
-
- Get the remaining secrets for your
instance:
oc get secret -n ${PROJECT_CPD_INSTANCE} |grep ${INSTANCE}-
- Run the following command for each secret to delete them one at a time. When you run the
command, replace {secret-name} with the name of the
secret:
oc delete secret {secret-name} -n ${PROJECT_CPD_INSTANCE}
Note: This step deletes all secrets, including Redis secrets. When Redis secrets are deleted, they are automatically re-created. This behavior is expected. Redis secrets are re-created in the following format:wa-redis-dockercfg-xxxx wa-redis-token-xxxx
- Get the remaining secrets for your
instance:
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 Assistant software from the cluster.
To uninstall the operator and other OLM objects:
- Delete
the OLM objects for Watson
Assistant:
cpd-cli manage delete-olm-artifacts \ --cpd_operator_ns=${PROJECT_CPD_OPS} \ --components=watson_assistant
- 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.