Skip to content

Commit a6360d5

Browse files
(DOCSP-10094): Remove/change '--profile' in examples (#107)
* (DOCSP-10094): Remove/change '--profile' in examples * Tech & copy review * Create a default profile source constant * More updates * Cleanup, replace more default profile source constants * Add links to project ID in quick start * Copy review 2
2 parents 2d59843 + 61ed12b commit a6360d5

File tree

132 files changed

+862
-791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+862
-791
lines changed

conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@
5757
pygments_style = 'sphinx'
5858

5959
source_constants = {
60+
'default-profile': ':ref:`default profile <mcli-profiles>`',
6061
'version': version,
6162
'mcli': 'MongoDB CLI',
6263
'mcli-long': 'MongoDB Command Line Interface (``mongocli``)',
6364
'mcli-version': '0.5.0',
65+
'mdbVersion': '4.2',
6466
'mdbagent': 'MongoDB Agent',
6567
'aagent': 'Automation Agent',
6668
'magent': 'Monitoring Agent',

snooty.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name = "mongocli"
22

33
[constants]
4+
default-profile = ":ref:`default profile <mcli-profiles>`"
45
mcli = "MongoDB CLI"
56
mcli-long = "MongoDB Command Line Interface (``mongocli``)"
67
mcli-version = "0.5.0"
78
mdbagent = "MongoDB Agent"
9+
mdbVersion = "4.2"
810
aagent = "Automation Agent"

source/configure/configuration-file.txt

Lines changed: 74 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,51 +12,93 @@
1212
:depth: 1
1313
:class: singlecol
1414

15-
The {+mcli+} configuration file stores related settings and
16-
|api| keys in groups called *profiles*. You can define multiple profiles
17-
so that you can use the {+mcli+} to access different MongoDB services or
18-
projects from the same terminal. You can update the settings stored in
19-
your configuration file by editing the file with a text editor or
20-
by using the ``mongocli config set`` command.
15+
The {+mcli+} configuration file stores your profiles. You can update the
16+
settings stored in your configuration file by editing the file with a
17+
text editor or by using the :ref:`mcli-config-set-command` command.
2118

2219
.. include:: /includes/admonitions/secure-config-file.rst
2320

2421
Configuration File Location
2522
---------------------------
2623

2724
The first time you run the :ref:`mcli-config-command` command, the
28-
{+mcli+} creates a configuration file called ``mongocli.toml`` and grants
29-
you read and write access to the file. The {+mcli+} saves the
30-
configuration file to the folder where your system stores application
31-
configuration files, which is defined by the ``$XDG_CONFIG_HOME``
32-
environment variable. By default, this location is the ``/.config``
33-
folder of your home directory. If this folder doesn't exist, the
34-
{+mcli+} creates the folder and grants you read, write, and execute
35-
permissions.
25+
{+mcli+} creates a configuration file called ``mongocli.toml``. The
26+
{+mcli+} grants the user who ran the command read and write access to
27+
the file. The {+mcli+} saves the configuration file to the folder where
28+
the system stores application configuration files, which is defined by
29+
the ``$XDG_CONFIG_HOME`` environment variable. By default, this location
30+
is the ``/.config`` folder of the user's home directory. If this folder
31+
doesn't exist, the {+mcli+} creates the folder and grants the user read,
32+
write, and execute permissions.
33+
34+
.. _mcli-profiles:
35+
36+
Profiles
37+
--------
38+
39+
The {+mcli+} configuration file stores related settings and
40+
|api| keys in groups called *profiles*. You can create or define
41+
multiple profiles so that you can use the {+mcli+} to access different
42+
MongoDB services or projects from the same terminal.
43+
44+
To run {+mcli+} with a specific profile, append the ``--profile
45+
<profileName>`` option to the command. If you omit the ``--profile``
46+
parameter, {+mcli+} looks for a profile named ``default`` in the
47+
configuration file.
3648

3749
Example
3850
-------
3951

4052
The following example configuration file contains two profiles,
41-
``default`` and ``myOpsManager``. The ``default`` profile contains |api|
42-
keys, an organization ID, and a project ID for an |service| deployment.
43-
The ``myOpsMgr`` profile contains |api| keys, the base |url|, an
44-
organization ID, and a project ID for an |onprem| deployment.
53+
``default`` and ``myOpsManager``.
4554

46-
.. code-block:: sh
55+
The ``default`` profile connects to a |service| deployment and contains
56+
the following settings:
57+
58+
- An organization ID
59+
- |api| keys
60+
- A project ID
61+
62+
The ``myOpsManager`` profile connects to an |onprem| deployment and
63+
contains contains the following settings:
64+
65+
- The |onprem| base |url|
66+
- An organization ID
67+
- |api| keys
68+
- A project ID
69+
70+
.. code-block:: text
71+
:copyable: false
72+
73+
# ~/.config/mongocli.toml
4774

4875
[default]
49-
service=cloud
50-
public_api_key=ABCDEFG
51-
private_api_key=e750d2bf-1234-4cde-5678-ca4dcbcac9a4
52-
organization_id=qwer5678uiop23jb45lk78mn
53-
project_id=5e2f04ecf10fcd33c7d4077e
54-
55-
[myOpsMgr]
56-
service=om
57-
public_api_key=HIJKLMN
58-
private_api_key=e750d2bf-9101-4cde-1121-ca4dcbcac9a5
59-
ops_manager_url=http://localhost:9080
60-
organization_id=jklsa23123dsdf3jj456hs2
61-
project_id=kk12jdn43jd123dkdkf97jg
76+
organization_id = "qwer5678uiop23jb45lk78mn"
77+
public_api_key = "ABCDEFG"
78+
project_id= "5e2f04ecf10fcd33c7d4077e"
79+
private_api_key = "e750d2bf-1234-4cde-5678-ca4dcbcac9a4"
80+
service = "cloud"
81+
82+
[myOpsManager]
83+
ops_manager_url = "http://localhost:9080/"
84+
organization_id = "jklsa23123dsdf3jj456hs2"
85+
public_api_key = "HIJKLMN"
86+
project_id = "kk12jdn43jd123dkdkf97jg"
87+
private_api_key = "e750d2bf-9101-4cde-1121-ca4dcbcac9a5"
88+
service = "ops-manager"
89+
90+
To use {+mcli+} with the ``default`` profile, omit the ``--profile``
91+
option from the command:
92+
93+
.. code-block:: sh
94+
:copyable: false
95+
96+
mongocli <command>
97+
98+
To use {+mcli+} with the ``myOpsManager`` profile, append the
99+
``--profile myOpsManager`` option to the command:
100+
101+
.. code-block:: sh
102+
:copyable: false
62103

104+
mongocli <command> --profile myOpsManager
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. note::
2+
3+
This feature is not available for ``M0`` (Free Tier) clusters. For
4+
more information, see :atlas:`Atlas M0 (Free Tier) Limitations
5+
</reference/free-shared-limitations/index.html>`.

source/includes/alert-describe-options.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- string
1717
- Name of the profile where the public and private
1818
keys for the project are saved. If omitted, uses the
19-
``default`` profile. To learn more about creating a
19+
{+default-profile+}. To learn more about creating a
2020
profile, see :ref:`mcli-configure`.
2121
- no
2222

@@ -25,4 +25,4 @@
2525
- Unique identifier of the project that contains the
2626
alert to describe. If omitted, uses the project ID in
2727
the profile or :ref:`environment variable <mcli-env-var>`.
28-
- yes
28+
- yes

source/includes/alert-list-options.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- string
2323
- Name of the profile where the public and private
2424
keys for the project are saved. If omitted, uses the
25-
``default`` profile. To learn more about creating a
25+
{+default-profile+}. To learn more about creating a
2626
profile, see :ref:`mcli-configure`.
2727
- no
2828

@@ -53,4 +53,4 @@
5353
* - ``CLOSED``
5454
- Alert is closed.
5555

56-
- no
56+
- no

source/includes/alerts-ack-options.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737

3838
* - ``--profile``, ``-P``
3939
- string
40-
- Name of the profile where the project ID and the |svc-api-key|\s
41-
for the project are saved. If omitted, uses the ``default``
42-
profile.
43-
40+
- Name of the profile where the project ID and the |svc-api-key|\s
41+
for the project are saved. If omitted, uses the
42+
{+default-profile+}.
43+
4444
.. seealso::
4545

4646
To learn more about creating a profile, see

source/includes/backup-checkpoints-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* - ``--profile``, ``-P``
1616
- string
1717
- Name of the profile where the project ID and the |svc-api-key|\s
18-
for the project are saved. If omitted, uses the ``default`` profile.
18+
for the project are saved. If omitted, uses the {+default-profile+}.
1919
To learn more about creating a profile, see :ref:`mcli-configure`.
2020
- no
2121

source/includes/basic-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- string
1717
- Name of the profile where the public and private
1818
keys for the project are saved. If omitted, uses the
19-
``default`` profile. To learn more about creating a
19+
{+default-profile+}. To learn more about creating a
2020
profile, see :ref:`mcli-configure`.
2121
- no
2222

source/includes/list-table-events-list-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* - ``--profile``, ``-P``
1111
- string
1212
- Name of the profile where the project ID and the |svc-api-key|\s
13-
for the project are saved. If omitted, uses the ``default`` profile.
13+
for the project are saved. If omitted, uses the {+default-profile+}.
1414
To learn more about creating a profile, see :ref:`mcli-configure`.
1515
- no
1616

source/includes/measurements-disks-describe-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
* - ``--profile``, ``-P``
108108
- string
109109
- Name of the profile where the project ID and the |svc-api-key|\s
110-
for the project are saved. If omitted, uses the ``default`` profile.
110+
for the project are saved. If omitted, uses the {+default-profile+}.
111111
To learn more about creating a profile, see :ref:`mcli-configure`.
112112
- no
113113

source/includes/mms-backup-restore-start-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
* - ``--profile``, ``-P``
8484
- string
8585
- Name of the profile where the project ID and the |svc-api-key|\s
86-
for the project are saved. If omitted, uses the ``default`` profile.
86+
for the project are saved. If omitted, uses the {+default-profile+}.
8787
To learn more about creating a profile, see :ref:`mcli-configure`.
8888
- no
8989

source/includes/quick-start-intro.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
You can configure {+mcli+} access to your MongoDB service using
2+
the :ref:`mcli-config-command` and :ref:`mcli-config-set-command`
3+
commands.
4+
5+
The following procedure creates the {+default-profile+} in the
6+
:ref:`configuration file <mcli-config-file>`. You can use this profile with all the other commands in this tutorial.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Congratulations! You have successfully created a cluster to host your
2+
data. You can view your cluster by logging in to the UI.
3+

source/includes/steps-configure-mcli-atlas.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ source:
33
file: steps-configure-mcli.yaml
44
ref: create-profile
55
replacement:
6-
serviceName: "cloud"
6+
serviceOption: ""
77
---
88
stepnum: 2
99
source:
1010
file: steps-configure-mcli.yaml
1111
ref: enter-api-key
1212
replacement:
13+
apiKeys: ":atlas:`Programmatic API Key </configure-api-access>`"
14+
projectId: ":atlas:`Project ID </tutorial/manage-project-settings/>`"
1315
service: "|service|"
1416
---
1517
stepnum: 3

source/includes/steps-configure-mcli-cm.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ source:
33
file: steps-configure-mcli.yaml
44
ref: create-profile
55
replacement:
6-
serviceName: "cloud-manager"
6+
serviceOption: "--service cloud-manager"
77
---
88
stepnum: 2
99
source:
1010
file: steps-configure-mcli.yaml
1111
ref: enter-api-key
1212
replacement:
13+
apiKeys: ":cloudmgr:`Cloud Manager API Access </tutorial/configure-public-api-access>`"
14+
projectId: ":cloudmgr:`Project ID </tutorial/manage-project-settings/>`"
1315
service: "|cloud|"
1416
---
1517
stepnum: 3

source/includes/steps-configure-mcli-om.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source:
33
file: steps-configure-mcli.yaml
44
ref: create-profile
55
replacement:
6-
serviceName: "ops-manager"
6+
serviceOption: "--service ops-manager"
77
---
88
stepnum: 2
99
source:
@@ -15,6 +15,8 @@ source:
1515
file: steps-configure-mcli.yaml
1616
ref: enter-api-key
1717
replacement:
18+
apiKeys: ":opsmgr:`Ops Manager API Acess </tutorial/configure-public-api-access>`"
19+
projectId: ":opsmgr:`Project ID </tutorial/manage-project-settings/>`"
1820
service: "|onprem|"
1921
---
2022
stepnum: 4

0 commit comments

Comments
 (0)