Skip to content
misc.rst 3.49 KiB
Newer Older
Installation
============

Andreas Klöckner's avatar
Andreas Klöckner committed
RELATE currently works with Python 2.7. (This is because `dulwich
<https://www.samba.org/~jelmer/dulwich/>`_, a dependency, does not yet support
Python 3.)

Install `bower <http://bower.io/>`_ and its dependencies, as described on its
web page.

(Optional) Make a virtualenv to install to::

Andreas Klöckner's avatar
Andreas Klöckner committed
    virtualenv --system-site-packages my-relate-env
    source my-relate-env/bin/activate

To install, clone the repository::

Andreas Klöckner's avatar
Andreas Klöckner committed
    git clone git://github.com/inducer/relate
Andreas Klöckner's avatar
Andreas Klöckner committed
Enter the relate directory::
Andreas Klöckner's avatar
Andreas Klöckner committed
    cd relate

Install the dependencies::

    pip install -r requirements.txt

Copy (and, optionally, edit) the example configuration::

    cp local_settings.py.example local_settings.py
    vi local_settings.py

Initialize the database::

    python manage.py migrate
    python manage.py createsuperuser --username=$(whoami)

Retrieve static (JS/CSS) dependencies::

    python manage.py bower install

Run the server::

    python manage.py runserver

Open a browser to http://localhost:8000, sign in (your user name will be the
same as your system user name, or whatever `whoami` returned above) and select
"Set up new course".

Additional setup steps for Docker
Andreas Klöckner's avatar
Andreas Klöckner committed
---------------------------------

(TODO)

Add to kernel command line, if needed::

    [...] cgroup_enable=memory swapaccount=1

Change docker config to disallow IP forwarding::

    --ip-forward=false

in :file:`/etc/default/docker.io`.

Long-term maintenance
---------------------

As course content gets updated repeatedly, more and more little files get
created in the directories containing the course directories. Given enough
time, RELATE may eventually encounter this `issue in dulwich
<https://github.com/jelmer/dulwich/issues/281>`_, the software component that
RELATE uses to access git repositories. If it does, it will fail with
``IOError: [Errno 24] Too many open files``.

To prevent this from happening, it is advisable to occasionally run `git repack -a -d`
on RELATE's git repositories. This may be accomplished by creating a
`Cron <https://en.wikipedia.org/wiki/Cron>`_ job running
a customized version of
`this script <https://github.com/inducer/relate/blob/master/repack-repositories.sh>`_.
This is needed about once every few hundred course update cycles, so relatively
infrequently.

Tips
====

User-visible Changes
====================

Andreas Klöckner's avatar
Andreas Klöckner committed
Version 2015.1
--------------

First public release.

License
=======

Andreas Klöckner's avatar
Andreas Klöckner committed
RELATE is licensed to you under the MIT/X Consortium license:
Andreas Klöckner's avatar
Andreas Klöckner committed
Copyright (c) 2014-15 Andreas Klöckner and Contributors.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.