Upgrading the MongoDB embedded services
Prepare the MongoDB database of IBM Automation Decision Services or IBM Automation Document Processing for the upgrade to 24.0.0.
About this task
You need to check the MongoDB featureCompatibilityVersion (FCV) version before
you upgrade to 24.0.0. If the MongoDB
featureCompatibilityVersion (FCV) version is 4.4, you need to upgrade the MongoDB
featureCompatibilityVersion (FCV) version to 5.0.
Follow the steps in the Procedure section to upgrade the MongoDB
featureCompatibilityVersion (FCV) version to 5.0 for IBM Automation Decision Services or IBM Automation Document Processing.
Procedure
-
Identify a running pod of the MongoDB service that is in use by IBM Automation Decision Services or IBM Automation Document Processing. Depending on the
capability you installed, the pod name might vary. Run the following command to generate a list of pods.
oc get pods | grep mongoThe following example command identifies the MongoDB pod asicp4adeploy-mongo-deploy-6c78656bd4-gh7dt.oc get pods | grep mongo icp4adeploy-mongo-deploy-6c78656bd4-gh7dt 1/1 Running 0 142mNote: You can ignore theicp-mongopods and themongo operatorpod as they are related to Cloud Pak foundational services and you do not need to upgrade them manually. - Check the version of MongoDB
featureCompatibilityVersion(FCV) version.- For 21.0.3-IF031 or laterRun the following commands.
oc get pods | grep mongo-deploy oc exec icp4adeploy-mongo-deploy-<podID> -- bash -c 'mongo --norc --tls --tlsAllowInvalidCertificates -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval "db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1})"'If the MongoDB
featureCompatibilityVersionversion is 4.4, you need to set thefeatureCompatibilityVersionversion to 5.0.If the MongoDB
featureCompatibilityVersionversion is 5.0, you can skip the following steps. - From 24.0.0-IF001 For 22.0.2-IF006
- Run the following commands.
oc get pods | grep mongo-deploy oc exec icp4adeploy-mongo-deploy-<podID> -- bash -c 'mongo --norc --tls --tlsAllowInvalidCertificates -u <Mongo-username> -p <Mongo-password> --eval "db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1})"'Where <Mongo-username> is the value from file /etc/credentials/admin/MONGO_ROOT_USERNAME and <Mongo-password> is the value from file /etc/credentials/admin/MONGO_ROOT_PASSWORD. You can find the
MONGO_ROOT_USERNAMEandMONGO_ROOT_PASSWORDfiles in the Mongo pod. - Upgrade the MongoDB version to 5.0.15 by manually adding the following to the custom resource
YAML file and the operator upgrades the Mongo deployment.The following custom resource file is for IBM Automation Document Processing.
ecm_configuration: document_processing: mongo: image: repository: cp.icr.io/cp/cp4a/iadp/mongo_adp tag: 5.0.15The following custom resource file is for IBM Automation Decision Services.ads_configuration: mongo: image: repository: cp.icr.io/cp/cp4a/ads/mongo tag: 5.0.15Note: After you update the custom resource, wait for the Operator to upgrade themongo-deploypod before you go to the next step. It might take 20 minutes or longer. You can monitor whether the pod is updated by running the following command periodically and noting the AGE of the pod.oc get pods | grep mongo-deploy
- Run the following commands.
- For 21.0.3-IF031 or later
- Set the MongoDB
featureCompatibilityVersion(FCV) version to 5.0.- For 21.0.3-IF031 or laterRun the following command.
oc exec icp4adeploy-mongo-deploy-<podID> -- bash -c 'mongo --norc --tls --tlsAllowInvalidCertificates -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval "db.adminCommand({ setFeatureCompatibilityVersion: \"5.0\" })"' - From 24.0.0-IF001 For
22.0.2-IF006Run the following command.
oc exec icp4adeploy-mongo-deploy-<podID> -- bash -c 'mongo --norc --tls --tlsAllowInvalidCertificates -u <Mongo-username> -p <Mongo-password> --eval "db.adminCommand({ setFeatureCompatibilityVersion: \"5.0\" })"'Where <Mongo-username> is the value from file /etc/credentials/admin/MONGO_ROOT_USERNAME and <Mongo-password> is the value from file /etc/credentials/admin/MONGO_ROOT_PASSWORD. You can find the
MONGO_ROOT_USERNAMEandMONGO_ROOT_PASSWORDfiles in the Mongo pod.
If the command is successful, the last line of the output is
{ "ok" : 1 }. - For 21.0.3-IF031 or later
- Verify that the MongoDB
featureCompatibilityVersion(FCV) version is updated to 5.0.- For 21.0.3-IF031 or laterRun the following command.
oc exec icp4adeploy-mongo-deploy-<podID> -- bash -c 'mongo --norc --tls --tlsAllowInvalidCertificates -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval "db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1})"' - From 24.0.0-IF001 For
22.0.2-IF006Run the following command.
oc exec icp4adeploy-mongo-deploy-<podID> -- bash -c 'mongo --norc --tls --tlsAllowInvalidCertificates -u <Mongo-username> -p <Mongo-password> --eval "db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1})"'Where <Mongo-username> is the value from file /etc/credentials/admin/MONGO_ROOT_USERNAME and <Mongo-password> is the value from file /etc/credentials/admin/MONGO_ROOT_PASSWORD. You can find the
MONGO_ROOT_USERNAMEandMONGO_ROOT_PASSWORDfiles in the Mongo pod.Important: After you verified that the MongoDBfeatureCompatibilityVersion(FCV) version is updated to 5.0, you need to remove the image tag that you added in step 2 for both IBM Automation Document Processing and IBM Automation Decision Services from the 24.0.0-IF001 custom resource before you start the upgrade.
- For 21.0.3-IF031 or later