Skip to content

Commit 9ed1217

Browse files
authored
(DOCSP-18640) Add update steps for new MCLI versions (#638) (#639)
* (DOCSP-18640) Add update steps for new versions
1 parent a864783 commit 9ed1217

9 files changed

+223
-12
lines changed

snooty.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ data-lake-store = "data store"
177177
default-profile = ":ref:`default profile <mcli-profiles>`"
178178
mcli = "MongoDB CLI"
179179
mcli-long = "MongoDB Command Line Interface (``mongocli``)"
180-
mcli-version = "1.20.0"
180+
mcli-version = "1.20.1"
181181
mdbagent = "MongoDB Agent"
182182
mdbVersion = "5.0"
183183
mongosh = ":binary:`~bin.mongosh`"

source/configure/environment-variables.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,11 @@ The {+mcli+} supports the following environment variables:
107107
* - ``MCLI_MONGOSH_PATH``
108108
- The full path on your local system to the MongoDB Shell,
109109
{+mongosh+}.
110+
111+
* - ``MCLI_SKIP_UPDATE_CHECK``
112+
- When set to ``yes``, the {+mcli+} does not prompt you to update
113+
to new versions.
110114

111-
112115
* - | ``MCLI_OPS_MANAGER_CA_CERTIFICATE``
113116
| *Ops Manager only*
114117
- If applicable, the full path on your local

source/includes/steps-install-mcli-source.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ content: |
3232
.. example::
3333
3434
In the following example, the user downloads and extracts a
35-
binary for the {+mcli+} to the ``/mcli_{+mcli-version+}-macOS_x86_64``
36-
directory.
35+
binary for the {+mcli+} to the
36+
``/mcli_{+mcli-version+}-macOS_x86_64``directory.
3737
3838
The user then moves the executable file to a directory already in
3939
their ``PATH``:
@@ -57,4 +57,17 @@ content: |
5757
5858
The command returns the available commands and options for the
5959
{+mcli+}.
60+
---
61+
ref: mcli-verify-update
62+
level: 4
63+
title: "Verify your update."
64+
content: |
65+
66+
To verify your ``mongocli`` update, run the ``--version`` command:
67+
68+
.. code-block:: sh
69+
70+
mongocli --version
71+
72+
The command returns your {+mcli+} version.
6073
...
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
stepnum: 1
2+
ref: mcli-apt-update
3+
level: 4
4+
title: "Update the {+mcli+}."
5+
content: |
6+
Invoke the following command:
7+
8+
.. code-block:: sh
9+
10+
sudo apt-get install --only-upgrade mongocli
11+
12+
---
13+
stepnum: 2
14+
level: 4
15+
ref: mcli-verify
16+
source:
17+
ref: mcli-verify-update
18+
file: steps-install-mcli-source.yaml
19+
...
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
stepnum: 1
3+
ref: mcli-update-binary
4+
level: 4
5+
title: "Update the {+mcli+}."
6+
content: |
7+
8+
1. Remove any existing {+mcli+} binaries to prevent
9+
conflicts between versions.
10+
11+
#. Download and extract the correct binary for your operating system:
12+
13+
.. list-table::
14+
:header-rows: 1
15+
:widths: 50 50
16+
17+
* - Operating System
18+
- Download
19+
20+
* - Windows
21+
- :github:`.zip </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_windows_x86_64.zip>`, :github:`.msi </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_windows_x86_64.msi>`
22+
23+
.. note::
24+
25+
The ``.msi`` download for Windows replaces old
26+
installations of the {+mcli+}, so you don't need to
27+
remove existing binaries first.
28+
29+
* - MacOS
30+
- :github:`.tar.gz (x86-64) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_macos_x86_64.zip>`, :github:`.tar.gz (ARM) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_macos_arm64.zip>`
31+
32+
* - Ubuntu/Debian
33+
- :github:`.deb (x86-64) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_linux_x86_64.deb>`, :github:`.deb (ARM) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_linux_arm64.deb>`
34+
35+
* - RHEL/CentOS/SLES/AMZ
36+
- :github:`.rpm (x86-64) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_linux_x86_64.rpm>`, :github:`.rpm (ARM) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_linux_arm64.rpm>`
37+
38+
* - Linux
39+
- :github:`.tar.gz (x86-64) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_linux_x86_64.tar.gz>`, :github:`.tar.gz (ARM) </mongodb/mongocli/releases/download/v{+mcli-version+}/mongocli_{+mcli-version+}_linux_arm64.tar.gz>`
40+
41+
#. Run the executable file.
42+
---
43+
stepnum: 2
44+
level: 4
45+
ref: mcli-verify
46+
source:
47+
ref: mcli-verify-update
48+
file: steps-install-mcli-source.yaml
49+
...
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
stepnum: 1
3+
ref: mcli-homebrew-update
4+
level: 4
5+
title: "Update the {+mcli+}"
6+
content: |
7+
Invoke the following ``brew`` commands:
8+
9+
.. code-block:: sh
10+
11+
brew update
12+
brew upgrade mongocli
13+
14+
---
15+
stepnum: 2
16+
level: 4
17+
ref: mcli-verify
18+
source:
19+
ref: mcli-verify-update
20+
file: steps-install-mcli-source.yaml
21+
22+
...
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
stepnum: 1
3+
ref: mcli-update-repo
4+
level: 4
5+
title: "Update the {+mcli+}."
6+
content: |
7+
8+
1. Change directories to your local ``mongocli`` repostiory:
9+
10+
.. code-block:: sh
11+
12+
cd mongocli
13+
14+
1. Update your local repository with the latest changes from MongoDB:
15+
16+
.. code-block:: sh
17+
18+
git pull
19+
20+
#. Reinstall {+mcli+} using Go.
21+
22+
.. code-block:: sh
23+
24+
make install
25+
---
26+
stepnum: 2
27+
level: 4
28+
ref: mcli-verify
29+
source:
30+
ref: mcli-verify-update
31+
file: steps-install-mcli-source.yaml
32+
...
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
stepnum: 1
2+
ref: mcli-yum-update
3+
level: 4
4+
title: "Update the {+mcli+}."
5+
content: |
6+
Invoke the following ``yum`` command:
7+
8+
.. code-block:: sh
9+
10+
yum update mongocli
11+
---
12+
stepnum: 2
13+
level: 4
14+
ref: mcli-verify
15+
source:
16+
ref: mcli-verify-update
17+
file: steps-install-mcli-source.yaml
18+
...

source/install.txt

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
.. _mcli-install:
44

55
==================================================================
6-
Install the {+mcli+}
6+
Install or Update the {+mcli+}
77
==================================================================
88

99
.. default-domain:: mongodb
1010

11+
.. contents:: On this page
12+
:local:
13+
:backlinks: none
14+
:depth: 1
15+
:class: singlecol
16+
1117
.. toctree::
1218
:titlesonly:
1319

@@ -17,15 +23,16 @@ You can use the {+mcli-long+} to deploy and manage MongoDB clusters in
1723
|service|, |cloud-short|, and |onprem|. For operating system and MongoDB
1824
service version requirements, see :ref:`mcli-compatibility`.
1925

26+
Install the {+mcli+}
27+
----------------------------
28+
2029
To install the {+mcli+}, choose one of the following methods:
2130

2231
1. Install with a package manager like Homebrew,
2332
Yum, or Apt.
2433
#. Download and extract the binary.
2534
#. Clone the GitHub repository and install the {+mcli+} with Go.
2635

27-
|
28-
2936
.. _mcli-install-prereqs:
3037

3138
.. tabs::
@@ -34,7 +41,7 @@ To install the {+mcli+}, choose one of the following methods:
3441
:tabid: Homebrew
3542

3643
Prerequisites
37-
-------------
44+
~~~~~~~~~~~~~
3845

3946
To install the {+mcli+} using Homebrew, you must:
4047

@@ -48,7 +55,7 @@ To install the {+mcli+}, choose one of the following methods:
4855
:tabid: apt
4956

5057
Prerequisites
51-
-------------
58+
~~~~~~~~~~~~~
5259

5360
To install the {+mcli+} using Apt, you must install ``gnupg``:
5461

@@ -63,7 +70,7 @@ To install the {+mcli+}, choose one of the following methods:
6370
:tabid: clone-repo
6471

6572
Prerequisites
66-
-------------
73+
~~~~~~~~~~~~~
6774

6875
To install the {+mcli+}, you must install the following tools:
6976

@@ -72,7 +79,7 @@ To install the {+mcli+}, choose one of the following methods:
7279
#. `Go v1.17 or newer <https://golang.org/doc/install#install>`_.
7380

7481
Procedure
75-
---------
82+
~~~~~~~~~
7683

7784
.. tabs::
7885
:hidden:
@@ -83,7 +90,7 @@ Procedure
8390
.. include:: /includes/steps/install-mcli-brew.rst
8491

8592
.. tab:: Yum
86-
:tabid: yum
93+
:tabid: yum
8794

8895
.. include:: /includes/steps/install-mcli-yum.rst
8996

@@ -102,6 +109,54 @@ Procedure
102109

103110
.. include:: /includes/steps/install-mcli-repo.rst
104111

112+
Update the {+mcli+}
113+
---------------------------
114+
115+
To update the {+mcli+}, follow the procedure for the method with which
116+
you installed the {+mcli+}:
117+
118+
.. tabs::
119+
120+
.. tab:: Homebrew
121+
:tabid: Homebrew
122+
123+
Procedure
124+
~~~~~~~~~
125+
126+
.. include:: /includes/steps/update-mcli-brew.rst
127+
128+
.. tab:: Yum
129+
:tabid: yum
130+
131+
Procedure
132+
~~~~~~~~~
133+
134+
.. include:: /includes/steps/update-mcli-yum.rst
135+
136+
.. tab:: Apt
137+
:tabid: apt
138+
139+
Procedure
140+
~~~~~~~~~
141+
142+
.. include:: /includes/steps/update-mcli-apt.rst
143+
144+
.. tab:: Download Binary
145+
:tabid: download-binary
146+
147+
Procedure
148+
~~~~~~~~~
149+
150+
.. include:: /includes/steps/update-mcli-binary.rst
151+
152+
.. tab:: Clone Repository
153+
:tabid: clone-repo
154+
155+
Procedure
156+
~~~~~~~~~
157+
158+
.. include:: /includes/steps/update-mcli-repo.rst
159+
105160
Next Steps
106161
----------
107162

0 commit comments

Comments
 (0)