opHA-MB priming script on new installs and upgrades
New Installation Process
1. Initial Setup
Download the opHA-MB 5.0 installation package
Run the installer as root:
sh ./opHA-Linux-x86_64-5.0.0.run
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
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
The postinstall-ophamb-prime script will have already configured most MongoDB settings
Additional steps for Main Primary:
Initialize replica set
Configure write concern
Add arbiter node
For Pollers/Mirrors:
Initialize MongoDB replication
4. opCommon.json Configuration
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
Start NATS on cluster nodes:
systemctl start nats-server
Restart MongoDB:
systemctl restart mongod
Start streaming services on Pollers/Mirrors:
Upgrade Process
1. Pre-upgrade Steps
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
Document current server roles and configurations
2. Upgrade Installation
Run the upgrade installer:
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
Run configuration comparison:
4. Service verification
Follow the same service start sequence as new installation
Verify streaming status:
Verification Steps (Both New Install and Upgrade)
Check NATS cluster status:
Verify MongoDB replication:
Confirm streaming status:
Verify data synchronization between nodes
Troubleshooting
If streaming fails to start:
Check NATS connectivity
Verify MongoDB replication status
Review ophad logs:
/usr/local/omk/log/ophad.log
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