Optional: Configuring dedicated OpenShift worker nodes for Db2 Big SQL

You can provision Db2 Big SQL on dedicated Red Hat® OpenShift® worker nodes.

About this task

Do this advanced configuration only when it is necessary. Constraining Db2 Big SQL to a specific set of nodes can complicate activities, including upgrades and maintenance at the OpenShift level. In general, it is recommended that you allow Db2 Big SQL to be scheduled across all available OpenShift worker nodes.

This task assumes that all Db2 Big SQL instances share the same set of dedicated nodes. That is, the nodes are labeled as icp4data=database-bigsql.

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.

Procedure

  1. Log in to Red Hat OpenShift Container Platform as an instance administrator.
    ${OC_LOGIN}
    Remember: OC_LOGIN is an alias for the oc login command.
  2. Retrieve the name of the worker node that you want to dedicate to Db2 Big SQL:
    oc get nodes
  3. Label and taint the nodes:
    oc adm taint node node name icp4data=database-bigsql:PreferNoSchedule
    oc label node node name icp4data=database-bigsql
  4. Change to the project where the IBM® Software Hub control plane is installed:
    oc project ${PROJECT_CPD_INST_OPERANDS}
  5. Identify the IBM Software Hub pod that holds the Db2 Big SQL Custom Resource (CR) template:
    pod=$(oc get pod -o custom-columns=NAME:.metadata.name --no-headers | grep ibm-nginx-[0-9a-h]*-[0-9a-z]* | head -n 1)
  6. On the local host, back up the Db2 Big SQL CR template from the pod:
    oc cp $pod:/user-home/_zen-addons/bigsql/8.2.2/yamls/bigsql-cr.yaml /tmp/bigsql-cr.yaml
  7. On the pod, update the Db2 Big SQL CR template file:
    oc exec -it $pod -- sed -i -e 's/^spec:/spec:\n  affinity:\n    nodeAffinity:\n      requiredDuringSchedulingIgnoredDuringExecution:\n        nodeSelectorTerms:\n        - matchExpressions:\n          - key: icp4data\n            operator: In\n            values:\n            - database-bigsql\n  tolerations:\n  - key: "icp4data"\n    operator: "Equal"\n    value: "database-bigsql"\n    effect: "PreferNoSchedule"/' /user-home/_zen-addons/bigsql/8.2.2/yamls/bigsql-cr.yaml

What to do next

Create service instances