You can upgrade the trial license for replication in the Db2 service to
a permanent license.
About this task
Run the steps of this task on the Db2 cluster host.
Procedure
-
Log in to your Db2 cluster host,
scp your Replication license
(not the Db2 license) to the cluster host name, and generate the encode output by
running the following commands:
cd <replication_license_directory>
LICENSE_KEY="./idr4a.lic"
cat license_key | base64 | tr -d '\n'
Save the encoded output, as you will add it to your YAML file later in this procedure.
-
Use the OpenShift® command line interface
(oc) to get the name of your db2ucluster instance:
oc get db2ucluster
An example output result
looks like the following:
NAME STATE AGE Ready 1d
db2oltp-16360427332670605
Create an environment variable for the db2ucluster instance name by running the
following
command:
INSTANCE_NAME="db2oltp-16360427332670605"
-
Edit the Db2U cluster instance YAML file.
Note: The vi editor is used.
oc edit db2ucluster ${INSTANCE_NAME}
-
Inside Db2U cluster instance YAML file, locate the
spec: > addOns: > qrep: >
license: section, insert a key named value with the encoded replication
license string as the key value:
qrep:
enabled: true
infraHost: <db2-cluster-hostname>
infraIP: <db2-cluster-external-ip>
license:
accept: true
value: <base64_encoded_qrep_permanent_license_string>
-
Save and close the YAML file.
oc edit db2ucluster ${INSTANCE_NAME}
An
example output result looks like the
following:
db2ucluster.db2u.databases.ibm.com/db2oltp-16360427332670605 edited
-
Scale down the replication pod to 0:
oc scale --replicas=0 deployment c-${INSTANCE_NAME}-qrep
-
After the replication pod stops, scale up the replication pod to 1 for the new license to take
effect:
oc scale --replicas=1 deployment c-${INSTANCE_NAME}-qrep
-
When the new replication pod is ready, verify the updated replication license:
oc exec -it c-${INSTANCE_NAME}-<repl_instance_name> -- su - db2inst1 -c "/opt/ibm/db2/V11.5.0.0/adm/db2licm -l"