Versions Compared

Key

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

Non-Replication Setup and Configuration Guide

...

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

...

Introduction

opHA-MB 5.X introduces the concept of a Primary & multiple Poller servers and a Message Bus:

...

For the terms used in this project together with their meanings, see https://docs.community.firstwave.com/wiki/spaces/opHA/pages/edit-v2/3164408853#Terminology.

Software Installation

Upgrade to opHA-MB 5.1.0 can be done from infrastructure

  • New to opHA/opHA-MB

  • Running opHA 4.X

1. Upgrade to opHA-5.1.0 with no opHA

1.1 Prerequisites

IMPORTANT: All the servers should be setup with the following

...

Poller1 Server: opha-poller1.opmantek.net

1.1.1 Editing the Role of the instance in opCommon.json

The default value of opha_role in opCommon.json is Standalone

...

  • “Main Primary”

  • “Poller”

  • “Mirror”

1.1.2 Installing opHA-MB license

Install the opHA-MB for NMIS & opCharts license on all the servers.

...

You need to enter a License Key in the Modules → opLicensing Enter License key as below on all the servers .

...

1.2 Download Software

Download the opHA 5 software onto each server.

1.3 Install Software

Run the installation commands on each server in the opHA cluster.

...

Code Block
languagejson
sudo sh ./opHA-MB-x86_64-5.0.0.run

1.4 Install Message Bus Software

The Message Bus software (NATS) has to be installed and configured.

...

Ensure you have added both opHA-MB for NMIS & opCharts and opHA-MB for opEvents licensesare added under opLicensing

1.5 NATS Setup

This configuration should be applied to the Main Primary server ONLY.

...

Code Block
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 
} 

1.6 MongoDB Setup (Main Primary Only)

The following steps should be performed on all the servers. only on the Main Primary MongoDB instance.

Initialize MongoDB Replica Set

Connect to MongoDB using the mongosh command:

...

Code Block
sudo systemctl restart mongod

1.7 Common opCommon.json Configuration for All Servers

1.7.1 Update /usr/local/omk/conf/opCommon.json

  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 FQDN and port to be utilized in the nats_server attribute, you can find this in the database section.

    Code Block
    languagejson
    "nats_server": "opha-primary1.opmantek.net"

    IMPORTANT

    Delete the following line from the opCommon.json file.

  3. Code Block
    languagejson
    "db_mongo_cluster": [],

1.8 Starting Services

1.8.1 Start NATS (on Main Primary Only)

Start the NATS service on the Main Primary server ONLY:

Code Block
sudo systemctl start nats-server

1.8.2 Restart FirstWave daemons on all servers

After configuration changes have been made, you will need to restart the relevant FirstWave module daemons applicable to your server.

...

Code Block
sudo systemctl restart nmis9d opchartsd opeventsd omkd

1.9 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.

1.10 Restart opHA service on the Main Primary

Code Block
sudo systemctl restart ophad

1.11 Start the Poller and Mirrors

Execute the following command on the poller and mirror servers.

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

1.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. Upgrade to opHA-5.1.0 from opHA 4.X

2.1 Prerequisites

IMPORTANT: All the servers should be setup with the following

...

Poller1 Server: opha-poller1.opmantek.net

2.1.1 Editing the Role of the instance in opCommon.json

The default value of opha_role in opCommon.json is Standalone

...

  • “Main Primary”

  • “Primary”

  • “Poller”

  • “Mirror”

2.1.2 Installing opHA-MB license

Install the opHA-MB for NMIS & opCharts license on the Main Primary server only.

...

You need to enter a License Key in the Modules → opLicensing as below on the Main Primary.

...

2.2 Download Software

Download the opHA 5 software onto each server.

2.3 Install Software

Run the installation commands on each server in the opHA cluster.

...

Code Block
languagejson
sudo sh ./opHA-Linux-x86_64-5.0.0.run

2.4 Install Message Bus Software

The Message Bus software (NATS) has to be installed and configured.

For this scenario, we do not need a MongoDB Arbiter, so use -y to answer yes to the two questions.

2.5 NATS Setup

This configuration should be applied to the Main Primary server ONLY.

...

Code Block
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 
} 

2.6 MongoDB Setup (Main Primary Only)

The following steps should be performed only on the Main Primary MongoDB instance.

2.7 Initialize MongoDB Replica Set

Connect to MongoDB using the mongosh command:

...

Code Block
systemctl restart mongod

2.8 Common Configuration for All Servers

2.8.1 Update /usr/local/omk/conf/opCommon.json

  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 FQDN and port to be utilized in the nats_server attribute, you can find this in the database section.

    Code Block
    languagejson
    "nats_server": "opha-primary1.opmantek.net"

    IMPORTANT

    Delete the following line from the opCommon.json file.

  3. Code Block
    languagejson
    "db_mongo_cluster": [],

2.9 Starting Services

2.9.1 Start NATS (on Main Primary Only)

Start the NATS service on the Main Primary server ONLY:

Code Block
sudo systemctl start nats-server

2.9.2 Restart mongod on Pollers and Mirrors only

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

Code Block
sudo systemctl restart mongod

2.9.3 Restart FirstWave daemons on all servers

After configuration changes have been made, you will need to restart the relevant FirstWave module daemons applicable to your server.

...

Proceed to the next step.

2.9.4 Restart opHA service on the Main Primary

Code Block
sudo systemctl restart ophad

2.10 Start the Poller and Mirrors

Execute the following command on the poller and mirror servers.

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

2.11 Final Steps

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

...