Upgrading Product Master Kubernetes or Red Hat OpenShift deployment

This topic explains the procedure to migrate Kubernetes or Red Hat® OpenShift® cluster.

Before you begin

Fix Pack 7 and later

Procedure

  1. Verify that the secret details are present by using the following command.
    # oc get secret  | grep ipm-registry
    # oc get secret  | grep 'app-secret\|tls-secret’
  2. Take backup of the existing release deployment files, customization, app-secret, random-secret, IBM Db2® database and MongoDB, and /opt/MDM/public_html folder of admin pod.
    To take backup of MongoDB proceed as follows:
    1. Go to the MongoDB pod by using the following command.
      # oc rsh productmaster-mongodb-5464cb968-qcnts
      Note: Get the MongoDB user and password through the random-secret file.
    2. Take the backup of the MongoDB database by using the following command.
      $cd /data/db
      $mongodump \ 
      --username <username> \
      --authenticationDatabase admin \ 
      --password <password> \ 
      -d <database_name>
      
    3. Download the /data/db/dump folder to your local machine by using the following command.
      oc rsync productmaster-mongodb-6975f78c4d-4hx5w:/data/db/dump .
  3. Check the CR name by using the following command.
    # oc get productmaster
    Note: You need to use the same CR name in the ipm_12.0.x_cr.yaml file.
  4. Update the ipm_12.0.x_cr.yaml file to make replica count of all pods to 0 and apply again.
  5. Confirm that all the pods are removed by using the following command.
    # oc get pods
  6. Optional: If you have created any manual ingress route for IBM Product Master, delete it by using the following command.
    # oc delete ingress <name>
  7. Check existing packagemanifest before applying subscription by using the following command.
    # oc describe packagemanifest productmaster-operator | grep -C3 "Default Channel"
  8. Update the new catalog source docker images into the catalog_source.yaml file. You can find the new image in the latest downloaded catalog_source.yaml file (IBM Product Master deployment files that are downloaded from the IBM Support Fix Central site).
  9. Apply the catalog_source.yaml file by using the following command.
    # oc apply -f catalog_source.yaml
    1. Verify creation of new pods starts by using the following command.
      # oc get pods
    2. Verify that the new catalog is created by using the following command.
      # oc get pods | grep catalog
    3. Verify that the packagemanifest is updated with the new channel version and operator image by using the following command.
      # oc describe packagemanifest productmaster-operator | grep -C3 "Default Channel"
  10. Update CSV or Operator controller. This step is required only if you have set the value of InstallPlanApproval to Manual because when the value is Automatic, subscription gets updated automatically.
  11. Add the volume details for the new magento and message-archive services as follows in your volumes.yaml file.
    
    kind: PersistentVolume
    apiVersion: v1
    metadata:
      name: magento-connector-log-volume
      namespace: default
      labels:
        svc: magento-connector-log-volume
    spec:
      capacity:
        storage: 2Gi
      accessModes:
        - ReadWriteOnce
      storageClassName: standard
      hostPath:
        path: /mnt/ipm12/magento-connector
    
    You can copy this message block also from the volumes.yaml file downloaded from the IBM Support Fix Central site).

What to do next

Upgrade IBM Product Master by using the newly downloaded ipm_12.0.x_cr.yaml file as follows.

  1. Update the storage class to the same value as used in the IBM Product Master your current fix pack deployment.
  2. Optional:If you are using own registry, update the value of the image > registry.
  3. Ensure that the CR name for both releases is the same.
    
    apiVersion: productmaster.ibm.com/v1
    kind: ProductMaster
    metadata:
      name: <CR name>
    
  4. Update all the changes that you need in your new CR including storage type including the new service for Magento Connector.
  5. Enable feature that are required and mark rest of 0 so that associated pods don't come up and consume CPU and Memory. For more information, see con_oper_custmfeature.html.
  6. Apply the CR file. After all the pods are up and running, you can log in to the IBM Product Master by using the same login URLs that you used for the IBM Product Master your current fix pack version.
  7. If you are using dynamic volume provisioning then you need to perform following steps for MongoDB backup and restore. You need to restore the MongoDB database that you backed up in the MongoDB backup section.
    1. Copy dump into the /data/db folder of the MongoDB pod by using the following command.
      # oc rsync dump productmaster-mongodb-0:/data/db
    2. Restore the MongoDB database by using the following command.
      $ mongorestore 
      --username <username> \  
      --authenticationDatabase admin \
      --password <password> \  
      /data/db/dump
      
  8. Performing database migration.
    1. Access the productmaster-admin-<container-name> pod by using the following command.
      # oc rsh productmaster-admin-<container-name>
    2. Run the migrateToInstalledFP.sh script file in the $TOP/bin/migration folder by using the following command.
      migrateToInstalledFP.sh 
      --fromversion=<fixpackversion>
      
  9. Fix Pack 6If you had done the customization by creating custom images, then to get your customizations, you now need to follow Customizing the containerized deployment instructions.