Provision a service instance for Watson Query
To deploy the Watson Query service, you must create a Watson Query service instance.
Provisioning through Cloud Pak for Data as a Service
You can provision the Watson Query service from the Cloud Pak for Data as a Service console. Follow these steps to provision Watson Query for Cloud Pak for Data as a Service.
- If necessary, log in to IBM Cloud and upgrade your IBM Cloud account to Pay-as-you-go. For more information, see Upgrading your account.
- From the IBM Cloud console, go to Manage > Billing and usage, and select Promotions to apply your promo code for a promotional credit toward Watson Query usage.
- From the Cloud Pak for Data as a Service console, go to Services > Services catalog.
- Select Watson Query.
- Select a region, choose a pricing plan, configure your resource, and click Create.
Provisioning from the catalog
You can provision the Watson Query service on the service's catalog page. When you provision the service from the catalog, specify the following parameters.
- Service name - The name can be any string. This string is the name that is used on the web and in the command line to identify the new deployment.
- Resource group - If you are organizing your services into resource groups, you can specify the resource group in this field. Otherwise, you can leave it as the default.
- Head node size - For the Enterprise plan, you can select only the 8 Cores/32GB Memory option. For the Lite plan, you can select only the 4 Cores/16GB Memory option
- Worker nodes - For the Enterprise plan, you can select between 3 and 9 worker nodes. For the Lite plan, only 1 worker node is available.
- Worker node size - For the Enterprise plan, you can select only the 4 Cores/32GB Memory option. For the Lite plan, you can select only the 4 Cores/16GB Memory option
- Service Endpoints - Select the Public or Private endpoint option. Public endpoints provide a connection to your deployment on the public network and are the default selection. Private endpoints route traffic through the IBM Cloud Private network, avoiding exposure to the public internet.
- Key Protect instance and disk encryption key - If you use Key Protect, you can select an instance and a key to encrypt the deployment's disk. If you do not use your own key, the deployment automatically creates and manages its own disk encryption key.
Click Create to start the provisioning process.
Provisioning by using the command line
You can provision the Watson Query service by using the CLI to request a service instance with the service ID of the database that you want to provision. You can use the IBM Cloud CLI tool to communicate with IBM Cloud from your terminal or command line. For more information, see Getting started with the IBM Cloud CLI.
For example, use the following command template:
ibmcloud resource service-instance-create <service-name> <service-id> <service-plan-id> <region> --service-endpoints <SERVICE_ENDPOINTS_TYPE>
When you run the command, the database deployment begins. The database takes some time to deploy. You can check on its progress on your IBM Cloud dashboard or you can run the following command to see the current state of the service instance:
ibmcloud resource service-instance-create <service-name>
Additional flags and parameters
--service-endpointsflag to specify which types of service endpoints to include in your deployment. By default, connections to your deployment can be made from the public network. Possible values are
public-and-private. If the flag is omitted, the default is a
publicendpoint. The following example command specifies a service endpoint:
ibmcloud resource service-instance-create <service-name> --service-endpoints <endpoint-type>
-pflag to provide additional parameters to be passed to the provisioning process. The parameters are in JSON format. For example, you can use the Cloud Resource Name (CRN) parameter, which uniquely identifies a resource in the cloud. All parameter names and values are passed as strings.
Provisioning by using the Resource Controller API
You can provision the Watson Query service by using the Resource Controller API. However, to use the Resource Controller API, you need some additional preparation.
- Get an IAM token from your API token.
- Get the ID of the resource group that you would like to deploy to. This information is available through the IBM Cloud CLI. You can find a list of resource groups with
ibmcloud resource groupsand the ID of a resource group with
ibmcloud resource group.
- Understand the region that you would like to deploy to.
- The parameters
resource_plan_idare all required. You can send additional parameters in the request body if you need them.
For example, the following create request is a
POST to the
curl -X POST \
-H 'Authorization: Bearer <>' \
-H 'Content-Type: application/json' \
- Use the
disk_encryption_key_crnparameter to provide the CRN of a Key Protect key, which is used for disk encryption. A Key Protect CRN is in the format
- Use the
service-endpointsparameter to specify the type of service endpoint that is supported on your deployment. Options are
public-and-private. If omitted, the default is
public. In the CLI,
service-endpointsis a flag and not a parameter.
- Use the
worker_countparameter to specify the number of worker nodes.
Parent topic: Watson Query