Uninstalling Watson Speech services
An instance administrator can uninstall Watson Speech services.
- Who needs to complete this task?
-
Instance administrator To uninstall Watson Speech services, 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 Watson Speech services 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 Watson Speech services on the cluster.
Information you need to complete this task
Review the following information before you uninstall Watson Speech services:
- 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 Watson Speech services:
Deleting service instances
Before you uninstall Watson Speech services, you must delete any service instances that are associated with Watson Speech services 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 Watson Speech services.
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 text-to-speech type.
-
Delete each text-to-speech instance in the list.
- Filter the list to show the speech-to-text type.
- Delete each speech-to-text instance in the list.
Uninstalling the service
- Who needs to complete this task?
- You must be an administrator of the project where Watson Speech services is installed.
- When do you need to complete this task?
-
Complete this task if you want to remove Watson Speech services from your deployment.
If you installed Watson Speech services in multiple projects, you must complete this task for each instance of Watson Speech services that you want to uninstall.
Delete the persistent volume claims (PVCs) for the MinIO and RabbitMQ datastores only if you do not want to preserve a backup copy of your data. The deletion commands permanently remove the datastores and all of their data.
To uninstall Watson Speech services:
-
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. - Delete the custom resource and operator for Watson Speech services.
cpd-cli manage uninstall-components \ --instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --components=watson_speech \ --include_dependency=trueWait for thecpd-clito return the following message:[SUCCESS]... The uninstall-components command ran successfully - Remove Watson Speech services 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-speechsecret and store the keys in environment variables.export MCG_ACCESS_KEY="$(oc extract secret/noobaa-account-watson-speech \ --keys=AWS_ACCESS_KEY_ID --to=- --namespace ${PROJECT_CPD_INST_OPERANDS})"export MCG_SECRET_KEY="$(oc extract secret/noobaa-account-watson-speech \ --keys=AWS_SECRET_ACCESS_KEY --to=- \ --namespace ${PROJECT_CPD_INST_OPERANDS})" - Configure the MinIO client for Multicloud Object Gateway.
mc alias set speech "${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 Watson Speech services.
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 speech - Delete the following objects and buckets that were created by Watson Speech services:
speech-service-base-modelstts-customization-icpstt-async-icpstt-customization-icp
- Run the following command one time for each item in the list and replace
<name>with a name from the list:mc rm --recursive --force speech/<name>-ibm-${CUSTOM_RESOURCE_SPEECH}-${PROJECT_CPD_INST_OPERANDS} mc rb speech/<name>-ibm-${CUSTOM_RESOURCE_SPEECH}-${PROJECT_CPD_INST_OPERANDS} - First, define the
buckets.
MCG_BUCKETS=( "speech-service-base-models" "tts-customization-icp" "stt-async-icp" "stt-customization-icp" )Next, remove all of the buckets with one command.for bucket in "${MCG_BUCKETS[@]}" ; do \ mc rm --recursive --force speech/${bucket}-ibm-${CUSTOM_RESOURCE_SPEECH}-${PROJECT_CPD_INST_OPERANDS} ; \ mc rb speech/${bucket}-ibm-${CUSTOM_RESOURCE_SPEECH}-${PROJECT_CPD_INST_OPERANDS} ; \ done
- Remove the Multicloud Object Gateway configuration from the
MinIO client by entering the following
command:
mc alias remove speech - Delete the Noobaa Account secret for Watson
Speech:
oc delete secret noobaa-account-watson-speech -n ${PROJECT_CPD_INST_OPERANDS}
- Download the MinIO client.
Optional: If you have MinIO and RabbitMQ PVCs for Watson Speech services that are no longer in use, you can remove them using the following command.
Warning: Skip this step if you want to preserve any stored data. Deleting the PVC may permanently delete stored data.oc delete pvc -l "release in (${CUSTOM_RESOURCE_SPEECH}, ${CUSTOM_RESOURCE_SPEECH}-rabbitmq)" -n {{ ${PROJECT_CPD_INST_OPERANDS} }}Optional: Delete the backup PVC for MinIO for Watson Speech services.
Warning: Skip this step if you want to preserve any stored data. Deleting the PVC may permanently delete stored data.oc delete pvc ${CUSTOM_RESOURCE_SPEECH}-ibm-minio-backup-pvc -n {{ ${PROJECT_CPD_INST_OPERANDS} }}