Git Product home page Git Product logo

jobeinabox's Introduction

JobeInABox

Docker Stars Docker Pulls Docker Automated Docker Build

The Moodle CodeRunner question type plugin requires a Jobe server on which to run student-submitted jobs. JobeInABox is a container image that provides a basic Jobe server that runs all the standard languages but does not have a mysql server installed so cannot use API-key access. For normal use, that's not a problem - API-key access is relevant only to Jobe servers delivering services to multiple clients.

Building and running your own image locally (strongly recommended)

There are several ways to build and run a JobeInABox container, for example:

For production use you should build your own image using the local timezone. In this example we use Docker as follows:

Pull this repo from Github, cd into the jobeinabox directory and type a command of the form

sudo docker build . -t my/jobeinabox --build-arg TZ="Europe/Amsterdam"

You can then run your newly-built image with the command

sudo docker run -d -p 4000:80 --name jobe my/jobeinabox

This will give you a jobe server running on port 4000, which can then be tested locally and used by Moodle as explained in the section "Using jobeinabox" below.

Using the pre-built jobeinabox image on docker hub

To run the pre-built Docker Hub image, just enter the command:

sudo docker run -d -p 4000:80 --name jobe trampgeek/jobeinabox:latest

This will give you a jobe server running on port 4000, which can then be tested locally and used by Moodle as explained in the section "Using jobeinabox" below.

Warnings:

  1. The image is over 1 GB, so may take a long time to start the first time, depending on your download bandwidth.

Using jobeinabox

Having started a jobeinabox container by either of the above methods, you can check it's running OK by browsing to

 http://[host_running_docker]:4000/jobe/index.php/restapi/languages

and you should get a JSON-encoded list of the supported languages, namely

[["c","7.3.0"],["cpp","7.3.0"],["java","10.0.2"],["nodejs","8.10.0"],["octave","4.2.2"],["pascal","3.0.4"],["php","7.2.7"],["python3","3.6.5"]]

If you wish to run the test suite within the container, use the command

sudo docker exec -t jobe /usr/bin/python3 /var/www/html/jobe/testsubmit.py

To set your Moodle/CodeRunner plugin to use this dockerised Jobe server, set the Jobe server field in the CodeRunner admin settings (Site Administration > Plugins > Question types > CodeRunner) to

[host_running_docker]:4000

Do not put http:// at the start.

To stop the running server, enter the command:

sudo docker stop jobe

To remove the running server, enter the command:

sudo docker rm jobe

To check if there is anything left, enter the command

sudo docker ps -a

Notes on security:

  1. Note that while the container in which this Jobe runs should be secure, the container's network is currently just bridged across to the host's network. This means that Jobe can be accessed from anywhere that can access the host and can access any URI that the host can access. Firewalling of the host is essential for production use.

  2. Rebuild the container regularly to ensures that it is running with the latest jobe version and security updates.

jobeinabox's People

Contributors

trampgeek avatar akadiry avatar kulttuuri avatar timhunt avatar

Forkers

jyukopla

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.