Uninstalling watsonx Assistant
An instance administrator can uninstall watsonx Assistant.
- Who needs to complete this task?
-
Instance administrator To uninstall watsonx Assistant, 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 Assistant 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 Assistant on the cluster.
Information you need to complete this task
Review the following information before you uninstall watsonx 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,
run:
source ./cpd_vars.sh
Dependent services
Before you uninstall watsonx Assistant, ensure that the following services are uninstalled:
Procedure
Complete the following tasks to uninstall watsonx Assistant:
Deleting service instances
Before you uninstall watsonx Assistant, you must delete any service instances that are associated with watsonx Assistant to ensure 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 watsonx Assistant.
From the IBM Software Hub 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.
Uninstalling the service
To uninstall watsonx Assistant:
-
Log the
cpd-cliin to the Red Hat® OpenShift® Container Platform cluster:${CPDM_OC_LOGIN}Remember:CPDM_OC_LOGINis an alias for thecpd-cli manage login-to-ocpcommand. - Get the name of the watsonx Assistant
service.
oc get WatsonAssistant --namespace ${PROJECT_CPD_INST_OPERANDS} - Set the
INSTANCEenvironment variable to the name of the watsonx Assistant service:export INSTANCE=<wa-instance-name> - Delete the custom resource for watsonx Assistant.
cpd-cli manage delete-cr \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --components=watson_assistant \ --include_dependency=trueWait for thecpd-clito return the following message before you proceed to the next step:[SUCCESS]... The delete-cr command ran successfully - Delete the OLM objects for watsonx Assistant:
cpd-cli manage delete-olm-artifacts \ --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \ --components=watson_assistantWait for thecpd-clito 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 Assistant is installed.
- When do you need to complete this task?
- Complete this task to clean up resources after you remove watsonx Assistant from your deployment.
To delete the remaining resources:
-
- Check whether a deployment verification test
exists:
oc get dvt -n ${PROJECT_CPD_INST_OPERANDS} -
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_INST_OPERANDS}
- Check whether a deployment verification test
exists:
-
- Get the remaining persistent volume claims for your
instance:
oc get pvc -n ${PROJECT_CPD_INST_OPERANDS} |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_INST_OPERANDS}
- Get the remaining persistent volume claims for your
instance:
-
- Get the temporary patches for your
instance:
oc get temporarypatch -n ${PROJECT_CPD_INST_OPERANDS} |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_INST_OPERANDS} - If the deletion gets hung up, press
Ctrl+Cto 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_INST_OPERANDS} --type=merge -p '{"metadata": {"finalizers":null}}'
- Get the temporary patches for your
instance:
- Remove watsonx Assistant data from Multicloud Object Gateway by completing the following steps:
-
Download the MinIO client.
Refer to the MinIO product documentation and follow the appropriate instructions for your platform.
- Get the
hostandportinformation for the Multicloud Object Gateway and store it in an environment variable namedMCG_ENDPOINTby entering the following command:export MCG_ENDPOINT="$(oc get route s3 --namespace openshift-storage \ --output jsonpath='https://{.spec.host}')" -
Get the access key and secret key of Multicloud Object Gateway from the
noobaa-account-watson-assistantsecret and store the keys in environment variables.export MCG_ACCESS_KEY="$(oc extract secret/noobaa-account-watson-assistant \ --keys=AWS_ACCESS_KEY_ID --to=- --namespace ${PROJECT_CPD_INST_OPERANDS})"export MCG_SECRET_KEY="$(oc extract secret/noobaa-account-watson-assistant \ --keys=AWS_SECRET_ACCESS_KEY --to=- \ --namespace ${PROJECT_CPD_INST_OPERANDS})" - Configure the MinIO client for Multicloud Object Gateway.
mc alias set assistant "${MCG_ENDPOINT}" "${MCG_ACCESS_KEY}" "${MCG_SECRET_KEY}"Note: If necessary, follow the instructions in the MinIO documentation to configure a security certificate. Otherwise, specify the--insecureoption to disable certificate verification. If you disable verification for the client, you must include the--insecureoption when you submit themccommands. -
Run the following command to confirm that the MinIO client is successfully configured. The command lists the buckets that are used by watsonx Assistant.
If an error is displayed, check the variables that you defined in the previous steps and ensure that the Multicloud Object Gateway host and port are accessible from your console.mc ls assistant - Delete the following objects and buckets that were created by watsonx Assistant:
nlclassifier-icpwa-api-prod-wa-v1
If a bucket named
To delete, run the following commands one time for each item in the list and replaceicpis listed, remove it. This bucket is listed only when data has been migrated from MinIO.<name>with a name from the list:mc rm --recursive --force assistant/<name>-${PROJECT_CPD_INST_OPERANDS} mc rb assistant/<name>-${PROJECT_CPD_INST_OPERANDS} - Remove the Multicloud Object Gateway configuration from the
MinIO client by entering the following
command:
mc alias remove assistant
-
-
- Get the remaining secrets for your
instance:
oc get secret -n ${PROJECT_CPD_INST_OPERANDS} |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_INST_OPERANDS}
- Get the remaining secrets for your
instance: