Versions Compared

Key

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

...

  1. Backup Configuration: Make a backup copy of the opCommon.json file before making any changes.

  2. Add NATS Server Configuration: Ensure the following configuration is included in opCommon.json on all servers. In the below example we have added the main-primary in the nats_server string int the “database“ json object

    Code Block
    languagejson
    "nats_server": "opha-dev1.opmantek.net:4222"

4. Server-Specific Configuration

4.2 Update License

Currently there are 2 available licenses and messagebus will not run without a license.

  1. opHA-MB for NMIS & opCharts (This license is required for messagebus to run)

  2. opHA-MB for opEvents (This license is an add-on for opEvents)

    image-20241107-234837.pngImage Removed

...

5. MongoDB Setup (Main-Primary Only)

...

Run the following command

Code Block
rs.initiate({})

...

4.2

...

Run the following command to set the default write concern:

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

5.3 Add Arbiter

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

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

...

Update License

Currently there are 2 available licenses and messagebus will not run without a license.

  1. opHA-MB for NMIS & opCharts (This license is required for messagebus to run)

  2. opHA-MB for opEvents (This license is an add-on for opEvents)

    image-20241107-234837.pngImage Added

...

5.2 Restart mongod on the Main-Primary and Second-Primary

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

...

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

Code Block
systemctl start nats-server

...

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

8. Switching Main and Secondary Primary Servers

To switch from Main-Primary to Secondary Primary, follow these steps:

  1. Connect to MongoDB:

    Code Block
    mongosh --username opUserRW --password op42flow42 admin
  2. Update member priorities:

    Code Blockcfg = rs.conf() cfg.members[0].priority = 0.6 cfg.members[1].priority = 0.5 rs.reconfig(cfg)

...