Skip to content

Plateforme permettant une correction automatique d'exercices d'informatiques. A destination du PC de l'INSA de Lyon

Notifications You must be signed in to change notification settings

nstouls/plateformePC

 
 

Repository files navigation

plateformePC

This version of the tool is modified to be installed on a RaspberryPI 2.

Installation

  • Install Debian, Docker, MongoDB and OpenJDK
    curl -sSL https://get.docker.com/ | sh
    sudo usermod -aG docker pi
    sudo apt-get install openjdk-8-jdk git
    sudo apt-get upgrade
    docker pull descol/rpi-mongo
  • Configure classpath :
    echo "export JAVA_HOME=/usr/lib/jvm/default-java/" >> ~/.bashrc
  • Deploy this tool:
    Clone this git
    cd base-plateforme
    docker build -t descol/base-plateforme .

Starting platform

Running mongoDB and Vertex-based web server:

    docker run -d --name plateformeDB -v /home/pi/plateformePC/DB:/data/db -p 27017:27017 descol/rpi-mongo
    docker start plateformeDB
    sudo java -jar build/libs/Plateforme-fat.jar

If Plateforme-fat.jar doesnt exist, it could be generated from the gradle script on a desktop computer :

    ./gradlew shadowJar

Background Running

Manual method

  • Install screen utility :
    sudo apt-get update
    sudo apt-get install screen
  • Launch the platform through screen :
    screen sudo java -jar build/libs/Plateforme-fat.jar

Automatic launch at startup

Add a link in systemd pointing out to the rpi-platefromePC service:

    sudo ln -s /home/pi/plateformePC/scripts/rpi-plateformePC.service /etc/systemd/system/rpi-plateformePC.service 

Troubleshooting

  • To revert MongoDB from a crash :
    docker run --rm --volumes-from plateformeDB descol/rpi-mongo unlink "/mongodb/data/mongod.lock"
    docker run --rm -it -p 27017:27017  --volumes-from plateformeDB descol/rpi-mongo mongod --dbpath /mongodb/data/ --repair
    docker start plateformeDB

About

Plateforme permettant une correction automatique d'exercices d'informatiques. A destination du PC de l'INSA de Lyon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.9%
  • HTML 8.8%
  • Java 4.9%
  • CSS 3.0%
  • TeX 1.8%
  • Dockerfile 0.3%
  • Other 0.3%