Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e5de5f5
added in validation for input files and permissions while creating di…
KesterTan Jan 26, 2025
2283fbe
removed unnecessary files
KesterTan Jan 26, 2025
5cc5004
added thread pool for scp commands
KesterTan Jan 26, 2025
81422e1
added more in-depth print statements
KesterTan Jan 26, 2025
9760759
reverted threading and added logging
KesterTan Feb 2, 2025
f508a15
reverted thread pool
KesterTan Feb 9, 2025
e460603
remove dump
KesterTan Feb 9, 2025
0b3f866
Small fixces
evanyeyeye Feb 9, 2025
9a27e47
reverted threading
KesterTan Feb 9, 2025
52326da
small fixes
KesterTan Feb 9, 2025
014ad49
stressTest.py working
coder6583 Feb 11, 2025
1c506a2
Incorporated PDL correctness changes
KesterTan Feb 16, 2025
02c3f11
Merge branch 'ec2-cli-testing' into copy-in
KesterTan Feb 19, 2025
b753118
Added some stabilization time
KesterTan Feb 20, 2025
e6c19f3
Changed stabilization
KesterTan Feb 20, 2025
6facb4e
Added timeout using aws waiter
KesterTan Feb 20, 2025
53a2858
Syntax issues
KesterTan Feb 20, 2025
e23e8e3
Syntax issues and logging
KesterTan Feb 20, 2025
d78f88b
readme updated
coder6583 Feb 20, 2025
c8263ee
Fixed client region
KesterTan Feb 20, 2025
3c22e1f
Revert stop before
KesterTan Feb 20, 2025
1b83595
Revert sleep
KesterTan Feb 20, 2025
47388c9
Revert aws waiter
KesterTan Feb 20, 2025
4d24ee5
Update .gitignore
evanyeyeye Mar 17, 2025
f609b07
Clean dump
evanyeyeye Mar 17, 2025
158f0af
Quality improvements
evanyeyeye Mar 17, 2025
20c8994
Fix gitignore
evanyeyeye Mar 17, 2025
128a2e7
Update .gitignore
evanyeyeye Mar 17, 2025
5493761
fixed stressTest termination
coder6583 Mar 31, 2025
9584e51
updated .gitignore for security key
coder6583 Apr 7, 2025
ce23c9d
Merge branch 'ec2-cli-testing' into copy-in
coder6583 Apr 7, 2025
8f59e44
copy boto.cfg
KesterTan Sep 16, 2025
4950256
docker installation and install ping
KesterTan Sep 16, 2025
85b9a60
copy boto if exist
KesterTan Sep 16, 2025
97a1792
Removed detachVM argument
KesterTan Oct 6, 2025
0b134f0
chnaged request obj
KesterTan Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
scripts/*.sh
# exclude
vmms/id_rsa*
vmms/id_ed25519*
courselabs/*
dockerTmp/*

# config
config.py

Expand All @@ -27,3 +29,10 @@ pip-selfcheck.json

# Backup files
*.bak

# Redis
*.rdb

# Tests
tests/*
!tests/*.py
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,25 @@ RUN apt-get update && apt-get install -y \
ca-certificates \
lxc \
iptables \
iputils-ping \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /opt/TangoService/Tango/

# Install Docker from Docker Inc. repositories.
RUN curl -sSL https://get.docker.com/ -o get_docker.sh && sh get_docker.sh
# Install Docker
RUN set -eux; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl gnupg; \
install -m 0755 -d /etc/apt/keyrings; \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc; \
chmod a+r /etc/apt/keyrings/docker.asc; \
. /etc/os-release; \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu ${VERSION_CODENAME} stable" > /etc/apt/sources.list.d/docker.list; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin; \
apt-get clean; rm -rf /var/lib/apt/lists/*

# Install the magic wrapper.
ADD ./wrapdocker /usr/local/bin/wrapdocker
Expand Down Expand Up @@ -69,6 +81,7 @@ RUN mkdir -p /var/log/docker /var/log/supervisor
# Move custom config file to proper location
RUN cp /opt/TangoService/Tango/deployment/config/nginx.conf /etc/nginx/nginx.conf
RUN cp /opt/TangoService/Tango/deployment/config/supervisord.conf /etc/supervisor/supervisord.conf
RUN if [ -f /opt/TangoService/Tango/boto.cfg ]; then cp /opt/TangoService/Tango/boto.cfg ~/.boto; fi

# Reload new config scripts
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
73 changes: 64 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<img src="images/autolab_banner.svg" width="380px" height="100px">
</a>

Tango
======
# Tango

Tango is a standalone RESTful Web service that runs and manages jobs. A job is a set of files that must satisfy the following constraints:

Expand All @@ -16,13 +15,13 @@ Upon receiving a job, Tango will copy all of the job's input files into a VM, ru

A brief overview of the Tango respository:

* `tango.py` - Main tango server
* `jobQueue.py` - Manages the job queue
* `jobManager.py` - Assigns jobs to free VMs
* `worker.py` - Shepherds a job through its execution
* `preallocator.py` - Manages pools of VMs
* `vmms/` - VMMS library implementations
* `restful_tango/` - HTTP server layer on the main Tango
- `tango.py` - Main tango server
- `jobQueue.py` - Manages the job queue
- `jobManager.py` - Assigns jobs to free VMs
- `worker.py` - Shepherds a job through its execution
- `preallocator.py` - Manages pools of VMs
- `vmms/` - VMMS library implementations
- `restful_tango/` - HTTP server layer on the main Tango

Tango was developed as a distributed grading system for [Autolab](https://github.com/autolab/Autolab) at Carnegie Mellon University and has been extensively used for autograding programming assignments in CMU courses.

Expand All @@ -35,7 +34,63 @@ Please feel free to use Tango at your school/organization. If you run into any p
3. [Read the documentation for the VMMS API](https://docs.autolabproject.com/tango-vmms/).
4. [Test whether Tango is set up properly and can process jobs](https://docs.autolabproject.com/tango-cli/).

## Stress Testing Tango

To stress test Tango by running a large number of submissions, use `stressTest.py`. Currently, this is not a feature on the master branch. To use this feature, go on the `copy-in`.

### Setting up the testing directory

Create your testing directory by copying the  `sample_test` directory into the `my_tests` directory.

```
cp -r sample_tests my_tests/<Test Name>
```

A brief overview of the testing directory

- `input` - Directory to put your input files
- `output` - Directory for the autograder output for each of the test submissions
- `<Test Name>.yaml` - Yaml file to configure the stress test
- `expected_output.txt` - Expected JSON output of the autograder
- `summary.txt` - Summary of the autograder outputs
- `log.txt` - Log of the submissions

First, rename the `sample_test.yaml` to be `<Test Name>.yaml`

```
mv sample_test.yaml <Test Name>.yaml
```

Next, update the Yaml file.

```yaml
num_submissions: 5
submission_delay: 0.1
autograder_image: <Autograding Image>
output_file: log.txt
tango_port: 3001
cli_path: <Path to Tango>/clients/tango-cli.py
instance_type: <Instance Type>
timeout: 180
ec2: True
expected_output: expected_output.txt
stop_before:
```

After creating the Yaml file, copy the `autograde-Makefile`, `autograde.tar` and the file to submit in the `input` directory.

### Running the stress test

```
virtualenv env
source env/bin/activate
pip install -r requirements.txt
cd <Path to Tango>/tests
python3 stressTest.py --test_dir my_tests/<Test Name>
```

## Python 2 Support

Tango now runs on Python 3. However, there is a legacy branch [master-python2](https://github.com/autolab/Tango/tree/master-python2) which is a snapshot of the last Python 2 Tango commit for legacy reasons. You are strongly encouraged to upgrade to the current Python 3 version of Tango if you are still on the Python 2 version, as future enhancements and bug fixes will be focused on the current master.

We will not be backporting new features from `master` to `master-python2`.
Expand Down
Loading