Migration to Version 5.1.1 and later
The following instruction describes migration to IBM Manta Data Lineage Version 5.1.1 and later. Before running the MDI Lineage Migration Toolkit, you must complete all the steps in the prerequisites section.
Before completeing the following steps and running the migration, complete steps included in Prerequisites for running the MDI Migration Toolkit.
Prerequisites
-
Download and extract command-line interface (
cpd-cli). See, Installing the IBM Software Hub command-line interface (cpd-cli). -
Add cpd-cli directory to the
PATH:# Ensure that cpd-cli is in the PATH export PATH=${PATH}:<cpd-cli-location> -
Check the storage class of your Cloud Pak for Data cluster:
oc get storageclass --all-namespaces -
Create a persistent volume claim (PVC) depending on the storage class of your Cloud Pak for Data cluster. See, Preparing to use the IBM Software Hub export and import utility.
-
Create
cpd-cliprofile for Cloud Pak for Data admin user. See, Creating a profile to use thecpd-climanagement commands. -
Check if the
cpd-cliuser and profile are created:cpd-cli config users list cpd-cli config profiles list -
Initialize the export import utility. See, Initializing the export import utility.
-
Download the MDI Lineage Migration Toolkit Patch from Fix Central. Enter your IBM ID credentials when prompted.
- For 5.1.1, download from IBM Support.
- For 5.1.2, download from IBM Support.
- For 5.1.3, download from IBM Support.
-
Copy the MDI Lineage Migration Toolkit to
${MDIWORK_DIR}on the Cloud Pak for Data cluster.MDIWORK_DIR=/tmp/mdiwork mkdir -p ${MDIWORK_DIR} cd ${MDIWORK_DIR}-
For 5.1.1, set the
MDI_MIG_PATCH_NAMEto:MDI_MIG_PATCH_NAME=mdi-lineage-migration-patch_5112.zip -
For 5.1.2, set the
MDI_MIG_PATCH_NAMEto:MDI_MIG_PATCH_NAME=mdi-lineage-migration-patch_5144.zip -
For 5.1.3, set the
MDI_MIG_PATCH_NAMEto:MDI_MIG_PATCH_NAME=mdi-lineage-migration-patch_51110.zip
-
-
Install the MDI Lineage Migration Toolkit patch:
# set the namespace PROJECT_CPD_INST_OPERANDS=<namespace> # set OCP node hostname and OCP port OCP_URL=<https://<ocp> hostname>:<ocp port> NAMESPACE=${PROJECT_CPD_INST_OPERANDS} cd ${MDIWORK_DIR} unzip ${MDI_MIG_PATCH_NAME} chmod -R 755 mdi-lineage-migration-patch cd mdi-lineage-migration-patch ./install-mdi-lineage-migration-config-spec.sh -u <username> -p <password> -url ${OCP_URL} -n ${NAMESPACE}
Prerequisites for air-gapped environment
-
Log in to the OpenShift console as the cluster admin.
-
Prepare the authentication credentials to access the IBM production repository. Use the same
auth.jsonfile as for CASE download and image mirroring, or create anauth.jsonfile that contains credentials to accessicr.ioand your local private registry. For more information about theauth.jsonfile, see Syntax for the registry authentication file.An example directory path:
${HOME}/.airgap/auth.jsonAn example of creating an
auth.jsonfile:{ "auths": { "cp.icr.io":{"email":"unused","auth":"<base64 encoded id:apikey>"}, "<private registry hostname>":{"email":"unused","auth":"<base64 encoded id:password>"} } } -
Install skopeo:
yum install skopeo -
Confirm the path for the local private registry to copy the hotfix images to:
oc describe pod <hotfix image pod> | grep -i "image:"An example:
oc describe pod catalog-api | grep Image: Image: cp.icr.io/cp/cpd/catalog-api@sha256:03c88c69b986f24d39e4556731c0d171169d2bd91b0fb22f6367fd51c9020e64 -
Get the local private registry source details:
oc get imageContentSourcePolicy oc describe imageContentSourcePolicy [cloud-pak-for-data-mirror]An example output:
- mirrors: - ${PRIVATE_REGISTRY_LOCATION}/cp/ source: cp.icr.io/cp/cpdFor more information about mirroring of images, see Mirroring IBM Software Hub images to a private container registry.
-
Use the
skopeocommand to copy the patch images from the IBM production registry to the local private registry. Using the appropriateauth.jsonfile, copy the patch images from the IBM production registry to the OpenShift cluster registry.DOCKER_IMAGE_ID=90d12c276279f0d7db9b885f55016ee30b571432ba1f24f9bab59fefd1fecdd1 skopeo copy --all --authfile "<folder path>/auth.json" \ --dest-tls-verify=false --src-tls-verify=false \ docker://cp.icr.io/cp/cpd/mdi-lineage-migration@sha256:${DOCKER_IMAGE_ID} \ docker://${PRIVATE_REGISTRY_LOCATION}/cp/cpd/mdi-lineage-migration@sha256:${DOCKER_IMAGE_ID}-
For 5.1.1, set the
DOCKER_IMAGE_IDto:DOCKER_IMAGE_ID=6e6b800e8ca2d096e8b36767656ec2f335b7df009861e66355bb8f67b27713cf -
For 5.1.2, set the
DOCKER_IMAGE_IDto:DOCKER_IMAGE_ID=fe65fd1eb42de5643983ff76d862b084cd3cb752349a44554f7b0470325e8997 -
For 5.1.3, set the
DOCKER_IMAGE_IDto:DOCKER_IMAGE_ID=f62503244e887776cb323d0c808cc8740b7e33145a4385332a900c3e4f0ed8bc
-
Running migration
Migration needs to be run as root or by a user with sudo access. See, Prerequisites for running the MDI Migration Toolkit.
-
Add
cpd-clidirectory toPATH:export PATH=${PATH}:<cpd-cli-location> -
Get the list of profiles.
cpd-cli config profiles list -
Set a profile name using the value from the list of profiles.
CPD_PROFILE_NAME=<cpd-profile-name> -
Set environment variables for the following required parameters:
NAMESPACE=<namespace> CP4D_HOST=<cp4d hostname> MIGRATION_USERNAME=<migration username> MIGRATION_USER_APIKEY=<migration user apikey> MIGRATION_INSTANCE_NAME=<migration instance name> DSD_ADMIN_USERNAME=<dsd admin username> LINEAGE_ADMIN_USERNAME=<lineage admin username> LOG_LEVEL=<info|debug> MDIWORK_DIR=/tmp/mdiwork-
For
MIGRATION_USERNAMEparameter, provide the user with Manage projects permission. This user is also called as migration user. -
For
MIGRATION_USER_APIKEYparameter, provide the API Key of the migration user. -
For
DSD_ADMIN_USERNAMEparameter, provide the user with Create data source definitions and Manage data source definitions permissions. This user needs to be added to the Platform assets catalog with the Admin role. -
For
LINEAGE_ADMIN_USERNAMEparameter, provide the system admin username. The system admin user needs to have at least the following permissions: Administer platform, Manage catalogs, Manage users, Manage asset discovery, Access data lineage, Manage data lineage. -
If you want the migration to use the system admin user to create and manage data source definitions, then both the
DSD_ADMIN_USERNAMEandLINEAGE_ADMIN_USERNAMEparameters can use the same system admin username. -
If you want to run the migration in debug mode, set
LOG_LEVEL=debug. Otherwise, setLOG_LEVEL=info.
-
-
Create migration parameters
YAMLfile:MIGRATION_USER_BEARER_TOKEN=$(curl -i -s -k -X POST "https://${CP4D_HOST}/icp4d-api/v1/authorize" -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"username\":\"${MIGRATION_USERNAME}\",\"api_key\":\"${MIGRATION_USER_APIKEY}\"}" | grep '"token":' | grep -o '"token":\S*"' | awk -F , '{print$1}' | awk -F : '{print$2}' | tr -d '"') cd ${MDIWORK_DIR} cat <<EOF > mdi-lineage-mig-params.yaml mdi-lineage-migration-aux: MIGRATION_INSTANCE_NAME: ${MIGRATION_INSTANCE_NAME} MIGRATION_USER_BEARER_TOKEN: ${MIGRATION_USER_BEARER_TOKEN} DSD_ADMIN_USERNAME: ${DSD_ADMIN_USERNAME} LINEAGE_ADMIN_USERNAME: ${LINEAGE_ADMIN_USERNAME} EOF -
Run the export using migration parameters
YAMLfile:cd ${MDIWORK_DIR} cpd-cli export-import export create -c mdi-lineage-migration -n ${NAMESPACE} --profile=${CPD_PROFILE_NAME} --backoff-limit=0 -f mdi-lineage-mig-params.yaml ${MIGRATION_INSTANCE_NAME} --log-level=${LOG_LEVEL} -
Check the export status and confirm that migration is completed:
cpd-cli export-import export status -n ${NAMESPACE} ${MIGRATION_INSTANCE_NAME} --profile=${CPD_PROFILE_NAME}An example output:
cpd-cli export-import export status -n ${NAMESPACE} ${MIGRATION_INSTANCE_NAME} --profile=${CPD_PROFILE_NAME} Name: 14febtest02 Job Name: cpd-ex-14febtest02 Active: 0 Succeeded: 1 Failed: 0 Start Time: Fri, 14 Feb 2025 00:18:42 -0800 Completed At: Fri, 14 Feb 2025 00:21:20 -0800 Duration: 2m38s -
Get the import list:
cpd-cli export-import import list --profile=${CPD_PROFILE_NAME} -
Delete existing import if found in the above step:
OLD_IMPORT_NAME=<name of the existing import> cpd-cli export-import import delete ${OLD_IMPORT_NAME} -n ${NAMESPACE} --profile=${CPD_PROFILE_NAME} -
Run the import:
cd ${MDIWORK_DIR} cpd-cli export-import import create -n ${NAMESPACE} --profile=${CPD_PROFILE_NAME} -f mdi-lineage-mig-params.yaml ${MIGRATION_INSTANCE_NAME}im1 --backoff-limit 0 --log-level=${LOG_LEVEL} --from-export ${MIGRATION_INSTANCE_NAME} -
Check the import status and confirm that migration is completed:
cpd-cli export-import import status -n ${NAMESPACE} ${MIGRATION_INSTANCE_NAME}im1 --profile=${CPD_PROFILE_NAME}An example output:
cpd-cli export-import import status -n ${NAMESPACE} ${MIGRATION_INSTANCE_NAME}im1 --profile=${CPD_PROFILE_NAME} Name: 14febtest02im1 Job Name: cpd-im-14febtest02 Active: 0 Succeeded: 1 Failed: 0 Start Time: Fri, 14 Feb 2025 00:18:42 -0800 Completed At: Fri, 14 Feb 2025 00:24:20 -0800 Duration: 5m38s