Skip to content

Commit 92927a0

Browse files
authored
(DOCSP-10959) Add sharded cluster support for Ops Manager (#140)
* (DOCSP-10959) Add sharded cluster support for Ops Manager
1 parent 7cc80be commit 92927a0

File tree

2 files changed

+215
-41
lines changed

2 files changed

+215
-41
lines changed

source/reference/mms-cluster-settings-file.txt

Lines changed: 169 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

3839
Cluster-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

7395
Replica 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

168222
Sample 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+
}

source/reference/ops-manager/cluster-create.txt

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -94,47 +94,68 @@ where:
9494
Examples
9595
--------
9696

97-
The following examples show two ways to run the command.
97+
The following examples show several ways to run the command.
9898

99-
.. _om-cluster-create-example1:
99+
.. tabs::
100100

101-
Example 1
102-
~~~~~~~~~
101+
.. tab:: Create a Cluster with a YAML Configuration File
102+
:tabid: yaml
103103

104-
The following ``mongocli ops-manager cluster create`` command
105-
creates a cluster named ``myCluster`` in the specified project using:
106104

107-
- A file named ``om-cluster.yaml``, which contains the settings in the
108-
:ref:`sample file <mms-sample-config-file>` in ``.yaml`` format
109-
- The {+default-profile+}
105+
.. _om-cluster-create-example1:
110106

111-
.. code-block:: sh
112-
:copyable: false
107+
The following ``mongocli ops-manager cluster create`` command
108+
creates a cluster named ``myCluster`` in the specified project using:
113109

114-
mongocli ops-manager cluster create --file om-cluster.yaml --projectId 5e2dec2131cd7c007880b05e
110+
- A file named ``om-cluster.yaml``, which contains the settings
111+
in the
112+
:ref:`sample file <mms-sample-config-file>` in ``.yaml`` format
113+
- The {+default-profile+}
115114

116-
.. _om-cluster-create-example2:
115+
.. code-block:: sh
116+
:copyable: false
117117

118-
Example 2
119-
~~~~~~~~~
118+
mongocli ops-manager cluster create --file om-cluster.yaml --projectId 5e2dec2131cd7c007880b05e
120119

121-
The following ``mongocli om cluster create`` command creates a
122-
cluster named ``myCluster`` in the specified project using:
120+
.. tab:: Create a Cluster with a JSON Configuration File
121+
:tabid: json
123122

124-
- A file named ``om-cluster.json``, which contains the settings in the
125-
:ref:`sample file <mms-sample-config-file>` in ``.json`` format
126-
- A profile named ``OMprofile``
123+
.. _om-cluster-create-example2:
127124

128-
.. code-block:: sh
129-
:copyable: false
125+
The following ``mongocli om cluster create`` command creates a
126+
cluster named ``myCluster`` in the specified project using:
127+
128+
- A file named ``om-cluster.json``, which contains the settings in the
129+
:ref:`sample file <mms-sample-config-file>` in ``.json`` format
130+
- A profile named ``OMprofile``
131+
132+
.. code-block:: sh
133+
:copyable: false
134+
135+
mongocli om cluster create --file om-cluster.json --projectId 5e2dec2131cd7c007880b05e --profile OMprofile
136+
137+
.. tab:: Create a Sharded Cluster
138+
:tabid: sharded
139+
140+
.. _om-cluster-create-example3:
141+
142+
The following ``mongocli om cluster create`` command creates a
143+
sharded cluster named ``myShardedCluster`` in the specified project using:
144+
145+
- A file named ``om-sharded-cluster.json``, which contains the settings
146+
in the sharded cluster :ref:`sample file <mms-sample-config-file>` in
147+
``.json`` format
148+
- A profile named ``OMprofile``
149+
150+
.. code-block:: sh
151+
:copyable: false
130152

131-
mongocli om cluster create --file om-cluster.json --projectId 5e2dec2131cd7c007880b05e --profile OMprofile
153+
mongocli om cluster create -f om-sharded-cluster.json --projectId 5e2dec2131cd7c007880b05e --profile OMprofile
132154

133155
Output
134156
~~~~~~
135157

136-
The :ref:`om-cluster-create-example1` and :ref:`om-cluster-create-example2`
137-
commands print the following to the terminal:
158+
The command prints the following to the terminal:
138159

139160
.. code-block:: text
140161
:copyable: false

0 commit comments

Comments
 (0)