Installing Watson Assistant

A project administrator can install Watson Assistant on IBM® Cloud Pak for Data.

Permissions you need for this task
You must be an administrator of the OpenShift® project (Kubernetes namespace) where you will deploy Watson Assistant.
Information you need to complete this task
  • Watson Assistant needs only the restricted security context constraint (SCC).
  • Watson Assistant must be installed in the same project as Cloud Pak for Data.
  • Watson Assistant uses the following storage classes. If you don't use these storage classes on your cluster, ensure that you have a storage class with an equivalent definition:
    • OpenShift Container Storage: ocs-storagecluster-ceph-rbd
    • * IBM Spectrum® (IBM Spectrum Scale Container Native only): ibm-spectrum-scale-sc
    • Portworx: portworx-watson-assistant-sc
    • IBM Cloud Block Storage: ibmc-block-gold

Before you begin

Ensure that the cluster meets the minimum requirements for installing Watson Assistant. For details, see System requirements.

Additionally, ensure that a cluster administrator completed the required Pre-installation tasks for your environment. Specifically, verify that a cluster administrator completed the following tasks:

  1. Cloud Pak for Data is installed. For details, see Installing Cloud Pak for Data.
  2. For environments that use a private container registry, such as air-gapped environments, the Watson Assistant software images are mirrored to the private container registry. For details, see Mirroring images to your container registry.
  3. The cluster is configured to pull the Watson Assistant software images. For details, see Configuring your cluster to pull images.
  4. The Watson Assistant catalog source exists. For details, see Creating catalog sources.
  5. The Watson Assistant operator subscription exists. For details, see Creating operator subscriptions.

If these tasks are not complete, the Watson Assistant installation will fail.

Watson Assistant requires that the following configuration settings be applied when you install Cloud Pak for Data:
  • Watson Assistant supports single-zone OpenShift deployments; it does not support multi-zone deployments.
  • Watson Assistant uses the following foundational services:
    • Certificate Manager
    • EDB Cloud Native PostgreSQL Database
    • Events
    • License Service
    Review Installing IBM Cloud Pak® foundational services to determine whether you need to take extra steps to install the services manually. For some services, such as the License Service, you might need to take additional steps.

Procedure

Complete the following tasks to install Watson Assistant:

  1. Installing the service
  2. Verifying the installation
  3. What to do next

Installing the service

To install Watson Assistant, complete the following steps.

  1. Log in to Red Hat® OpenShift Container Platform as a user with sufficient permissions to complete the task:
    oc login OpenShift_URL:port
  2. Only one EDB Cloud Native PostgreSQL operator can be running to successfully install Watson Assistant. Run the following command to check that only one EDB Cloud Native PostgreSQL operator is running in the cluster or in the ibm-common-services namespace:
    oc get pods -A |grep -i postgresql-operator
  3. Create a WatsonAssistant custom resource to install Watson Assistant.

    When you create the custom resource, the Watson Assistant operator installs Watson Assistant.

    Important: By creating a WatsonAssistant custom resource with spec.license.accept: true, you are accepting the license terms for Watson Assistant. You can find links to the relevant licenses in IBM Cloud Pak for Data License Information.
    Tip: For additional properties that you can specify in the custom resource, see Additional installation options.
    • Create a custom resource with the following format.

      apiVersion: assistant.watson.ibm.com/v1
      kind: WatsonAssistant
      metadata:
        name: wa     # This is the recommended name, but you can change it
        namespace: project-name     # Replace with the project where you will install
        annotations:
          oppy.ibm.com/disable-rollback: "true"
          oppy.ibm.com/log-default-level: "debug"
          oppy.ibm.com/log-filters: ""
          oppy.ibm.com/log-thread-id: "false"
          oppy.ibm.com/log-json: "false"
        labels:
          app.kubernetes.io/managed-by: "Ansible"
          app.kubernetes.io/name: "watson-assistant"
          app.kubernetes.io/instance: "wa"     # This should match the value for metadata.name
      spec:
        backup:
          offlineQuiesce: false
          onlineQuiesce: false
        cluster:
          dockerRegistryPrefix: ""
          imagePullSecrets: []
          storageClassName: ocs-storagecluster-ceph-rbd     # If you use a different storage class, replace it with the appropriate storage class
          type: private
          name: prod     # Do not change this value 
        cpd:
          namespace: cpd-project-name     # Replace with the project where Cloud Pak for Data is installed. This value will most likely match metadata.namespace
        datastores:
          cos:
            storageClassName: "" 
            storageSize: 20Gi
          datagovernor:
            elasticSearch:
              storageSize: 55Gi
            etcd:
              storageSize: 55Gi
            kafka:
              storageSize: 55Gi
            storageClassName: "ocs-storagecluster-ceph-rbd"
            zookeeper:
              storageSize: 55Gi
          elasticSearch:
            analytics:
              storageClassName: ""
              storageSize: ""
            store:
              storageClassName: ""
              storageSize: ""
          etcd:
            storageClassName: ""
            storageSize: 50Gi
          kafka:
            storageClassName: ""
            storageSize: 5Gi
            zookeeper:
              storageSize: 1Gi
          modelTrain:
            postgres:
              storageClassName: "ocs-storagecluster-ceph-rbd"
              storageSize: 55Gi
            rabbitmq:
              storageClassName: "ocs-storagecluster-ceph-rbd"
              storageSize: 55Gi
          postgres:
            backupStorageClassName: ""
            storageClassName: ""
            storageSize: 10Gi
          redis:
            storageClassName: ""
            storageSize: ""
        features:
          analytics:
            enabled: true
          recommends:
            enabled: true
          tooling:
            enabled: true
          voice:
            enabled: false
        labels: {}
        languages:
        - en
        #- es
        #- pt-br
        #- fr
        #- it
        #- ja
        #- de
        #- ko
        #- ar
        #- nl
        #- zh-tw
        #- zh-cn
        #- cs
        license:
          accept: true   
        size: medium     # Options are small, medium, and large
        version: 4.0.8
    • Create a custom resource with the following format.

      apiVersion: assistant.watson.ibm.com/v1
      kind: WatsonAssistant
      metadata:
        name: wa     # This is the recommended name, but you can change it
        namespace: project-name     # Replace with the project where you will install 
        annotations:
          oppy.ibm.com/disable-rollback: "true"
          oppy.ibm.com/log-default-level: "debug"
          oppy.ibm.com/log-filters: ""
          oppy.ibm.com/log-thread-id: "false"
          oppy.ibm.com/log-json: "false"
        labels:
          app.kubernetes.io/managed-by: "Ansible"
          app.kubernetes.io/name: "watson-assistant"
          app.kubernetes.io/instance: "wa"     # This should match the value for metadata.name
      spec:
        backup:
          offlineQuiesce: false
          onlineQuiesce: false
        cluster:
          dockerRegistryPrefix: ""
          imagePullSecrets: []
          storageClassName: portworx-watson-assistant-sc     # If you use a different storage class, replace it with the appropriate storage class
          type: private
          name: prod     # Do not change this value 
        cpd:
          namespace: cpd-project-name     # Replace with the project where Cloud Pak for Data is installed. This value will most likely match metadata.namespace
        datastores:
          cos:
            storageClassName: ""
            storageSize: 20Gi
          datagovernor:
            elasticSearch:
              storageSize: ""
            etcd:
              storageSize: ""
            kafka:
              storageSize: ""
            storageClassName: ""
            zookeeper:
              storageSize: ""
          elasticSearch:
            analytics:
              storageClassName: ""
              storageSize: ""
            store:
              storageClassName: ""
              storageSize: ""
          etcd:
            storageClassName: ""
            storageSize: 2Gi
          kafka:
            storageClassName: ""
            storageSize: 5Gi
            zookeeper:
              storageSize: 1Gi
          modelTrain:
            postgres:
              storageClassName: "portworx-watson-assistant-sc"
              storageSize: "10Gi"
            rabbitmq:
              storageClassName: "portworx-watson-assistant-sc"
              storageSize: ""
          postgres:
            backupStorageClassName: ""
            storageClassName: ""
            storageSize: 10Gi
          redis:
            storageClassName: ""
            storageSize: ""
        features:
          analytics:
            enabled: true
          recommends:
            enabled: true
          tooling:
            enabled: true
          voice:
            enabled: false
        labels: {}
        languages:
        - en
        #- es
        #- pt-br
        #- fr
        #- it
        #- ja
        #- de
        #- ko
        #- ar
        #- nl
        #- zh-tw
        #- zh-cn
        #- cs
        license:
          accept: true
        size: medium     # Options are small, medium, and large
        version: 4.0.8
    • Create a custom resource with the following format.

      apiVersion: assistant.watson.ibm.com/v1
      kind: WatsonAssistant
      metadata:
        name: wa     # This is the recommended name, but you can change it
        namespace: project-name     # Replace with the project where you will install 
        annotations:
          oppy.ibm.com/disable-rollback: "true"
          oppy.ibm.com/log-default-level: "debug"
          oppy.ibm.com/log-filters: ""
          oppy.ibm.com/log-thread-id: "false"
          oppy.ibm.com/log-json: "false"
        labels:
          app.kubernetes.io/managed-by: "Ansible"
          app.kubernetes.io/name: "watson-assistant"
          app.kubernetes.io/instance: "wa"     # This should match the value for metadata.name
      spec:
        backup:
          offlineQuiesce: false
          onlineQuiesce: false
        cluster:
          dockerRegistryPrefix: ""
          imagePullSecrets: []
          storageClassName: ibmc-block-gold     # If you use a different storage class, replace it with the appropriate storage class
          type: private
          name: prod     # Do not change this value 
        cpd:
          namespace: cpd-project-name     # Replace with the project where Cloud Pak for Data is installed. This value will most likely match metadata.namespace
        datastores:
          cos:
            storageClassName: ""
            storageSize: 50Gi
          datagovernor:
            elasticSearch:
              storageSize: "50Gi"
            etcd:
              storageSize: "50Gi"
            kafka:
              storageSize: "50Gi"
            storageClassName: "ibmc-block-gold"
            zookeeper:
              storageSize: "50Gi"
          elasticSearch:
            analytics:
              storageClassName: ""
              storageSize: ""
            store:
              storageClassName: ""
              storageSize: ""
          etcd:
            storageClassName: ""
            storageSize: 50Gi
          kafka:
            storageClassName: ""
            storageSize: 50Gi
            zookeeper:
              storageSize: 50Gi
          modelTrain:
            postgres:
              storageClassName: "ibmc-block-gold"
              storageSize: "50Gi"
            rabbitmq:
              storageClassName: "ibmc-block-gold"
              storageSize: "50Gi"
          postgres:
            backupStorageClassName: ""
            storageClassName: ""
            storageSize: 50Gi
          redis:
            storageClassName: ""
            storageSize: ""
        features:
          analytics:
            enabled: true
          recommends:
            enabled: true
          tooling:
            enabled: true
          voice:
            enabled: false
        labels: {}
        languages:
        - en
        #- es
        #- pt-br
        #- fr
        #- it
        #- ja
        #- de
        #- ko
        #- ar
        #- nl
        #- zh-tw
        #- zh-cn
        #- cs
        license:
          accept: true     
        size: medium     # Options are small, medium, and large
        version: 4.0.8
    • Create a custom resource with the following format.

      apiVersion: assistant.watson.ibm.com/v1
      kind: WatsonAssistant
      metadata:
        name: wa     # This is the recommended name, but you can change it
        namespace: project-name     # Replace with the project where you will install 
        annotations:
          oppy.ibm.com/disable-rollback: "true"
          oppy.ibm.com/log-default-level: "debug"
          oppy.ibm.com/log-filters: ""
          oppy.ibm.com/log-thread-id: "false"
          oppy.ibm.com/log-json: "false"
        labels:
          app.kubernetes.io/managed-by: "Ansible"
          app.kubernetes.io/name: "watson-assistant"
          app.kubernetes.io/instance: "wa"     # This should match the value for metadata.name
      spec:
        backup:
          offlineQuiesce: false
          onlineQuiesce: false
        cluster:
          dockerRegistryPrefix: ""
          imagePullSecrets: []
          storageClassName: ibm-spectrum-scale-sc     # If you use a different storage class, replace it with the appropriate storage class
          type: private
          name: prod     # Do not change this value 
        cpd:
          namespace: cpd-project-name     # Replace with the project where Cloud Pak for Data is installed. This value will most likely match metadata.namespace
        datastores:
          cos:
            storageClassName: ""
            storageSize: 20Gi
          datagovernor:
            elasticSearch:
              storageSize: ""
            etcd:
              storageSize: ""
            kafka:
              storageSize: ""
            storageClassName: ""
            zookeeper:
              storageSize: ""
          elasticSearch:
            analytics:
              storageClassName: ""
              storageSize: ""
            store:
              storageClassName: ""
              storageSize: ""
          etcd:
            storageClassName: ""
            storageSize: 2Gi
          kafka:
            storageClassName: ""
            storageSize: 5Gi
            zookeeper:
              storageSize: 1Gi
          modelTrain:
            postgres:
              storageClassName: "ibm-spectrum-scale-sc"
              storageSize: "10Gi"
            rabbitmq:
              storageClassName: "ibm-spectrum-scale-sc"
              storageSize: ""
          postgres:
            backupStorageClassName: ""
            storageClassName: ""
            storageSize: 10Gi
          redis:
            storageClassName: ""
            storageSize: ""
        features:
          analytics:
            enabled: true
          recommends:
            enabled: true
          tooling:
            enabled: true
          voice:
            enabled: false
        labels: {}
        languages:
        - en
        #- es
        #- pt-br
        #- fr
        #- it
        #- ja
        #- de
        #- ko
        #- ar
        #- nl
        #- zh-tw
        #- zh-cn
        #- cs
        license:
          accept: true    
        size: medium     # Options are small, medium, and large
        version: 4.0.8
  4. Apply the following temporary patch to fix a known issue in Watson Assistant 4.0.8:
    INSTANCE=wa     # Replace "wa" with the name of your instance
    cat <<EOF | oc apply -f -
    apiVersion: assistant.watson.ibm.com/v1
    kind: TemporaryPatch
    metadata:
      name: ${INSTANCE}-add-clu-mm-balanced-header
    spec:
      apiVersion: assistant.watson.ibm.com/v1
      kind: WatsonAssistantClu
      name: ${INSTANCE}
      patchType: patchStrategicMerge
      patch:
        nlu:
          deployment:
            spec:
              template:
                spec:
                  containers:
                  - name: nlu
                    env:
                    - name: USE_MM_BALANCED_HEADER
                      value: "false"
        clu-serving:
          deployment:
            spec:
              template:
                spec:
                  containers:
                  - name: clu-serving
                    env:
                    - name: USE_MM_BALANCED_HEADER
                      value: "false"
    EOF

Additional installation options

You can modify the custom resource to add support for languages other than English. You can make this update to your custom resource before or after installation. By default, English is enabled. To add support for another language, add the language code to the languages list in your custom resource. For example, to add support for French, specify supported languages in the following way:
...
  languages: 
  - en
  - fr
  #- es
  #- pt-br
  #- it
  #- ja
  #- de
  #- ko
  #- ar
  #- nl
  #- zh-tw
  #- zh-cn  
  #- cs
...

For more information about language support with Watson Assistant, see Supported languages.

Verifying the installation

When you create the custom resource, the Watson Assistant operator processes the contents of the custom resource and starts up the microservices that comprise Watson Assistant, including WatsonAssistant. (The WatsonAssistant microservice is defined by the wa custom resource.) Watson Assistant is installed when the WatsonAssistant status is Completed.

To check the status of the installation:

  1. Change to the project where you installed Watson Assistant:
    oc project project-name
  2. Get the status of Watson Assistant (wa):
    oc get WatsonAssistant wa -o jsonpath='{.status.watsonAssistantStatus} {"\n"}'

    Watson Assistant is ready when the command returns Completed

What to do next

The service is ready to use. For more information about using Watson Assistant, see the following topics: