...
The default value of opha_role in opCommon.json is Standalone
| Code Block | ||||
|---|---|---|---|---|
| ||||
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 | ||||||
|---|---|---|---|---|---|---|
| ||||||
sh ./<executable> |
e.g
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
sudo sh ./opHA-Linux-x86_64-5.1.0.run |
...
db_mongo_cluster is cluster of ‘Main Primary’ and ‘Secondary Primary’
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
"database" : {
"db_replica_set": "rs1",
"db_mongo_cluster": [ "opha-dev1.opmantek.net", "opha-dev6.opmantek.net" ],
"nats_num_replicas": 3,
"nats_cluster": [ "opha-dev1.opmantek.net", "opha-dev2.opmantek.net", "opha-dev6.opmantek.net" ]
} |
...
Run the following command
| Code Block | ||||
|---|---|---|---|---|
| ||||
mongosh --username opUserRW --password op42flow42 admin |
Add the main-primary and secondary-primary to the below command and run it
| Code Block | ||||
|---|---|---|---|---|
| ||||
rs.initiate({ _id: "rs1", version: 1, members: [ { _id: 0, host : "opha-dev1.opmantek.net:27017", priority: 2 }, { _id: 1, host : "opha-dev6.opmantek.net:27017", priority: 1 } ] }) |
...
Run the following command to set the default write concern:
| Code Block | ||||
|---|---|---|---|---|
| ||||
db.adminCommand({ "setDefaultRWConcern": 1, "defaultWriteConcern": { "w": 1 } }) |
...
Run the following command to add an arbiter to the replica set:
| Code Block | ||||
|---|---|---|---|---|
| ||||
rs.addArb("opha-dev2.opmantek.net:27018") |
...
Run the following command on the Main Primary, Secondary Primary, and Arbiter servers ONLY:
| Code Block | ||||
|---|---|---|---|---|
| ||||
sudo systemctl restart mongod |
Starting Services
...
Start the NATS service on the Main Primary, Secondary Primary, and Arbiter servers ONLY:
| Code Block | ||||
|---|---|---|---|---|
| ||||
systemctl start nats-server |
...
After configuration changes, restart mongod on all Mirrors and Pollers servers ONLY:
| Code Block | ||||
|---|---|---|---|---|
| ||||
systemctl restart mongod |
Restart services on all servers
...
For example if you have NMIS9, opCharts, opEvents and opHA 5 installed you would execute as follows:
| Code Block | ||||
|---|---|---|---|---|
| ||||
systemctl restart nmis9d opchartsd opeventsd omkd ophad |
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.
Synchronize the Primary collections with Poller
For all the opHA Peers, go to opHA Peers page click on “Sync all nodes” followed by “Pull Peer Data”
Start the Poller and Mirrors
Execute the following command on the poller and mirror servers.
...
servers.
| Code Block | ||||
|---|---|---|---|---|
| ||||
cd /usr/local/omk/bin ./ophad cmd producer start |
...
Accept EULAs: Make sure when you login to each server to confirm that all End User License Agreements (EULAs) are accepted.
Discover the Peers
Click on Peers in opHA-MB portal on the Main Primary (http://<fqdn of Main Primary>/en/omk/opHA/peers)
...
.
...
Upgrade to opHA-5.1.0 from opHA 4.X
...
The default value of opha_role in opCommon.json is Standalone
| Code Block | ||||
|---|---|---|---|---|
| ||||
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
...
root user
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
sh ./<executable> |
e.g
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
sh ./opHA-Linux-x86_64-5.1.0.run |
...
Update /usr/local/omk/conf/opCommon.json for Main Primary and Secondary Primary only
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
"db_replica_set": "rs1", "db_mongo_cluster": [ "opha-dev1.opmantek.net", "opha-dev6.opmantek.net" ], "nats_num_replicas": 3, "nats_cluster": [ "opha-dev1.opmantek.net", "opha-dev2.opmantek.net", "opha-dev6.opmantek.net" ] |
...
Run the following command
| Code Block | ||||
|---|---|---|---|---|
| ||||
mongosh --username opUserRW --password op42flow42 admin |
Add the main-primary and secondary-primary to the below command and run it
| Code Block | ||||
|---|---|---|---|---|
| ||||
rs.initiate({ _id: "rs1", version: 1, members: [ { _id: 0, host : "opha-dev1.opmantek.net:27017", priority: 2 }, { _id: 1, host : "opha-dev6.opmantek.net:27017", priority: 1 } ] }) |
...
Run the following command to set the default write concern:
| Code Block | ||||
|---|---|---|---|---|
| ||||
db.adminCommand({ "setDefaultRWConcern": 1, "defaultWriteConcern": { "w": 1 } }) |
...
Run the following command to add an arbiter to the replica set:
| Code Block | ||||
|---|---|---|---|---|
| ||||
rs.addArb("opha-dev2.opmantek.net:27018") |
...
Run the following command on the Main Primary, Secondary Primary, and Arbiter servers ONLY:
| Code Block | ||||
|---|---|---|---|---|
| ||||
sudo systemctl restart mongod |
...
Start the NATS service on the Main Primary, Secondary Primary, and Arbiter servers ONLY:
...
servers ONLY:
| Code Block | ||||
|---|---|---|---|---|
| ||||
systemctl start nats-server |
...
After configuration changes, restart mongod on all Mirrors and Pollers servers ONLY:
| Code Block | ||||
|---|---|---|---|---|
| ||||
systemctl restart mongod |
Restart services on all servers
...
For example if you have NMIS9, opCharts, opEvents and opHA 5 installed you would execute as follows:
| Code Block | ||||
|---|---|---|---|---|
| ||||
systemctl restart nmis9d opchartsd opeventsd omkd |
...
Proceed to next step after discovering all the Peers.
Synchronize the Primary collections with Poller
For all the opHA Peers, go to opHA Peers page click on “Sync all nodes” followed by “Pull Peer Data”
Restart opHA service on the Main Primary
| Code Block | ||||
|---|---|---|---|---|
| ||||
sudo systemctl restart ophad |
...
Execute the following command on the poller and mirror servers.
| Code Block | ||||
|---|---|---|---|---|
| ||||
cd /usr/local/omk/bin ./ophad cmd producer start |
...