/
opHA-MB priming script on new installs and upgrades

opHA-MB priming script on new installs and upgrades

New Installation Process

1. Initial Setup

  1. Download the opHA-MB 5.0 installation package

  2. Run the installer as root:

    sh ./opHA-Linux-x86_64-5.0.0.run
  3. During installation, you will be prompted at the end of application installation with "Do you want to skip running the postinstall-ophamb-prime script?":

    • For new installations: Answer 'n' to run the script (default 'y' will skip it, so that unattended installations do not run the ophamb-postinstall-prime.sh script)

    • The script sets up crucial message bus configurations and should only be run once during initial setup

    • If this is your designated arbiter server, answer 'n' when prompted about arbiter setup during the prime script execution

2. NATS Configuration

  1. Configure NATS on Main Primary, Secondary Primary (if applicable), and Arbiter:

    • Edit /etc/nats-server.conf

    • Set server_name to local server FQDN

    • Configure cluster settings with all participating server FQDNs

    • Set up user authentication

    • Enable JetStream

3. MongoDB Configuration

  1. The postinstall-ophamb-prime script will have already configured most MongoDB settings

  2. Additional steps for Main Primary:

    • Initialize replica set

    • Configure write concern

    • Add arbiter node

  3. For Pollers/Mirrors:

    • Initialize MongoDB replication

4. opCommon.json Configuration

  1. Update /usr/local/omk/conf/opCommon.json on all servers, the ophamb-postinstall-prime.sh script will add all the new required fields:

    • Configure NATS cluster settings

    • Set database replica settings

    • Configure MongoDB cluster settings

    • Update streaming applications settings

5. Start Services

  1. Start NATS on cluster nodes:

    systemctl start nats-server
  2. Restart MongoDB:

    systemctl restart mongod
  3. Start streaming services on Pollers/Mirrors:

Upgrade Process

1. Pre-upgrade Steps

  1. Backup all configuration files (the opha installer will automatically backup anything in /usr/local/omk and copy it to root’s home directory):

    • /usr/local/omk/conf/opCommon.json

    • /etc/mongod.conf

    • /etc/nats-server.conf

  2. Document current server roles and configurations

2. Upgrade Installation

  1. Run the upgrade installer:

  2. When prompted "Do you want to skip running the postinstall-ophamb-prime script?":

    • Select 'y' (default) or press Enter to skip

    • This script should only be run once during initial installation

    • If already running message bus, running this again will disrupt existing configurations

3. Configuration Updates

  1. Run configuration comparison:

4. Service verification

  1. Follow the same service start sequence as new installation

  2. Verify streaming status:

Verification Steps (Both New Install and Upgrade)

  1. Check NATS cluster status:

  2. Verify MongoDB replication:

  3. Confirm streaming status:

  4. Verify data synchronization between nodes

Troubleshooting

  1. If streaming fails to start:

    • Check NATS connectivity

    • Verify MongoDB replication status

    • Review ophad logs: /usr/local/omk/log/ophad.log

  2. Common issues:

    • Firewall blocking NATS ports (4222, 6222, 8222)

    • MongoDB authentication issues

    • Incorrect server role configuration in opCommon.json

Important Notes

  • The postinstall-ophamb-prime script is a one-time setup tool for message bus initialization

  • For upgrades, skip running the prime script to preserve existing configurations

  • Always backup configurations before making changes

  • Monitor system logs during configuration changes

Related content

opHA-MB 5.0 Upgrade (Non-Replication)
opHA-MB 5.0 Upgrade (Non-Replication)
More like this
opHA 3 - Centralised configuration
opHA 3 - Centralised configuration
More like this
opHA 3 cli tool
opHA 3 cli tool
More like this
opConfig 3 Installation Guide
opConfig 3 Installation Guide
More like this
opHA Message Bus Troubleshooting
opHA Message Bus Troubleshooting
More like this
opEvents Installation Guide
opEvents Installation Guide
More like this