Preparing to upgrade IBM Knowledge Catalog
Before you can upgrade IBM Knowledge Catalog to Version 5.2 and migrate all IBM Knowledge Catalog data to the EDB Native PostgreSQL database that is used in Version 5.2, complete several checks and preparation tasks.
This information applies to upgrades from Version 4.8, 5.0, or 5.1.
Before you begin
The commands in the following tasks use environment variables so that you can run the commands exactly as written (see Setting up installation environment variables).
Pre-upgrade tasks
Complete these tasks before you start the upgrade:
- Log the
cpd-cliin to the Red Hat® OpenShift® Container Platform cluster:${CPDM_OC_LOGIN}Remember:CPDM_OC_LOGINis an alias for thecpd-cli manage login-to-ocpcommand. - Verify the status of the Db2U StatefulSet
and
pod:
oc get sts c-db2oltp-wkc-db2u -n ${PROJECT_CPD_INST_OPERANDS}oc get pods c-db2oltp-wkc-db2u-0 -n ${PROJECT_CPD_INST_OPERANDS} - Verify that the Db2 databases that must be
migrated are
connected:
kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to LINEAGE"kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to WFDB"kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to ILGDB"kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to BGDB" -
For IBM Knowledge Catalog 5.2, four separate PostgreSQL instances are deployed. Each instance is configured with distinct schemas and distinct persistent volume claims (PVCs).
Check the sizes of the current Db2 databases to calculate the storage that is required for the PostgreSQL instances.
Get the current database sizes. Specify the commands on a single line:
- BGDB
- This database holds the business
glossary.
kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to BGDB > /dev/null; db2 \"SELECT TABSCHEMA, SUM(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE) AS TOTAL_SCHEMA_SIZE_KB FROM SYSIBMADM.ADMINTABINFO WHERE TABSCHEMA = 'BG' GROUP BY TABSCHEMA\" | awk '/BG/ { printf \"%s: %.2f GB\\n\", \$1, \$NF / (1024 * 1024) }'" - WFDB
- This database holds workflow
data.
kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to WFDB > /dev/null; db2 \"SELECT TABSCHEMA, SUM(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE) AS TOTAL_SCHEMA_SIZE_KB FROM SYSIBMADM.ADMINTABINFO WHERE TABSCHEMA = 'DB2INST1' GROUP BY TABSCHEMA\" | awk '/DB2INST1/ { printf \"%s: %.2f GB\\n\", \$1, \$NF / (1024 * 1024) }'" - LINEAGE
- This database hold activity lineage
data.
kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to LINEAGE > /dev/null; db2 \"SELECT TABSCHEMA, SUM(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE) AS TOTAL_SCHEMA_SIZE_KB FROM SYSIBMADM.ADMINTABINFO WHERE TABSCHEMA = 'LINEAGE_TENANT_999' GROUP BY TABSCHEMA\" | awk '/LINEAGE_TENANT_999/ { printf \"%s: %.2f GB\\n\", \$1, \$NF / (1024 * 1024) }'" - DATAQUALITY
- This database holds data quality
information.
kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to LINEAGE > /dev/null; db2 \"SELECT TABSCHEMA, SUM(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE) AS TOTAL_SCHEMA_SIZE_KB FROM SYSIBMADM.ADMINTABINFO WHERE TABSCHEMA = 'DATAQUALITY' GROUP BY TABSCHEMA\" | awk '/DATAQUALITY/ { printf \"%s: %.2f GB\\n\", \$1, \$NF / (1024 * 1024) }'"This database is available only if the data quality feature is enabled in your deployment.
- ILGDB
- This database holds information that is related to the data privacy service.
kubectl exec -i -n ${PROJECT_CPD_INST_OPERANDS} c-db2oltp-wkc-db2u-0 -- ksh -l -c "db2 connect to ILGDB > /dev/null; db2 \"SELECT TABSCHEMA, SUM(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE) AS TOTAL_SCHEMA_SIZE_KB FROM SYSIBMADM.ADMINTABINFO WHERE TABSCHEMA = 'DB2INST1' GROUP BY TABSCHEMA\" | awk '/DB2INST1/ { printf \"%s: %.2f GB\\n\", \$1, \$NF / (1024 * 1024) }'"
- Expand the PVCs based on the results from the previous steps.
Edit the
wkc-crcustom resource. You can do this manually or run anoc patchcommand. Update the values for the following parameters in thespecsection.Set the variables for the Postgres instances as follows.
Consider the numbers in the instructions as the required minimum. If you expect future growth, feel free to increase the numbers accordingly. The variables for the different databases, for example
$BGDB, refer to the sizes of the Db2 schemas that you determined in the previous step.If the DATAQUALITY database exists, the required space on the migration volume of the
dataqualitymigration is 3.5 times the space of the DATAQUALITY database. If the DATAQUALITY database does not exist, assume the$DATAQUALITYvalue to be 0 in your calculations. In version 5.2.0, do not set theikc_dataquality_postgres_migration_storage_sizevariable in thewkc-crcustom resource.You can determine the value of the
$CURRENT_PROFILING_PVC_SIZEvariable by checking the size of thewdp-profiling-cloud-native-postgresql-1PVC.The default value for each storage size is 50 GB. If your calculation yields a lower value for one of the entries, you do not need to update the respective variable in the CR.
- 5.2.0 Variables and PVCs in Version 5.2.0
-
Variable to set in the CR Name of the affected PVC Minimum value ikc_glossary_workflow_postgres_storage_sizeikc-glossary-workflow-postgres$BGDB + $WFDBactivity_lineage_postgres_storage_sizeikc-activity-lineage-postgres$LINEAGEwdp_profiling_edb_postgres_storage_sizewdp-profiling-cloud-native-postgresql$DATAQUALITY+$CURRENT_PROFILING_PVC_SIZEikc_dp_dps_bidata_mde_mdi_postgres_storage_sizeikc-dp-dps-bidata-mde-mdi-postgres$ILGDB+ 20 GB (to account for metadata import and reporting data)ikc_postgres_migration_storage_sizeikc-db2-postgres-migration-<component>max($BGDB, $WFDB, $LINEAGE, $DATAQUALITY*3.5, $ILGDB) - 5.2.1 and later Variables and PVCs in Version 5.2.1 and later
-
Variable to set in the CR Name of the affected PVC Minimum value ikc_glossary_workflow_postgres_storage_sizeikc-glossary-workflow-postgres$BGDB + $WFDBactivity_lineage_postgres_storage_sizeikc-activity-lineage-postgres$LINEAGEwdp_profiling_edb_postgres_storage_sizewdp-profiling-cloud-native-postgresql$DATAQUALITY+$CURRENT_PROFILING_PVC_SIZEikc_dp_dps_bidata_mde_mdi_postgres_storage_sizeikc-dp-dps-bidata-mde-mdi-postgres$ILGDB+ 20 GB (to account for metadata import and reporting data)ikc_dataquality_postgres_migration_storage_sizeikc-db2-postgres-migration-dataquality$DATAQUALITY*3.5ikc_dps_postgres_migration_storage_sizeikc-db2-postgres-migration-dps$ILGDBikc_glossary_postgres_migration_storage_sizeikc-db2-postgres-migration-glossary$BGDBikc_wdplineage_postgres_migration_storage_sizeikc-db2-postgres-migration-wdplineage$LINEAGEikc_workflow_postgres_migration_storage_sizeikc-db2-postgres-migration-workflow$WFDB
The changes are applied when you upgrade your system.