Skip to content

Commit 6e67e1d

Browse files
authored
Merge pull request #10 from mongodb-developer/instruqt_updates
Updating docs to include Instruqt
2 parents 14e5a31 + c1e9a45 commit 6e67e1d

28 files changed

+111
-26
lines changed

docs/20-dev-env/1-dev-env-setup.mdx

Lines changed: 111 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,158 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
13
import Screenshot from "@site/src/components/Screenshot";
24

35
# 👐 Setup dev environment
46

57
<details>
6-
<summary>🦹 If you are doing this lab as part of a MongoDB GenAI Developer Day, you can continue in the Codespace you previously created.</summary>
8+
<summary>🦹 If you are doing this lab as part of a MongoDB GenAI Developer Day, you can continue in the environment you previously created.</summary>
79

8-
Navigate to [this](https://github.com/codespaces/new/mongodb-developer/genai-devday-notebooks?quickstart=1) link. Click the **Resume this codespace** button to resume the code space you created previously.
10+
<Tabs groupId="resume lab">
11+
<TabItem value="Instruqt" label="Instruqt">
912

10-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/1-resume-codespace.png" alt="Resume codespace" />
13+
Navigate to the Instruqt lab using [this](http://mdb.link/instruqt-ai) link. Click **Continue** to continue in the sandbox you created previously.
14+
15+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/1-resume-sandbox.png" alt="Resume sandbox" />
16+
17+
In the Explorer menu, navigate to `genai-devday-notebooks` > `notebooks` > `ai-agents-lab.ipynb` This is the Jupyter Notebook you will be using throughout this lab.
18+
19+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/2-nav-notebook.png" alt="Navigate to the notebook" />
20+
21+
:::tip
22+
Notice that this documentation website is also linked in the `Agents Lab Instructions` tab of your Instruqt sandbox. Feel free to access the documentation from there instead for the rest of the lab.
23+
:::
24+
</TabItem>
25+
26+
<TabItem value="GitHub Codespaces" label="GitHub Codespaces">
27+
28+
Navigate to [this](https://github.com/codespaces/new/mongodb-developer/genai-devday-notebooks?quickstart=1) link. Click the **Resume this codespace** button to resume the codespace you created previously.
29+
30+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/1-resume-codespace.png" alt="Resume codespace" />
1131

1232
Give the codespace a few seconds to restart. When files appear in the Explorer tab, click on the file named `ai-agents-lab.ipynb` under `notebooks`. This is the Jupyter Notebook you will be using throughout this lab.
1333

14-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/2-nav-notebook.png" alt="Navigate to the notebook" />
34+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/2-nav-notebook.png" alt="Navigate to the notebook" />
35+
</TabItem>
36+
37+
<TabItem value="Local" label="Local">
38+
39+
Open the browser tab where your Jupyter Server from before is running and open the file named `ai-agents-lab.ipynb`.
40+
41+
<Screenshot url="localhost:8888/tree" src="img/screenshots/20-dev-env/1-dev-env-setup/local/1-nav-notebook.png" alt="Jupyter Notebook" />
42+
43+
</TabItem>
44+
</Tabs>
1545
</details>
1646

1747
:::tip
1848
In this lab, we will be using Jupyter Notebooks, which is an interactive Python environment. If you are new to Jupyter Notebooks, use [this](https://mongodb-developer.github.io/vector-search-lab/docs/dev-env/jupyter-notebooks) guide to familiarize yourself with the environment.
1949
:::
2050

21-
## Option 1: GitHub Codespaces
51+
<Tabs groupId="setup options">
52+
<TabItem value="Instruqt" label="Instruqt">
2253

23-
You will be working in GitHub Codespaces throughout this lab. A codespace is a cloud-hosted, containerized development environment that comes pre-configured with all the tools you need to run this lab.
54+
Instruqt is a lab platform that provides cloud-based sandboxes which come pre-configured with all the tools you need to run this lab.
2455

25-
Navigate to [this](https://github.com/codespaces/new/mongodb-developer/genai-devday-notebooks?quickstart=1) link. You will be prompted to sign into GitHub if you haven't already. Once signed in, click the **Create new codespace** button to create a new codespace.
56+
**Navigate to the Instruqt lab using [this](http://mdb.link/instruqt-ai) link.** Fill out the form that appears and click **Submit and access**.
2657

27-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/3-create-codespace.png" alt="Start a codespace" />
58+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/3-submit-form.png" alt="Submit Instruqt form" />
2859

29-
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
60+
Click **Start** to launch the lab environment.
61+
62+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/4-start-sandbox-setup.png" alt="Start Instruqt sandbox" />
63+
64+
You should see a screen with a purple progress bar indicating that Instruqt is preparing a sandbox with all the required libraries for this lab and a MongoDB cluster.
65+
66+
Once this is done, you should see a Start button at the bottom right of the screen. Click this to enter the lab.
67+
68+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/5-start-lab.png" alt="Start Instruqt lab" />
3069

3170
### Connect to the MongoDB cluster
3271

33-
Once the environment is built, you will be prompted to connect to the MongoDB cluster via MongoDB's VSCode extension. This will allow you to visualize the data that we will import into the cluster later in the lab, directly from the VSCode IDE.
72+
Let's first connect to the MongoDB cluster that was created for you. This will allow you to view data we import into the cluster later in the lab, directly from the VSCode IDE.
3473

35-
To connect to the cluster, click the leaf icon in the left navigation bar of the IDE.
74+
To do this, click the leaf icon in the left navigation bar of the IDE. This is MongoDB's VSCode extension.
3675

37-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/4-click-leaf.png" alt="Click leaf icon" />
76+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/6-click-leaf.png" alt="Click leaf icon" />
3877

39-
Under **Connections**, click the _mongodb:27017_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
78+
Under **Connections**, click the _Local MongoDB Atlas_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
4079

41-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/5-connect-cluster.png" alt="Connect to the cluster" />
80+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/7-connect-cluster.png" alt="Connect to the cluster" />
4281

43-
If the connection was successful, you should see the message **Connected to: mongodb:27017** with a green indicator.
82+
If the connection was successful, you should see a green leaf and a "connected" message appear around the _Local MongoDB Atlas_ connection.
4483

4584
You will also see the default databases in the cluster appear under **Connections**. Any additional databases we create during the lab will also appear here.
4685

47-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/6-connection-successful.png" alt="Connection successful" />
86+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/8-connection-successful.png" alt="Connection successful" />
4887

4988
### Jupyter Notebook setup
5089

5190
You will be filling code in a Jupyter Notebook during this lab, so let's get set up with that next!
5291

53-
Within the codespace, click on the files icon in the left navigation bar of the IDE. In the Explorer menu, under `notebooks`, click on the file named `ai-agents-lab.ipynb` to open the Jupyter Notebook for this lab.
92+
Within the sandbox, click on the files icon in the left navigation bar of the IDE. In the Explorer menu, navigate to `genai-devday-notebooks` > `notebooks` > `ai-agents-lab.ipynb` to open the Jupyter Notebook for this lab.
5493

55-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/7-nav-notebook.png" alt="Navigate to the notebook" />
94+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/2-nav-notebook.png" alt="Navigate to the notebook" />
5695

5796
Next, select the Python interpreter by clicking **Select Kernel** at the top right of the IDE.
5897

59-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/8-select-kernel.png" alt="Select kernel" />
98+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/9-select-kernel.png" alt="Select kernel" />
6099

61100
In the modal that appears, click **Python environments...** and select the interpreter that is marked as **Recommended** or **Global Env**.
62101

63-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/9-python-env-modal.png" alt="Select Python Environments" />
102+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/10-python-env-modal.png" alt="Select Python Environments" />
64103

65-
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/10-select-recommended.png" alt="Select recommended interpreter" />
104+
<Screenshot url="https://play.instruqt.com" src="img/screenshots/20-dev-env/1-dev-env-setup/instruqt/11-select-recommended.png" alt="Select recommended interpreter" />
66105

67106
That's it! You're ready for the lab!
68107

69-
## Option 2: Run locally
70-
71-
:::caution
72-
During the lab, we will use GitHub Codespaces. These instructions are here just in case you can't use Codespaces or if you really, really, really want a local installation.
108+
:::tip
109+
Notice that this documentation website is also linked in the `Agents Lab Instructions` tab of your Instruqt sandbox. Feel free to access the documentation from there instead for the rest of the lab.
73110
:::
74111

112+
</TabItem>
113+
114+
<TabItem value="GitHub Codespaces" label="GitHub Codespaces">
115+
116+
A codespace is a cloud-hosted development environment from GitHub, that comes pre-configured with all the tools you need to run this lab.
117+
118+
**To create a codespace, navigate to [this](https://github.com/codespaces/new/mongodb-developer/genai-devday-notebooks?quickstart=1) link.** You will be prompted to sign into GitHub if you haven't already. Once signed in, click the **Create new codespace** button to create a new codespace.
119+
120+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/3-create-codespace.png" alt="Start a codespace" />
121+
122+
Let it run for a few seconds as it prepares a Docker container with all the required libraries and a MongoDB cluster.
123+
124+
### Connect to the MongoDB cluster
125+
126+
Let's first connect to the MongoDB cluster that was created for you. This will allow you to view data we import into the cluster later in the lab, directly from the VSCode IDE.
127+
128+
To do this, click the leaf icon in the left navigation bar of the IDE. This is MongoDB's VSCode extension.
129+
130+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/4-click-leaf.png" alt="Click leaf icon" />
131+
132+
Under **Connections**, click the _Local MongoDB Atlas_ connection. This should automatically establish a connection to the local MongoDB cluster running on port 27017.
133+
134+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/5-connect-cluster.png" alt="Connect to the cluster" />
135+
136+
If the connection was successful, you should see a green leaf and a "connected" message appear around the _Local MongoDB Atlas_ connection.
137+
138+
You will also see the default databases in the cluster appear under **Connections**. Any additional databases we create during the lab will also appear here.
139+
140+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/6-connection-successful.png" alt="Connection successful" />
141+
142+
### Jupyter Notebook setup
143+
144+
You will be filling code in a Jupyter Notebook during this lab, so let's get set up with that next!
145+
146+
Within the codespace, click on the files icon in the left navigation bar of the IDE. In the Explorer menu, under `notebooks`, click on the file named `ai-agents-lab.ipynb` to open the Jupyter Notebook for this lab.
147+
148+
<Screenshot url="https://github.com/codespaces" src="img/screenshots/20-dev-env/1-dev-env-setup/codespaces/2-nav-notebook.png" alt="Navigate to the notebook" />
149+
150+
That's it! You're ready for the lab!
151+
152+
</TabItem>
153+
154+
<TabItem value="Local" label="Local">
155+
75156
To run the lab locally, follow the steps below:
76157

77158
* Clone the [GitHub repo](https://github.com/mongodb-developer/genai-devday-notebooks.git) for this lab by executing the following command from the terminal:
@@ -108,4 +189,8 @@ jupyter notebook
108189

109190
* In the browser tab that pops up, open the file named `ai-agents-lab.ipynb`.
110191

111-
<Screenshot url="localhost:8888/tree" src="img/screenshots/20-dev-env/1-dev-env-setup/11-jupyter-notebook.png" alt="Jupyter Notebook" />
192+
<Screenshot url="localhost:8888/tree" src="img/screenshots/20-dev-env/1-dev-env-setup/local/1-nav-notebook.png" alt="Jupyter Notebook" />
193+
194+
</TabItem>
195+
196+
</Tabs>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)