@@ -34,6 +34,7 @@ The following sections contain the:
3434
3535- Cluster-wide configuration properties
3636- Replica set member configuration properties
37+ - Sharded cluster configuration properties
3738
3839Cluster-Wide Settings
3940~~~~~~~~~~~~~~~~~~~~~
@@ -49,26 +50,47 @@ The configuration file for creating or updating a |cloud| or
4950 - Type
5051 - Description
5152
53+ * - ``name``
54+ - string
55+ - Name of the cluster.
56+
57+ * - ``version``
58+ - string
59+ - Version of the :manual:`mongod
60+ </reference/program/mongod/#bin.mongod>` process to deploy.
61+
5262 * - ``featureCompatibilityVersion``
5363 - string
5464 - :manual:`Feature Compatibility Version
5565 </reference/command/setFeatureCompatibilityVersion#dbcmd.setFeatureCompatibilityVersion>`
5666 of the deployment.
5767
58- * - ``name``
59- - string
60- - Name of the cluster.
61-
6268 * - ``processes``
69+ - array of objects
70+ - Required for replica sets. An array of objects containing
71+ settings for each
72+ :manual:`mongod </reference/program/mongod/#bin.mongod>`
73+ process. Each ``mongod`` has
74+ :ref:`replica set member settings <replica-set-member-settings>`.
75+
76+ * - ``shards``
77+ - array of objects
78+ - Required for sharded clusters. An array of objects containing
79+ settings for each shard.
80+
81+ * - ``config``
6382 - object
64- - Settings for the MongoDB process. Each object contain
65- settings for one instance of the :manual:`mongod
66- </reference/program/mongod/#bin.mongod>` process .
83+ - Required for sharded clusters. Object that contains your
84+ :manual:`config server </core/sharded-cluster-config-servers/>`
85+ replica set .
6786
68- * - ``version``
69- - string
70- - Version of the :manual:`mongod
71- </reference/program/mongod/#bin.mongod>` process to deploy.
87+ * - ``mongos``
88+ - array of objects
89+ - Required for sharded clusters. An array of objects containing
90+ settings for each :manual:`mongos </reference/program/mongos>`
91+ instance.
92+
93+ .. _replica-set-member-settings:
7294
7395Replica Set Member Settings
7496~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -131,7 +153,7 @@ replica set member:
131153
132154 * - ``port``
133155 - integer
134- - Port for the replica set memeber . The :manual:`mongod
156+ - Port for the replica set member . The :manual:`mongod
135157 </reference/program/mongod/#bin.mongod>` process
136158 must have exclusive access to the specified port.
137159 - yes
@@ -140,7 +162,7 @@ replica set member:
140162 - integer
141163 - :manual:`Priority
142164 </reference/replica-configuration/#rsconf.members[n].priority>`
143- of the replica set memeber during elections. Value
165+ of the replica set member during elections. Value
144166 can be:
145167
146168 - ``0``
@@ -157,20 +179,52 @@ replica set member:
157179 votes in the election. Value can be:
158180
159181 - ``0`` if the replica set member cannot vote
160- - ``1`` if the replica set memeber can vote
182+ - ``1`` if the replica set member can vote
161183
162184 To learn more about ``votes``, see :manual:`votes
163185 </reference/replica-configuration/#rsconf.members[n].votes>`.
164186 - yes
165187
188+ .. _shard-settings:
189+
190+ Shard Settings
191+ ~~~~~~~~~~~~~~
192+
193+ The configuration file for creating or updating a |cloud| or
194+ |mms-full| cluster can contain the following settings for each
195+ shard:
196+
197+ .. list-table::
198+ :header-rows: 1
199+ :widths: 20 10 60 10
200+
201+ * - Field
202+ - Type
203+ - Description
204+ - Required?
205+
206+ * - ``name``
207+ - string
208+ - Name of the of the shard.
209+ - yes
210+
211+ * - ``processes``
212+ - array of objects
213+ - An array of objects containing settings
214+ for each
215+ :manual:`mongod </reference/program/mongod/#bin.mongod>`
216+ process. Each ``mongod`` has
217+ :ref:`replica set member settings <replica-set-member-settings>`.
218+ - yes
219+
166220.. _mms-sample-config-file:
167221
168222Sample Configuration File
169223-------------------------
170224
171225.. tabs::
172226
173- .. tab:: YAML
227+ .. tab:: YAML Replica Set Configuration
174228 :tabid: yaml
175229
176230 .. code-block:: text
@@ -198,7 +252,7 @@ Sample Configuration File
198252 votes: 1
199253 port: 29030
200254
201- .. tab:: JSON
255+ .. tab:: JSON Replica Set Configuration
202256 :tabid: json
203257
204258 .. code-block:: json
@@ -234,3 +288,102 @@ Sample Configuration File
234288 }
235289 ]
236290 }
291+
292+ .. tab:: JSON Sharded Cluster Configuration
293+ :tabid: json-sharded
294+
295+ .. code-block:: json
296+
297+ {
298+ "name": "myShardedCluster",
299+ "version": "4.2.2",
300+ "featureCompatibilityVersion": "4.2",
301+ "shards": [
302+ {
303+ "name": "myShard_0",
304+ "processes": [
305+ {
306+ "dbPath": "/data/myCluster/myShard_0/27000",
307+ "hostname": "host0.example",
308+ "logPath": "/data/myCluster/myShard_0/27000/mongodb.log",
309+ "port": 27000,
310+ "votes": 1
311+ },
312+ {
313+ "dbPath": "/data/myCluster/myShard_0/27001",
314+ "hostname": "host1.example",
315+ "logPath": "/data/myCluster/myShard_0/27001/mongodb.log",
316+ "port": 27001,
317+ "votes": 1
318+ },
319+ {
320+ "dbPath": "/data/myCluster/myShard_0/27002",
321+ "hostname": "host2.example",
322+ "logPath": "/data/myCluster/myShard_0/27002/mongodb.log",
323+ "port": 27002,
324+ "version": "4.2.8-ent",
325+ "votes": 1
326+ }
327+ ]
328+ },
329+ {
330+ "name": "myShard_1",
331+ "processes": [
332+ {
333+ "dbPath": "/data/myCluster/myShard_1/28000",
334+ "hostname": "host3.example",
335+ "logPath": "/data/myCluster/myShard_1/28000/mongodb.log",
336+ "port": 28000,
337+ "votes": 1
338+ },
339+ {
340+ "dbPath": "/data/myCluster/myShard_1/28001",
341+ "hostname": "host4.example",
342+ "logPath": "/data/myCluster/myShard_1/28001/mongodb.log",
343+ "port": 28001,
344+ "votes": 1
345+ },
346+ {
347+ "dbPath": "/data/myCluster/myShard_1/28002",
348+ "hostname": "host5.example",
349+ "logPath": "/data/myCluster/myShard_1/28002/mongodb.log",
350+ "port": 28002,
351+ "votes": 1
352+ }
353+ ]
354+ }
355+ ],
356+ "config": {
357+ "name": "configRS",
358+ "processes": [
359+ {
360+ "dbPath": "/data/myCluster/configRS/29000",
361+ "hostname": "host6.example",
362+ "logPath": "/data/myCluster/configRS/29000/mongodb.log",
363+ "port": 29000,
364+ "votes": 1
365+ },
366+ {
367+ "dbPath": "/data/myCluster/configRS/29001",
368+ "hostname": "host7.example",
369+ "logPath": "/data/myCluster/configRS/29001/mongodb.log",
370+ "port": 29001,
371+ "votes": 1
372+ },
373+ {
374+ "dbPath": "/data/myCluster/configRS/29002",
375+ "hostname": "host8.example",
376+ "logPath": "/data/myCluster/configRS/29002/mongodb.log",
377+ "port": 29002,
378+ "votes": 1
379+ }
380+ ]
381+ },
382+ "mongos": [
383+ {
384+ "hostname": "host9.example",
385+ "logPath": "/data/myCluster/mongoses/27015/mongodb.log",
386+ "port": 27015
387+ }
388+ ]
389+ }
0 commit comments