Skip to content

Commit 0cd9fd5

Browse files
authored
Merge pull request #21 from mongodb-developer/improve-initial-setup
Improve initial setup
2 parents 0f18b33 + 7aa668e commit 0cd9fd5

File tree

1 file changed

+53
-17
lines changed

1 file changed

+53
-17
lines changed

docs/setup/index.mdx

Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,45 @@
22
sidebar_position: 2
33
---
44

5+
import Tabs from '@theme/Tabs';
6+
import TabItem from '@theme/TabItem';
7+
8+
59
# 👐 Initial Setup and Access for Atlas CLI
610

7-
**Run this section in your notebook**
11+
This section will cover the required notebook operations that must be fulfilled to run the challenges.
812

9-
:::info
10-
You can clone our template or use it in one of the online environments: https://github.com/mongodb-developer/security-lab-notebooks/blob/main/template_notebook.ipynb
13+
## Open the template notebook
1114

1215
:::tip
13-
**Important! Each code that needs to be edited is marked with `<CODE_BLOCK>`.**
16+
We recommend using one of the online environments below to run Jupyter Notebooks.
1417
:::
1518

16-
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mongodb-developer/security-lab-notebooks/blob/main/template_notebook.ipynb)
19+
| Google Colab | GitHub Codespaces | Clone locally |
20+
| :------------- | :---------- | :---------- |
21+
| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mongodb-developer/security-lab-notebooks/blob/main/template_notebook.ipynb) | [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=mongodb-developer/security-lab-notebooks) | [Template notebook](https://github.com/mongodb-developer/security-lab-notebooks/blob/main/template_notebook.ipynb)|
1722

18-
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=mongodb-developer/security-lab-notebooks)
1923

20-
This section will cover the required notebook operations that must be fulfilled to run the challenges.
2124

22-
### 1. Install Atlas CLI on the notebook environment.
25+
## 1. Install Atlas CLI on the notebook environment.
26+
27+
Run the 1st cell in the notebook to install the [Atlas CLI](https://www.mongodb.com/docs/atlas/atlas-cli/), a command line interface to manage MongoDB clusters.
28+
29+
:::note
30+
If you're running the notebook in a Codespace you'll be prompted to install two suggested extensions: a Python environment and Jupyter Notebooks support. Install them. When finsished, select the Python environment when prompted.
31+
:::
32+
2333
```python
2434
# Install atlas-cli
2535

26-
!wget https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.37.0_linux_x86_64.deb
27-
!dpkg -i mongodb-atlas-cli_1.37.0_linux_x86_64.deb
36+
!wget https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.46.3_linux_x86_64.deb
37+
!sudo dpkg -i mongodb-atlas-cli_1.46.3_linux_x86_64.deb
2838

2939
# If you require sudo privilege, run the following instead:
30-
# !sudo dpkg -i mongodb-atlas-cli_1.37.0_linux_x86_64.deb
40+
# !sudo dpkg -i mongodb-atlas-cli_1.46.3_linux_x86_64.deb
3141
```
3242

33-
### 2. Authenticate the CLI against your Atlas organization.
43+
## 2. Authenticate the CLI against your Atlas organization.
3444

3545
`atlas auth login` typically enters interactive mode.
3646
We are piping a new line character so that it selects a default organization for you.
@@ -80,16 +90,39 @@ Successfully logged in as [email protected].
8090
```
8191

8292

93+
94+
95+
</details>
96+
:::
97+
98+
### 2.1 Get the organization ID
99+
100+
If you are a member of more than one Atlas organization, after login in you'll see a list of your organizations and you can select the one you prefer to run the lab. But if you're using a free account you only have one organization, and the list won't appear.
101+
102+
103+
<Tabs groupId="orgId">
104+
<TabItem value="moreThanOne" label="You have more than one organization">
105+
83106
Take a note of the relevant Organization ID for next steps and "STOP" the cell.
84107

85108
<img src="../img/SuccessPhase.png" />
86109

87-
Take a note of the relevant Organization ID for next step.
88110

89-
</details>
90-
:::
111+
</TabItem>
112+
113+
<TabItem value="justOne" label="You have only one organization (free accounts most likely)">
114+
115+
You won't see any organization id in the response. Run the 2.1 Cell `Get Organization ID` and copy the `Organization ID`.
91116

92-
### 3. Create a new project called "MySecureProj."
117+
```
118+
ID NAME
119+
31415926535 My Org's Name
120+
```
121+
122+
</TabItem>
123+
</Tabs>
124+
125+
## 3. Create a new project called "MySecureProj."
93126
Replace `<ORGANIZATION_ID>` with the Organization ID from the previous step.
94127
```
95128
# Retain the quotes ("") when pasting the Organization ID
@@ -99,8 +132,11 @@ org_id = "<ORGANIZATION_ID>"
99132
There should be an output which shows the Project ID of the project created. Use this Project ID for the next step.
100133

101134

102-
### 4. Create your challenge cluster.
135+
## 4. Create your challenge cluster.
103136
Replace `<PROJECT_ID>` with the Project ID from the previous step.
137+
138+
This will provision an M0, free forever cluster, running in AWS in region US_EAST_1. That cluster will be associated to the project we just created.
139+
104140
```python
105141
# Retain the quotes ("") when pasting the Project ID
106142
project_id = "<PROJECT_ID>"

0 commit comments

Comments
 (0)