Docs Home → MongoDB Command Line Interface
Cluster Configuration File
Overview
The mongocli
command requires cluster configuration
settings for creating or updating a MongoDB Cloud Manager or MongoDB Ops Manager
cluster. The configuration properties can be provided
through a .yaml
or .json
file. The following sections
describe the Configuration Properties that are required for
creating or updating a cluster and provide a
Sample Configuration File that you can copy and modify.
Configuration Properties
The following sections contain the:
Cluster-wide configuration properties
Replica set member configuration properties
Sharded cluster configuration properties
Cluster-Wide Settings
The configuration file for creating or updating a MongoDB Cloud Manager or MongoDB Ops Manager cluster must contain the following cluster-wide settings:
Field | Type | Description |
---|---|---|
name | string | Name of the cluster. |
version | string | Version of the mongod process to deploy. |
featureCompatibilityVersion | string | Feature Compatibility Version
of the deployment. |
processes | array of objects | Required for replica sets. An array of objects containing
settings for each mongod process. Each mongod has
replica set member settings. |
shards | array of objects | Required for sharded clusters. An array of objects containing
settings for each shard. |
config | object | Required for sharded clusters. Object that contains your
config server
replica set. |
mongos | array of objects | Required for sharded clusters. An array of objects containing
settings for each mongos instance. |
Replica Set Member Settings
The configuration file for creating or updating a MongoDB Cloud Manager or MongoDB Ops Manager cluster can contain the following settings for each replica set member:
Field | Type | Description | Required? | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
auditLogDestination | string | Setting that enables auditing and specifies where to send all audit events. MongoDB CLI accepts the following values:
This setting corresponds to the auditLog.destination configuration file option. | no | ||||||||||
auditLogFormat | string | Format of the output file for
auditing if MongoDB CLI accepts the following values:
This setting corresponds to the auditLog.format configuration file option. | no | ||||||||||
auditLogPath | string | Output file for auditing if
This setting corresponds to the auditLog.path configuration file option. | no | ||||||||||
bindIp | string | Hostnames and/or IP addresses and/or full Unix domain socket
paths on which This setting corresponds to the net.bindIp configuration file option. | no | ||||||||||
bindIpAll | boolean | Flag that indicates whether the This setting corresponds to the net.bindIpAll configuration file option. | no | ||||||||||
buildIndexes | boolean | Flag that indicates whether to direct the This setting corresponds to the buildIndexes replica set configuration option. | no | ||||||||||
dbPath | string | Directory where the mongod instance stores its
data. This cannot be modified after deployment. | yes | ||||||||||
delay | int | Number of seconds behind the primary member that this member should lag. This setting corresponds to the slaveDelay replica set configuration option. | no | ||||||||||
hostname | string | Name of the host to add to the replica set. This is the
host on which Ops Manager deploys the mongod process. | yes | ||||||||||
ipv6 | boolean | Flag that indicates whether the deployment supports IPv6.
MongoDB CLI accepts the following values: This setting corresponds to the net.ipv6 configuration file option. | no | ||||||||||
logDestination | string | Destination to which MongoDB sends all log output. MongoDB CLI
accepts the following values: If you do not specify This setting corresponds to the systemLog.destination configuration file option. | no | ||||||||||
logPath | string | Location and name of the log file for the mongod process on
the host. | yes | ||||||||||
port | integer | Port for the replica set member. The mongod process
must have exclusive access to the specified port. | yes | ||||||||||
priority | integer | Priority of the replica set member during elections. Value can be:
Non-voting members must have a priority of | yes | ||||||||||
tls.CAFile | string |
This setting corresponds to the net.tls.CAFile | no | ||||||||||
tls.certificateKeyFile | string |
This setting corresponds to the net.tls.certificateKeyFile
| no | ||||||||||
tls.certificateKeyFilePassword | string | Password to de-crypt the certificate-key file. Use the This setting corresponds to the
net.tls.certificateKeyFilePassword
| no | ||||||||||
tls.certificateSelector | string | Certificate property that the MongoDB Agent uses to select a matching certificate from the operating system’s certificate store to use for TLS/SSL. MongoDB CLI accepts one of the following key-value mappings as an
argument of
This setting corresponds to the
net.tls.certificateSelector
| no | ||||||||||
tls.clusterCertificateSelector | string | Certificate property that the MongoDB Agent uses to select a matching certificate from the operating system’s certificate store to use for internal x.509 membership authentication. MongoDB CLI accepts one of the following key-value mappings as an
argument of
This setting corresponds to the
net.tls.clustercertificateSelector
| no | ||||||||||
tls.clusterFile | string |
This setting corresponds to the net.tls.clusterFile
| no | ||||||||||
tls.clusterPassword | string | The password to de-crypt the x.509 certificate-key file specified
with Use the This setting corresponds to the net.tls.clusterPassword
| no | ||||||||||
tls.CRLFile | string | The This setting corresponds to the net.tls.CRLFile
| no | ||||||||||
tls.disabledProtocols | string | Protocols or versions over which a MongoDB server running with TLS refuses incoming connections. This setting corresponds to the net.tls.disabledProtocols
| no | ||||||||||
tls.FIPSMode | string | Enable or disable the use of the FIPS mode of the TLS library for
the This setting corresponds to the net.tls.FIPSMode
| no | ||||||||||
tls.mode | string | Enables TLS for all network connections. MongoDB CLI accepts the following arguments for this setting:
This setting corresponds to the net.tls.mode
| no | ||||||||||
tls.PEMKeyFile | string |
ImportantThis setting is deprecated. Use This setting corresponds to the net.ssl.PEMKeyFile
| no | ||||||||||
votes | integer | Number that indicates whether the replica set member votes in the election. MongoDB CLI accepts the following values:
To learn more about | yes |
Shard Settings
The configuration file for creating or updating a MongoDB Cloud Manager or MongoDB Ops Manager cluster can contain the following settings for each shard:
Field | Type | Description | Required? |
---|---|---|---|
name | string | Name of the of the shard. | yes |
processes | array of objects | An array of objects containing settings for each mongod
process. Each mongod has replica set member settings. | yes |