Uninstalling Watson Speech to Text

A project administrator can uninstall Watson Speech to Text from IBM® Cloud Pak for Data.

Permissions you need for this task
You must be an administrator of the OpenShift® project (Kubernetes namespace) where Watson Speech to Text is installed.

Procedure

Complete the following tasks to uninstall Watson Speech to Text:

  1. Uninstalling the service
  2. Uninstalling the operator
Note: Complete step 2 only if you want to completely remove the Speech services software from your cluster.

Uninstalling the service

When you need to complete this task

Complete this task when you want to remove a running instance of Watson Speech to Text.

If you installed multiple instances of Watson Speech to Text on the cluster, you must complete this task for each instance of Watson Speech to Text that you want to uninstall.

If you plan to uninstall the operator, you must uninstall all instances of Watson Speech to Text before you uninstall the operator.

When you delete the WatsonSpeech custom resource, the WatsonSpeech operand is uninstalled. (The operand is the running instance of Watson Speech to Text.)

Uninstalling Watson Speech to Text will remove all of the data that is associated with this instance of Watson Speech to Text.

To uninstall the service:

  1. From the web client, remove any provisioned instances of Watson Speech to Text:
    1. Log in to the Cloud Pak for Data web client as an administrator.
    2. From the menu, select Services > Instances.
    3. Filter the list to show only speech-to-text instances.
    4. Delete each speech-to-text instance.
  2. Log in to Red Hat® OpenShift Container Platform as a user with sufficient permissions to complete the task:
    oc login OpenShift_URL:port
  3. Change to the project (namespace) where Watson Speech to Text is installed:
    oc project ${PROJECT_CPD_INSTANCE}
  4. Get the name of the custom resource:
    oc get WatsonSpeech -n ${PROJECT_CPD_INSTANCE}
  5. Delete the WatsonSpeech custom resource:
    oc delete WatsonSpeech custom-resource-name -n ${PROJECT_CPD_INSTANCE}
  6. Run the following command to verify that the resources that were created by Watson Speech to Text are deleted:
    oc get all,pvc -l "release in (custom-resource-name, custom-resource-name-rabbitmq)"

    If Watson Speech to Text was uninstalled successfully, the response is empty. If the response is not empty, you can run the following command to force the deletion:

    oc delete all,pvc -l "release in (custom-resource-name, custom-resource-name-rabbitmq)" \
      --force --grace-period=0
  7. Run the following command to verify that the secret that was created by Watson Speech to Text is deleted:
    oc get secret | grep custom-resource-name

    If Watson Speech to Text was uninstalled successfully, the response is empty. If the response is not empty, you can run the following command to force the deletion:

    oc delete secret custom-resource-name-ca custom-resource-name-instance-tls

Uninstalling the operator

When you need to complete this task
Complete this task only if you want to completely remove Watson Speech to Text from your cluster.

Complete this task after you uninstall the service.

Before you begin
Ensure the IBM Cloud Pak® CLI (cloudctl) is installed on your local machine. If the IBM Cloud Pak CLI is not installed:
  1. Download the cloudctl software from the IBM/cloud-pak-cli repository on GitHub. Ensure that you download the appropriate package for your workstation:
    cloudctl-operating-system-architecture.tar.gz
  2. Extract the contents of the archive file:
    tar -xzf archive-name
  3. Change to the directory where you extracted the file and make the file executable:
    chmod 775 cloudctl-architecture
  4. Move the file to the /usr/local/bin directory:
    mv cloudctl-architecture /usr/local/bin/cloudctl
  5. Confirm that the IBM Cloud Pak CLI (cloudctl) is installed:
    cloudctl --help
Tip: Additional guidance for validating the archive file is available in the IBM/cloud-pak-cli repository.

To uninstall the operator:

  1. Specify the directory where you want to download the CASE package for Watson Speech. For example, you could download the file to $HOME/offline:
    export OFFLINEDIR=$HOME/offline
  2. Download the CASE package for Watson Speech:
    cloudctl case save \
      --repo https://github.com/IBM/cloud-pak/raw/master/repo/case \
      --case ibm-watson-speech \
      --version 4.0.10 \
      --outputdir ${OFFLINEDIR}
  3. Change to the directory where you downloaded the CASE package.
  4. Log in to Red Hat OpenShift Container Platform as a user with sufficient permissions to complete the task:
    oc login OpenShift_URL:port
  5. Run the following command to see a preview of the items that will be removed when you uninstall the operator:
    The operators are in the ibm-common-services project (express installations)
    cloudctl case launch \
      --case ibm-watson-speech-4.0.10.tgz \
      --inventory speechOperatorSetup \
      --namespace ibm-common-services \
      --action uninstall-operator \
      --args "--dryRun"

    The operators are in the cpd-operators project (specialized installations)
    cloudctl case launch \
      --case ibm-watson-speech-4.0.10.tgz \
      --inventory speechOperatorSetup \
      --namespace cpd-operators \
      --action uninstall-operator \
      --args "--dryRun"

  6. Uninstall the operator. You can either:
    • Rerun the previous command without the --args "--dryRun" entry.
    • Run the oc commands that were specified in the dry run output.