@@ -34,6 +34,7 @@ The following sections contain the:
34
34
35
35
- Cluster-wide configuration properties
36
36
- Replica set member configuration properties
37
+ - Sharded cluster configuration properties
37
38
38
39
Cluster-Wide Settings
39
40
~~~~~~~~~~~~~~~~~~~~~
@@ -49,26 +50,47 @@ The configuration file for creating or updating a |cloud| or
49
50
- Type
50
51
- Description
51
52
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
+
52
62
* - ``featureCompatibilityVersion``
53
63
- string
54
64
- :manual:`Feature Compatibility Version
55
65
</reference/command/setFeatureCompatibilityVersion#dbcmd.setFeatureCompatibilityVersion>`
56
66
of the deployment.
57
67
58
- * - ``name``
59
- - string
60
- - Name of the cluster.
61
-
62
68
* - ``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``
63
82
- 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 .
67
86
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:
72
94
73
95
Replica Set Member Settings
74
96
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -131,7 +153,7 @@ replica set member:
131
153
132
154
* - ``port``
133
155
- integer
134
- - Port for the replica set memeber . The :manual:`mongod
156
+ - Port for the replica set member . The :manual:`mongod
135
157
</reference/program/mongod/#bin.mongod>` process
136
158
must have exclusive access to the specified port.
137
159
- yes
@@ -140,7 +162,7 @@ replica set member:
140
162
- integer
141
163
- :manual:`Priority
142
164
</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
144
166
can be:
145
167
146
168
- ``0``
@@ -157,20 +179,52 @@ replica set member:
157
179
votes in the election. Value can be:
158
180
159
181
- ``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
161
183
162
184
To learn more about ``votes``, see :manual:`votes
163
185
</reference/replica-configuration/#rsconf.members[n].votes>`.
164
186
- yes
165
187
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
+
166
220
.. _mms-sample-config-file:
167
221
168
222
Sample Configuration File
169
223
-------------------------
170
224
171
225
.. tabs::
172
226
173
- .. tab:: YAML
227
+ .. tab:: YAML Replica Set Configuration
174
228
:tabid: yaml
175
229
176
230
.. code-block:: text
@@ -198,7 +252,7 @@ Sample Configuration File
198
252
votes: 1
199
253
port: 29030
200
254
201
- .. tab:: JSON
255
+ .. tab:: JSON Replica Set Configuration
202
256
:tabid: json
203
257
204
258
.. code-block:: json
@@ -234,3 +288,102 @@ Sample Configuration File
234
288
}
235
289
]
236
290
}
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