diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..950eaae --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +NEXT_PUBLIC_LAB3_TERMINAL_PATH=/wetty diff --git a/README.md b/README.md index 13a5ce0..2f0a74f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,23 @@ npm run dev 3. Open `http://localhost:3000`. +## Lab 3 Web Terminal + +Set `NEXT_PUBLIC_LAB3_TERMINAL_PATH` to the WeTTY endpoint used by your deployment. The default expected path is `/wetty`, and `.env.example` includes that value. Local environments can also provide a full URL such as `http://127.0.0.1:7681/wetty`. + +The Lab 3 widget assumes: + +- WeTTY runs on the lab host and is bound to `127.0.0.1` +- the public proxy forwards `/wetty` to the local WeTTY port +- WebSocket upgrade happens at the reverse proxy +- WeTTY is launched as root so it can present `/bin/login` locally instead of SSH + +Example service command: + +```bash +wetty --host 127.0.0.1 --port 3001 --base /wetty --allow-iframe +``` + ## Project Structure ```text diff --git a/content/labs/lab-3-llama-cpp-and-ollama.md b/content/labs/lab-3-llama-cpp-and-ollama.md index a521d83..e59cfde 100644 --- a/content/labs/lab-3-llama-cpp-and-ollama.md +++ b/content/labs/lab-3-llama-cpp-and-ollama.md @@ -24,7 +24,11 @@ In this lab, we will: Execute sections require running commands and producing output. -To start this lab, you'll need CLI access: +To start this lab, use the embedded terminal below. It connects to the same lab machine in your browser and should prompt you to log in with the default `student` account. + +
+ +If the embedded terminal is unavailable, you can still fall back to: - SSH -Lab 3 Terminal
+
+ The terminal is docked to the bottom of the page. Expand it with the
+ arrow when you're ready to work from /home/student/lab3.
+
+ Work from /home/student/lab3, or pop the terminal out
+ into a full tab for more room.
+
+ Connecting to the embedded terminal... +
+ ) : null} + + {status === "error" ? ( +
+ The reverse proxy is not running for {terminalPath}.
+
+ If the terminal page does not appear, open it in a new tab or fall
+ back to SSH on <IP>:22.
+