6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-19 19:45:25 +00:00
tutor/docs/tutorials/arm64.rst
Régis Behmo 18ce1f2fe4 feat: persistent bind-mounts
This is an important change, where we get remove the previous `--mount`
option, and instead opt for persistent bind-mounts.

Persistent bind mounts have several advantages:
- They make it easier to remember which folders need to be bind-mounted.
- Code is *much* less clunky, as we no longer need to generate temporary
  docker-compose files.
- They allow us to bind-mount host directories *at build time* using the
  buildx `--build-context` option.
- The transition from development to production becomes much easier, as
  images will automatically be built using the host repo.

The only drawback is that persistent bind-mounts are slightly less
portable: when a config.yml file is moved to a different folder, many
things will break if the repo is not checked out in the same path.

For instance, this is how to start working on a local fork of
edx-platform:

    tutor config save --append MOUNTS=/path/to/edx-platform

And that's all there is to it. No, this fork will be used whenever we
run:

    tutor images build openedx
    tutor local start
    tutor dev start

This change is made possible by huge improvements in the build time
performance. These improvements make it convenient to re-build Docker
images often.

Related issues:
https://github.com/openedx/wg-developer-experience/issues/71
https://github.com/openedx/wg-developer-experience/issues/66
https://github.com/openedx/wg-developer-experience/issues/166
2023-06-14 21:08:49 +02:00

41 lines
1.9 KiB
ReStructuredText

.. _arm64:
Running Tutor on ARM-based systems
==================================
Tutor can be used on ARM64 systems, although no official ARM64 docker images are available. If you want to get started quickly, there is `an unofficial community-maintained ARM64 plugin <https://github.com/open-craft/tutor-contrib-arm64>`_ which will set the required settings for you and which includes unofficial docker images. If you prefer not to use an unofficial plugin, you can follow this tutorial.
.. note:: There are generally two ways to run Tutor on an ARM system - using emulation (via qemu or Rosetta 2) to run x86_64 images or running native ARM images. Since emulation can be noticeably slower (typically 20-100% slower depending on the emulation method), this tutorial aims to use native images where possible.
Building the images
-------------------
Although there are no official ARM64 images, Tutor makes it easy to build the images yourself.
Start by :ref:`installing <install>` Tutor and its dependencies (e.g. Docker) onto your system.
.. note:: For Open edX developers, if you want to use the :ref:`nightly <nightly>` version of Tutor to "run master", install Tutor using git and check out the ``nightly`` branch of Tutor at this point. See the :ref:`nightly documentation <nightly>` for details.
Next, configure Tutor::
tutor config save --interactive
Go through the configuration process, answering each question.
Then, build the "openedx" and "permissions" images::
tutor images build openedx permissions
.. TODO we don't want this instruction anymore
If you want to use Tutor as an Open edX development environment, you should also build the development images::
tutor dev dc build lms
From this point on, use Tutor as normal. For example, start Open edX and run migrations with::
tutor local launch
Or for a development environment::
tutor dev launch