Installing Watson Discovery

A project administrator can install the Watson Discovery service on IBM® Cloud Pak for Data.

Before you begin

Required role: To complete this task, you must be an administrator of the project (namespace) where you will deploy Watson Discovery.

Before you install Watson Discovery, ensure that:

Common core services Watson Discovery requires the Cloud Pak for Data common core services. The common core services are installed once in a given Red Hat OpenShift project. If the common core services are not installed in the project where you plan to install Watson Discovery, the common core services will be automatically installed when you install Watson Discovery. If the common core services need to be installed, it might take longer to install Watson Discovery. For more information on the common core services, see:

If you are installing multiple services on your cluster, you must run the installations one at a time and wait until the installation completes before installing another service. You cannot run the installations in parallel.

Tip: For a list of all available options, enter the following command:
./cpd-cli install --help

Procedure

  1. Complete the appropriate steps to install Watson Discovery on your environment:
  2. Verifying that the installation completed successfully
  3. Checking for available patches
  4. Complete the tasks listed in What to do next

Installing on clusters connected to the internet

From your installation node:

  1. Change to the directory where you placed the Cloud Pak for Data command-line interface and the repo.yaml file.
  2. Log in to your Red Hat OpenShift cluster as a project administrator:
    oc login OpenShift_URL:port
  3. To install Watson Discovery, you must run the installer multiple times to install the following assemblies in this order:

    edb-operator
    Installs a EnterpriseDB PostgreSQL server that is used by the Watson Discovery service. Specify the following additional parameter with the installation command:
    --optional-modules edb-pg-base:x86_64
    For example:
    cpd-cli install \
       --assembly edb-operator \
       --optional-modules edb-pg-base:x86_64 \
       --version 3.5.0 \
       --namespace zen \
       --repo repo.yaml \
       --cluster-pull-prefix $(oc registry info --internal)/zen \
       --transfer-image-to=$(oc registry info)/zen \
       --ask-push-registry-credentials \
       --insecure-skip-tls-verify
    watson-discovery
    This assembly installs the Discovery service.
    For example:
    cpd-cli  install \
      --assembly watson-discovery \
      --version 2.2.1 \
      --override discovery-override.yaml \
      --namespace zen \
      --repo repo.yaml \
      --storageclass portworx-db-gp3-sc \
      --cluster-pull-prefix $(oc registry info --internal)/zen \
      --transfer-image-to=$(oc registry info)/zen \
      --ask-push-registry-credentials \
      --latest-dependency \
      --insecure-skip-tls-verify
    Run the following command to see a preview of what will be installed when you install the service.
    Important: If you are using the internal Red Hat OpenShift registry and you are using the default self-signed certificate, specify the --insecure-skip-tls-verify flag to prevent x509 errors.
    ./cpd-cli install \
    --repo ./repo.yaml \
    --assembly Assembly_name \
    --arch Cluster_architecture \  
    --namespace Project \
    --storageclass Storage_class_name \
    --transfer-image-to Registry_location \
    --cluster-pull-prefix Registry_from_cluster \
    --ask-push-registry-credentials \
    --latest-dependency \
    --dry-run
    Add the following line to your installation command after the --namespace flag to specify the fully qualified name of your installation override file:
    --override discovery-override.yaml

    Replace the following values:

    Variable Replace with
    Cluster_architecture Specify the architecture of your cluster hardware:
    • For x86-64 hardware, remove this flag or specify x86_64
    • For POWER hardware, specify ppc64le
    • For IBM Z hardware, specify s390x
    Project Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.
    Storage_class_name Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.

    If you are installing Cloud Pak for Data on Red Hat OpenShift 4.6, you can choose to use OpenShift Container Storage (OCS) as your storage solution. To do so, specify the Storage_class_name as follows: --storageclass ocs-storagecluster-ceph-rbd.

    Registry_location Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.
    Registry_from_cluster Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.
  4. Rerun the previous command without the --dry-run flag to install the service.

Installing on air-gapped clusters

From your installation node:

  1. Do not start this procedure until you have completed the steps in Preparing for air-gapped installations to download the required files for the service.
  2. Change to the directory where you placed the Cloud Pak for Data command-line interface.
  3. Log in to your Red Hat OpenShift cluster as a project administrator:
    oc login OpenShift_URL:port
  4. To install Watson Discovery, you must run the installer multiple times to install the following assemblies in this order:

    edb-operator
    Installs a EnterpriseDB PostgreSQL server that is used by the Watson Discovery service. Specify the following additional parameter with the installation command:
    --optional-modules edb-pg-base:x86_64
    For example:
    cpd-cli install \
    --assembly edb-operator \
    --optional-modules edb-pg-base:x86_64 \
    --version 3.5.0 \
    --namespace zen \
    --load-from cpd-cli-workspace \
    --latest-dependency  \
    --cluster-pull-prefix $(oc registry info --internal)/zen
    watson-discovery
    This assembly installs the Discovery service.
    For example:
    ./cpd-cli  install \
    --assembly watson-discovery \
    --version 2.2.1 \
    --storageclass portworx-db-gp3-sc \
    --override discovery-override.yaml \
    --namespace zen \
    --load-from cpd-cli-workspace \
    --cluster-pull-prefix $(oc registry info --internal)/zen
    Run the following command to see a preview of what will be installed when you install the service.
    Important: If you are using the internal Red Hat OpenShift registry:
    • Do not specify the --ask-pull-registry-credentials parameter.
    • If you are using the default self-signed certificate, specify the --insecure-skip-tls-verify flag to prevent x509 errors.
    ./cpd-cli install \
    --assembly watson-discovery \
    --version Version_number
    --arch Cluster_architecture \
    --namespace Project \
    --storageclass Storage_class_name \
    --cluster-pull-prefix Registry_from_cluster \
    --ask-pull-registry-credentials \
    --load-from Image_directory_location \
    --latest-dependency \
    --dry-run
    Add the following line to your installation command after the --namespace flag to specify the fully qualified name of your installation override file:
    --override discovery-override.yaml

    Replace the following values:

    Variable Replace with
    Cluster_architecture Specify the architecture of your cluster hardware:
    • For x86-64 hardware, remove this flag or specify x86_64
    • For POWER hardware, specify ppc64le
    • For IBM Z hardware, specify s390x
    Project Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.
    Storage_class_name Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.

    If you are installing Cloud Pak for Data on Red Hat OpenShift 4.6, you can choose to use OpenShift Container Storage (OCS) as your storage solution. To do so, specify the Storage_class_name as follows: --storageclass ocs-storagecluster-ceph-rbd.

    Registry_from_cluster Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.
    Image_directory_location The location of the cpd-cli-workspace directory.

    Use the value provided by your cluster administrator. You should have obtained this information when you completed Preparing to install and upgrade services.

  5. Rerun the previous command without the --dry-run flag to install the service.

Verifying that the installation completed successfully

From your installation node:

  1. Run the following command:
    ./cpd-cli status \
    --assembly watson-discovery \
    --namespace Project

    Replace Project with the value you used in when you installed Watson Discovery.

    • If the installation completed successfully, the status of the assembly and the modules in the assembly is Ready.
    • If the installation failed, contact IBM Support for assistance.

Checking for available patches

Determine whether there are any patches available for the version of Watson Discovery that you installed:

Clusters connected to the internet
Run the following command to check for patches:
./cpd-cli status \
--repo ./repo.yaml \
--namespace Project \ 
--assembly watson-discovery \
--patches \
--available-updates 
Air-gapped clusters
See the list of Available patches for Watson Discovery.

If you need to apply patches to the service, follow the guidance in Applying patches.

Updating the Elastic search operator

If you apply a patch to the Discovery service, you must apply a patch to the Elastic search service that is used by Discovery also. The Elastic search patch was first available when the Discovery service patch 6 was released, but is required with any Discovery 2.2.1 patch to remediate a Log4j vulnerability.

To apply the Elastic search patch, complete the following steps:
  1. Apply the ibm-cloudpakopen-elasticsearch-operator-patch-1 patch to the ibm-cloudpakopen-elasticsearch-operator assembly.

  2. Follow the standard instructions to apply the patch.

    The patch adds the opencontent-elasticsearch-7.8.0:1.1.880 Elasticsearch image.

  3. Run the following command to update the Elasticsearch image version that is used in the Watson Discovery instance:
    oc patch wd wd --namespace Project --type=merge --patch \
    '{"spec": {"elasticsearch": {"image": {"tag": "1.1.880" } } } }'
  4. Verify that the image tag that is used in the Elasticsearch pods is updated to the new tag (1.1.880) by running the following commands.

    This action might take a few minutes.

    oc get sts --namespace Project \
    wd-ibm-elasticsearch-es-server-client -o \
    jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'
    oc get sts --namespace Project \
    wd-ibm-elasticsearch-es-server-master -o \
    jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'
    oc get sts --namespace Project \
    wd-ibm-elasticsearch-es-server-data -o \
    jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'

What to do next