@@ -29,12 +29,17 @@ available in the :ref:`mcli-reference` section.
29
29
Prerequisites
30
30
-------------
31
31
32
+ Before you begin, review and ensure that your environment is
33
+ :ref:`compatible <mcli-compatibility>` for installing and using
34
+ {+mcli+}.
35
+
32
36
This tutorial requires the following:
33
37
34
38
- A `MongoDB account <https://docs.mongodb.com/guides/cloud/account>`_
35
39
- An :atlas:`Atlas </organizations-projects/>`,
36
40
:cloudmgr:`Cloud Manager </organizations-projects/>`, or
37
- :opsmgr:`Ops Manager </organizations-projects/>` organization and project
41
+ :opsmgr:`Ops Manager </organizations-projects/>` organization and
42
+ project
38
43
39
44
.. _quick-start-install:
40
45
@@ -54,9 +59,12 @@ verify installation:
54
59
Generate Programmatic Access Keys
55
60
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56
61
57
- {+mcli+} uses Programmatic Access Keys to access the |service|, |cloud-short|,
58
- or |mms| projects. Your |svc-api-key| must have the ``project owner``
59
- role and it must be whitelisted for your IP address or |cidr| range.
62
+ {+mcli+} uses Programmatic Access Keys to access the |service|,
63
+ |cloud-short|, or |on-prem| projects. Your |svc-api-key| must have:
64
+
65
+ - The ``project owner`` role
66
+ - The access list entry for your IP address or |cidr| range
67
+
60
68
To learn more about generating the |svc-api-key|, see:
61
69
62
70
- :atlas:`Atlas API Access </configure-api-access>`
@@ -110,23 +118,23 @@ Procedure
110
118
111
119
.. _quick-start-whitelist:
112
120
113
- Whitelist Your IP Address
114
- ~~~~~~~~~~~~~~~~~~~~~~~~~
121
+ Configure Your IP Access List
122
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115
123
116
124
|service| only allows incoming connections to the cluster from
117
- entries in the project’s whitelist . You can add individual IP
118
- addresses or |cidr| blocks to the project IP whitelist .
125
+ entries in the project’s access list . You can add individual IP
126
+ addresses or |cidr| blocks to the project IP access list .
119
127
120
128
|service| supports specifying private IP addresses with VPC peered
121
- connections. For more information, see
122
- :atlas:`Set up a Network Peering Connection </security-vpc-peering/index.html>`.
129
+ connections. For more information, see :atlas:`Set up a Network
130
+ Peering Connection </security-vpc-peering/index.html>`.
123
131
124
- Run the following command to add entries to your whitelist .
132
+ Run the following command to add entries to your IP access list .
125
133
Replace the IP address with your connection IP address.
126
134
127
135
.. code-block:: sh
128
136
129
- mongocli atlas whitelist create <your-IP-address> --type ipAddress
137
+ mongocli atlas accesslist create <your-IP-address> --type ipAddress
130
138
131
139
.. _quick-start-create-mdb-user:
132
140
@@ -154,78 +162,135 @@ Procedure
154
162
155
163
mongocli atlas dbuser create --username User1 --password ChangeThisPasswordToSomethingSecure --role atlasAdmin@admin
156
164
165
+ .. _quick-start-atlas-monitor-cluster:
166
+
167
+ Determine Your Cluster Status
168
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169
+
170
+ Run the :ref:`mcli-atlas-cluster-watch-cmd` command to determine
171
+ if the cluster is available for use. The following command uses
172
+ the default profile to access the |service| project:
173
+
174
+ .. code-block:: sh
175
+
176
+ mongocli atlas cluster watch getStarted
177
+
157
178
.. _quick-start-atlas-retrieve-cluster:
158
179
159
180
Retrieve Your Cluster
160
181
~~~~~~~~~~~~~~~~~~~~~
161
182
162
- To check your cluster's deployment status, issue the
183
+ To retrieve your cluster settings and status, issue the
163
184
:ref:`mcli-atlas-cluster-describe-command` command.
164
185
165
186
.. code-block:: sh
166
187
167
- mongocli atlas cluster describe getStarted
188
+ mongocli atlas cluster describe getStarted --output json
168
189
169
190
Your command output should look similar to the following:
170
191
171
192
.. code-block:: json
172
193
:copyable: false
173
194
174
195
{
175
- "autoScaling": {
176
- "diskGBEnabled": false
177
- },
178
- "backupEnabled": false,
179
- "biConnector": {
180
- "enabled": false,
181
- "readPreference": "secondary"
182
- },
183
- "clusterType": "REPLICASET",
184
- "diskSizeGB": 10,
185
- "encryptionAtRestProvider": "NONE",
186
- "id": "5e29cf4e7a3e5a3f46554bde",
187
- "groupId": "<project-ID>",
188
- "mongoDBVersion": "4.2.3",
189
- "mongoDBMajorVersion": "4.2",
190
- "mongoURI": "mongodb://getstarted.mongodb.example.net:27017,getstarted.mongodb.example.net:27017,getstarted.mongodb.example.net:27017",
191
- "name": "getStarted",
192
- "numShards": 1,
193
- "paused": false,
194
- "providerBackupEnabled": false,
195
- "providerSettings": {
196
- "backingProviderName": "AWS",
197
- "instanceSizeName": "M10",
198
- "providerName": "TENANT",
199
- "regionName": "US_EAST_1"
200
- },
201
- "replicationFactor": 3,
202
- "replicationSpec": {
203
- "US_EAST_1": {
204
- "analyticsNodes": 0,
205
- "electableNodes": 3,
206
- "priority": 7,
207
- "readOnlyNodes": 0
208
- }
209
- },
210
- "replicationSpecs": [
211
- {
212
- "id": "5e29cf3cf10fab4e2677c9f9",
213
- "numShards": 1,
214
- "zoneName": "Zone 1",
215
- "regionsConfig": {
216
- "US_EAST_1": {
217
- "analyticsNodes": 0,
218
- "electableNodes": 3,
219
- "priority": 7,
220
- "readOnlyNodes": 0
221
- }
222
- }
223
- }
224
- ],
225
- "srvAddress": "mongodb+srv://getstarted.mongodb.example.net",
226
- "stateName": "IDLE"
196
+ "autoScaling": {
197
+ "diskGBEnabled": false,
198
+ "compute": {
199
+ "enabled": false,
200
+ "scaleDownEnabled": false
201
+ }
202
+ },
203
+ "backupEnabled": false,
204
+ "biConnector": {
205
+ "enabled": false,
206
+ "readPreference": "secondary"
207
+ },
208
+ "clusterType": "REPLICASET",
209
+ "diskSizeGB": 0.5,
210
+ "encryptionAtRestProvider": "NONE",
211
+ "id": "5e29cf4e7a3e5a3f46554bde",
212
+ "groupId": "<project-ID>",
213
+ "mongoDBVersion": "4.2.12",
214
+ "mongoDBMajorVersion": "4.2",
215
+ "mongoURI": "mongodb://getStarted-shard-00-00.example.mongodb.net:27017,getStarted-shard-00-01.example.mongodb.net:27017,getStarted-shard-00-02.example.mongodb.net:27017",
216
+ "mongoURIUpdated": "2020-08-12T14:36:23Z",
217
+ "mongoURIWithOptions": "mongodb://getStarted-shard-00-00.example.mongodb.net:27017,getStarted-shard-00-01.example.mongodb.mongodb.net:27017,getStarted-shard-00-02.example.mongodb.net:27017/?ssl=true\u0026authSource=admin\u0026replicaSet=atlas-abcde4-shard-0",
218
+ "name": "getStarted",
219
+ "numShards": 1,
220
+ "paused": false,
221
+ "pitEnabled": false,
222
+ "providerBackupEnabled": false,
223
+ "providerSettings": {
224
+ "backingProviderName": "AWS",
225
+ "instanceSizeName": "M0",
226
+ "providerName": "TENANT",
227
+ "regionName": "US_EAST_1",
228
+ "autoScaling": {
229
+ "compute": {}
230
+ }
231
+ },
232
+ "replicationFactor": 3,
233
+ "replicationSpecs": [
234
+ {
235
+ "id": "5f33fdc96b0fb076cc13ef20",
236
+ "numShards": 1,
237
+ "zoneName": "Zone 1",
238
+ "regionsConfig": {
239
+ "US_EAST_1": {
240
+ "analyticsNodes": 0,
241
+ "electableNodes": 3,
242
+ "priority": 7,
243
+ "readOnlyNodes": 0
244
+ }
245
+ }
246
+ }
247
+ ],
248
+ "srvAddress": "mongodb+srv://getStarted.example.mongodb.net",
249
+ "stateName": "IDLE",
250
+ "connectionStrings": {
251
+ "standard": "mongodb://getStarted-shard-00-00.example.mongodb.net:27017,getStarted-shard-00-01.example.mongodb.net:27017,getStarted-shard-00-02.example.mongodb.net:27017/?ssl=true\u0026authSource=admin\u0026replicaSet=atlas-abcde4-shard-0",
252
+ "standardSrv": "mongodb+srv://getStarted.example.mongodb.net"
253
+ }
227
254
}
228
255
256
+ .. _quick-start-atlas-retrieve-conection-string:
257
+
258
+ Get Your Cluster Connection String Using a Go Template
259
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
260
+
261
+ You can also use the |mongo| shell to connect to your cluster with
262
+ the ``srvAddress`` and appropriate :manual:`connection string
263
+ options
264
+ </reference/connection-string/#connection-string-options>`.
265
+
266
+ To retrieve the connection string for the ``getStarted`` cluster,
267
+ run the following :ref:`mcli-atlas-cluster-describe-command`
268
+ command with the template. The following command uses the default
269
+ profile for accessing |service|.
270
+
271
+ .. code-block:: sh
272
+
273
+ mongocli atlas clusters describe getStarted -o go-template="Parse: {{.SrvAddress}}"
274
+
275
+ The previous command returns a string similar to the following:
276
+
277
+ .. code-block:: sh
278
+ :copyable: false
279
+
280
+ Parse: mongodb+srv://getstarted.example.mongodb.net
281
+
282
+ Use the connection string with the |mongo| shell to connect to
283
+ the ``getStarted`` cluster. This example uses the following to
284
+ connect to the |service| cluster:
285
+
286
+ - The connection string returned by the previous command
287
+ - The username and password created in this :ref:`tutorial
288
+ <quick-start-create-mdb-user>`
289
+
290
+ .. code-block::
291
+
292
+ mongo "mongodb+srv://getstarted.example.mongodb.net" --username User1 --password ChangeThisPasswordToSomethingSecure
293
+
229
294
.. tab:: Cloud Manager
230
295
:tabid: cloud-manager
231
296
@@ -319,6 +384,19 @@ Procedure
319
384
]
320
385
}
321
386
387
+ .. _quick-start-cm-watch-automation-config:
388
+
389
+ Watch Your Automation Configuration Status
390
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
391
+
392
+ Run the :ref:`mcli-cm-automation-watch-command` command to
393
+ determine if the cluster is ready for use. The following command
394
+ uses the default profile to access the |cloud-short| project:
395
+
396
+ .. code-block:: sh
397
+
398
+ mongocli cm automation watch
399
+
322
400
.. tab:: Ops Manager
323
401
:tabid: ops-manager
324
402
@@ -366,7 +444,7 @@ Procedure
366
444
"buildIndexes": true,
367
445
"db_path": "/data/cluster/rs1",
368
446
"featureCompatibilityVersion": "4.2",
369
- "hostname": "host1",
447
+ "hostname": "host1",
370
448
"log_path": "/data/cluster/rs1/mongodb.log",
371
449
"name": "getStartedCluster",
372
450
"port": 29010,
@@ -416,6 +494,19 @@ Procedure
416
494
]
417
495
}
418
496
497
+ .. _quick-start-om-watch-automation-config:
498
+
499
+ Watch Your Automation Configuration Status
500
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
501
+
502
+ Run the :ref:`mcli-om-automation-watch-command` command to
503
+ determine if the cluster is ready for use. The following command
504
+ uses the default profile to access the |mms| project:
505
+
506
+ .. code-block:: sh
507
+
508
+ mongocli om automation watch
509
+
419
510
Summary
420
511
-------
421
512
@@ -427,17 +518,20 @@ Summary
427
518
428
519
.. include:: /includes/quick-start-summary.rst
429
520
430
- You can also use the |mongo| shell connect to your cluster with
431
- the ``srvAddress`` and appropriate :manual:`connection string
432
- options
433
- </reference/connection-string/#connection-string-options>`.
434
-
435
521
.. tab:: Cloud Manager
436
522
:tabid: cloud-manager
437
523
438
524
.. include:: /includes/quick-start-summary.rst
439
525
526
+ You can also use the |mongo| shell to connect to your cluster with
527
+ the appropriate :manual:`connection string options
528
+ </reference/connection-string/#connection-string-options>`.
529
+
440
530
.. tab:: Ops Manager
441
531
:tabid: ops-manager
442
532
443
533
.. include:: /includes/quick-start-summary.rst
534
+
535
+ You can also use the |mongo| shell to connect to your cluster with
536
+ the appropriate :manual:`connection string options
537
+ </reference/connection-string/#connection-string-options>`.
0 commit comments