Skip to content

Commit 398ffe8

Browse files
authored
fix sandbox script and add readme (Metta-AI#254)
e### TL;DR Fixed an infinite recursion bug in the sandbox script and added documentation for sandbox setup and management. ### What changed? - Removed the self-referential call to `./devops/sandbox.sh` inside the sandbox script that was causing infinite recursion - Added a new README.md file in the `devops/sandbox` directory with instructions for: - Setting up a new Mac machine - Launching a sandbox on AWS - Connecting to a sandbox via SSH - Stopping a sandbox ### How to test? 1. Run the sandbox script to verify it no longer causes infinite recursion 2. Follow the instructions in the new README to: - Set up a new machine: `python devops/aws/setup_machine.py` - Launch a sandbox: `./devops/aws/cmd.sh launch --cmd=sandbox --run=sandbox --job-name=<sandbox_name>` - Connect to the sandbox: `./devops/aws/cmd.sh ssh --job-name=<sandbox_name>` - Stop the sandbox: `./devops/aws/cmd.sh stop <sandbox_name>` ### Why make this change? The sandbox script had a critical bug where it was calling itself recursively, which would eventually crash the system. Additionally, there was no clear documentation on how to set up and manage sandboxes, making it difficult for new team members to use this functionality.
1 parent aa1803e commit 398ffe8

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

devops/sandbox.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ echo "Running sandbox"
99

1010
while true; do
1111
echo "Running sandbox"
12-
./devops/sandbox.sh
1312
sleep 100
1413
done

devops/sandbox/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Sandbox Management Guide
2+
3+
This guide provides instructions for setting up and managing sandbox environments on AWS.
4+
5+
## Initial Setup
6+
7+
To set up a new Mac machine:
8+
9+
```bash
10+
python devops/aws/setup_machine.py
11+
```
12+
13+
## Sandbox Operations
14+
15+
### Launching a Sandbox
16+
17+
To launch a new sandbox on AWS:
18+
19+
```bash
20+
./devops/aws/cmd.sh launch --cmd=sandbox --run=sandbox --job-name=<sandbox_name>
21+
```
22+
23+
### Connecting to a Sandbox
24+
25+
To connect to an existing sandbox:
26+
27+
1. First claim it in Asana: [Dev Cluster](https://app.asana.com/1/1209016784099267/project/1209353759349008/task/1210106185904866?focus=true)
28+
2. Then connect using:
29+
30+
```bash
31+
./devops/aws/cmd.sh ssh --job-name=<sandbox_name>
32+
```
33+
34+
### Stopping a Sandbox
35+
36+
To stop a running sandbox:
37+
38+
```bash
39+
./devops/aws/cmd.sh stop <sandbox_name>
40+
```
41+
42+

0 commit comments

Comments
 (0)