Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f2202ae
distDocker vmms in working order
daviddob Jan 24, 2017
23b43ff
testing autodriver update
daviddob Jan 25, 2017
fdbe4a5
testing autodriver update
daviddob Jan 25, 2017
cddf2e2
adding verbosity to autodriver ram limit for debugging
daviddob Jan 25, 2017
03543e0
adding verbosity to autodriver ram limit for debugging
daviddob Jan 25, 2017
8fd621d
reverting autodriver and implementing ram limit via docker
daviddob Jan 25, 2017
c539a7c
cleanup for PR
daviddob Jan 25, 2017
1bae629
cleanup for PR
daviddob Jan 25, 2017
a913f3b
cleanup for PR
daviddob Jan 25, 2017
1b034f0
added ram option to template config file
daviddob Jan 25, 2017
35fe359
Added in ssh master and added hosts to config.py
daviddob Jan 26, 2017
4ffc2a1
Added docker ram limit to localDocker vmms
daviddob Jan 26, 2017
f7ebc8b
cleaned up directory structure
daviddob Jan 26, 2017
2db4ffb
added hosts to config.py
daviddob Jan 26, 2017
419a307
added use_ssh_master to config.py
daviddob Jan 26, 2017
31c5307
added unzip to autograding image
Jan 31, 2017
4458b0d
updating dockerfile to 16.04 base for increased g++ compatibility
daviddob Feb 5, 2017
ec4599a
Patching java garbage collector eating tonsof threads
daviddob Feb 6, 2017
548223f
removed useless java parameter line
Feb 7, 2017
4939e1e
updating dockerfile for CSE410-alphonce
daviddob Feb 16, 2017
aeae47e
pulling updates from upstream
daviddob Jun 27, 2017
086a900
Resolved critical uninitialized vm attributes for dist docker pre-all…
daviddob Aug 3, 2017
222f96c
Patched missing attribute crash when destroying vm with distdocker (m…
daviddob Aug 3, 2017
0976d3d
Update Dockerfile
daviddob Aug 8, 2017
8c18937
Added CSE421 Dockerfile
daviddob Feb 13, 2018
8615206
modified pintos image, so that it no longer downloads it from stanfor…
Feb 13, 2018
3bc7f94
updated directory structure, so it runs under /home/autograde
Feb 13, 2018
5ad5e21
Merge pull request #1 from UBAutograding/CSE421
daviddob Feb 13, 2018
a4dfc4c
updated main docker container for tango to ubuntu 18.04
Jun 1, 2018
c7178bb
fixed string creation
Jun 2, 2018
39d213f
updated to 16.04 will try for 18.04 next
Jun 4, 2018
e517c85
18.04 all i need to do is see if i can premake the autolab user
Jun 4, 2018
060de47
added user in docker file
Jun 4, 2018
df93f0b
Update Dockerfile
Searay-330 Jun 9, 2018
c3f1bb1
Update Dockerfile
Searay-330 Jun 11, 2018
79e31cd
Updated Grading Images Docker File
Searay-330 Jun 21, 2018
5f91b81
Update Dockerfile
Searay-330 Jun 26, 2018
266252d
Add NodeJS to grading images
daviddob Jun 29, 2018
1292268
Merge branch 'master' into dev
Jun 29, 2018
22e2738
Updated and tested Tango Docker OS
daviddob Sep 5, 2018
eefc18c
Update Tango OS to Ubuntu 18.04
daviddob Sep 5, 2018
8c68eeb
Added OCaml to the base image for 305
daviddob Sep 5, 2018
ecf05f2
Merge branch 'master' of github.com:UBAutograding/Tango
daviddob Sep 5, 2018
5f56b28
Bump ubuntu to 18.04 and g++ to 7.x
daviddob Sep 9, 2018
31e6c93
Cleanup old formatting
daviddob Sep 10, 2018
3d05fc1
Prevent missing vm ids from crashing during destroy
daviddob Sep 10, 2018
d7aa70f
Cleanup and Error Patching
daviddob Sep 10, 2018
bd0b75a
Patch output redirection bug in 18.04 Tango images
daviddob Sep 20, 2018
55a4ed5
Add Dockerfile with Scala and Maven support
jessehartloff Jan 22, 2019
618abec
Merge pull request #9 from hartloff/master
daviddob Jan 28, 2019
2eef059
Added Dockerfile for CSE 191 (contains Coq)
knepley Jun 2, 2020
d815abd
Merge pull request #10 from knepley/knepley/feature-add-CSE191-vm
daviddob Jun 19, 2020
f7bad87
Dockerfile_CSE468
zijianan Sep 23, 2020
00840b7
insert changes someplace after the initial C++ setup and before the a…
zijianan Sep 24, 2020
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ courselabs/*
# config
config.py

local
courselabs/*

# Virtualenv
.Python
bin
Expand Down
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start with empty ubuntu machine
FROM ubuntu:15.04
FROM ubuntu:18.04

MAINTAINER Autolab Development Team "autolab-dev@andrew.cmu.edu"

Expand All @@ -15,9 +15,8 @@ WORKDIR /opt/TangoService/Tango
RUN mkdir volumes

WORKDIR /opt

# Install dependancies
RUN apt-get update && apt-get install -y \
RUN apt-get update --fix-missing && DEBIAN_FRONTEND=nointeractive apt-get install -y \
nginx \
curl \
git \
Expand Down Expand Up @@ -68,7 +67,6 @@ RUN cp /opt/TangoService/Tango/deployment/config/redis.conf /etc/redis.conf
# Reload new config scripts
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]


# TODO:
# volumes dir in root dir, supervisor only starts after calling start once , nginx also needs to be started
# Different log numbers for two different tangos
Expand Down
2 changes: 1 addition & 1 deletion clients/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This directory contains the Tango client program and some example jobs
that are useful for testing.

tango-cli.py - Tango client program
tango-rest.py - Tango client program

Example jobs:
job1 - simple hello job
Expand Down
2 changes: 1 addition & 1 deletion clients/tango-cli.py → clients/tango-rest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/local/bin/python
#
#
# tango-cli.py - Command line client for the RESTful Tango.
# tango-rest.py - Command line client for the RESTful Tango.
#

import os
Expand Down
8 changes: 6 additions & 2 deletions config.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class Config:
# Default value of '*'' points this path to /path/to/Tango/volumes/
DOCKER_VOLUME_PATH = '*'
DOCKER_HOST_USER = ''

DOCKER_DISTRIBUTED_HOSTS = ['host.example.domain','host2.example.domain','host3.example.domain']
USE_SSH_MASTER = True

# Maximum size for input files in bytes
MAX_INPUT_FILE_SIZE = 250 * 1024 * 1024 # 250MB

Expand All @@ -86,6 +88,8 @@ class Config:

# VM ulimit values
VM_ULIMIT_FILE_SIZE = 100 * 1024 * 1024
#(Ram specified in MB)
VM_ULIMIT_USER_RAM = 512
VM_ULIMIT_USER_PROC = 100

# How many times to reschedule a failed job
Expand Down Expand Up @@ -127,7 +131,7 @@ class Config:
######
# Part 4: Settings for shared memory
#
USE_REDIS = True
USE_REDIS = False
REDIS_HOSTNAME = "127.0.0.1"
REDIS_PORT = 6379

Expand Down
2 changes: 0 additions & 2 deletions hosts

This file was deleted.

74 changes: 37 additions & 37 deletions jobManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,44 +65,44 @@ def __manage(self):
if not job.accessKey and Config.REUSE_VMS:
id, vm = self.jobQueue.getNextPendingJobReuse(id)
job = self.jobQueue.get(id)

try:
# Mark the job assigned
self.jobQueue.assignJob(job.id)
# if the job has specified an account
# create an VM on the account and run on that instance
if job.accessKeyId:
from vmms.ec2SSH import Ec2SSH
vmms = Ec2SSH(job.accessKeyId, job.accessKey)
newVM = copy.deepcopy(job.vm)
newVM.id = self._getNextID()
preVM = vmms.initializeVM(newVM)
else:
# Try to find a vm on the free list and allocate it to
# the worker if successful.
if Config.REUSE_VMS:
preVM = vm
if job:
try:
# Mark the job assigned
self.jobQueue.assignJob(job.id)
# if the job has specified an account
# create an VM on the account and run on that instance
if job.accessKeyId:
from vmms.ec2SSH import Ec2SSH
vmms = Ec2SSH(job.accessKeyId, job.accessKey)
newVM = copy.deepcopy(job.vm)
newVM.id = self._getNextID()
preVM = vmms.initializeVM(newVM)
else:
preVM = self.preallocator.allocVM(job.vm.name)
vmms = self.vmms[job.vm.vmms] # Create new vmms object

# Now dispatch the job to a worker
self.log.info("Dispatched job %s:%d to %s [try %d]" %
(job.name, job.id, preVM.name, job.retries))
job.appendTrace(
"%s|Dispatched job %s:%d [try %d]" %
(datetime.utcnow().ctime(), job.name, job.id, job.retries))

Worker(
job,
vmms,
self.jobQueue,
self.preallocator,
preVM
).start()

except Exception as err:
self.jobQueue.makeDead(job.id, str(err))
# Try to find a vm on the free list and allocate it to
# the worker if successful.
if Config.REUSE_VMS:
preVM = vm
else:
preVM = self.preallocator.allocVM(job.vm.name)
vmms = self.vmms[job.vm.vmms] # Create new vmms object

# Now dispatch the job to a worker
self.log.info("Dispatched job %s:%d to %s [try %d]" %
(job.name, job.id, preVM.name, job.retries))
job.appendTrace(
"%s|Dispatched job %s:%d [try %d]" %
(datetime.utcnow().ctime(), job.name, job.id, job.retries))

Worker(
job,
vmms,
self.jobQueue,
self.preallocator,
preVM
).start()

except Exception as err:
self.jobQueue.makeDead(job.id, str(err))

# Sleep for a bit and then check again
time.sleep(Config.DISPATCH_PERIOD)
Expand Down
58 changes: 54 additions & 4 deletions vmms/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,59 @@
# Autolab - autograding docker image

FROM ubuntu:14.04
MAINTAINER Mihir Pandya <mihir.m.pandya@gmail.com>
FROM ubuntu:18.04
MAINTAINER David Dobmeier <daviddob@buffalo.edu>

RUN apt-get update --fix-missing
#C++ Setup
RUN apt-get update
RUN apt-get install -y gcc
RUN apt-get install -y make
RUN apt-get install -y build-essential
RUN apt-get install -y libcunit1-dev libcunit1-doc libcunit1

#Python Setup
RUN apt-get update --fix-missing && \
DEBIAN_FRONTEND=nointeractive apt-get install -y \
python3 python3-numpy python3-nose python3-pandas \
python python-numpy python-nose python-pandas \
pep8 python-pip python3-pip python-wheel \
python-sphinx && \
pip install --upgrade setuptools

#Java Setup
RUN apt-get update --fix-missing
RUN apt-get install -y default-jdk

#Valgrind Setup
RUN apt-get update
RUN apt-get install -y valgrind

#SML Setup
RUN mkdir -p /usr/local/bin/sml
WORKDIR /usr/local/bin/sml
RUN apt-get install -y gcc-multilib g++-multilib lib32z1 lib32ncurses5 wget
RUN wget http://www.smlnj.org/dist/working/110.78/config.tgz
RUN tar -xzvf config.tgz
RUN config/install.sh
RUN ln -s /usr/local/bin/sml/bin/sml /usr/local/sbin/sml
RUN ln -s /usr/local/bin/sml/bin/ml-lex /usr/local/sbin/ml-lex
RUN ln -s /usr/local/bin/sml/bin/ml-yacc /usr/local/sbin/ml-yacc

#Flex setup
RUN apt-get install -y flex

#Bison Setup
RUN apt-get install -y bison

#Utility setup
RUN apt-get install -y unzip

#NodeJS setup
RUN apt-get update --fix-missing
RUN apt-get install -y nodejs
RUN apt-get install -y npm

#OCaml Setup
RUN apt-get install -y ocaml

# Install autodriver
WORKDIR /home
Expand All @@ -16,6 +63,7 @@ RUN mkdir autolab autograde output
RUN chown autolab:autolab autolab
RUN chown autolab:autolab output
RUN chown autograde:autograde autograde
RUN apt-get update && apt-get install -y sudo
RUN apt-get install -y git
RUN git clone https://github.com/autolab/Tango.git
WORKDIR Tango/autodriver
Expand All @@ -25,10 +73,12 @@ RUN chmod +s /usr/bin/autodriver

# Clean up
WORKDIR /home
RUN apt-get remove -y git
RUN apt-get -y autoremove
RUN rm -rf Tango/

# Check installation
RUN ls -l /home
RUN which autodriver
RUN which javac
RUN which sml
RUN g++ --version
62 changes: 62 additions & 0 deletions vmms/Dockerfile_CSE191
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Autolab - autograding docker image

FROM ubuntu:18.04
MAINTAINER Matthew Knepley <knepley@buffalo.edu>

#C Setup
RUN apt-get update
RUN apt-get install -y gcc
RUN apt-get install -y make
RUN apt-get install -y build-essential
RUN apt-get install -y libcunit1-dev libcunit1-doc libcunit1

#Python Setup
RUN apt-get update --fix-missing && \
DEBIAN_FRONTEND=nointeractive apt-get install -y \
python3 python3-numpy python3-nose python3-pandas \
python python-numpy python-nose python-pandas \
pep8 python-pip python3-pip python-wheel \
python-sphinx && \
pip install --upgrade setuptools

#Valgrind Setup
RUN apt-get update
RUN apt-get install -y valgrind
#OPAM Setup
RUN apt-get install -y m4
RUN apt-get install -y pkg-config
RUN apt-get install -y opam

#Utility setup
RUN apt-get install -y unzip

# Install autodriver
WORKDIR /home
RUN useradd autolab
RUN useradd autograde
RUN mkdir autolab autograde output
RUN chown autolab:autolab autolab
RUN chown autolab:autolab output
RUN chown autograde:autograde autograde
RUN apt-get update && apt-get install -y sudo
RUN apt-get install -y git
RUN git clone https://github.com/autolab/Tango.git
WORKDIR Tango/autodriver
RUN make clean && make
RUN cp autodriver /usr/bin/autodriver
RUN chmod +s /usr/bin/autodriver

# Install Coq
RUN su autograde -c "opam init && opam install coq"
RUN echo "PATH=${PATH}:/home/autograde/.opam/system/bin" >> /home/autograde/.profile

# Clean up
WORKDIR /home
RUN apt-get -y autoremove
RUN rm -rf Tango/

# Check installation
RUN ls -l /home
RUN which autodriver
RUN su autograde -c "/bin/bash -c 'source ~/.profile && which coqc'"
RUN gcc --version
64 changes: 64 additions & 0 deletions vmms/Dockerfile_CSE421
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
FROM ubuntu:16.04
MAINTAINER Farshad Ghanei <farshadg@buffalo.edu>
#prerequisites
RUN apt-get update --fix-missing
RUN apt-get update && apt-get install -y apt-utils
RUN apt-get install -y gcc make build-essential libcunit1-dev libcunit1-doc libcunit1 wget python qemu xorg-dev libncurses5-dev gdb git
# Install autodriver
WORKDIR /home
RUN useradd autolab
RUN useradd autograde
RUN mkdir autolab autograde output
RUN chown autolab:autolab autolab
RUN chown autolab:autolab output
RUN chown autograde:autograde autograde
RUN apt-get update && apt-get install -y sudo
RUN apt-get install -y git
RUN git clone https://github.com/autolab/Tango.git
WORKDIR Tango/autodriver
RUN make clean && make
RUN cp autodriver /usr/bin/autodriver
RUN chmod +s /usr/bin/autodriver
###############################################
# configuraion and setup for bochs and pintos #
###############################################
ENV PINTOSDIR /home/autograde/pintos_base
ENV DSTDIR /usr/local
ENV SRCDIR $PINTOSDIR/sources
RUN mkdir -p $SRCDIR
RUN mkdir -p $PINTOSDIR
RUN mkdir -p $DSTDIR/bin
ENV BXSHARE $DSTDIR/share/bochs
ENV PATH="${DSTDIR}/bin:${PATH}"

# These files may be put on a local server, but keep the folder structure
WORKDIR $SRCDIR/
RUN git clone git://pintos-os.org/pintos-anon
RUN mv pintos-anon/* $PINTOSDIR
#RUN wget http://web.stanford.edu/class/cs140/projects/pintos/pintos.tar.gz
#RUN tar -xzf pintos.tar.gz
#RUN mv pintos/* $PINTOSDIR

WORKDIR $SRCDIR/
RUN wget http://www.oldlinux.org/Linux.old/bochs/Bochs/bochs-2.2.6/bochs-2.2.6.tar.gz
#RUN wget http://web.stanford.edu/class/cs140/projects/pintos/bochs-2.2.6.tar.gz

WORKDIR $PINTOSDIR/src/misc/
RUN ./bochs-2.2.6-build.sh

WORKDIR $PINTOSDIR/src/utils/
RUN sed -i "5i GDBMACROS=$PINTOSDIR/src/misc/gdb-macros" pintos-gdb
RUN make
RUN cp backtrace pintos pintos-gdb pintos-mkdisk Pintos.pm pintos-set-cmdline squish-pty squish-unix $DSTDIR/bin

RUN chown -R autograde:autograde /home/autograde
RUN chown -R autograde:autograde $BXSHARE
RUN chown -R autograde:autograde $DSTDIR/bin
# Clean up
WORKDIR /home
RUN apt-get -y autoremove
RUN rm -rf Tango/
# Check installation
RUN ls -l /home
RUN which autodriver

Loading