Giter Club home page Giter Club logo

autolab-oneclick's Introduction

Autolab OneClick Installation

Autolab-OneClick is the fastest way to install a full autograding environment and course management system!

You can setup Autolab in a local or server environment

Contact [email protected] for questions. Please fill out Github issues if you encounter any problems.

autolab-oneclick's People

Contributors

coradoxrm avatar devanshk avatar nayak16 avatar rmzr7 avatar zyx-billy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autolab-oneclick's Issues

Failed to fetch docker, HttpError 404

Greetings Autolab Users,

we recently tried to do a local install of Autolab, but are stuck at the following error:

W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/vivid/edge/binary-amd64/Packages HttpError404

E: Some index files failed to download. They have been ignored, or old ones used instead.
Fetched 21.4 MB in 5s (4146 kB/s)
ERROR: Service 'tango' failed to build: The command '/bin/sh -c curl -sSL https://get.docker.com/ | sh' returned a non-zero code: 100
./install.sh: Zeile 98: ./install.sh: Datei oder Verzeichnis nicht gefunden

It appears the script tries to install docker from a dead link. It did not even choose the right dist, as we are on Ubuntu 16.04.2, so it should be xenial instead of vivid (or at least I think so, my ubuntu dist knowledge is minimal). What's more is that we already have docker installed, so there really should be need for another installation. Does someone have an idea on how the one-click installation script could be changed to prevent this error?

School.yml not found

Hi there,

I'm testing the one-click install and the installation fails at the precompilation of the Rails assets, with the error that the file /home/app/webapp/config/school.yml can't be found. This could be a documentation error (one-click install docs don't mention it) or with the installation script (server/Autolab/bin/setup.sh is supposed to copy it but is never called).

Thanks!

OS X install.sh flags

when i type ./install.sh -l [00:42:33]

i get the following error on OS X
local base64: invalid option -- d Usage: base64 [-hvD] [-b num] [-i in_file] [-o out_file] -h, --help display this message -D, --decode decodes input -b, --break break encoded string into num character lines -i, --input input file (default: "-" for stdin) -o, --output output file (default: "-" for stdout)

#<Mysql2::Error: Can't connect to MySQL server on 'db' (111)>

I'm running install.sh -l in my MacOSX, and when it tries to start local_db_1_e6351c097e85, it fails when it tries to connect to the MySQL server and thus fails to create the database

[6/6] Init database...
Starting local_tango_1_b01116f87ab0 ... done
Step 20/20 : RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Running in 5e8912df8499
Removing intermediate container 5e8912df8499
 ---> a09378dae1e9
Successfully built a09378dae1e9
Successfully tagged local_web:latest
WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating local_tango_1_f972b5a1c594 ... done
Creating local_db_1_d824e7c0230a    ... done
Creating local_web_1_783357f955cc   ... done
[5/6] Done
[6/6] Init database...
Starting local_tango_1_b01116f87ab0 ... done
Starting local_db_1_e6351c097e85    ... done
#<Mysql2::Error: Can't connect to MySQL server on 'db' (111)>
Couldn't create database for {"adapter"=>"mysql2", "database"=>"app_autolab_development", "pool"=>5, "username"=>"root", "password"=>nil, "socket"=>"/var/run/mysqld/mysqld.sock", "host"=>"db"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
Starting local_tango_1_b01116f87ab0 ... done
Starting local_db_1_e6351c097e85    ... done
rake aborted!
ActiveRecord::NoDatabaseError: Unknown database 'app_autolab_development'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:23:in `rescue in mysql2_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:10:in `mysql2_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:567:in `retrieve_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:87:in `connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:913:in `initialize'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `new'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `up'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:in `migrate'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Mysql2::Error: Unknown database 'app_autolab_development'
/var/lib/gems/2.2.0/gems/mysql2-0.3.18/lib/mysql2/client.rb:70:in `connect'
/var/lib/gems/2.2.0/gems/mysql2-0.3.18/lib/mysql2/client.rb:70:in `initialize'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:567:in `retrieve_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:87:in `connection'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:913:in `initialize'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `new'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `up'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:in `migrate'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
./install.sh: line 98: ./install.sh: No such file or directory
Failed command: 

ERROR: Line 186 of script has return value 1. The log file is saved at /var/folders/b6/xq5h_sm935v4fgp8c0qs9dp00000gn/T/tmp.2InULY6t.

Thank you for trying out Autolab! For questions and comments, email us at [email protected].

ERROR: Line 180 of script has return value 127 - docker-compose: command not found

I am attempting to install AutoLab in an Ubuntu 16.04 box. At the end of the installation script I see this message.

[2/6] Done
[3/6] Copying config files...
[3/6] Done
[4/6] make volumes...
[4/6] Done
[5/6] Init docker images and containers...
./install.sh: line 180: docker-compose: command not found
Failed command: congrats() {

ERROR: Line 180 of script has return value 127. The log file is saved at /tmp/tmp.Okr2tKW6la.

Thank you for trying out Autolab! For questions and comments, email us at [email protected].

Should I install docker-compose? I thought the purpose of this script was to install all dependencies including docker.

specify host/port for job.notifyURL

I want to run the docker images on a machine that already is hosting web services. My idea would be to use apache proxy to forward from a subdomain to the non-standard http port of the docker. However, I found that the job.notifyURL seems to be set to https://localhost/.... Besides allowing specifying non-standard ports, it might be better to generalize this to also allow different hosts.

Errno::EACCES: Permission denied @ dir_s_mkdir - /home/app/webapp/courses/AutoPopulated

When I try to run the autolab:populate command, this error occurs:

$   docker-compose run --rm -e RAILS_ENV=production web rake autolab:populate

Starting local_db_1_e6351c097e85    ... done
Starting local_tango_1_b01116f87ab0 ... done
Creating Course AutoPopulated and config file
rake aborted!
Errno::EACCES: Permission denied @ dir_s_mkdir - /home/app/webapp/courses/AutoPopulated
/home/app/webapp/app/models/course.rb:94:in `init_course_folder'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:228:in `call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:228:in `block in halting_and_conditional'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:506:in `call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:506:in `block in call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:506:in `each'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:506:in `call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_create_callbacks'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:306:in `_create_record'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:57:in `_create_record'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/var/lib/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/persistence.rb:120:in `save'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/validations.rb:37:in `save'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block (2 levels) in save'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save'
/var/lib/gems/2.2.0/gems/newrelic_rpm-3.17.2.327/lib/new_relic/agent/instrumentation/active_record_helper.rb:26:in `block in save'
/var/lib/gems/2.2.0/gems/newrelic_rpm-3.17.2.327/lib/new_relic/agent.rb:586:in `with_database_metric_name'
/var/lib/gems/2.2.0/gems/newrelic_rpm-3.17.2.327/lib/new_relic/agent/instrumentation/active_record_helper.rb:25:in `save'
/var/lib/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/persistence.rb:34:in `create'
/home/app/webapp/lib/tasks/autolab.rake:27:in `load_course'
/home/app/webapp/lib/tasks/autolab.rake:334:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => autolab:populate
(See full trace by running task with --trace)

Docker-compose.yml is outdated

We're using legacy format for the compose.yml file which will cause problems with newer versions of docker.

We should upgrade this to version 2

Tango needs access to docker socket and volumes for vmms/localDocker.py

I was unable to get Tango working out of the box. After quite a bit of debugging and digging I found the changes I made below worked, although they are fairly hacky.

The Tango vmms/localDocker.py requires you to mount /var/run/docker.sock to the docker container so it can use the docker command on the host (rather unsafe though). Furthermore, the autograding_image seems to mount /opt/TangoService/Tango/volumes, however, this image is run on the host and the path is for the container. This can be "fixed" by creating the directory /opt/TangoService/Tango/volumes and mounting it on the container. This can by modifying the docker-compose.yaml to be the following (the part about volumes):

tango:
  build: ./Tango
  command: sh start.sh
  ports:
    - '8600:8600'
  privileged: true
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
    - /opt/TangoService/Tango/volumes:/opt/TangoService/Tango/volumes

I would like to know if I am overlooking anything or if there is a more simple way to handle this.

Publish docker image, ease local installation

I wish there'd be a single docker image I could pull from Docker Registry to run a local test set-up for evaluation.
E.g.
docker run -p 80:80 autolab/autolab-testing:2.0.8

That includes two points:

  1. please publish images (tango, autolab) of project releases on a public docker registry (e.g. Docker Hub). This saves me having to follow the official installation instructions - I can easily use a non-Ubuntu environment being a non-root user (with just access to run docker).
  2. if the local setup is only meant for testing anyway then I see no harm in publishing a single image that contains a database and the web frontend in a single image (with hardcoded or generated passwords and other configuration, so that I wouldn't have to care).
    This would tremendously ease the evaluation/testing.

ERROR: Line 180 of script has return value 1. The log file is saved at /tmp/tmp.pe5bmESQAJ

This error is caused when I uninstalled Autolab then tried to reinstall it. My explanation to this error is that Autolab was not completely removed due to some issues in the uninstall.sh script.

  1. Firstly, I got the following errors when I run uninstall.sh:
Remove one or more containers
rm: cannot remove ‘/var/lib/docker/plugins’: Device or resource busy
rm: cannot remove ‘/var/lib/docker/overlay2’: Device or resource busy

the solution is simply umount these directories before removing them using

sudo umount /var/lib/docker/overlay2
sudo umount /var/lib/docker/plugins
  1. Secondly, docker-engine is obsoleted and docker-ce is used instead, so the uninstall.sh should be updated
sudo apt-get purge docker-ce;
sudo apt-get autoremove --purge docker-ce;

Docker-Compose Build Web is wasteful

This is an improvement suggested by [email protected].

When you make a small change to the config files, you currently need to fully rebuild the Autolab web docker image - reloading 848MB rather than the few MB of data that are actually different. It would be better to create an intermediate docker container that has all the apt packages and ruby gems, then layer on top of that the Autolab files. This way you’d only have to rebuild the uppermost layer when making small changes, such as config files, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.