Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: take advantage of upstream static asset build improvements #31

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ instructions, because git commits are used to generate release notes:

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

<a id='changelog-16.1.1'></a>
## v16.1.1 (2023-08-29)

- 💥[Bugfix] Apply "fix mysql crash after upgrade to Palm" from 16.1.0 to `tutor k8s` deployments, as well. Users previously running `tutor k8s` with `RUN_MYSQL: true`, with any version between 16.0.0 and 16.1.0 including, might have to fix their data manually. For users running `tutor local`, this change has no effect, as the underlying issue was already fixed in 16.1.0. For users running `tutor k8s` with `RUN_MYSQL: false`, this change is also a no-op. (by @fghaas)

<a id='changelog-16.1.0'></a>
## v16.1.0 (2023-08-16)

Expand Down
2 changes: 2 additions & 0 deletions changelog.d/20230818_112124_kyle_buildkit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Deprecation] The template variable ``is_buildkit_enabled``, which now always returns True, is deprecated. Plugin authors should assume BuildKit is enabled and remove the variable from their templates (by @kdmccormick).
- 💥[Deprecation] Tutor no longer supports the legacy Docker builder, which was previously available by setting ``DOCKER_BUILDKIT=0`` in the host environment. Going forward, Tutor will always use BuildKit (a.k.a. ``docker buildx`` in Docker v19-v22, or just ``docker build`` in Docker v23). This transition will improve build performance and should be seamless for Tutor users who are running a supported Docker version (by @kdmccormick).
4 changes: 2 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Requirements
------------

* Supported OS: Tutor runs on any 64-bit, UNIX-based OS. It was also reported to work on Windows (with `WSL 2 <https://docs.microsoft.com/en-us/windows/wsl/install>`__).
* Architecture: support for ARM64 is a work-in-progress. See `this issue <https://github.com/overhangio/tutor/issues/510>`__.
* Architecture: Both AMD64 and ARM64 are supported.
* Required software:

- `Docker <https://docs.docker.com/engine/installation/>`__: v20.10.15+
Expand Down Expand Up @@ -114,7 +114,7 @@ Upgrading to a new Open edX release
Major Open edX releases are published twice a year, in June and December, by the Open edX `Build/Test/Release working group <https://discuss.openedx.org/c/working-groups/build-test-release/30>`__. When a new Open edX release comes out, Tutor gets a major version bump (see :ref:`versioning`). Such an upgrade typically includes multiple breaking changes. Any upgrade is final because downgrading is not supported. Thus, when upgrading your platform from one major version to the next, it is strongly recommended to do the following:

1. Read the changes listed in the `CHANGELOG.md <https://github.com/overhangio/tutor/blob/master/CHANGELOG.md>`__ file. Breaking changes are identified by a "💥".
2. Perform a backup. On a local installation, this is typically done with::
2. Perform a backup (see the :ref:`backup tutorial <backup_tutorial>`). On a local installation, this is typically done with::

tutor local stop
sudo rsync -avr "$(tutor config printroot)"/ /tmp/tutor-backup/
Expand Down
4 changes: 2 additions & 2 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Tutor simplifies the deployment of Open edX by:
:width: 500px
:align: center

Because Docker containers are becoming an industry-wide standard, that means that with Tutor it becomes possible to run Open edX anywhere: for now, Tutor supports deploying on a local server, with `docker-compose <https://docs.docker.com/compose/overview/>`_, and in a large cluster, with `Kubernetes <http://kubernetes.io/>`_. But in the future, Tutor may support other deployment platforms.
Because Docker containers are becoming an industry-wide standard, that means that with Tutor it becomes possible to run Open edX anywhere: for now, Tutor supports deploying on a local server, with `docker compose <https://docs.docker.com/compose/overview/>`_, and in a large cluster, with `Kubernetes <http://kubernetes.io/>`_. But in the future, Tutor may support other deployment platforms.

Where can I try Open edX and Tutor?
-----------------------------------
Expand Down Expand Up @@ -101,7 +101,7 @@ You can now take advantage of the Tutor-powered CLI (item #3) to bootstrap your

tutor local launch

Under the hood, Tutor simply runs ``docker-compose`` and ``docker`` commands to launch your platform. These commands are printed in the standard output, such that you are free to replicate the same behaviour by simply copying/pasting the same commands.
Under the hood, Tutor simply runs ``docker compose`` and ``docker`` commands to launch your platform. These commands are printed in the standard output, such that you are free to replicate the same behaviour by simply copying/pasting the same commands.

How do I navigate Tutor's command-line interface?
-------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/k8s.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Common tasks
Executing commands inside service pods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Tutor and plugin documentation usually often instructions to execute some ``tutor local run ...`` commands. These commands are only valid when running Tutor locally with docker-compose, and will not work on Kubernetes. Instead, you should run ``tutor k8s exec ...`` commands. Arguments and options should be identical.
The Tutor and plugin documentation usually often instructions to execute some ``tutor local run ...`` commands. These commands are only valid when running Tutor locally with docker compose, and will not work on Kubernetes. Instead, you should run ``tutor k8s exec ...`` commands. Arguments and options should be identical.

For instance, to run a Python shell in the lms container, run::

Expand Down
2 changes: 1 addition & 1 deletion docs/local.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Local deployment
This method is for deploying Open edX locally on a single server, where docker images are orchestrated with `docker-compose <https://docs.docker.com/compose/overview/>`_.

.. note::
Tutor is compatible with the ``docker compose`` subcommand. However, this support is still in beta and we're not sure it will behave the same as the previous ``docker-compose`` command. So ``docker-compose`` will be preferred, unless you set an environment variable ``TUTOR_USE_COMPOSE_SUBCOMMAND`` to enforce using ``docker compose``.
As of v16.0.0, Tutor now uses the ``docker compose`` subcommand instead of the separate ``docker-compose`` command.

.. _tutor_root:

Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/datamigration.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _backup_tutorial:

Making backups and migrating data
---------------------------------

Expand All @@ -10,7 +12,7 @@ With Tutor, all data are stored in a single folder. This means that it's extreme

3. Transfer the configuration, environment, and platform data from server 1 to server 2::

rsync -avr "$(tutor config printroot)/" username@server2:/tmp/tutor/
sudo -avr "$(tutor config printroot)/" username@server2:/tmp/tutor/

4. On server 2, move the data to the right location::

Expand Down
25 changes: 12 additions & 13 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.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile requirements/base.in
Expand All @@ -12,26 +12,28 @@ certifi==2023.7.22
# via
# kubernetes
# requests
charset-normalizer==3.1.0
charset-normalizer==3.2.0
# via requests
click==8.1.3
click==8.1.7
# via -r requirements/base.in
google-auth==2.19.1
google-auth==2.22.0
# via kubernetes
idna==3.4
# via requests
jinja2==3.1.2
# via -r requirements/base.in
kubernetes==26.1.0
kubernetes==27.2.0
# via -r requirements/base.in
markupsafe==2.1.3
# via jinja2
mypy==1.3.0
mypy==1.5.1
# via -r requirements/base.in
mypy-extensions==1.0.0
# via mypy
oauthlib==3.2.2
# via requests-oauthlib
# via
# kubernetes
# requests-oauthlib
pyasn1==0.5.0
# via
# pyasn1-modules
Expand All @@ -42,7 +44,7 @@ pycryptodome==3.18.0
# via -r requirements/base.in
python-dateutil==2.8.2
# via kubernetes
pyyaml==6.0
pyyaml==6.0.1
# via
# -r requirements/base.in
# kubernetes
Expand All @@ -61,7 +63,7 @@ six==1.16.0
# python-dateutil
tomli==2.0.1
# via mypy
typing-extensions==4.6.3
typing-extensions==4.7.1
# via
# -r requirements/base.in
# mypy
Expand All @@ -70,8 +72,5 @@ urllib3==1.26.16
# google-auth
# kubernetes
# requests
websocket-client==1.5.2
websocket-client==1.6.2
# via kubernetes

# The following packages are considered to be unsafe in a requirements file:
# setuptools
4 changes: 0 additions & 4 deletions requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ pyinstaller
scriv
twine

# doc requirement is lagging behind
# https://github.com/readthedocs/sphinx_rtd_theme/issues/1323
docutils<0.19

# Types packages
types-docutils
types-PyYAML
Expand Down
83 changes: 45 additions & 38 deletions requirements/dev.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.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile requirements/dev.in
Expand All @@ -8,11 +8,11 @@ altgraph==0.17.3
# via pyinstaller
appdirs==1.4.4
# via -r requirements/base.txt
astroid==2.15.5
astroid==2.15.6
# via pylint
attrs==23.1.0
# via scriv
black==23.3.0
black==23.7.0
# via -r requirements/dev.in
bleach==6.0.0
# via readme-renderer
Expand All @@ -29,11 +29,11 @@ certifi==2023.7.22
# requests
cffi==1.15.1
# via cryptography
charset-normalizer==3.1.0
charset-normalizer==3.2.0
# via
# -r requirements/base.txt
# requests
click==8.1.3
click==8.1.7
# via
# -r requirements/base.txt
# black
Expand All @@ -42,31 +42,31 @@ click==8.1.3
# scriv
click-log==0.4.0
# via scriv
coverage==7.2.7
coverage==7.3.0
# via -r requirements/dev.in
cryptography==41.0.3
# via secretstorage
dill==0.3.6
dill==0.3.7
# via pylint
docutils==0.18.1
# via
# -r requirements/dev.in
# readme-renderer
google-auth==2.19.1
docutils==0.20.1
# via readme-renderer
google-auth==2.22.0
# via
# -r requirements/base.txt
# kubernetes
idna==3.4
# via
# -r requirements/base.txt
# requests
importlib-metadata==6.6.0
importlib-metadata==6.8.0
# via
# keyring
# twine
importlib-resources==6.0.1
# via keyring
isort==5.12.0
# via pylint
jaraco-classes==3.2.3
jaraco-classes==3.3.0
# via keyring
jeepney==0.8.0
# via
Expand All @@ -76,13 +76,13 @@ jinja2==3.1.2
# via
# -r requirements/base.txt
# scriv
keyring==23.13.1
keyring==24.2.0
# via twine
kubernetes==26.1.0
kubernetes==27.2.0
# via -r requirements/base.txt
lazy-object-proxy==1.9.0
# via astroid
markdown-it-py==2.2.0
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.3
# via
Expand All @@ -92,9 +92,9 @@ mccabe==0.7.0
# via pylint
mdurl==0.1.2
# via markdown-it-py
more-itertools==9.1.0
more-itertools==10.1.0
# via jaraco-classes
mypy==1.3.0
mypy==1.5.1
# via -r requirements/base.txt
mypy-extensions==1.0.0
# via
Expand All @@ -104,18 +104,19 @@ mypy-extensions==1.0.0
oauthlib==3.2.2
# via
# -r requirements/base.txt
# kubernetes
# requests-oauthlib
packaging==23.1
# via
# black
# build
pathspec==0.11.1
pathspec==0.11.2
# via black
pip-tools==6.13.0
pip-tools==7.3.0
# via -r requirements/dev.in
pkginfo==1.9.6
# via twine
platformdirs==3.5.1
platformdirs==3.10.0
# via
# black
# pylint
Expand All @@ -132,27 +133,27 @@ pycparser==2.21
# via cffi
pycryptodome==3.18.0
# via -r requirements/base.txt
pygments==2.15.1
pygments==2.16.1
# via
# readme-renderer
# rich
pyinstaller==5.11.0
pyinstaller==5.13.1
# via -r requirements/dev.in
pyinstaller-hooks-contrib==2023.3
pyinstaller-hooks-contrib==2023.7
# via pyinstaller
pylint==2.17.4
pylint==2.17.5
# via -r requirements/dev.in
pyproject-hooks==1.0.0
# via build
python-dateutil==2.8.2
# via
# -r requirements/base.txt
# kubernetes
pyyaml==6.0
pyyaml==6.0.1
# via
# -r requirements/base.txt
# kubernetes
readme-renderer==37.3
readme-renderer==41.0
# via twine
requests==2.31.0
# via
Expand All @@ -170,7 +171,7 @@ requests-toolbelt==1.0.0
# via twine
rfc3986==2.0.0
# via twine
rich==13.4.1
rich==13.5.2
# via twine
rsa==4.9
# via
Expand All @@ -193,23 +194,27 @@ tomli==2.0.1
# black
# build
# mypy
# pip-tools
# pylint
# pyproject-hooks
tomlkit==0.11.8
tomlkit==0.12.1
# via pylint
twine==4.0.2
# via -r requirements/dev.in
types-docutils==0.20.0.1
types-docutils==0.20.0.3
# via -r requirements/dev.in
types-pyyaml==6.0.12.10
types-pyyaml==6.0.12.11
# via -r requirements/dev.in
types-setuptools==67.8.0.0
types-setuptools==68.1.0.0
# via -r requirements/dev.in
typing-extensions==4.6.3
typing-extensions==4.7.1
# via
# -r requirements/base.txt
# astroid
# black
# mypy
# pylint
# rich
urllib3==1.26.16
# via
# -r requirements/base.txt
Expand All @@ -219,16 +224,18 @@ urllib3==1.26.16
# twine
webencodings==0.5.1
# via bleach
websocket-client==1.5.2
websocket-client==1.6.2
# via
# -r requirements/base.txt
# kubernetes
wheel==0.40.0
wheel==0.41.2
# via pip-tools
wrapt==1.15.0
# via astroid
zipp==3.15.0
# via importlib-metadata
zipp==3.16.2
# via
# importlib-metadata
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
4 changes: 3 additions & 1 deletion requirements/docs.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
-r base.txt
sphinx
# Python 3.8 support was dropped in 7.2.0
# https://github.com/sphinx-doc/sphinx/pull/11511
sphinx<7.2.0
sphinx-rtd-theme
sphinx-click
Loading