6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-20 03:51:14 +00:00
tutor/docs/install.rst

132 lines
5.7 KiB
ReStructuredText
Raw Normal View History

.. _install:
Install Tutor
=============
2020-03-16 21:14:36 +00:00
.. _requirements:
Requirements
------------
2020-03-16 21:14:36 +00:00
* Supported OS: Tutor runs on any 64-bit, UNIX-based system. It was also reported to work on Windows.
* Required software:
2020-03-16 21:14:36 +00:00
- `Docker <https://docs.docker.com/engine/installation/>`__: v18.06.0+
- `Docker Compose <https://docs.docker.com/compose/install/>`__: v1.22.0+
2020-01-10 18:03:53 +00:00
.. 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.
2019-03-27 14:55:09 +00:00
* Ports 80 and 443 should be open. If other web services run on these ports, check the tutorial on :ref:`how to setup a web proxy <web_proxy>`.
2020-03-16 21:14:36 +00:00
* Hardware:
2020-12-09 01:39:10 +00:00
- Minimum configuration: 4 GB RAM, 2 CPU, 8 GB disk space
- Recommended configuration: 8 GB RAM, 4 CPU, 25 GB disk space
2019-02-13 22:44:42 +00:00
.. note::
2020-12-09 01:39:10 +00:00
On Mac OS, by default, containers are allocated 2 GB of RAM, which is not enough. You should follow `these instructions from the official Docker documentation <https://docs.docker.com/docker-for-mac/#advanced>`__ to allocate at least 4-5 GB to the Docker daemon. If the deployment fails because of insufficient memory during database migrations, check the :ref:`relevant section in the troubleshooting guide <migrations_killed>`.
2020-03-16 21:14:36 +00:00
.. _install_binary:
2020-03-16 21:14:36 +00:00
Direct binary download
----------------------
The latest binaries can be downloaded from https://github.com/overhangio/tutor/releases. From the command line:
2019-02-18 08:53:54 +00:00
.. include:: download/binary.rst
2020-02-25 16:03:40 +00:00
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 that are already bundled with the binary: see the :ref:`existing plugins <existing_plugins>`.
2020-03-16 21:14:36 +00:00
.. _install_source:
Alternative installation methods
--------------------------------
If you would like to inspect the Tutor source code, you are most welcome to install Tutor from `Pypi <https://pypi.org/project/tutor/>`_ or directly from `the Github repository <https://github.com/overhangio/tutor>`_. You will need python >= 3.6 with pip and the libyaml development headers. On Ubuntu, these requirements can be installed by running::
2019-03-27 14:55:09 +00:00
sudo apt install python3 python3-pip libyaml-dev
2019-03-27 14:55:09 +00:00
Installing from pypi
~~~~~~~~~~~~~~~~~~~~
.. include:: download/pip.rst
2019-03-27 14:55:09 +00:00
Installing from source
~~~~~~~~~~~~~~~~~~~~~~
::
git clone https://github.com/overhangio/tutor
cd tutor
pip install -e .
2019-10-07 12:26:17 +00:00
2020-12-18 08:19:36 +00:00
DNS records
-----------
When running a server in production, it is necessary to define `DNS records <https://en.wikipedia.org/wiki/Domain_Name_System#Resource_records>`__ which will make it possible to access your Open edX platform by name in your browser. The precise procedure to create DNS records vary from one provider to the next and is beyond the scope of these docs. You should create a record of type A with a name equal to your LMS hostname (given by ``tutor config printvalue LMS_HOST``) and a value that indicates the IP address of your server. Applications other than the LMS, such as the studio, ecommerce, etc. typically reside in subdomains of the LMS. Thus, you should also create a CNAME record to point all subdomains of the LMS to the LMS_HOST.
For instance, the demo Open edX server that runs at http://demo.openedx.overhang.io has the following DNS records::
demo.openedx 1800 IN A 172.105.89.208
*.demo.openedx 1800 IN CNAME demo.openedx.overhang.io.
.. _cloud_install:
v11.0.0 (2020-12-09) - 💥[Improvement] Upgrade Open edX to Koa - 💥 Setting changes: - The ``ACTIVATE_HTTPS`` setting was renamed to ``ENABLE_HTTPS``. - Other ``ACTIVATE_*`` variables were all renamed to ``RUN_*``. - The ``WEB_PROXY`` setting was removed and ``RUN_CADDY`` was added. - The ``NGINX_HTTPS_PORT`` setting is deprecated. - Architectural changes: - Use Caddy as a web proxy for automated SSL/TLS certificate generation: - Nginx no longer listens to port 443 for https traffic - The Caddy configuration file comes with a new ``caddyfile`` patch for much simpler SSL/TLS management. - Configuration files for web proxies are no longer provided. - Kubernetes deployment no longer requires setting up a custom Ingress resource or custom manager. - Gunicorn and Whitenoise are replaced by uwsgi: this increases boostrap performance and makes it no longer necessary to mount media folders in the Nginx container. - Replace memcached and rabbitmq by redis. - Additional features: - Make it possible to disable all plugins at once with ``plugins disable all``. - Add ``tutor k8s wait`` command to wait for a pod to become ready - Faster, more reliable static assets with local memory caching - Deprecation: proxy files for Apache and Nginx are no longer provided out of the box. - Removed plugin `{{ patch (...) }}` statements: - "https-create", "k8s-ingress-rules", "k8s-ingress-tls-hosts": these are no longer necessary. Instead, declare your app in the "caddyfile" patch. - "local-docker-compose-nginx-volumes": this patch was primarily used to serve media assets. The recommended is now to serve assets with uwsgi.
2020-09-17 10:53:14 +00:00
2020-03-16 21:14:36 +00:00
Zero-click AWS installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-03-16 21:14:36 +00:00
Tutor can be launched on Amazon Web Services very quickly with the `official Tutor AMI <https://aws.amazon.com/marketplace/pp/B07PV3TB8X>`__. Shell access is not required, as all configuration will happen through the Tutor web user interface. For detailed installation instructions, we recommend watching the following video:
2020-02-25 16:03:40 +00:00
.. youtube:: xtXP52qGphA
2019-10-07 12:26:17 +00:00
.. _upgrade:
Upgrading
---------
2019-10-07 12:26:17 +00:00
2020-02-25 16:03:40 +00:00
With Tutor, it is very easy to upgrade to a more recent Open edX or Tutor release. Just install the latest ``tutor`` version (using either methods above) and run the ``quickstart`` command again. If you have :ref:`customised <configuration_customisation>` your docker images, you will have to re-build them prior to running ``quickstart``.
``quickstart`` should take care of automatically running the upgrade process. If for some reason you need to *manually* upgrade from an Open edX release to the next, you should run ``tutor local upgrade``. For instance, to upgrade from Koa to Lilac, run::
tutor local upgrade --from=koa
2020-01-10 18:03:53 +00:00
.. _autocomplete:
2019-05-03 05:55:21 +00:00
Autocomplete
------------
Tutor is built on top of `Click <https://click.palletsprojects.com>`_, which is a great library for building command line interface (CLI) tools. As such, Tutor benefits from all Click features, including `auto-completion <https://click.palletsprojects.com/en/8.x/bashcomplete/>`_. After installing Tutor, auto-completion can be enabled in bash by running::
2019-05-03 05:55:21 +00:00
_TUTOR_COMPLETE=bash_source tutor >> ~/.bashrc
2019-05-03 05:55:21 +00:00
If you are running zsh, run instead::
_TUTOR_COMPLETE=zsh_source tutor >> ~/.zshrc
2019-05-03 05:55:21 +00:00
After opening a new shell, you can test auto-completion by typing::
tutor <tab><tab>
Uninstallation
--------------
2020-06-14 20:33:44 +00:00
It is fairly easy to completely uninstall Tutor and to delete the Open edX platforms that is running locally.
First of all, stop any locally-running platform::
2020-12-18 08:19:36 +00:00
tutor local stop
tutor dev stop
Then, delete all data associated to your Open edX platform::
2020-12-18 08:19:36 +00:00
# WARNING: this step is irreversible
sudo rm -rf "$(tutor config printroot)"
Finally, uninstall Tutor itself::
2020-12-18 08:19:36 +00:00
# If you installed tutor from source
pip uninstall tutor
2020-12-18 08:19:36 +00:00
# If you downloaded the tutor binary
sudo rm /usr/local/bin/tutor