Skip to content

Installation

Adrian Wilke edited this page Feb 25, 2019 · 27 revisions

Docker installation

Based on a Ubuntu 16.04 virtual machine

Upgrade to Ubuntu 18.04 LTS

sudo apt-get update
sudo apt-get upgrade --yes
sudo apt-get dist-upgrade --yes
sudo do-release-upgrade

Source: http://www.ubuntubuzz.com/2018/04/how-to-upgrade-ubuntu-from-1604-lts-to-1804-lts-using-command-lines.html

Docker installation

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt-get update
sudo apt-get install docker-ce
sudo docker run hello-world

Source: https://docs.docker.com/install/linux/docker-ce/ubuntu/#os-requirements

Installation of nbgraderutils

Download

Download and unzip the latest version as ZIP file:

wget https://github.com/dice-group/nbgraderutils/archive/master.zip
unzip master.zip
cd nbgraderutils-master

Configuration

Edit the file scripts/2-run-container.sh
The directory which is used to access files for backups will be overwritten:

MOUNT_DIR_HOST="/mnt/nbgjava"

Create the docker image and container

# Create the docker image
# A log file build.log will be updated during the execution
sudo ./docker/1-build-image.sh 

# Create the docker container
sudo ./docker/2-run-container.sh 

Initialize

This script copies example assignments to the docker container.
It also creates 3 test users.

sudo ./scripts/initialize.sh

Change the passwords for the existing users

sudo ./scripts/change-password.sh nbgadmin <PSW1>
sudo ./scripts/change-password.sh nbguser <PSW2>

sudo ./scripts/change-password.sh nbgtesta <PSW3>
sudo ./scripts/change-password.sh nbgtestb <PSW4>
sudo ./scripts/change-password.sh nbgtestc <PSW5>

You should be able to login and create notebooks via your browser: https://localhost:8000.

Final additions

  • Debug Information to handle errors
  • CreateStudents Scripts to generate additional student accounts
  • HTTPS Create certificates using letsencrypt
  • Backup Using SSH/rsync to create backups
  • Config Change the default configuration settings