Provisioning the Watson Query service

Before you use Watson Query, you must provision an instance of the service to your IBM Cloud Pak for Data.

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

Before you provision the Watson Query service, you must meet the following requirements.

Important: To complete this task, you must have the Create service instances permission. The default Cloud Pak for Data Administrator role has this permission.

About this task

The Watson Query service is provisioned to any compute node in the Cloud Pak for Data cluster that has the specified resources (cores, memory, and ephemeral storage) available.

Procedure

To provision Watson Query, complete the following tasks:

  1. Provision the service.
  2. Verify provisioning.
  3. Find out what to do next.

Provisioning the service

To provision the Watson Query service, complete the following steps.

  1. On the navigation menu, click Services > Instances.
  2. From the list of instances, locate the Watson Query service, click the action menu, and select Provision instance.
  3. To configure the service, specify the resources that you want to allocate to the Watson Query worker nodes in the Nodes step.
    1. Specify the number of Watson Query worker nodes to allocate to the service.
      Recommended: One worker node is sufficient for many workloads.

      To understand the difference between compute nodes and worker nodes, see Preparing to install Watson Query.

    2. Specify the number of cores to allocate per node.

      You are constrained by the total number of available cores on the OpenShift® compute nodes.

    3. Specify the amount of memory in GB to allocate per node.

      You are constrained by the total amount of memory on the OpenShift compute nodes. You can scale the Watson Query service up and down at any time after you provision it. For more information, see Scaling Watson Query.

  4. In the Storage step, specify the storage classes and persistent volume sizes that you want to use for the service nodes and caching storage. For more information, see Storage requirements.
    1. In the Node storage section, select the storage class and specify the size to allocate to your nodes. The default size that is shown in the Node storage section is 50Gi.

      In Watson Query, the term worker pod refers to a pod that runs one Watson Query worker component. You can allocate multiple worker components to the Watson Query service instance. These components are effectively multiple c-db2u-dv-db2u-x pods.

    2. In the Caching storage section, select the storage class and specify the amount of storage to allocate to your data caches.
      Note: Part of the total cache storage space is used for refreshing active caches that have a periodic refresh schedule. This refresh schedule impacts the storage space that is available for creating new cache entries.
  5. Click Next.
  6. Ensure that the summary is correct and click Configure.

    Wait for the service to be provisioned. This step might take some time because of the number of components that must start.

  7. If you want to use Cloud Pak for Data while you wait for the Watson Query provisioning process to complete, click Home.

Verifying that the service was provisioned

To validate that Watson Query was provisioned successfully, follow these steps.

  1. Run the following command:
    oc -n ${PROJECT_CPD_INSTANCE} get bigsql db2u-dv
    The result must show the db2u-dv CR in the Ready state similar to the following example.
    NAME      DB2UCLUSTER   STATE   AGE
    db2u-dv   db2u-dv       Ready   4h25m
  2. Run the following command:
    oc -n ${PROJECT_CPD_INSTANCE} get bigsql db2u-dv -o jsonpath="{.status.state}"

    This command must return Ready as the result.

  3. Run the following command:
    oc -n ${PROJECT_CPD_INSTANCE} get pods | grep -i c-db2u-dv
    All containers from Watson Query instance pods must be running. You must see output similar to the following example from a Watson Query instance with one worker pod.
    c-db2u-dv-db2u-0                                             1/1     Running     0               4h28m
    c-db2u-dv-db2u-1                                             1/1     Running     0               4h28m
    c-db2u-dv-dvapi-7b9d754d77-xljmg                             1/1     Running     0               4h17m
    c-db2u-dv-dvcaching-59996b4b75-xf77s                         1/1     Running     0               4h17m
    c-db2u-dv-dvutils-0                                          1/1     Running     0               4h18m
    c-db2u-dv-hurricane-dv-86cb4ffbb7-j4gfc                      1/1     Running     0               4h26m
    c-db2u-dv-restore-morph-g7qdl                                0/1     Completed   0               4h25m

What to do next

Additionally, you must follow these steps:
  1. When you provision the Watson Query service, you are automatically assigned the Watson Query Admin role. After you provision the service, you must give other users access to the service. For more information, see Managing users in Watson Query.
  2. To connect to the Watson Query service, use the JDBC URL that is provided in the Configure connection page for the service. Additionally, if you have a load balancer, you must open the port in your load balancer and your firewall. For more information, see Configuring network requirements for Watson Query.
Now you can use the Watson Query service. For more information, see Virtualizing data.