-
Notifications
You must be signed in to change notification settings - Fork 242
Deprecated wiki pages
before version 1.12.0
To enable key pair uploads and to allow the server running MarkUs to handle git requests over ssh:
In config/environments/production.rb
set:
config.enable_key_storage = true
For the rest of the setup we will assume that:
config.key_storage = "/MarkUs/data/prod/keys"
config.x.repository.storage = "/MarkUs/data/prod/repos"
and that you're running MarkUs on a server named markus.example.edu
.
- Make sure the required packages are installed:
$ apt-get install openssh-server git
- Create a user to serve the repositories (typically this user is named
git
)
$ useradd -m -s /bin/bash git
- Put the
markus-git-shell.sh
script on the the new user's PATH and make it executable:
$ cp .dockerfiles/markus-git-shell.sh /usr/local/bin/markus-git-shell.sh
$ chown git:git /usr/local/bin/markus-git-shell.sh
$ chmod 700 /usr/local/bin/markus-git-shell.sh
- The
markus-git-shell.sh
callsgit-shell
which the git user needs to run with super-user permissions:
$ echo "git ALL=(root) NOPASSWD:/usr/bin/git-shell" | sudo EDITOR="tee -a" visudo
- Make symlinks of all relevant files:
If your MarkUs instance does not use a relative url root:
$ ln -s /MarkUs/data/prod/keys/ /home/git/.ssh/
$ ln -s /Markus/data/prod/repos/bare/ /home/git/
OR if your instance uses a relative url root (ex: csc108/)
$ ln -s /MarkUs/data/prod/keys/ /home/git/.ssh/csc108/
$ ln -s /Markus/data/prod/repos/bare/ /home/git/csc108/
$ sed -i "s@#*AuthorizedKeysFile.*@AuthorizedKeysFile /home/git/.ssh/csc108/authorized_keys@g" /etc/ssh/sshd_config
- Start the sshd service:
$ /usr/sbin/sshd
- Set remaining config option:
config.x.repository.ssh_url = git@markus.example.edu
OR if you're using a relative url root make sure to include it:
config.x.repository.ssh_url = git@markus.example.edu/csc108
before version 1.13.0
MarkUs uses python's nbconvert package to convert jupyter notebooks to html so it can be displayed in the browser. Install a python virtual environment with nbconvert installed. This virtual environment can be installed anywhere, in this example it is created at /some/dir/venv
python3 -m venv /some/dir/venv
/some/dir/venv/bin/pip install wheel nbconvert
Let MarkUs know where the virtual environment is installed. Set config.nbconvert
in production.rb
:
config.nbconvert = '/some/dir/venv/bin/jupyter-nbconvert'
before version 1.13.0
python3.7 -m venv lib/scanner/venv
source lib/scanner/venv/bin/activate
pip install -r lib/scanner/requirements.txt
deactivate