Configuring high availability for document service - Mission Control 3.2.0.0

Genetec Mission Controlâ„¢ Deployment Guide 3.2.0.0

Product
Mission Control
Content type
Guides > Deployment guides
Version
3.2
Release
3.2.0.0
Language
English
Last updated
2024-09-20

To have high availability for document service in Genetec Mission Controlâ„¢, the MongoDB database service should be accessible outside the local system.

What you should know

To enable automatic failover, MongoDB is configured to run as a replica set where multiple MongoDB instances on separate servers are running parallel. Configure a replica set with three servers and keep the read and write capabilities when running two servers. Also, test a single-server service that only allows read-only functionality until a second server is restored.

Procedure

  1. Install MongoDB on the shared servers.
  2. With each installation on each server, open the configuration file of the shared MongoDB database. It should be in c:\Program Files\MongoDB\Server\<version>\bin\mongod.cfg.
  3. To allow connections from outside of the localhost to the MongoDB server, change the bindIp to bindIp: 127.0.0.1,<the hostname of the server>.
  4. Add the name of the replica set.
  5. After modifying the configuration file, restart the MongoDB service.
  6. On a single server with the MongoDB database installed, open an administrator command prompt and run this command to access the MongoDB directory: C:\Program Files\MongoDB\Server\<version>\bin.
  7. Run mongo next to open the MongoDB shell and connect to the MongoDB instance on the machine.
  8. Run the below command to initialize the replica set and add all the MongoDB database servers to the replica set. Replace <host#> with the hostnames of the MongoDB servers and enter the name of the replica set after _id :.
    Code
    rs.initiate( { 
    _id : "", 
    members: [ 
    { _id: 0, host: "<host#>:27017" }, 
    { _id: 1, host: "<host2>:27017" }, 
    { _id: 2, host: "<host3>:27017" } 
    ] 
    })
  9. Run rs.conf() next to confirm that all the MongoDB servers have been added to the replica set under members.
  10. Run rs.status() to confirm that one instance has been set as primary.
  11. Create or modify your MissionControl.gconfig file on all servers where the role is running. The file is typically in c:\Program Files (x86)\Genetec Security Center 5.11\ConfigurationFiles. This step is not required for the Directory.
  12. In the DocumentServiceConfig element, replace <host#> with the hostnames of the MongoDB database servers and ensure that the name of replica set is correct.
    Code
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <DocumentServiceConfig IsEnabled="true" ConnectionString="mongodb://<host#>:27017,<host#>:27017,<host#>:27017/?replicaSet=<Replica set name>&amp;readPreference=primaryPreferred&amp;appname=Genetec.SecurityCenter&amp;ssl=false"/>
    </configuration>