Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Autolab Workshop

409 views

Published on

Autolab is a course management service at CMU that enables instructors to offer programming labs to their students over the Internet. The two key ideas in Autolab are autograding, that is, programs evaluating other programs, and scoreboards. In November 2014, the Autolab team open-sourced this piece of technology to enable other organizations to adopt it for their needs and platforms.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Autolab Workshop

  1. 1. WORKSHOP 7th of November, 2014
  2. 2. Background ● Started in 2010 by Prof. Dave O’Hallaron ○ 15-213 followed by 15-112 ● Completely student-run ● Timeline: ○ < 2010: Single machine ○ > 2010: VM support ○ > 2011: Autodriver ○ > 2013: Rails upgrade and Tango Web API
  3. 3. Some Numbers ● Approximately 2500 students use it every semester ● 77 classes since 2010 between CMU and CMU-Qatar ● 2 coding challenges ● 2014 (as of 3:20PM today): 320,538 -> ~1034 jobs/day 2012 2013 2014
  4. 4. Becoming Open Source ● Higher customizability ● Larger adoption rate ● Decoupling of two core components ● CMU spirit ● Add your own features! ○ PDF annotation ○ Online quizzes ○ Distributed Job Queue
  5. 5. Overview of Front-end ● Ruby on Rails ○ REST ○ Model-View-Controller (MVC) ■ Model: Internal structure ■ View: What user sees ■ Controller: Supply objects to view for rendering, page redirecting, etc. ○ Javascript, CSS, etc.
  6. 6. Overview of Front-end ● Important model relations CUD: CourseUserDatum AUD: AssessmentUserDatum User CUD Course AssessmentAUD Submission
  7. 7. Overview of Front-end ● Resources & Routing ○ RESTful CRUD ○ In the process of switching to a more traditional REST interface for models ○ Each Resource Gets 7 routes by default
  8. 8. Overview of Front-end ● For example, Users ○ GET /users => index ○ GET /users/new => new ○ POST /users => create ○ GET /users/:id => show ○ GET /users/:id/edit => edit ○ PATCH /users/:id => update ○ DELETE /users/:id => destroy
  9. 9. Overview of Tango ● External, standalone, job dispatch service ● Stateless ● Highly flexible ● Web API
  10. 10. Overview of Tango Tango creates directory stores files poll for output file optional callback open upload addJob poll callback job queue
  11. 11. Overview of Tango Tango VM pool (EC2/CMU) rhel.img rhel.img rhel601.img rhel210.img worker thread initializeVM waitVM copyIn copyOut destroyVM runJob vmms job queue
  12. 12. Overview of Tango ● Virtual Machine Management System (VMMS) ● Extending Tango for OpenStack, Docker, Vagrant, Xen etc
  13. 13. Autograding Autolab Upon submission #validateHandin #saveHandin #autogradeAfterHandin - #createVm Upon receiving Callback #autogradeDone #saveAutograde - #parseAutoresult Tango creates directory stores files poll for output file optional callback VM pool (EC2/CMU) rhel.img rhel.img rhel601.img rhel210.img open upload addJob poll callback worker thread initializeVM waitVM copyIn copyOut destroyVM runJob /courses/COURSE_ID/assessments/AS SET_ID/handin .c tangoRES T vmms
  14. 14. Docs ● http://docs.autolab.cs.cmu.edu/ ● https://github.com/autolab/Tango/wiki
  15. 15. Getting Started... ● What’s the hardest part of joining a project? o Setting up your environment! ● We’ve set up an environment for you! ● See the Autolab README for full instructions o Later, you will need your own DB o ...and possibly your own Tango for Autograding
  16. 16. Getting Started... 1. Fork Autolab repo on github (https://github.com/autolab/Autolab.git) 1. You can’t push to our repo, so you need to fork your own 2. ssh autolab@54.201.118.81 3. git clone https://github.com/<github_id>/Autolab.git <your_andrewID> 4. cd <your_andrewID> 5. cp lib/autoConfig.rb.template lib/autoConfig.rb 6. cp config/database.yml.template config/database.yml
  17. 17. 6. In autoConfig.rb change: - RESTFUL_HOST = “greatwhite.ics.cs.cmu.edu” - RESTFUL_PORT = 3000 - AUTOCONFIG_COURSE_DIR = “/home/autolab/<andrew_ID>/courses” - RESTFUL_KEY = “demo” - RESTFUL_COURSELAB = “autolab-demo” Getting Started...
  18. 18. Getting Started... 7. In config/database.yml change: - database: <andrew_ID>_autolab_development - username: root - password: ‘autolab-demo’ 8. Populate Autolab by running: - bundle exec rake db:create db:migrate - rake autolab:populate 9. Run Autolab! - rails s -p <fav_port_num_between_9000_and_9999> - 54.201.118.81:<port> - Log in via “Developer Login”, enter email “admin@foo.bar”.
  19. 19. Contributing to Autolab 1. Fork the repository and create a local clone of your fork a. https://github.com/autolab/Autolab b. https://github.com/autolab/Tango 1. Assign yourself to a new or existing issue on the project a. https://github.com/autolab/Autolab/issues b. https://github.com/autolab/Tango/issues
  20. 20. Contributing to Autolab 3. Create a new local branch “fix_issue” and commit a. git checkout -b "fix_issue” b. git add . c. git commit -m “commit_msg. Fixes #<issue_num>” 3. Push the branch to GitHub a. git push origin “fix_issue”
  21. 21. Contributing to Autolab 4. Submit a pull request a. navigate to your fork of the project b. click the large green “compare and review” button 4. We will review and merge useful pull requests a. documentation and comments on pull requests are useful in this regard
  22. 22. Contributing to Autolab 6. Keep your forked repository synced with the project a. git remote add upstream https://github.com/autolab/Tango.git b. git remote add upstream https://github.com/autolab/Autolab.git c. git checkout master d. git fetch upstream e. git merge upstream/master
  23. 23. Questions and Comments Questions and Comments autolab-dev@andrew.cmu.edu

×