7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-09 17:22:25 +00:00
Commit Graph

43 Commits

Author SHA1 Message Date
Régis Behmo
ff8091bef2 feat: simplify nightly management
Bumping the `OPENEDX_COMMON_VERSION` in the master branch usually
creates a conflict when we merge the change in the nightly branch. To
avoid this conflict, we add some logic to the `OPENEDX_COMMON_VERSION`.

This change should be invisible for most users.

This partially addresses issue #936.
2023-11-29 10:49:53 +01:00
Régis Behmo
a0c66ca650 feat: upgrade to palm.4 2023-11-16 22:36:32 +01:00
Régis Behmo
9cba06595e feat: upgrade to open-release/palm.3 2023-10-13 16:54:45 +02:00
Régis Behmo
2a47100d6a fix: broken mysql after palm upgrade
This fix is for a rather serious issue that affects users who upgrade
from Olive to Palm. The client mysql charset and collation was
incorrectly set to utf8mb4, while the server stil runs utf8mb3. Only
users who run the mysql container are affected.

To resolve this issue, we explicitely configure the client to use the
utf8mb3 charset/collation.

Important note: users who have somehow managed to upgrade from olive to
Palm before may find themselves in an undefined state. They might have
to fix their mysql data manually. Same thing for users who launched Palm
from scratch; although, according to my preliinary tests, they should be
able to downgrade their connection from utf8mb4 to utf8mb3 without
issue.

In addition, we upgrade to mysql 8.1.0. Among many other fixes, this
avoids a server restart after the upgrade:

> An in-place upgrade from MySQL 5.7 to MySQL 8.0, without a server
> restart, could result in unexpected errors when executing queries on
> tables. This fix eliminates the need to restart the server between the
> upgrade and queries. (Bug #35410528)

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-34.html

See also the 8.1.0 release notes:

https://dev.mysql.com/doc/relnotes/mysql/8.1/en/news-8-1-0.html

Close #887.
2023-08-16 19:01:41 +02:00
Régis Behmo
a6338e2880 feat: upgrade to open-release/palm.2 2023-08-09 22:41:34 +02:00
Régis Behmo
42f7819374 v16.0.0 2023-06-14 21:08:49 +02:00
Régis Behmo
189bfb2a7a feat: upgrade mongodb to 4.4
This is for
https://github.com/openedx/wg-build-test-release/issues/288

Note that we also upgrade mongodb from 4.0 to 4.2, because somehow this
hasn't been done in olive.
2023-06-14 21:08:49 +02:00
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
Régis Behmo
ee8de62770 depr: RUN_LMS, RUN_CMS settings
These tutor settings are mostly useless and make templates much more
difficult to work with.
2023-06-14 19:40:58 +02:00
Régis Behmo
b3c3c4a2cc feat: upgrade to Palm
Among other changes: ORA2 file uploads were stored in a folder named
"SET-ME-PLEASE (ex.  bucket-name)" (sigh). With this change, the folder
should be automatically renamed to "openedxuploads". This issue has been
occuring since June 2019... (sigh²)

Close #707
2023-06-14 19:40:58 +02:00
Florian Haas
30d3ba3ba8 chore: Bump MongoDB default to version 4.2.24
Bump the default image reference for MongoDB from 4.2.17 to 4.2.24, to
address a critical issue present in versions 4.2.0 through 4.2.23.

References:
https://www.mongodb.com/docs/manual/release-notes/4.2/#patch-releases
https://jira.mongodb.org/browse/WT-10461

Fixes #854.
2023-06-13 10:10:53 +02:00
Régis Behmo
2233c3422a feat: upgrade to open-release/olive.4 2023-05-22 18:16:39 +02:00
Régis Behmo
0887691cc4
feat: upgrade to open-release/olive.3 2023-04-12 21:46:04 +02:00
Régis Behmo
91385ba8d7 feat: upgrade to open-release/olive.2 2023-02-10 11:07:22 +01:00
Régis Behmo
2381be6921 fix: https is ignored with proxy is enabled
When ENABLE_WEB_PROXY=false, Caddy was overriding the X-Forwarded-*
headers. This is a change that was introduced in 2.5.0. We upgrade to
2.6.3 to use the new global "trusted_proxies" directive.

https://github.com/caddyserver/caddy/releases/tag/v2.6.3
https://github.com/caddyserver/caddy/releases/tag/v2.5.0
2023-02-09 20:30:31 +01:00
Régis Behmo
4b14d20c5e feat: overridable lms/cms max upload size
Users want to be able to override the request `max_size` to upload
larger files. But they will not be able to if the patch is placed after
the `request` directive. So we move the patch statement before the
directive. Also, we wrap the `request_body` directives within `handle`
statements. If not, then different sizes are not managed properly.

To override the max upload size in the cms, add the following to the
"caddyfile-cms" patch:

    handle_path /import/* {
        request_body {
            max_size 500MB
        }
    }

See discussion:
https://discuss.openedx.org/t/how-to-update-caddyfile-using-tutor-plugin/8944
2023-02-07 10:19:54 +01:00
Régis Behmo
c26999ec65 feat: upgrade to olive 2022-12-12 16:55:07 +01:00
Régis Behmo
e4e9cd8197 Merge branch 'master' into nightly 2022-11-29 10:28:11 +01:00
Régis Behmo
ff0e8f7140 fix: pin openedx dev Docker image tag with tutor version
When running:

    tutor dev run -m /path/to/edx-platform lms
    pip install -r requirements/edx/development.txt

I realised that I was re-installing packages that should already have been
present in the image. The reason for that was that I was running an outdated
version of the dev version of the openedx Docker image. This happens because
`tutor dev run` does not trigger an image re-build.

We solve this issue by pinning the openedx dev Docker image tag to the current
tutor version.
2022-11-29 09:02:50 +01:00
Overhang.IO
a0480f8d11 Merge remote-tracking branch 'origin/master' into nightly 2022-11-28 12:15:04 +00:00
james
7b72a5a910 feat: support for mongodb SSL+auth source/mech+replica set
This change builds upon a previously proposed PR:
https://github.com/overhangio/tutor/pull/437

There was another long conversation about this topic here:
https://github.com/overhangio/tutor-forum/pull/10#issuecomment-1314799915

We could have supported the MongoDB auth/replica set/ssl parameters as part of
the MongoDB host URI, but then this URI is not supported in the forum plugin,
which uses an old version of the mongoid client. We were hoping that the client
would have been upgraded by now, but it's not been upgraded for a long time.

The changes introduced here are 100% backward-compatible. The forum plugin will
have to be updated to take into account the new parameters.
2022-11-28 13:09:13 +01:00
Overhang.IO
e1f07420be Merge remote-tracking branch 'origin/master' into nightly 2022-10-04 08:09:47 +00:00
Régis Behmo
c0fb64714f feat: bump scorm to v14.0.0 2022-10-04 09:25:41 +02:00
Sofiane Bebert
6674e267de feat: upgrade all apps to open-release/nutmeg.2 2022-08-21 09:15:00 +01:00
Régis Behmo
c4388e134c v14.0.0: upgrade to Nutmeg
- 💥 [Feature] Upgrade to Nutmeg: (by @regisb)
    - 💥 [Feature] Persistent grades are now enabled by default.
    - [Bugfix] Remove edX references from bulk emails ([issue](https://github.com/openedx/build-test-release-wg/issues/100)).
    - [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] Start MongoDB when running migrations, because a new data migration fails if MongoDB is not running
2022-06-09 19:18:20 +02:00
Régis Behmo
224cd6c19f Merge branch 'master' into nightly 2022-04-20 22:01:14 +02:00
Régis Behmo
d9486018a2 feat: add --mount option to local/dev
The `--mount` option is available both with `tutor local`
and `tutor dev` commands. It allows users to easily bind-mount containers from
the host to containers. Yes, I know, we already provide that possibility with
the `bindmount` command and the `--volume=/path/` option. But these suffer from
the following drawbacks:

- They are difficult to understand.
- The "bindmount" command name does not make much sense.
- It's not convenient to mount an arbitrary folder from the host to multiple
  containers, such as the many lms/cms containers (web apps, celery workers and
  job runners).

To address this situation, we now recommend to make use of --mount:

1. `--mount=service1[,service2,...]:/host/path:/container/path`: manually mount
   `/host/path` to `/container/path` in container "service1" (and "service2").
2. `--mount=/host/path`: use the new v1 plugin API to discover plugins that
   will detect this option and select the right containers in which to bind-mount
   volumes. This is really nifty...

Close https://github.com/overhangio/2u-tutor-adoption/issues/43
2022-04-20 19:33:17 +02:00
Overhang.IO
b70bbddce3 Merge remote-tracking branch 'origin/master' into nightly 2022-04-15 09:14:51 +00:00
Florian Haas
407a8566df fix: Correct EDX_PLATFORM_VERSION default for local edx-platform forks
PR #619 set the EDX_PLATFORM_VERSION build arg's default to
OPENEDX_COMMON_VERSION. While this works fine for setting a
non-default branch to run edx code from (say, "master"), it may break
if the user sets OPENEDX_COMMON_VERSION to a branch or tag name that
does not exist upstream in repositories *other than*
EDX_PLATFORM_REPOSITORY.

Thus, introduce a separate configuration parameter,
EDX_PLATFORM_VERSION, to match the build arg of the same name. Set its
default to OPENEDX_COMMON_VERSION.

This way, the user can deploy an arbitrarily-named fork of
edx-platform, while retaining the default OPENEDX_COMMON_VERSION
(like, for example "open-release/maple.3") for everything else.
2022-04-15 09:24:15 +02:00
Régis Behmo
c685466d8c Merge branch 'master' into nightly 2022-04-12 16:14:23 +02:00
Florian Haas
eaa578eabd feat: Make the platform repository and NPM registry configurable from config.yml
Previously, the only way for Tutor users to use a fork of edx-platform
or a custom NPM registry was to use build args during the image build.

This is suboptimal in the case of automatically building images from
CI pipelines, which may want to auto-detect when an image needs to be
rebuilt based on config.yml changes.

In addition, the EDX_PLATFORM_VERSION build argument can already be
set via a corresponding config.yml parameter (OPENEDX_COMMON_VERSION),
so it's reasonable to follow that precedent and also introduce
config.yml parameters to correspond with the EDX_PLATFORM_REPOSITORY
and NPM_REGISTRY build arguments.

Thus, introduce two new configuration parameters:

- EDX_PLATFORM_REPOSITORY
- NPM_REGISTRY

These parameters can now optionally be used instead of the
aforementioned build args.
2022-04-12 15:46:50 +02:00
Régis Behmo
0b86568ad5 feat: upgrade all apps to open-release/maple.3
Fresh out of the oven!
2022-04-11 18:44:15 +02:00
Overhang.IO
83e757465d Merge remote-tracking branch 'origin/master' into nightly 2022-03-31 14:41:14 +00:00
Régis Behmo
5aa1d53167 fix: remove duplicate LOCAL_PROJECT_NAME config entry 2022-03-31 16:31:03 +02:00
Overhang.IO
b982da93af Merge remote-tracking branch 'origin/master' into nightly 2022-03-14 13:18:33 +00:00
Régis Behmo
49f11dd3a0 fix: upgrade exim-relay SMTP image to make it work on arm64
Close #600.
2022-03-14 12:45:17 +01:00
Régis Behmo
156ef063ce feat: upgrade all services to open-release/maple.2 2022-02-14 14:38:43 +01:00
Overhang.IO
ba8a07c844 Merge remote-tracking branch 'origin/master' into nightly 2022-01-30 21:19:46 +00:00
Régis Behmo
7c3e54335d fix: let's encrypt auto-revoked certificates
Let's Encrypt started mass-revoking certificates. For some reason, we
did not upgrade to the latest version of Caddy in the Maple upgrade, so
we are affected by this issue. Users should upgrade now.

See:
https://discuss.overhang.io/t/lets-encrypt-revoked-certificate-did-anyone-experienced-this/2391
https://discuss.overhang.io/t/ssl-error-in-the-browser/2390
https://community.letsencrypt.org/t/questions-about-renewing-before-tls-alpn-01-revocations/170449/21
2022-01-30 21:33:31 +01:00
Régis Behmo
7188c3e49f Merge branch 'master' into nightly 2021-12-21 01:34:42 +01:00
Régis Behmo
7c157eccd5 feat: upgrade to Maple
- A shared cookie domain between lms and cms is no longer recommended:
https://github.com/edx/edx-platform/blob/master/docs/guides/studio_oauth.rst
- refactor: clean mounted data folder in lms/cms. In Lilac, the
bind-mounted lms/data and cms/data folders are a mess because new
folders are created there for every new course organisation.  These
folders are empty. As far as we know they are useless... With this
change we move these folders to a dedicated "modulestore" subdirectory;
which corresponds better to the initial intent of the fs_root setting.
- fix: frontend failure during login to the lms. See:
https://github.com/openedx/build-test-release-wg/issues/104
- feat: move all forum-related code to a dedicated plugin. Forum is an
optional feature, and as such it deserves its own plugin. Starting from
Maple, users will be able to install the forum from
https://github.com/overhangio/tutor-forum/
- migrate from DCS_* session cookie settings to SESSION_*. That's
because edx-platform no longer depends on django-cookies-samesite. Close
https://github.com/openedx/build-test-release-wg/issues/110
- get rid of tons of deprecation warnings in the lms/cms
- feat: make it possible to point to themed assets. Cherry-picking this
change makes it possible to point to themed assets with a theme-agnostic
url, notably from MFEs.
- Install all official plugins as part of the `tutor[full]` package.
- Don't print error messages about loading plugins during autocompletion.
- Prompt for image building when upgrading from one release to the next.
- Add `tutor local start --skip-build` option to skip building Docker images.

Close #450.
Close #545.
2021-12-20 21:21:36 +01:00
Régis Behmo
c40e682f5d refactor: clarify configuration management
Previously, configuration management was very confusing because we kept mixing
"base" and "defaults" configuration:

- It was difficult to make the difference between core settings that were
  necessary (e.g: passwords) as opposed to others that could simply be
  defaulted to.
- The order of settings in config.yml mattered: config entries that depended on
  other needed to be defined later. As a consequence, Tutor was not compatible
  with Python 3.5, where dict entries are not sorted.
2021-12-20 21:19:10 +01:00
Régis Behmo
092dfbff67 refactor: clarify configuration management
Previously, configuration management was very confusing because we kept mixing
"base" and "defaults" configuration:

- It was difficult to make the difference between core settings that were
  necessary (e.g: passwords) as opposed to others that could simply be
  defaulted to.
- The order of settings in config.yml mattered: config entries that depended on
  other needed to be defined later. As a consequence, Tutor was not compatible
  with Python 3.5, where dict entries are not sorted.
2021-12-08 10:44:38 +01:00