Versions Compared

Key

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

...

If jq is installed on Main Primary, this below snippet can be used to automate deletion of all nats streams:

Code Block
breakoutModewide
breakoutWidth760
for stream_name in $(nats stream list --user omkadmin --password op42opha42 --json | jq -r '.[]'); 

      do nats stream rm --force --user omkadmin --password op42opha42 "$stream_name";

done

  1. Skip the optional step to cleanup the Nats storage /opt/data/nats if not needed.

  2. Mongodb arbiter config changes done on the mongosh
    Main Primary : mongosh (https://www.mongodb.com/docs/manual/tutorial/replace-replica-set-member/ )

    Code Block
    mongosh --username opUserRW --password op42flow42 admin --port 27017
    rs1 [direct: primary] admin> cfg = rs.conf()
    rs1 [direct: primary] admin> cfg.members[2].host = "opha-dev6.opmantek.net:27018"
    rs1 [direct: primary] admin> rs.reconfig(cfg)
    rs1 [direct: primary] admin> rs.conf()

    Verify the mongodb cluster config

    Code Block
    mongosh --username opUserRW --password op42flow42 admin --port 27017
    
    rs1 [direct: primary] admin> rs.conf()

    Code Block
     members: [
        {
          _id: 0,
          host: 'opha-dev4.opmantek.net:27017',
          priority: 2,
        },
        {
          _id: 1,
          host: 'opha-dev7.opmantek.net:27017',
          priority: 1,
        },
        {
          _id: 2,
          host: 'opha-dev6.opmantek.net:27018',
          priority: 0,
        }
      ],

  3. All vms: (Main Pri, Sec Pri, Pollers, Mirrors)

...