@@ -29,12 +29,17 @@ available in the :ref:`mcli-reference` section.
2929Prerequisites
3030-------------
3131
32+ Before you begin, review and ensure that your environment is
33+ :ref:`compatible <mcli-compatibility>` for installing and using
34+ {+mcli+}.
35+
3236This tutorial requires the following:
3337
3438- A `MongoDB account <https://docs.mongodb.com/guides/cloud/account>`_
3539- An :atlas:`Atlas </organizations-projects/>`,
3640 :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
3843
3944.. _quick-start-install:
4045
@@ -54,9 +59,12 @@ verify installation:
5459Generate Programmatic Access Keys
5560~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5661
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+
6068To learn more about generating the |svc-api-key|, see:
6169
6270- :atlas:`Atlas API Access </configure-api-access>`
@@ -110,23 +118,23 @@ Procedure
110118
111119 .. _quick-start-whitelist:
112120
113- Whitelist Your IP Address
114- ~~~~~~~~~~~~~~~~~~~~~~~~~
121+ Configure Your IP Access List
122+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115123
116124 |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 .
119127
120128 |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>`.
123131
124- Run the following command to add entries to your whitelist .
132+ Run the following command to add entries to your IP access list .
125133 Replace the IP address with your connection IP address.
126134
127135 .. code-block:: sh
128136
129- mongocli atlas whitelist create <your-IP-address> --type ipAddress
137+ mongocli atlas accesslist create <your-IP-address> --type ipAddress
130138
131139 .. _quick-start-create-mdb-user:
132140
@@ -154,78 +162,135 @@ Procedure
154162
155163 mongocli atlas dbuser create --username User1 --password ChangeThisPasswordToSomethingSecure --role atlasAdmin@admin
156164
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+
157178 .. _quick-start-atlas-retrieve-cluster:
158179
159180 Retrieve Your Cluster
160181 ~~~~~~~~~~~~~~~~~~~~~
161182
162- To check your cluster's deployment status, issue the
183+ To retrieve your cluster settings and status, issue the
163184 :ref:`mcli-atlas-cluster-describe-command` command.
164185
165186 .. code-block:: sh
166187
167- mongocli atlas cluster describe getStarted
188+ mongocli atlas cluster describe getStarted --output json
168189
169190 Your command output should look similar to the following:
170191
171192 .. code-block:: json
172193 :copyable: false
173194
174195 {
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+ }
227254 }
228255
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+
229294 .. tab:: Cloud Manager
230295 :tabid: cloud-manager
231296
@@ -319,6 +384,19 @@ Procedure
319384 ]
320385 }
321386
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+
322400 .. tab:: Ops Manager
323401 :tabid: ops-manager
324402
@@ -366,7 +444,7 @@ Procedure
366444 "buildIndexes": true,
367445 "db_path": "/data/cluster/rs1",
368446 "featureCompatibilityVersion": "4.2",
369- "hostname": "host1",
447+ "hostname": "host1",
370448 "log_path": "/data/cluster/rs1/mongodb.log",
371449 "name": "getStartedCluster",
372450 "port": 29010,
@@ -416,6 +494,19 @@ Procedure
416494 ]
417495 }
418496
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+
419510Summary
420511-------
421512
@@ -427,17 +518,20 @@ Summary
427518
428519 .. include:: /includes/quick-start-summary.rst
429520
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-
435521 .. tab:: Cloud Manager
436522 :tabid: cloud-manager
437523
438524 .. include:: /includes/quick-start-summary.rst
439525
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+
440530 .. tab:: Ops Manager
441531 :tabid: ops-manager
442532
443533 .. 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