Skip to content

Commit e2a6a00

Browse files
(DOCSP-10730): Add install for yum & apt (#129)
* (DOCSP-10730): Add install for yum & apt * Tech input * Cleanup * Copy review
1 parent 82d7244 commit e2a6a00

File tree

4 files changed

+185
-2
lines changed

4 files changed

+185
-2
lines changed

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ name = "mongocli"
33
intersphinx = ["https://docs.mongodb.com/manual/objects.inv","https://docs.atlas.mongodb.com/objects.inv"]
44

55
[constants]
6+
aagent = "Automation Agent"
67
default-profile = ":ref:`default profile <mcli-profiles>`"
78
mcli = "MongoDB CLI"
89
mcli-long = "MongoDB Command Line Interface (``mongocli``)"
910
mcli-version = "1.1.0"
1011
mdbagent = "MongoDB Agent"
1112
mdbVersion = "4.2"
12-
aagent = "Automation Agent"
13+
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
stepnum: 1
2+
ref: mcli-apt-import
3+
level: 4
4+
title: "Import the public key used by ``apt``."
5+
content: |
6+
From a terminal, issue the following command to import the MongoDB
7+
public GPG Key from
8+
`<https://www.mongodb.org/static/pgp/server-{+mdbVersion+}.asc>`_.
9+
10+
.. code-block:: sh
11+
12+
wget -qO - https://www.mongodb.org/static/pgp/server-{+mdbVersion+}.asc | sudo
13+
apt-key add -
14+
15+
A succesful command returns an ``OK``.
16+
---
17+
stepnum: 2
18+
ref: mcli-apt-create-list-file
19+
level: 4
20+
title: "Create a list file for your edition of MongoDB."
21+
content: |
22+
23+
.. tabs::
24+
25+
.. tab:: MongoDB Community Edition
26+
:tabid: mdb-ent
27+
28+
Create the list file ``/ect/apt/sources.list.d/mongodb-org-{+mdbVersion+}.list`` for your version of Ubuntu.
29+
30+
.. tabs::
31+
32+
.. tab:: Ubuntu 20.04 (Focal)
33+
:tabid: comm-focal
34+
35+
.. code-block:: sh
36+
37+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/{+mdbVersion+} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+mdbVersion+}.list
38+
39+
.. tab:: Ubuntu 18.04 (Bionic)
40+
:tabid: comm-bionic
41+
42+
.. code-block:: sh
43+
44+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/{+mdbVersion+} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+mdbVersion+}.list
45+
46+
.. tab:: MongoDB Enterprise Edition
47+
:tabid: mdb-comm
48+
49+
Create a ``/etc/apt/sources.list.d/mongodb-enterprise.list``
50+
file for MongoDB.
51+
52+
.. tabs::
53+
54+
.. tab:: Ubuntu 20.04 (Focal)
55+
:tabid: ent-focal
56+
57+
.. code-block:: sh
58+
59+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-enterprise/{+mdbVersion+} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
60+
61+
.. tab:: Ubuntu 18.04 (Bionic)
62+
:tabid: ent-bionic
63+
64+
.. code-block:: sh
65+
66+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-enterprise/{+mdbVersion+} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
67+
68+
---
69+
stepnum: 3
70+
ref: mcli-apt-reload
71+
level: 4
72+
title: "Reload the local package database."
73+
content: |
74+
Invoke the following command:
75+
76+
.. code-block:: sh
77+
78+
sudo apt-get update
79+
---
80+
stepnum: 4
81+
ref: mcli-apt-install
82+
level: 4
83+
title: "Install the {+mcli+}."
84+
content: |
85+
Invoke the following command:
86+
87+
.. code-block:: sh
88+
89+
sudo apt-get install -y mongocli
90+
---
91+
stepnum: 5
92+
level: 4
93+
ref: mcli-verify
94+
source:
95+
ref: mcli-verify-install
96+
file: steps-install-mcli-source.yaml
97+
...
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
stepnum: 1
2+
ref: mcli-yum-configure
3+
level: 4
4+
title: "Configure ``yum`` for your edition of MongoDB."
5+
content: |
6+
7+
.. tabs::
8+
9+
.. tab:: MongoDB Community Edition
10+
:tabid: mdb-ent
11+
12+
Create a ``/etc/yum.repos.d/mongodb-org-{+mdbVersion+}.repo``
13+
file so that you can install {+mcli+} directly using ``yum``.
14+
15+
.. code-block:: text
16+
17+
[mongodb-org-{+mdbVersion+}]
18+
name=MongoDB Repository
19+
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/{+mdbVersion+}/x86_64/
20+
gpgcheck=1
21+
enabled=1
22+
gpgkey=https://www.mongodb.org/static/pgp/server-{+mdbVersion+}.asc
23+
24+
.. tab:: MongoDB Enterprise Edition
25+
:tabid: mdb-comm
26+
27+
Create a
28+
``/etc/yum.repos.d/mongodb-enterprise-{+mdbVersion+}.repo`` file
29+
so that you can install {+mcli+} directly using
30+
``yum``:
31+
32+
.. code-block:: text
33+
34+
[mongodb-enterprise-{+mdbVersion+}]
35+
name=MongoDB Repository
36+
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/{+mdbVersion+}/$basearch/
37+
gpgcheck=1
38+
enabled=1
39+
gpgkey=https://www.mongodb.org/static/pgp/server-{+mdbVersion+}.asc
40+
41+
---
42+
stepnum: 2
43+
ref: mcli-yum-install
44+
level: 4
45+
title: "Install the {+mcli+}."
46+
content: |
47+
Invoke the following ``yum`` command:
48+
49+
.. code-block:: sh
50+
51+
sudo yum install -y mongocli
52+
---
53+
stepnum: 3
54+
level: 4
55+
ref: mcli-verify
56+
source:
57+
ref: mcli-verify-install
58+
file: steps-install-mcli-source.yaml
59+
...

source/install.txt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ You can use the {+mcli-long+} to deploy and manage MongoDB clusters in
2727

2828
To install the {+mcli+}, choose one of the following methods:
2929

30-
1. Install with Homebrew (MacOS and Linux only).
30+
1. Install with a package manager like Homebrew,
31+
Yum, or Apt.
3132
#. Download and extract the binary.
3233
#. Clone the GitHub repository and install the {+mcli+} with Go.
3334

@@ -48,6 +49,21 @@ To install the {+mcli+}, choose one of the following methods:
4849
1. Use a MacOS or Linux operating system.
4950
#. Install `Homebrew <https://brew.sh/>`__.
5051

52+
.. tab:: Yum
53+
:tabid: yum
54+
55+
.. tab:: Apt
56+
:tabid: apt
57+
58+
Prerequisites
59+
-------------
60+
61+
To install the {+mcli+} using Apt, you must install ``gnupg``:
62+
63+
.. code-block:: sh
64+
65+
sudo apt-get install gnupg
66+
5167
.. tab:: Download Binary
5268
:tabid: download-binary
5369

@@ -74,6 +90,16 @@ Procedure
7490

7591
.. include:: /includes/steps/install-mcli-brew.rst
7692

93+
.. tab:: Yum
94+
:tabid: yum
95+
96+
.. include:: /includes/steps/install-mcli-yum.rst
97+
98+
.. tab:: Apt
99+
:tabid: apt
100+
101+
.. include:: /includes/steps/install-mcli-apt.rst
102+
77103
.. tab:: Download Binary
78104
:tabid: download-binary
79105

0 commit comments

Comments
 (0)