I learned about the existence of INGInious during my trip in Belgium. INGInious is an external code grader that can be integrated with edX. It is written in Python, uses docker, and runs on Linux CentOS server. I won’t go about and explain about it in details since it is quite documented here. But I want to document some notes during my effort to get it up and running on Microsoft Azure. Special thanks to Guillaume, the creator of INGInious, who helped me navigate the installation and configuration process.
Provision a Linux VM on Azure
I covered this on my previous post on installing open edX, the only difference here is that instead of selecting Ubuntu based image, this time I used OpenLogic’s Centos-based image.
Configure the server and install INGInious
- Connect to the server using an SSH client.
- Install pre-requisites.
sudo yum install epel-release sudo yum install git mongodb mongodb-server docker python-pip gcc python-devel python-yaml python-ldap sudo pip install pymongo pytidylib docker-py sh web.py docutils sudo yum install python-flup libtidy
- Enable mongod and docker service and start them.
sudo systemctl enable mongod sudo systemctl enable docker sudo systemctl start mongod sudo systemctl start docker
- Create docker group and add yourself to it.
sudo groupadd docker usermod -aG docker <your_user_id>
- Clone INGInious and edit configuration file.
git clone https://github.com/UCL-INGI/INGInious.git cd INGInious cp configuration.example.yaml configuration.yaml
- Edit INGInious/configuration.yaml.
- Modify the containers.
containers: default: ingi/inginious-c-default sekexe: ingi/inginious-c-sekexe mono: ingi/inginious-c-mono
- Modify the docker_instances.
docker_instances: - server_url: "unix://var/run/docker.sock"
- Modify the plugins (this is to enable the interface with edX).
plugins: - plugin_module: frontend.plugins.edx courseid: "<your_INGInious_course_id>" page_pattern: "/edx"
- Pull the pre-built docker containers.
sudo docker pull ingi/inginious-c-default sudo docker pull ingi/inginious-c-sekexe sudo docker pull ingi/inginious-c-mono
- By this time you should be able to run INGInious on the Python web server. It will be running on localhost:8080.
python app_frontend.py
Install lighttpd web server
- Install lighttpd with fastcgi.
sudo yum install lighttpd lighttpd-fastcgi
- Add lighttpd user to docker and mongodb groups.
sudo usermod -aG docker lighttpd sudo usermod -aG mongodb lighttpd
- Copy INGInious and give lighttpd access.
sudo cp -avr INGInious /var/www/INGInious sudo chown -R lighttpd:lighttpd /var/www/INGInious
Configure lighttpd
- Edit /etc/lighttpd/lighttpd.conf.
server.document-root = "/var/www/INGInious"
- Edit /etc/lighttpd/modules.conf.
server.modules = ( "mod_access", "mod_alias" ) include "conf.d/fastcgi.conf"
- Edit /etc/lighttpd/conf.d/fastcgi.conf.
server.modules += ( "mod_fastcgi" ) server.modules += ( "mod_rewrite" ) fastcgi.server = ( "/app_frontend.py" => (( "socket" => "/tmp/fastcgi.socket", "bin-path" => "/var/www/INGInious/app_frontend.py", "max-procs" => 1, "bin-environment" => ( "REAL_SCRIPT_NAME" => "" ), "check-local" => "disable" )) ) url.rewrite-once = ( "^/favicon.ico$" => "/static/favicon.ico", "^/static/(.*)$" => "/static/$1", "^/(.*)$" => "/app_frontend.py/$1", )
- Make SELinux permissive.
sudo setenforce 0
- Edit /etc/selinux/config.
SELINUX=permissive
- Enable and start lighttpd service.
sudo systemctl enable lighttpd sudo systemctl start lighttpd
- By this time, INGInious should run on the http port of your server.
I will cover integrating INGInious with edX in the next post.