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:

  1. Deleting service instances
  2. Uninstalling the service

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:

  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 text-to-speech type.
  4. Delete each text-to-speech instance in the list.
  5. Filter the list to show the speech-to-text type.
  6. 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:

  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 and operator for Watson Speech services.
    cpd-cli manage uninstall-components \
    --instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --components=watson_speech \
    --include_dependency=true
    Wait for the cpd-cli to return the following message:
    [SUCCESS]... The uninstall-components command ran successfully
  3. Remove Watson Speech services data from Multicloud Object Gateway by completing the following steps:
    1. Download the MinIO client.

      Refer to the MinIO product documentation and follow the appropriate instructions for your platform.

    2. Get the host and port information for the Multicloud Object Gateway and store it in an environment variable named MCG_ENDPOINT by entering the following command:
      export MCG_ENDPOINT="$(oc get route s3 --namespace openshift-storage \
      --output jsonpath='https://{.spec.host}')"
    3. Get the access key and secret key of Multicloud Object Gateway from the noobaa-account-watson-speech secret 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})"
    4. 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 --insecure option to disable certificate verification. If you disable verification for the client, you must include the --insecure option when you submit the mc commands.
    5. 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.
      mc ls speech
      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.
    6. Delete the following objects and buckets that were created by Watson Speech services:
      • speech-service-base-models
      • tts-customization-icp
      • stt-async-icp
      • stt-customization-icp
      To do so, do one of the following things:
      • 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
    7. Remove the Multicloud Object Gateway configuration from the MinIO client by entering the following command:
      mc alias remove speech
    8. Delete the Noobaa Account secret for Watson Speech:
      oc delete secret noobaa-account-watson-speech -n ${PROJECT_CPD_INST_OPERANDS}
  4. 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} }}
  5. 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} }}