Skip to content

Commit

Permalink
feat: upgrade to olive
Browse files Browse the repository at this point in the history
  • Loading branch information
regisb committed Dec 12, 2022
1 parent 5ef2464 commit fa3cf79
Show file tree
Hide file tree
Showing 32 changed files with 173 additions and 186 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ instructions, because git commits are used to generate release notes:

<!-- scriv-insert-here -->

<a id='changelog-15.0.0'></a>
## v15.0.0 (2022-12-06)


- 💥[Feature] Upgrade to Olive (by @regisb):
- Mypy type checking options were modified: developers are encouraged to add the `--implicit-reexport` option to their IDE.
- [Bugfix] Update problem templates according newer python versions. (by @mariajgrimaldi)
- [Improvement] Add the `-h` help option to all commands and subcommands. Previously, we could only use `--help`, which is quite long for lazy fingers. (by @regisb)
- 💥[Feature] Add an extensible `local/dev/k8s do ...` command to trigger custom job commands. These commands are used to run a series of bash scripts in designated containers. Any plugin can add custom jobs thanks to the `CLI_DO_COMMANDS` filter. This causes the following breaking changes:
- The "init", "createuser", "settheme", "importdemocourse" commands were all migrated to this new interface. For instance, `tutor local init` was replaced by `tutor local do init`.
- Plugin developers are encouraged to replace calls to the `COMMANDS_INIT` and `COMMANDS_PRE_INIT` filters by `CLI_DO_INIT_TASKS`.
- [Feature] Implement hook filter priorities, which work like action priorities. (by @regisb)
- 💥[Improvement] Remove the `local/dev bindmount` commands, which have been marked as deprecated for some time. The `--mount` option should be used instead.
- 💥[Bugfix] Fix local installation requirements. Plugins that implemented the "openedx-dockerfile-post-python-requirements" patch and that needed access to the edx-platform repo will no longer work. Instead, these plugins should implement the "openedx-dockerfile-pre-assets" patch. This scenario should be very rare, though. (by @regisb)
- 💥[Improvement] Rename the implementation of tutor <mode> quickstart to tutor <mode> launch. (by @Carlos-Muniz)
- 💥[Improvement] Remove the implementation of tutor dev runserver. (by @Carlos-Muniz)
- [Bugfix] Fix MongoDB replica set connection error resulting from edx-platform's pymongo (3.10.1 -> 3.12.3) upgrade ([edx-platform#30569](https://github.com/openedx/edx-platform/pull/30569)). (by @ormsbee)
- [Improvement] For Tutor Nightly (and only Nightly), official plugins are now installed from their nightly branches on GitHub instead of a version range on PyPI. This will allow Nightly users to install all official plugins by running ``pip install -e ".[full]"``.
- [Bugfix] Remove edX references from bulk emails ([issue](https://github.com/openedx/build-test-release-wg/issues/100)).
- [Bugfix] Update ``celery`` invocations for lms-worker and cms-worker to be compatible with Celery 5 CLI.
- [Improvement] Point CMS at its config file using ``CMS_CFG`` environment variable instead of deprecated ``STUDIO_CFG``.
- [Bugfix] Start MongoDB when running migrations, because a new data migration fails if MongoDB is not running.

<a id='changelog-14.2.3'></a>
## v14.2.3 (2022-12-06)

Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ Features
* No technical skill required with the `zero-click Tutor AWS image <https://docs.tutor.overhang.io/install.html#zero-click-aws-installation>`__

.. _readme_intro_end:
..
TODO: replace image + alt with tutor local launch
.. image:: ./docs/img/quickstart.gif
:alt: Tutor local quickstart
:target: https://terminalizer.com/view/91b0bfdd557

Launch
.. image:: ./docs/img/launch.webp
:alt: Tutor local launch
:target: https://www.terminalizer.com/view/3a8d55835686

Quickstart
----------

1. Install the `latest stable release <https://github.com/overhangio/tutor/releases>`_ of Tutor
Expand All @@ -71,7 +70,8 @@ Launch
Documentation
-------------

Extensive documentation is available online: https://docs.tutor.overhang.io/
Extensive documentation is available: https://docs.tutor.overhang.io/
Extensive documentation is available: https://docs.tutor.overhang.io/

Is there a problem?
-------------------
Expand Down
15 changes: 0 additions & 15 deletions changelog.d/20221124_172610_regis_nightly.md

This file was deleted.

16 changes: 6 additions & 10 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Open edX customisation

This defines the git repository from which you install Open edX platform code. If you run an Open edX fork with custom patches, set this to your own git repository. You may also override this configuration parameter at build time, by providing a ``--build-arg`` option.

- ``OPENEDX_COMMON_VERSION`` (default: ``"open-release/nutmeg.1"``)
- ``OPENEDX_COMMON_VERSION`` (default: ``"open-release/olive.1"``)

This defines the default version that will be pulled from all Open edX git repositories.

Expand All @@ -150,7 +150,7 @@ These two configuration parameters define which Redis database to use for Open e

.. _openedx_extra_pip_requirements:

- ``OPENEDX_EXTRA_PIP_REQUIREMENTS`` (default: ``openedx-scorm-xblock<13.0.0,>=12.0.0``)
- ``OPENEDX_EXTRA_PIP_REQUIREMENTS`` (default: ``openedx-scorm-xblock>=15.0.0,<16.0.0``)

This defines extra pip packages that are going to be installed for Open edX.

Expand All @@ -170,10 +170,6 @@ This configuration parameter sets the Django setting ``AWS_SECRET_ACCESS_KEY`` i

This configuration parameter sets the name of the MySQL Database to be used by the Open edX Instance.

- ``OPENEDX_CSMH_MYSQL_DATABASE`` (default: ``"{{ OPENEDX_MYSQL_DATABASE }}_csmh"``)

This configuration parameter allows you to configure the name of the separate Courseware Student-Module History (CSMH) database.

- ``OPENEDX_MYSQL_USERNAME`` (default: ``"openedx"``)

This configuration parameter sets the username associated with the MySQL Database.
Expand Down Expand Up @@ -408,14 +404,14 @@ If you don't create your fork from this tag, you *will* have important compatibi

- Do not try to run a fork from an older (pre-Nutmeg) version of edx-platform: this will simply not work.
- Do not try to run a fork from the edx-platform master branch: there is a 99% probability that it will fail.
- Do not try to run a fork from the open-release/nutmeg.master branch: Tutor will attempt to apply security and bug fix patches that might already be included in the open-release/nutmeg.master but which were not yet applied to the latest release tag. Patch application will thus fail if you base your fork from the open-release/nutmeg.master branch.
- Do not try to run a fork from the open-release/olive.master branch: Tutor will attempt to apply security and bug fix patches that might already be included in the open-release/olive.master but which were not yet applied to the latest release tag. Patch application will thus fail if you base your fork from the open-release/olive.master branch.

.. _i18n:

Adding custom translations
~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are not running Open edX in English (``LANGUAGE_CODE`` default: ``"en"``), chances are that some strings will not be properly translated. In most cases, this is because not enough contributors have helped translate Open edX into your language. It happens! With Tutor, available translated languages include those that come bundled with `edx-platform <https://github.com/openedx/edx-platform/tree/open-release/nutmeg.master/conf/locale>`__ as well as those from `openedx-i18n <https://github.com/openedx/openedx-i18n/tree/master/edx-platform/locale>`__.
If you are not running Open edX in English (``LANGUAGE_CODE`` default: ``"en"``), chances are that some strings will not be properly translated. In most cases, this is because not enough contributors have helped translate Open edX into your language. It happens! With Tutor, available translated languages include those that come bundled with `edx-platform <https://github.com/openedx/edx-platform/tree/open-release/olive.master/conf/locale>`__ as well as those from `openedx-i18n <https://github.com/openedx/openedx-i18n/tree/master/edx-platform/locale>`__.

Tutor offers a relatively simple mechanism to add custom translations to the openedx Docker image. You should create a folder that corresponds to your language code in the "build/openedx/locale" folder of the Tutor environment. This folder should contain a "LC_MESSAGES" folder. For instance::

Expand All @@ -436,9 +432,9 @@ Then, add a "django.po" file there that will contain your custom translations::
.. warning::
Don't forget to specify the file ``Content-Type`` when adding message strings with non-ASCII characters; otherwise a ``UnicodeDecodeError`` will be raised during compilation.

The "String to translate" part should match *exactly* the string that you would like to translate. You cannot make it up! The best way to find this string is to copy-paste it from the `upstream django.po file for the English language <https://github.com/openedx/edx-platform/blob/open-release/nutmeg.master/conf/locale/en/LC_MESSAGES/django.po>`__.
The "String to translate" part should match *exactly* the string that you would like to translate. You cannot make it up! The best way to find this string is to copy-paste it from the `upstream django.po file for the English language <https://github.com/openedx/edx-platform/blob/open-release/olive.master/conf/locale/en/LC_MESSAGES/django.po>`__.

If you cannot find the string to translate in this file, then it means that you are trying to translate a string that is used in some piece of javascript code. Those strings are stored in a different file named "djangojs.po". You can check it out `in the edx-platform repo as well <https://github.com/openedx/edx-platform/blob/open-release/nutmeg.master/conf/locale/en/LC_MESSAGES/djangojs.po>`__. Your custom javascript strings should also be stored in a "djangojs.po" file that should be placed in the same directory.
If you cannot find the string to translate in this file, then it means that you are trying to translate a string that is used in some piece of javascript code. Those strings are stored in a different file named "djangojs.po". You can check it out `in the edx-platform repo as well <https://github.com/openedx/edx-platform/blob/open-release/olive.master/conf/locale/en/LC_MESSAGES/djangojs.po>`__. Your custom javascript strings should also be stored in a "djangojs.po" file that should be placed in the same directory.

To recap, here is an example. To translate a few strings in French, both from django.po and djangojs.po, we would have the following file hierarchy::

Expand Down
2 changes: 1 addition & 1 deletion docs/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The ``openedx-dev`` Docker image is based on the same ``openedx`` image used by

- Additional Python and system requirements are installed for convenient debugging: `ipython <https://ipython.org/>`__, `ipdb <https://pypi.org/project/ipdb/>`__, vim, telnet.

- The edx-platform `development requirements <https://github.com/openedx/edx-platform/blob/open-release/nutmeg.master/requirements/edx/development.in>`__ are installed.
- The edx-platform `development requirements <https://github.com/openedx/edx-platform/blob/open-release/olive.master/requirements/edx/development.in>`__ are installed.


If you are using a custom ``openedx`` image, then you will need to rebuild ``openedx-dev`` every time you modify ``openedx``. To so, run::
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The `devstack <https://github.com/openedx/devstack>`_ is meant for development o
Is Tutor officially supported by edX?
-------------------------------------

Yes: as of the Open edX Maple release (December 9th 2021), Tutor is the only officially supported installation method for Open edX: see the `official installation instructions <https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/open-release-nutmeg.master/installation/index.html>`__.
Yes: as of the Open edX Maple release (December 9th 2021), Tutor is the only officially supported installation method for Open edX: see the `official installation instructions <https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/open-release-olive.master/installation/index.html>`__.

What features are missing from Tutor?
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Getting started

install
intro
quickstart
quickstart
whatnext
Binary file added docs/img/launch.webp
Binary file not shown.
Binary file removed docs/img/quickstart.gif
Binary file not shown.
9 changes: 4 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
.. include:: ../README.rst
:start-after: _readme_intro_start:
:end-before: _readme_intro_end:
..
TODO replace quickstart.gif + alt with 'launch'
.. image:: ./img/quickstart.gif
:alt: Tutor local quickstart
:target: https://terminalizer.com/view/91b0bfdd557

.. image:: ./img/launch.webp
:alt: Tutor local launch
:target: https://www.terminalizer.com/view/3a8d55835686

----------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/k8s.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The other benefit of ``kubectl apply`` is that it allows you to customise the Ku

To learn more about "kustomizations", refer to the `official documentation <https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/>`__.

Launch
Quickstart
----------

Launch the platform on Kubernetes in one command::
Expand Down
3 changes: 0 additions & 3 deletions docs/local.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ In the following, environment and data files will be generated in a user-specifi
export TUTOR_ROOT=/path/to/tutorroot
tutor run ...

.. note::
As of v10.0.0, a locally-running Open edX platform can no longer be accessed from http://localhost or http://studio.localhost. Instead, when running ``tutor local launch``, you must now decide whether you are running a platform that will be used in production. If not, the platform will be automatically be bound to http://local.overhang.io and http://studio.local.overhang.io, which are domain names that point to 127.0.0.1 (localhost). This change was made to facilitate internal communication between Docker containers.

Main commands
-------------

Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _launch:
.. _quickstart:

Quickstart (1-click install)
----------------------------
Expand All @@ -22,7 +22,7 @@ Yes :) This is what happens when you run ``tutor local launch``:
2. Configuration files are generated from templates.
3. Docker images are downloaded.
4. Docker containers are provisioned.
5. A full, production-ready Open edX platform (`Nutmeg <https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/open-release-nutmeg.master/platform_releases/nutmeg.html>`__ release) is run with docker-compose.
5. A full, production-ready Open edX platform (`Nutmeg <https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/open-release-olive.master/platform_releases/olive.html>`__ release) is run with docker-compose.

The whole procedure should require less than 10 minutes, on a server with good bandwidth. Note that your host environment will not be affected in any way, since everything runs inside docker containers. Root access is not even necessary.

Expand Down
2 changes: 1 addition & 1 deletion docs/whatnext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
What next?
==========

You have gone through the :ref:`Launch installation <launch>`: at this point, you should have a running Open edX platform. If you don't, please follow the instructions from the :ref:`Troubleshooting <troubleshooting>` section.
You have gone through the :ref:`Quickstart installation <quickstart>`: at this point, you should have a running Open edX platform. If you don't, please follow the instructions from the :ref:`Troubleshooting <troubleshooting>` section.

Logging-in as administrator
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ mypy
pycryptodome
jinja2>=2.10
kubernetes
pyyaml>=4.2b1
pyyaml>=6.0
10 changes: 5 additions & 5 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.8
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile requirements/base.in
Expand All @@ -8,15 +8,15 @@ appdirs==1.4.4
# via -r requirements/base.in
cachetools==5.2.0
# via google-auth
certifi==2022.9.24
certifi==2022.12.7
# via
# kubernetes
# requests
charset-normalizer==2.1.1
# via requests
click==8.1.3
# via -r requirements/base.in
google-auth==2.14.1
google-auth==2.15.0
# via kubernetes
idna==3.4
# via requests
Expand All @@ -38,7 +38,7 @@ pyasn1==0.4.8
# rsa
pyasn1-modules==0.2.8
# via google-auth
pycryptodome==3.15.0
pycryptodome==3.16.0
# via -r requirements/base.in
python-dateutil==2.8.2
# via kubernetes
Expand All @@ -63,7 +63,7 @@ tomli==2.0.1
# via mypy
typing-extensions==4.4.0
# via mypy
urllib3==1.26.12
urllib3==1.26.13
# via
# kubernetes
# requests
Expand Down
Loading

0 comments on commit fa3cf79

Please sign in to comment.