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
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.
- Ensure that you meet system, service, and semaphore requirements. For more information, see Preparing to install the service.
- Install and deploy the service.
- Ensure that you create the storage classes to use in Watson Query. For more information, see Storage considerations.
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:
Provisioning the service
To provision the Watson Query service, complete the following steps.
- On the navigation menu, click .
- From the list of instances, locate the Watson Query service, click the action menu, and select Provision instance.
- To configure the service, specify the resources that you want to allocate to the Watson
Query worker nodes in the Nodes step.
- 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.
- Specify the number of cores to allocate per node.
You are constrained by the total number of available cores on the OpenShift® compute nodes.
- 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.
- Specify the number of Watson
Query worker nodes to allocate to the service.
- 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.
- 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. - 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.
- 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.
- Click Next.
- 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.
- 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.
- Run the following command:
oc -n ${PROJECT_CPD_INSTANCE} get bigsql db2u-dv
The result must show thedb2u-dv
CR in the Ready state similar to the following example.NAME DB2UCLUSTER STATE AGE db2u-dv db2u-dv Ready 4h25m
- 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. - 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
- 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.
- 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.