Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The default value of opha_role in opCommon.json is Standalone

Code Block
breakoutModewide
breakoutWidth760
shankarn@opha-dev7:~$ grep opha_role /usr/local/omk/conf/opCommon.json
      "opha_role" : "Standalone",

...

All the following setup commands in this setup should be run as the root user

Code Block
breakoutModewide
breakoutWidth760
languagejson
sh ./<executable>

e.g

Code Block
breakoutModewide
breakoutWidth760
languagejson
sudo sh ./opHA-Linux-x86_64-5.1.0.run

...

db_mongo_cluster is cluster of ‘Main Primary’ and ‘Secondary Primary’

Code Block
breakoutModewide
breakoutWidth760
languagejson
"database" : {
    "db_replica_set": "rs1", 
    "db_mongo_cluster": [ "opha-dev1.opmantek.net", "opha-dev6.opmantek.net" ], 
    "nats_num_replicas": 3, 
    "nats_cluster": [ "opha-dev1.opmantek.net", "opha-dev2.opmantek.net", "opha-dev6.opmantek.net" ]
  }

...

Run the following command

Code Block
breakoutModewide
breakoutWidth760
mongosh --username opUserRW --password op42flow42 admin

Add the main-primary and secondary-primary to the below command and run it

Code Block
breakoutModewide
breakoutWidth760
rs.initiate({ _id: "rs1", version: 1, members: [ { _id: 0, host : "opha-dev1.opmantek.net:27017", priority: 2 }, { _id: 1, host : "opha-dev6.opmantek.net:27017", priority: 1 } ] })

...

Run the following command to set the default write concern:

Code Block
breakoutModewide
breakoutWidth760
db.adminCommand({ "setDefaultRWConcern": 1, "defaultWriteConcern": { "w": 1 } })

...

Run the following command to add an arbiter to the replica set:

Code Block
breakoutModewide
breakoutWidth760
rs.addArb("opha-dev2.opmantek.net:27018")

...

Run the following command on the Main Primary, Secondary Primary, and Arbiter servers ONLY:

sudo systemctl
Code Block
breakoutModewide
breakoutWidth760
sudo systemctl restart mongod

Starting Services

...

Start the NATS service on the Main Primary, Secondary Primary, and Arbiter servers ONLY:

Code Block
breakoutModewide
breakoutWidth760
systemctl start nats-server

...

After configuration changes, restart mongod on all Mirrors and Pollers servers ONLY:

Code Block
breakoutModewide
breakoutWidth760
systemctl restart mongod

Restart services on all servers

...

For example if you have NMIS9, opCharts, opEvents and opHA 5 installed you would execute as follows:

Code Block
breakoutModewide
breakoutWidth760
systemctl restart nmis9d opchartsd opeventsd omkd ophad

Discover the Peers

Click on Peers in opHA-MB portal on the Main Primary (http://<fqdn of Main Primary>/en/omk/opHA/peers)

...

Proceed to next step after discovering all the Peers.

Synchronize the Primary collections with Poller

  1. For all the opHA Peers, go to opHA Peers page click on “Sync all nodes” followed by “Pull Peer Data”

    Screenshot 2025-09-19 at 12.57.41.pngImage Added

Start the Poller and Mirrors

Execute the following command on the poller and mirror servers.

...

servers.

Code Block
breakoutModewide
breakoutWidth760
cd /usr/local/omk/bin
./ophad cmd producer start

...

  1. Accept EULAs: Make sure when you login to each server to confirm that all End User License Agreements (EULAs) are accepted.

Discover the Peers

Click on Peers in opHA-MB portal on the Main Primary (http://<fqdn of Main Primary>/en/omk/opHA/peers)

...

  1. .

...

Upgrade to opHA-5.1.0 from opHA 4.X

...

The default value of opha_role in opCommon.json is Standalone

Code Block
breakoutModewide
breakoutWidth760
shankarn@opha-dev7:~$ grep opha_role /usr/local/omk/conf/opCommon.json
      "opha_role" : "Standalone",

...

All the following setup commands in this setup should be run as the root user

...

root user

Code Block
breakoutModewide
breakoutWidth760
languagejson
sh ./<executable>

e.g

Code Block
breakoutModewide
breakoutWidth760
languagejson
sh ./opHA-Linux-x86_64-5.1.0.run

...

Update /usr/local/omk/conf/opCommon.json for Main Primary and Secondary Primary only

Code Block
breakoutModewide
breakoutWidth760
languagejson
"db_replica_set": "rs1", 
"db_mongo_cluster": [ "opha-dev1.opmantek.net", "opha-dev6.opmantek.net" ], 
"nats_num_replicas": 3, 
"nats_cluster": [ "opha-dev1.opmantek.net", "opha-dev2.opmantek.net", "opha-dev6.opmantek.net" ]

...

Run the following command

Code Block
breakoutModewide
breakoutWidth760
mongosh --username opUserRW --password op42flow42 admin

Add the main-primary and secondary-primary to the below command and run it

Code Block
breakoutModewide
breakoutWidth760
rs.initiate({ _id: "rs1", version: 1, members: [ { _id: 0, host : "opha-dev1.opmantek.net:27017", priority: 2 }, { _id: 1, host : "opha-dev6.opmantek.net:27017", priority: 1 } ] })

...

Run the following command to set the default write concern:

Code Block
breakoutModewide
breakoutWidth760
db.adminCommand({ "setDefaultRWConcern": 1, "defaultWriteConcern": { "w": 1 } })

...

Run the following command to add an arbiter to the replica set:

Code Block
breakoutModewide
breakoutWidth760
rs.addArb("opha-dev2.opmantek.net:27018")

...

Run the following command on the Main Primary, Secondary Primary, and Arbiter servers ONLY:

Code Block
breakoutModewide
breakoutWidth760
sudo systemctl restart mongod

...

Start the NATS service on the Main Primary, Secondary Primary, and Arbiter servers ONLY:

...

servers ONLY:

Code Block
breakoutModewide
breakoutWidth760
systemctl start nats-server

...

After configuration changes, restart mongod on all Mirrors and Pollers servers ONLY:

Code Block
breakoutModewide
breakoutWidth760
systemctl restart mongod

Restart services on all servers

...

For example if you have NMIS9, opCharts, opEvents and opHA 5 installed you would execute as follows:

Code Block
breakoutModewide
breakoutWidth760
systemctl restart nmis9d opchartsd opeventsd omkd

...

Proceed to next step after discovering all the Peers.

Synchronize the Primary collections with Poller

  1. For all the opHA Peers, go to opHA Peers page click on “Sync all nodes” followed by “Pull Peer Data”

    Screenshot 2025-09-19 at 12.57.41.pngImage Added

Restart opHA service on the Main Primary

Code Block
breakoutModewide
breakoutWidth760
sudo systemctl restart ophad

...

Execute the following command on the poller and mirror servers.

Code Block
breakoutModewide
breakoutWidth760
cd /usr/local/omk/bin
./ophad cmd producer start

...