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
breakoutWidth1800
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
breakoutWidth1800
languagejson
sudo sh ./<executable>

e.g

Code Block
breakoutModewide
breakoutWidth1800
languagejson
sudo sh ./opHA-MB-x86_64-5.1.0.run

...

  1. Edit Configuration: Update the /etc/nats-server.conf file with the following settings:

    1. Change the server_name to the name of your Main Primary server.

    2. Remove or comment out the cluster section, so that this remains:

Code Block
breakoutModewide
breakoutWidth1800
languagejson
server_name: "opha-primary1.opmantek.net"  #The local server  
http_port: 8222 
listen: 4222 
jetstream: enabled 

#tls {
#    cert_file: "<path>"
#    key_file:  "<path>"
#    #ca_file:   "<path>"
#    verify: true
#}

log_file: "/var/log/nats-server.log"

accounts { 
  $SYS { 
    users: [ 
      { user: "admin",
        pass: "password" 
      } 
    ] 
  } 
  ophad: { 
    users: [ 
        { user: "omkadmin", password: "op42opha42" } 
    ] 
    jetstream: enabled 
  } 
} 

jetstream { 
  store_dir: "/opt/nats/storage" 
  max_memory_store: 1028M 
  max_file_store: 1028M 
} 

...

Run the following command

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

...

Note:- On Poller and Mirror, if Mongo has automatically initiated and you see ‘rs0 [direct: primary] admin>’ at the Mongo shell prompt, you can skip the steps below and exit from Mongo Shell.

Code Block
breakoutModewide
breakoutWidth1800
rs.initiate()
exit

Restart mongod

Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl restart mongod

...

Start the NATS service on the Main Primary server ONLY:

sudo
Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl start nats-server

...

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

Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl restart nmis9d opchartsd opeventsd omkd

...

Proceed to next step after discovering all the Peers.

1.10 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”

1.11 Restart opHA service on the Main Primary

Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl restart ophad

1.

...

12 Start the Poller and Mirrors

Execute the following command on the poller and mirror servers.

sudo
Code Block
breakoutModewide
breakoutWidth1800
sudo /usr/local/omk/bin/ophad cmd producer start

1.

...

13 Final Steps

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

...

The default value of opha_role in opCommon.json is Standalone

Code Block
breakoutModewide
breakoutWidth1800
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
breakoutWidth1800
languagejson
sudo sh ./<executable>

e.g

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

...

  1. Edit Configuration: Update the /etc/nats-server.conf file with the following settings:

    1. Change the server_name to the name of your Main Primary server.

    2. Remove or comment out the cluster section, so that this remains:

Code Block
breakoutModewide
breakoutWidth1800
languagejson
server_name: "opha-primary1.opmantek.net"  #The local server  
http_port: 8222 
listen: 4222 
jetstream: enabled 

#tls {
#    cert_file: "<path>"
#    key_file:  "<path>"
#    #ca_file:   "<path>"
#    verify: true
#}

log_file: "/var/log/nats-server.log"

accounts { 
  $SYS { 
    users: [ 
      { user: "admin",
        pass: "password" 
      } 
    ] 
  } 
  ophad: { 
    users: [ 
        { user: "omkadmin", password: "op42opha42" } 
    ] 
    jetstream: enabled 
  } 
} 

jetstream { 
  store_dir: "/opt/nats/storage" 
  max_memory_store: 1028M 
  max_file_store: 1028M 
} 

...

Run the following command

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

Then run the following commands, to initiate a MongoDB Replica Set for streaming database changes.

Code Block
breakoutModewide
breakoutWidth1800
rs.initiate()
exit

Restart mongod

systemctl
Code Block
breakoutModewide
breakoutWidth1800
systemctl restart mongod

2.8 Common Configuration for All Servers

...

Start the NATS service on the Main Primary server ONLY:

Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl start nats-server

...

After configuration changes, restart mongod on all Poller and Mirror servers ONLY:

Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl restart mongod

...

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

Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl restart nmis9d opchartsd opeventsd omkd ophad

...

2.9.4 Restart opHA service on the Main Primary

Code Block
breakoutModewide
breakoutWidth1800
sudo systemctl restart ophad

2.10

...

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”. Please refer to https://docs.community.firstwave.com/wiki/spaces/opHA/pages/3272605706/opHA-MB+5.0+User+Guide#Scenario-1-%3A-Using-opHA4-‘Pull’-on-Primary-to-synchronize-nmisng-collections for more details.

    Screenshot 2025-09-19 at 12.53.34.pngImage Added

2.11 Start the Poller and Mirrors

Execute the following command on the poller and mirror servers.

Code Block
breakoutModewide
breakoutWidth1800
sudo /usr/local/omk/bin/ophad cmd producer start

Please refer to opHA-MB 5.0 User Guide

2.

...

12 Final Steps

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

  2. Ensure that all servers are configured to use the same timezone by using chronyc tracking. Steps to sync time :

    1. sudo timedatectl set-timezone Australia/Sydney

    2. sudo apt update

    3. sudo apt install chrony -y

    4. chronyc tracking

...