Table of contents

Installing the Watson Knowledge Catalog service

A project administrator can install Watson Knowledge Catalog 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 Knowledge Catalog.
Information you need to complete this task
  • Watson Knowledge Catalog requires a custom security context constraint (SCC). For details, see Creating required SCCs.
  • Watson Knowledge Catalog must be installed in the same project as Cloud Pak for Data.
  • Watson Knowledge Catalog requires the Cloud Pak for Data common core services. If the common core services are not installed in the project where you plan to install Watson Knowledge Catalog, the common core services will be automatically installed when you install Watson Knowledge Catalog, which will increase the amount of time the installation takes to complete.
  • Watson Knowledge Catalog 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-cephfs (specified during installation)
      • ocs-storagecluster-ceph-rbd
    • NFS: managed-nfs-storage
    • Portworx:
      • portworx-shared-gp3 (specified during installation)
      • portworx-cassandra-sc
      • portworx-couchdb-sc
      • portworx-db2-rwo-sc
      • portworx-elastic-sc
      • portworx-metastoredb-sc
      • portworx-gp3-sc
      • portworx-kafka-sc
      • portworx-solr-sc
    • IBM Cloud File Storage: ibmc-file-gold-gid or ibm-file-custom-gold-gid

Before you begin

Ensure that the cluster meets the minimum requirements for installing Watson Knowledge Catalog. 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 Knowledge Catalog 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 Knowledge Catalog software images. For details, see Configuring your cluster to pull images.
  4. The Watson Knowledge Catalog operator subscription exists. For details, see Creating operator subscriptions.
  5. The security context constraints (SCCs) required to run Watson Knowledge Catalog exists. For details, see Creating required SCCs.
  6. The node settings are adjusted for Watson Knowledge Catalog. For details, see Changing required node settings.

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

Procedure

Complete the following tasks to install Watson Knowledge Catalog:

  1. Installing Python
  2. Installing the service
  3. Verifying the installation
  4. Resizing the PersistentVolumeClaim (PVC)
  5. What to do next

Installing Python

Watson Knowledge Catalog automatically installs Db2U and Db2® as a service. To ensure that these components can be installed, you must install the following Python software on the system where you issue the installation commands:
  • Python 2
  • pyyaml
  1. To install Python 2, run the following command:
    yum install -y python2
    alternatives --set python /usr/bin/python2
  2. To install pyyaml, run the following command:
    pip2 install pyyaml

Installing the service

To install Watson Knowledge Catalog:

  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. Create a WKC custom resource to install Watson Knowledge Catalog. Follow the appropriate guidance for your environment.
    Note: For additional properties that you can specify in the custom resource, see Additional installation options.
    • Create a custom resource with the following format.

      cat <<EOF |oc apply -f -
      apiVersion: wkc.cpd.ibm.com/v1beta1
      kind: WKC
      metadata:
        name: wkc-cr     # This is the recommended name, but you can change it
        namespace: project-name     # Replace with the project where you will install Watson Knowledge Catalog
      spec:
        license:
          accept: true
          license: Enterprise|Standard     # Specify the license you purchased
        version: 4.0.1
        storageVendor: ocs
        # wkc_db2u_set_kernel_params: True
        # iis_db2u_set_kernel_params: True
        # install_wkc_core_only: true     # To install the core version of the service, remove the comment tagging from the beginning of the line.
      EOF
      Note: Enable the following parameters for clusters where you cannot configure Unsafe SysCtl, such as IBM Cloud (ROKS), by removing the commenting in the CR:
      
        # wkc_db2u_set_kernel_params: True
        # iis_db2u_set_kernel_params: True
    • Create a custom resource with the following format.

      cat <<EOF |oc apply -f -
      apiVersion: wkc.cpd.ibm.com/v1beta1
      kind: WKC
      metadata:
        name: wkc-cr     # This is the recommended name, but you can change it
        namespace: project-name     # Replace with the project where you will install Watson Knowledge Catalog
      spec:
        license:
          accept: true
          license: Enterprise|Standard     # Specify the license you purchased
        version: 4.0.1
        storageVendor: portworx
        # wkc_db2u_set_kernel_params: True
        # iis_db2u_set_kernel_params: True
        # install_wkc_core_only: true     # To install the core version of the service, remove the comment tagging from the beginning of the line.
      EOF
      Note: Enable the following parameters for clusters where you cannot configure Unsafe SysCtl, such as IBM Cloud (ROKS), by removing the commenting in the CR:
      
        # wkc_db2u_set_kernel_params: True
        # iis_db2u_set_kernel_params: True
    • Create a custom resource with the following format.

      cat <<EOF |oc apply -f -
      apiVersion: wkc.cpd.ibm.com/v1beta1
      kind: WKC
      metadata:
        name: wkc-cr     # This is the recommended name, but you can change it
        namespace: project-name     # Replace with the project where you will install Watson Knowledge Catalog
      spec:
        license:
          accept: true
          license: Enterprise|Standard     # Specify the license you purchased
        version: 4.0.1
        storageClass: managed-nfs-storage          #if you use a different storage class, replace it with the appropriate storage class
        # wkc_db2u_set_kernel_params: True
        # iis_db2u_set_kernel_params: True 
        # install_wkc_core_only: true     # To install the core version of the service, remove the comment tagging from the beginning of the line.
                         
      EOF
      Note: Enable the following parameters for clusters where you cannot configure Unsafe SysCtl, such as IBM Cloud (ROKS), by removing the commenting in the CR:
      
        # wkc_db2u_set_kernel_params: True
        # iis_db2u_set_kernel_params: True

Additional installation options

You can target nodes for the Db2U runtime, which is useful if your environment does not allow custom Security Context Constraints (SCCs) to be deployed on certain nodes. For more information, see Configuring Db2 on a specific node.

Verifying the installation

When you create the custom resource, the Watson Knowledge Catalog operator processes the contents of the custom resource and starts up the microservices that comprise Watson Knowledge Catalog, including WKC. (The WKC microservice is defined by the wkc-cr custom resource.) Watson Knowledge Catalog is installed when the WKC status is Completed.

To check the status of the installation:

  1. Change to the project where you installed Watson Knowledge Catalog:
    oc project project-name
  2. Get the status of Watson Knowledge Catalog. It might take two to three hours to install Watson Knowledge Catalog. You can check the status of Watson Knowledge Catalog by running the following command:
    oc get WKC wkc-cr -o jsonpath='{.status.wkcStatus} {"\n"}'

    While Watson Knowledge Catalog is installing, the status shows In-Progress.

    You can check the status of the modules by running the following commands. The modules are installed in the order shown, and you must wait for each module to show Completed before the next module is installed.
    • To get the status of the common core services module, run the following command:
      oc get CCS ccs-cr -o jsonpath='{.status.ccsStatus} {"\n"}'
    • To get the status of the Data Refinery module, run the following command:
      oc get DataRefinery datarefinery-sample -o jsonpath='{.status.datarefineryStatus} {"\n"}'
    • To get the status of the Db2 as a service module, run the following command:
      oc get Db2aaserviceService db2aaservice-cr -o jsonpath='{.status.db2aaserviceStatus} {"\n"}'
    • To get the status of the InfoSphere® Information Server module, run the following command. If you are installing the core version of the service, this check does not apply.
      oc get IIS iis-cr -o jsonpath='{.status.iisStatus} {"\n"}'
    • To get the status of the Unified Governance module, run the following command. If you are installing the core version of the service, this check does not apply.
      oc get UG ug-cr -o jsonpath='{.status.ugStatus} {"\n"}'

Resizing the PersistentVolumeClaim (PVC)

After installation of the service, you must resize the PVC for the InfoSphere Information Server Db2 instance to avoid running out of disk space.
Note: This procedure only applies to environments that use OpenShift Container Storage or Portworx.
  1. Edit the PVC:
    oc edit pvc data-c-db2oltp-iis-db2u-0
  2. Change the storage value in "spec" from 40Gi to 100Gi.
  3. Save the change.

What to do next

Complete the steps in Post-installation tasks for Watson Knowledge Catalog.