Setting up the cluster for Db2 Warehouse

If you plan to install Db2 Warehouse on IBM® Cloud Pak for Data, a cluster administrator must set up the cluster for Db2 Warehouse.

Prerequisites

Required role: To complete this task, you must be a cluster administrator.

Note: Multiple concurrent Db2® Warehouse SMP installations on a single cluster are supported, and multiple Db2 Warehouse engine pods can be scheduled on the same node or on different nodes. For Db2 Warehouse MPP installations, only one pod is supported per Red Hat® OpenShift® worker node. For both SMP and MPP, to guarantee the highest quality of service, a production best practice is to isolate some nodes for Db2 Warehouse to ensure that the database is not destabilized by other workloads on the nodes where Db2 Warehouse is running. Plan ahead to ensure that you have enough capacity in the cluster to support the number of desired Db2 Warehouse installations. To get detailed recommended specifications for a new deployment, use the online configuration tool.

Before you set up the cluster for Db2 Warehouse, ensure that:

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

Procedure

Set up the cluster for Db2 Warehouse by completing the appropriate task for your environment:

Preparing 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 an administrator:
    oc login OpenShift_URL:port
  3. Run the following command to see a preview of the list of resources that must be created on the cluster:
    ./cpd-cli adm \
    --repo ./repo.yaml \
    --assembly db2wh \
    --arch Cluster_architecture \  
    --namespace Project \
    --latest-dependency
    Important: By default, this command gets the latest version of the assembly. If you want to install a specific version of Db2 Warehouse, add the following line to your command after the --assembly flag:
    --version Assembly_version \

    Additionally, you can remove the --latest-dependency flag to get the minimum required version of any software that Db2 Warehouse is dependent on.

    Tell the person who will install Db2 Warehouse whether you used either of these flags. The install command must be run with the same flags.

    Replace the following values:

    Variable Replace with
    Assembly_version
    The version of Db2 Warehouse that you want to install. The assembly versions are listed in System requirements for services.
    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
    Project The project where the Cloud Pak for Data control plane is installed.

    The command returns a list of the changes that you must make to your cluster to ensure that Db2 Warehouse can run on your cluster.

  4. Make the necessary changes to your cluster. You can choose one of the following methods to make the changes:
    To automatically apply the changes to your cluster:
    Re-run the cpd adm command with the --apply flag:
    ./cpd-cli adm \
    --repo repo.yaml \
    --assembly db2wh \
    --arch Cluster_architecture \
    --namespace Project \
    --apply

    Replace the variables with the same values that you used the last time you ran the command.

    To manually apply the changes to your cluster:
    Follow the appropriate procedures from the Red Hat OpenShift documentation to complete the required tasks.
  5. Label the nodes in your cluster to be used by the database.
    oc label node node_name icp4data=database-db2wh
    Replace node_name with the name of the node that you want to label.

    See Setting up dedicated nodes for your Db2 Warehouse deployment for more information.

Preparing air-gapped clusters

From your installation node:

  1. Change to the directory where you placed the Cloud Pak for Data command-line interface.
  2. Log in to your Red Hat OpenShift cluster as an administrator:
    oc login OpenShift_URL:port
  3. Run the following command to see a preview of the list of resources that must be created on the cluster:
    ./cpd-cli adm \
    --assembly db2wh \
    --arch Cluster_architecture \
    --namespace Project \
    --load-from Image_directory_location \
    --latest-dependency
    Note: If the assembly was downloaded using the delta-images command, remove the --latest-dependency flag from the command. If you don't remove the --latest-dependency flag you will get an error indicating that the flag cannot be used.

    Tell the person who will install Db2 Warehouse whether you used the --latest-dependency flag. If you run this command with the --latest-dependency flag, the install command must also be run with the flag.

    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
    Project The project where the Cloud Pak for Data control plane is installed.
    Image_directory_location The location of the cpd-cli-workspace directory.

    The command returns a list of the changes that you must make to your cluster to ensure that Db2 Warehouse can run on your cluster.

  4. Make the necessary changes to your cluster. You can choose one of the following methods to make the changes:
    To automatically apply the changes to your cluster:
    Re-run the cpd adm command with the --apply flag:
    ./cpd-cli adm \
    --assembly db2wh \
    --arch Cluster_architecture \
    --namespace Project \
    --load-from Image_directory_location \
    --latest-dependency \
    --apply

    Replace the variables with the same values that you used the last time you ran the command.

    To manually apply the changes to your cluster:
    Follow the appropriate procedures from the Red Hat OpenShift documentation to complete the required tasks.
  5. Label the nodes in your cluster to be used by the database.
    oc label node node_name icp4data=database-db2wh
    Replace node_name with the name of the node that you want to label.

    See Setting up dedicated nodes for your Db2 Warehouse deployment for more information.