Step-2 Upgrading MongoDB
This section discusses the steps to upgrade the MongoDB.
Before you begin
Make sure the following prerequisites are met:
-
All ABS instances must be stopped and there should be no reads or writes occurring during the upgrade.
-
A backup of all the 3 databases has been taken:
abs_data,abs_midata,abs_metadata -
All the MongoDB nodes in the replica set must be online and reachable.
| It is recommended to retain only 10-days of data in order to facilitate a fast upgrade process. |
About this task
|
Run this upgrade only on one of the ABS nodes. Extract the upgrade scripts from the PingIntelligence upgrade package as explained in Common upgrade tasks section. |
Complete the following steps to upgrade MongoDB:
Steps
-
On any one of the ABS nodes, create a Mongo upgrade directory:
# mkdir <Mongo upgrade directory>
-
Navigate to
~/pi-tmp/pingidentity/upgrade/mongoon the machine where you downloaded the upgrade package, and copy themongo_upgrade_tool_5.1.tar.gzpackage and place it in<Mongo upgrade directory>diectory that your created in the previous step..# cd ~/pi-tmp/pingidentity/upgrade/mongo/ # cp mongo_upgrade_tool_5.1.tar.gz <Mongo upgrade directory>/.
-
In the
<Mongo upgrade directory>directory on the ABS node, extract the Mongo upgrade tool:tar xvf mongo_upgrade_tool_5.1.tar.gz
-
Stop ABS on all nodes by entering the following command.
# /<ABS installation path>/pingidentity/abs/bin/stop.sh
For example:
# /home/pi-user/pingidentity/abs/bin/stop.sh
If ABS is running as a service, then run the following command.
# systemctl stop pi-abs.service
Repeat this procedure for each ABS node. -
Edit
config/upgrade.propertiesand customize the properties to comply with your environment.The purpose of each property is described in the
config/upgrade.propertiesfile. -
Place the master key in
config/abs_master.key.The master key is needed to read and deobfuscate the Mongo credentials from the
abs.propertiesfile on the ABS node. -
Navigate to the
<Mongo upgrade directory>/pingidentity/mongo_upgrade_tool/directory and run the mongo upgrade script.# bin/upgrade.sh
For example:
# bin/upgrade.sh please see /var/tmp/mongo_upgrade/pingidentity/mongo_upgrade_tool/logs/upgrade.log for upgrade log
-
To verify the successful status of the upgrade see the
data/status.jsonfile.A successful upgrade should look like this:
{ "startTime" : "2022_01_12-10_10_08", "endTime" : "2022_01_12-10_10_10", "status" : "abs upgrade tool has finished successfully" }If the success status is not returned, send the
logs/upgrade.loglogfile to Ping Identity support.
Next steps
Proceed to Step-3 Upgrading ABS AI Engine. IMPORTANT: Only after successful upgrade of MongoDB, proceed with ABS upgrade.