Installation

Requirements

The only prerequisite for running this is a working Docker installation. You’ll need both the docker and docker-compose commands in your system $PATH. Follow the instructions from the official documentation:

Warning

Do not attempt to simply run apt-get install docker docker-compose on older Ubuntu platforms, such as 16.04 (Xenial), as you will get older versions of these utilities.

Note that the production web server container will bind to port 80 and 443, so if there a web server is running on the same server (Apache or Nginx, for instance), it should be stopped prior to running tutor. Check the section on how to setup a web proxy for a workaround.

With Tutor, Open edX can run on any platform that supports Docker, including Mac OS and Windows. Tutor was tested under various versions of Ubuntu and Mac OS.

At a minimum, the server running the containers should have 4 Gb of RAM. With less memory, the deployment procedure might crash during migrations (see the troubleshooting section) and the platform will be unbearably slow.

At least 9Gb of disk space is required.

Also, the host running the containers should be a 64 bit platform. (images are not built for i386 systems)

Direct binary downloads

The latest binaries can be downloaded from https://github.com/overhangio/tutor/releases. From the command line:

sudo curl -L "https://github.com/overhangio/tutor/releases/download/v3.11.4/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
sudo chmod 0755 /usr/local/bin/tutor

This is the simplest and recommended installation method for most people. Note however that you will not be able to use custom plugins with this pre-compiled binary. The only plugins you can use with this approach are those thare are already bundled with the binary: discovery, ecommerce, figures, minio, notes, xqueue.

From source

If you would like to inspect the Tutor source code, you are most welcome to install Tutor from Pypi or directly from the Github repository. You will need python >= 3.6 and the libyaml development headers. On Ubuntu, these requirements can be installed by running:

sudo apt install python3 libyaml-dev

Installing from pypi:

pip install tutor-openedx

Installing from a local clone of the repository:

git clone https://github.com/overhangio/tutor
cd tutor
pip install -e .

Cloud deployment

Tutor can be launched on Amazon Web Services very quickly with the official Tutor AMI. Shell access is not even required, as all configuration will happen through the Tutor web user interface.

Upgrading

To upgrade a running Open edX platform, just install the latest tutor version (using either methods above) and run the quickstart command again. If you have customised your docker images, you will have to re-build them prior to running quickstart.

Autocomplete

Tutor is built on top of Click, which is a great library for building command line interface (CLI) tools. As such, Tutor benefits from all Click features, including auto-completion. After installing Tutor, auto-completion can be enabled by running:

_TUTOR_COMPLETE=source tutor >> ~/.bashrc

If you are running zsh, run instead:

_TUTOR_COMPLETE=source_zsh tutor >> ~/.zshrc

After opening a new shell, you can test auto-completion by typing:

tutor <tab><tab>

Running Tutor with Podman

You have the option of running Tutor with Podman, instead of the native Docker tools. This has some practical advantages: it does not require a running Docker daemon, and it enables you to run and build Docker images without depending on any system component running root. As such, it is particularly useful for building Tutor images from CI pipelines.

The podman CLI aims to be fully compatible with the docker CLI, and podman-compose is a fully-compatible alias of docker-compose. This means that you can use both together with Tutor, without making any changes to Tutor itself.

Warning

You should not attempt to run Tutor with Podman on a system that already has native docker and docker-compose installed. If you want to switch to podman and podman-compose using the aliases described here, uninstall the native Docker packages first.

Enabling Podman

Podman is supported on a variety of development platforms, see the installation instructions for details.

Once you have installed Podman and its dependencies on the platform of your choice, you’ll need to make sure that its podman binary, usually installed as /usr/bin/podman, is aliased to docker, and is included as such in your system $PATH. On some CentOS and Fedora releases you can install a package named podman-docker to do this for you, but on other platforms you’ll need to take of this yourself.

  • If $HOME/bin is in your $PATH, you can create a symbolic link there:

    ln -s $(which podman) $HOME/bin/docker
    
  • If you want to instead make docker a system-wide alias for podman, you can create your symlink in /usr/local/bin, an action that normally requires root privileges:

    sudo ln -s $(which podman) /usr/local/bin/docker
    

Enabling podman-compose

podman-compose is available as a package from PyPI, and can thus be installed with pip. See its README for installation instructions. Note that if you have installed Tutor in its own virtualenv, you’ll need to run pip install podman-compose in that same virtualenv.

Once installed, you’ll again need to create a symbolic link that aliases docker-compose to podman-compose.

  • If you run Tutor and podman-compose in a virtualenv, create the symlink in that virtualenv’s bin directory: activate the virtualenv, then run:

    ln -s $(which podman-compose) $(dirname $(which podman-compose))/docker-compose
    
  • If you do not, create the symlink in /usr/local/bin, using root privileges:

    sudo ln -s $(which podman-compose) /usr/local/bin/docker-compose
    

Verifying your environment

Once you have configured your symbolic links as described, you should be able to run docker version and docker-compose --help and their output should agree, respectively, with podman version and podman-compose --help.

After that, you should be able to use tutor local, tutor build, and other commands as if you had installed the native Docker tools.