GithubHelp home page GithubHelp logo

xingyif / bottlenose-cs3650 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 0 B

CS assignment / grade mangement system

License: GNU Affero General Public License v3.0

Ruby 47.37% CoffeeScript 0.44% JavaScript 14.08% CSS 0.99% HTML 26.16% Shell 0.74% Racket 0.01% Java 9.17% Makefile 0.04% C 0.75% Perl 0.26%

bottlenose-cs3650's Introduction

Bottlenose

Bottlenose is a web app for managing assignment submission and grading in computer science courses. It provides a flexible mechanism for automatic grading of programming assignments.

Documentation

The documentation for each part of the system is broken up in the same way Rails organizes it's projects. Below are links to each main section.

Linux Setup (Vagrant)

The goal of this section is to get a working Debian 8 machine up and running. We also want to have this project's source in $BOTTLENOSE. I'm working on OS X so I'll be using a VM to do this. If you are working directly on the Linux machine then skip directly to bottlenose setup.

VirtualBox is a virtualization software that can run Debian 8. Download and install this tool.

Vagrant is another tool designed to avoid manual VM management. Download and install this tool as well.

Once you have both VirtualBox and Vagrant run the script below (from this directory) to start up your Debian 8 VM.

# Creates the Vagrantfile in the current directory, this file holds VM
# configuration information. The debian/jessie64 argument tells vagrant to
# use Debian 8 64bit.
vagrant init debian/jessie64

Open the Vagrantfile and add the line

config.vm.network "forwarded_port", guest: 3000, host: 3000

inside the config block. This allows the host to access the Rails server on port 3000.

# Start the VM with virtualbox.
vagrant up --provider virtualbox

Now that you have a working VM running Debian 8 we can SSH into it and begin setting it up.

# SSH into the VM.
vagrant ssh

# Move into the bottlenose project directory. Using Vagrant $BOTTLENOSE is
# /vagrant, this is because Vagrant keeps the directory on the host system
# with the Vagrantfile in sync with /vagrant on the client system.
cd /vagrant

Linux Setup (Manual)

As root. $BOTTLENOSE is /home/bottlenose/src.

apt-get update
apt-get install sudo git
mkdir /home/bottlenose
useradd -d /home/bottlenose -G sudo bottlenose
chown -R bottlenose:bottlenose /home/bottlenose
su - bottlenose
chsh -s /bin/bash
git clone https://github.com/nixpulvis/bottlenose.git src
cd src

Bottlenose Setup

The goal of this section is to have a working web-server running Bottlenose and all of it's dependencies. All scripts in this sections start in the $BOTTLENOSE directory unless explicitly stated otherwise.

Basics

Some packages are generally good to have, and needed by many future steps in the setup process.

sudo apt-get install \
    git \
    vim \
    curl

Postgres

TODO: I was using 9.5, is this correct?

Bottlenose uses Postgres 9.4+ as the database. Install and setup the bottlenose role with the following script.

# Install postgresql and the development library.
sudo apt-get install postgresql

# Switch to the postgres user to create the new bottlenose role.
sudo su - postgres

# Create the bottlenose role for postgres.
createuser -d bottlenose

# Exit back to the vagrant user.
exit

TODO: Talk about the pg_hba.conf file.

Ruby

Installing Ruby is easiest with the aid of a tool like rbenv. Install both rbenv, and ruby-build with the following script.

# Download both rbenv, and ruby-build.
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

# Add the `rbenv` executable to your $PATH.
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
# Run rbenv's init when Bash starts.
echo 'eval "$(rbenv init -)"' >> ~/.bashrc

# Restart the shell.
exec bash

Now we can install Ruby using rbenv and ruby-build.

# Install the Ruby system dependencies.
sudo apt-get install \
    build-essential \
    libssl-dev \
    libreadline-dev \
    zlib1g-dev \
    libpq-dev \
    qt4-default

# Install the Ruby determined by the contents of the
# .ruby-version file.
rbenv install

# Ensure Ruby was install correctly. Where <version> is the
# correct version as described in the .ruby-version file.
ruby --version
#=> ruby <version> ...

Once you have Ruby installed, install the Ruby dependencies.

# Install Ruby's package manager "Bundler".
gem install bundler

# If you're using rbenv, you may need to run this command to
# ensure new executables are loaded into your PATH.
rbenv rehash

# Install Bottlenose's dependencies.
bundle install

Rails

The last step is to set up the Rails app.

# Create the database.
rake db:create
# Run database migrations.
rake db:migrate

Usage

To run the server in development mode run the following script. The binding is up to your desired configuration, however this will work for most cases.

# Run the server, binding to 0.0.0.0 is needed for Vagrant.
rails s -b 0.0.0.0

To get access to a Ruby REPL with the application environment loaded, run rails c. The database REPL can be accessed using rails db.

Other tasks are done via rake, run rake -T to view all tasks available. The following are the most common tasks.

# Create the database.
rake db:create

# Run the database migrations.
rake db:migrate

# Rollback the last database migration.
rake db:rollback

# List all routes in the application.
rake routes

bottlenose-cs3650's People

Contributors

jaypoulz avatar marksherman avatar nattuck avatar nixpulvis avatar

Watchers

 avatar  avatar

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.