(Click to open topic with navigation)
Moab HPC Suite 9.1.0 and after requires MongoDB 3.2.x. On each host on which MongoDB is installed, check the installed version of MongoDB to see if it needs to be upgraded. You can check the version of MongoDB installed by running the following command:
[root]# rpm -qa | grep mongo
In order to upgrade the MongoDB databases, you must stop all services first. These instructions assume that you have all the MongoDB databases on the same host (for example, the Database Host). If you have installed the MongoDB databases on separate hosts (for example, the Insight MongoDB on the Insight Server Host), you will have to go to each host to stop the services before you can upgrade any of the MongoDB databases.
If MongoDB is at a version prior to 3.2, do the following:
Stop all the services that use MongoDB. See the warning at the beginning of this topic.
[root]# systemctl stop nitro-web-services.service # If Nitro Web Services is part of your configuration [root]# systemctl stop tomcat.service # If MWS is part of your configuration [root]# systemctl stop insight.service # If Insight is part of your configuration [root]# systemctl stop moab.service
Confirm that nothing is connected to MongoDB.
[root]# netstat -antp | egrep '(27017|28017).*ESTABLISHED'
Dump the database.
[root]# cd /root [root]# mongodump -u admin_user -p secret1 [root]# cp -a dump dump.save [root]# rm -rf dump/admin/system.users.* # Cannot restore users.
Install MongoDB 3.2.x.
[root]# systemctl stop mongodb.service [root]# systemctl disable mongodb.service [root]# rpm -e --nodeps $(rpm -qa 'mongo*') [root]# rm -rf /tmp/mongo*.sock /var/run/mongo* /var/lib/mongo* /var/log/mongo* [root]# zypper -n install mongodb-org [root]# systemctl enable mongod.service [root]# systemctl start mongod.service
Restore the database.
[root]# cd /root [root]# mongorestore
Create the users.
The "admin_user" is required. All other users are required only for the products that are part of your system configuration. For example, if Nitro Web Services is not part of your confirmation, you do not need to add the "nitro_user".
[root]# mongo use admin db.createUser({"user": "admin_user", "pwd": "secret1", "roles": ["root"]}) use moab db.createUser({"user": "moab_user", "pwd": "secret2", "roles": ["dbOwner"]}) db.createUser({"user": "mws_user", "pwd": "secret3", "roles": ["read"]}) db.createUser({"user": "insight_user", "pwd": "secret4", "roles": ["read"]}) use mws db.createUser({"user": "mws_user", "pwd": "secret3", "roles": ["dbOwner"]}) use insight db.createUser({"user": "insight_user", "pwd": "secret4", "roles": ["dbOwner"]}) db.createUser({"user": "mws_user", "pwd": "secret3", "roles": ["read"]}) use nitro-db db.createUser({"user": "nitro_user", "pwd": "secret5", "roles": ["dbOwner"]}) exit
Set MongoDB Configuration Options.
By default, /etc/mongod.conf sets net.bindIp to 127.0.0.1. You will need to change this setting if the MongoDB server needs to be accessible from other hosts or from other interfaces besides loopback. See https://docs.mongodb.com/manual/reference/configuration-options/#net-options for more information.
# Sample /etc/mongod.conf file net: port: 27017 # bindIp: 127.0.0.1 processManagement: fork: true pidFilePath: /var/run/mongodb/mongod.pid security: authorization: enabled storage: dbPath: /var/lib/mongo journal: enabled: true systemLog: destination: file logAppend: true path: /var/log/mongodb/mongod.log
Restart MongoDB.
[root]# systemctl restart mongod.service