The purpose of this document is to create a bare-minimum learning management system that can offer interactive computing labs with the use of jupyterhub. From jupyterhub's documentation, jupyterhub can be used to serve sandboxed computing environments to students by the use of the Learning Tools Interoperability (LTI) standard. The LTI was created by MS Global Learning Consortium for connecting external service tools to learning management systems like openEdx, canvas, blackboard, moodle and etc. Officially, jupyterhub has only tested their LTI implementation on openeEdx and canvas. Since Canvas is a lighter system than the openEdx platform, it will be used in order to test the integration of Jupyterhub with an LMS.
There is a commercial software as a service (SAAS) that has an implementation of this, called IllumiDesk with their pricing here. For a video of how Illumidesk works, and how this testing environment should work similarly, check out the video here.
- Create virtualenv
env
for running sandboxedjupyterhub
:virtualenv -ppython3 env
- Enter
env
environment:source env/bin/activate
- Install
jupyterhub
for multiuser-session jupyter notebooks:pip install jupyterhub
- Install
jupyterhub-ltiauthenticator
for multiuser-session jupyter notebooks:pip install jupyterhub-ltiauthenticator
- Install
nbgrader
for auto-grading jupyter notebooks:pip install git+git://github.com/samhinshaw/nbgrader.git
- Install
nbgrader
for pulling jupyter notebooks from git repositories:pip install nbgitpuller
- Generate
LTI_CLIENT_KEY
andLTI_CLIENT_SECRET
then save to.env
:LTI_CLIENT_KEY=(`openssl rand -hex 32`) LTI_CLIENT_SECRET=(`openssl rand -hex 32`) echo LTI_CLIENT_KEY=$LTI_CLIENT_KEY > .env echo LTI_CLIENT_SECRET=$LTI_CLIENT_SECRET >> .env echo export LTI_CLIENT_KEY >> .env echo export LTI_CLIENT_SECRET >> .env source .env
- Generate config file for
jupyterhub
:jupyterhub --generate-config
- Set
ltiauthenticator
asjupyterhub
's authenticator class injupyter_config.py
generated above:#c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator' import os c.JupyterHub.authenticator_class = 'ltiauthenticator.LTIAuthenticator' c.LTIAuthenticator.consumers = { os.environ['LTI_CLIENT_KEY']: os.environ['LTI_CLIENT_SECRET'] }
- install
configurable-http-proxy
as it is needed byjupyterhub
:sudo npm install -g configurable-http-proxy
- Add machine's hostname to
/etc/hosts
:sudo echo 127.0.0.1 $(hostname) >> /etc/hosts
- Start
jupyterhub
with specifiedjupyterhub_config.py
:jupyterhub -f /path/to/jupyterhub_config.py
- Clone
canvas-lms
repository:git clone https://github.com/instructure/canvas-lms
- Enter
canvas-lms
directory:cd canvas-lms
- Perform quick install script:
./script/docker_dev_setup.sh