Track a MongoDB cluster or node
The first step in adding Cyral to a data repository is to create an entry for it in Cyral's inventory. Here are the instructions on how to do this.
First, in the Cyral management console, navigate to the Data Repos tab and click on "Add Repository". For "Repository type" choose "MongoDB". This will open a popup. Under Repository name, give the repository a meaningful name. Then, select the correct cluster type for your deployment: Standalone, Replica set cluster, or Sharded cluster. The remaining configuration parameters depend upon the chosen cluster type, as described below.
Standalone:
For this deployment type, all you need to specify is the Hostname and Port of your database.
Replica set cluster:
For a replica set cluster, specify the replica set name and the number of nodes. If your cluster supports SRV names, select SRV Record as the connection format, otherwise select the Host/Port connection format. If SRV Record is selected, you need to only provide the host name that corresponds to the cluster's DNS SRV record. For the Host/Port connection format, specify one or more hostname and port pairs.
Sharded cluster:
For a sharded cluster, specify the number of nodes. If your cluster supports SRV names, select SRV Record as the connection format, otherwise select the Host/Port connection format. If SRV Record is selected, you need to only provide the host name that corresponds to the cluster's DNS SRV record. For the Host/Port connection format, specify one or more hostname and port pairs.
Fincally, click "Add"
Notes
Increasing the number of nodes
If you add nodes to your MongoDB deployment, you will need to do the following:
Go to the Cyral management console, go to Data repos, click on the MongoDB repo in question, click on Settings and then Edit.
Under Number of nodes, increase the number so that it matches the new number of nodes in the cluster.
Create a binding for the new node.
Next steps
- If a sidecar is deployed and available (one sidecar can protect many repositories) you can bind this repository to its sidecar now.
- If you don't already have a sidecar deployed that can serve this repository, add it now as described in the Sidecar Deployment section.