Skip to content

Commit 0693bcc

Browse files
authored
Merge pull request #90 from erabil-mdb/DOCSP-26171
(DOCSP-26171) Adds example for geosharded cluster.
2 parents 48d4898 + 733e6aa commit 0693bcc

File tree

2 files changed

+140
-5
lines changed

2 files changed

+140
-5
lines changed

source/cluster-config-file.txt

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,45 @@ Optional and Conditional {+Cluster+} Settings
150150
---------------------------------------------
151151

152152
Your {+cluster+} configuration file may contain additional optional or
153-
conditional {+cluster+} settings. For a full list of available
153+
conditional {+cluster+} settings. If you selected a ``clusterType`` of ``GEOSHARDED``, you must specify the following {+cluster+} settings either
154+
in the configuration file or as flags in the command:
155+
156+
.. list-table::
157+
:header-rows: 1
158+
:widths: 20 10 70
159+
160+
* - Field
161+
- Type
162+
- Description
163+
164+
* - ``replicationSpecs.``
165+
``numShards``
166+
- string
167+
- Positive integer that specifies the number of shards to deploy
168+
in each specified zone. Provide this value if you set a
169+
``clusterType`` of ``SHARDED`` or ``GEOSHARDED``. Omit this
170+
value if you selected a ``clusterType`` of ``REPLICASET``.
171+
172+
This API resource accepts ``1`` through ``50``, inclusive. This
173+
parameter defaults to ``1``.
174+
175+
If you specify a ``numShards`` value of ``1`` and a
176+
``clusterType`` of ``SHARDED``, |service| deploys a single-shard
177+
:manual:`sharded cluster </reference/glossary/#std-term-sharded-cluster>`.
178+
179+
Don't create a sharded cluster with a single shard for production environments. Single-shard sharded clusters don't provide the same benefits as multi-shard configurations.
180+
181+
* - ``replicationSpecs.``
182+
``zoneName``
183+
- string
184+
- Name for the zone in a :ref:`Global Cluster <global-clusters>`.
185+
Provide this value if you set ``clusterType`` to ``GEOSHARDED``.
186+
187+
For a full list of available
154188
settings, see the API documentation for
155-
:atlas:`Create One Multi-Cloud Cluster from One Project
156-
</reference/api-resources-spec/#operation/createOneAdvancedClusterFromOneProject>`.
189+
:oas-atlas-op:`Create One Cluster </createOneCluster>` and
190+
:oas-atlas-op:`Create One Multi-Cloud Cluster from One Project
191+
</createCluster>`.
157192

158193
.. _example-cluster-config-file:
159194

@@ -168,11 +203,18 @@ following example file:
168203

169204
.. _multi-cloud-example-cluster-config-file:
170205

171-
Multi-Cloud Example Cluster Configuration File
206+
Example Multi-Cloud Cluster Configuration File
172207
----------------------------------------------
173208

174209
To create a multi-cloud {+cluster+}, specify more than one
175210
service provider for your ``regionConfigs`` objects as shown in the
176211
following example file:
177212

178-
.. literalinclude:: /includes/json-cluster-config-file-multi.json
213+
.. literalinclude:: /includes/json-cluster-config-file-multi.json
214+
215+
Example Geosharded Cluster Configuration File
216+
---------------------------------------------
217+
218+
To create a :ref:`geosharded <global-clusters>` {+cluster+}, specify zones for your ``replicationSpecs`` objects as shown in the following example file:
219+
220+
.. literalinclude:: /includes/geosharded-cluster-config-file.json
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"backupEnabled": false,
3+
"biConnector": {
4+
"enabled": false,
5+
"readPreference": "secondary"
6+
},
7+
"clusterType": "GEOSHARDED",
8+
"diskSizeGB": 100,
9+
"encryptionAtRestProvider": "NONE",
10+
"mongoDBMajorVersion": "5.0",
11+
"name": "myCluster",
12+
"paused": false,
13+
"pitEnabled": false,
14+
"stateName": "IDLE",
15+
"replicationSpecs": [
16+
{
17+
"numShards": 1,
18+
"zoneName": "US-1",
19+
"regionConfigs": [
20+
{
21+
"analyticsSpecs": {
22+
"diskIOPS": 3000,
23+
"ebsVolumeType": "STANDARD",
24+
"instanceSize": "M30",
25+
"nodeCount": 0
26+
},
27+
"electableSpecs": {
28+
"diskIOPS": 3000,
29+
"ebsVolumeType": "STANDARD",
30+
"instanceSize": "M30",
31+
"nodeCount": 3
32+
},
33+
"readOnlySpecs": {
34+
"diskIOPS": 3000,
35+
"ebsVolumeType": "STANDARD",
36+
"instanceSize": "M30",
37+
"nodeCount": 0
38+
},
39+
"autoScaling": {
40+
"diskGB": {
41+
"enabled": true
42+
},
43+
"compute": {
44+
"enabled": false,
45+
"scaleDownEnabled": false
46+
}
47+
},
48+
"priority": 7,
49+
"providerName": "AWS",
50+
"regionName": "US_EAST_1"
51+
}
52+
]
53+
},
54+
{
55+
"numShards": 1,
56+
"zoneName": "US-2",
57+
"regionConfigs": [
58+
{
59+
"analyticsSpecs": {
60+
"diskIOPS": 3000,
61+
"ebsVolumeType": "STANDARD",
62+
"instanceSize": "M30",
63+
"nodeCount": 0
64+
},
65+
"electableSpecs": {
66+
"diskIOPS": 3000,
67+
"ebsVolumeType": "STANDARD",
68+
"instanceSize": "M30",
69+
"nodeCount": 3
70+
},
71+
"readOnlySpecs": {
72+
"diskIOPS": 3000,
73+
"ebsVolumeType": "STANDARD",
74+
"instanceSize": "M30",
75+
"nodeCount": 0
76+
},
77+
"autoScaling": {
78+
"diskGB": {
79+
"enabled": true
80+
},
81+
"compute": {
82+
"enabled": false,
83+
"scaleDownEnabled": false
84+
}
85+
},
86+
"priority": 7,
87+
"providerName": "AWS",
88+
"regionName": "US_EAST_2"
89+
}
90+
]
91+
}
92+
]
93+
}

0 commit comments

Comments
 (0)