Preparing to upgrade Product Master service

Before you upgrade the Product Master service from the IBM Cloud Pak for Data 5.1.x to 5.2 you must meet the following requirements.

  1. You need to take a backup of your existing MongoDB database. Complete the task listed in the Backup MongoDB database section.
  2. You need to take a backup of your existing app-secret file. Complete the task listed in the Backup app-secret file section.
  3. Update Db2 database password.
  4. To use the Free text feature, you need to install OpenSearch on the Red Hat® OpenShift® Container Platform. For more information, see Installing OpenSearch on the Red Hat OpenShift Container Platform.

Backup MongoDB database

This is a mandatory step for upgrading the Product Master service from the IBM Cloud Pak for Data 5.1.x to 5.2 .

  1. In the Product Master instance of the Red Hat OpenShift Container Platform go to Secret > app-secret to view the name, user and password of the instance.
  2. Go to the MongoDB pod.
    # oc rsh productmaster-mongodb-5464cb968-qcnts
  3. Verify the credentials you have detected in the Step 1.
    sh-4.4$ mongo
    MongoDB shell version v4.0.22
    connecting to: mongodb://<ipadress>:<portnumber>/?gssapiServiceName=mongodb
    Implicit session: session { "id" : UUID("<>") }
    MongoDB server version: 4.0.22
    Welcome to the MongoDB shell.
    For interactive help, type "help".
    For more comprehensive documentation, see
            http://docs.mongodb.org/
    Questions? Try the support group
            http://groups.google.com/group/mongodb-user
    2022-06-03T06:11:40.980+0000 I STORAGE  [main] In File::open(), ::open for '//.mongorc.js' failed with Permission denied
    > use admin
    switched to db admin
    > db.auth('<username>','<password>')
    1
    > show dbs;
    admin   0.000GB
    config  0.000GB
    local   0.000GB
    mldb2   0.000GB
    
  4. Run the following command to take the backup of the MongoDB database (mldb2).
    $cd /data/db
    $mongodump \ 
    --username <username> \
    --authenticationDatabase admin \ 
    --password <password> \ 
    -d mldb2
  5. Run the following command to download the /data/db/dump folder to your local machine.
    oc rsync productmaster-mongodb-6975f78c4d-4hx5w:/data/db/dump .
    Sample output
    # ls | grep dump dump

Backup app-secret file

This is a mandatory step for upgrading the Product Master service from the IBM Cloud Pak for Data 5.1.x to 5.2 .

Copy and rename app-secret as random-secret since the Product Master service in the IBM Cloud Pak® for Data 5.2 version fetches some values from the file.
  1. In the Product Master instance of the Red Hat OpenShift Container Platform, run the following command.
    oc project <NAMESPACE>
    oc get secret app-secret -o json | jq '.metadata.name = "random-secret"' | jq 'del(.metadata.ownerReferences)' | oc create -f –
    

Update Db2® database password

This is a mandatory step for upgrading the Product Master service from the IBM Cloud Pak for Data 5.1.x to 5.2 .

  1. In the instance of the Red Hat OpenShift Container Platform, go to Secret > app-secret > Action > Edit Secret.
  2. Update the value of the Key with your current database password.

What to do next

  1. To use the Digital Asset Management (DAM) or Machine learning (ML) features of the Product Master service, you need to install MongoDB. For more information, see Installing MongoDB for Product Master.
  2. Proceed with the Product Master service upgrade. For more information, see Upgrading Product Master.