6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-14 09:14:14 +00:00
Commit Graph

1762 Commits

Author SHA1 Message Date
Overhang.IO
82eeca8f57 Merge remote-tracking branch 'origin/master' into nightly 2023-07-28 19:32:12 +00:00
Régis Behmo
a1945245b8 security: fix unprivileged content libraries creation
See:
https://github.com/openedx/edx-platform/security/advisories/GHSA-3q74-3rfh-g37j
https://github.com/openedx/edx-platform/pull/32838
https://discuss.openedx.org/t/security-upcoming-security-release-for-edx-platform-on-2023-07-25/10769
2023-07-28 21:04:26 +02:00
Overhang.IO
e192227297 Merge remote-tracking branch 'origin/master' into nightly 2023-07-21 10:52:06 +00:00
Régis Behmo
faf43bd3b0 chore: actually do upgrade cryptography req
See: https://github.com/overhangio/tutor/security/dependabot/14
2023-07-21 12:45:29 +02:00
Overhang.IO
1d46872fd2 Merge remote-tracking branch 'origin/master' into nightly 2023-07-21 10:38:55 +00:00
Régis Behmo
68a995cee7 chore: upgrade cryptography requirement
Apply security update:
https://github.com/overhangio/tutor/security/dependabot/14
2023-07-21 12:11:36 +02:00
Régis Behmo
98d7532d0d fix: copy-node-modules error with buildx 2023-07-21 12:00:25 +02:00
Kyle D. McCormick
e4ddee2604 build: copy in copy-node-modules.sh for npm post-install hook
This post-install hook replaces `openedx-assets npm`.

Part of: https://github.com/openedx/edx-platform/issues/31604
2023-07-21 11:23:57 +02:00
Overhang.IO
b3ef12c3fd Merge remote-tracking branch 'origin/master' into nightly 2023-07-17 08:42:51 +00:00
Kyle D. McCormick
3affd546e9 fix: set default theme by simply deleting SiteTheme objects
`tutor ... do settheme default` is meant to revert to the
default theme.  However, in its current implementation, it
creates SiteTheme objects pointing to a theme named "default",
which doesn't exist, resulting in errors like:

    Theme dirs:
    [Path('/openedx/themes')]]
    Traceback (most recent call last):
      File "/openedx/edx-platform/openedx/core/djangoapps/theming/helpers.py", line 204, in get_current_theme
	themes_base_dir=get_theme_base_dir(site_theme.theme_dir_name),
      File "/openedx/edx-platform/openedx/core/djangoapps/theming/helpers.py", line 242, in get_theme_base_dir
	raise ValueError(
    ValueError: Theme 'default' not found in any of the following themes dirs,

This works from the perspective of the user, because a missing theme is
treated as the default theme. However, the errors are unneccesary &
confusing.

By simply deleting & not recreating SiteTheme objects instead,
we are able to revert to the default theme while keeping the
logs clear of theming errors.
2023-07-17 10:19:33 +02:00
Overhang.IO
272a5ee940 Merge remote-tracking branch 'origin/master' into nightly 2023-06-23 15:20:30 +00:00
Sarina Canelake
74ef1ae56e docs: Tweak upgrade instructions 2023-06-23 17:14:03 +02:00
Overhang.IO
0f0b458a19 Merge remote-tracking branch 'origin/master' into nightly 2023-06-23 14:18:38 +00:00
Braden MacDonald
b3879e13b6 docs: update ARM tutorial 2023-06-23 16:12:25 +02:00
Overhang.IO
bfd09fa61d Merge remote-tracking branch 'origin/master' into nightly 2023-06-22 11:13:19 +00:00
Régis Behmo
b5b74bec9d v16.0.2 2023-06-22 13:00:17 +02:00
Régis Behmo
41eddd813c fix: mysql deployment on k8s
The `--ignore-db-dir` option is no longer supported on MySQL 8. See:
https://dev.mysql.com/doc/refman/8.0/en/upgrade-prerequisites.html

This option was causing the mysql container to fail.
2023-06-22 12:57:46 +02:00
Overhang.IO
808e21209a Merge remote-tracking branch 'origin/master' into nightly 2023-06-16 10:09:31 +00:00
Régis Behmo
58e4e89e48 v16.0.1 2023-06-16 11:45:17 +02:00
Régis Behmo
b2067ce1f6 fix: load kube config from file
Close #860
2023-06-16 11:44:13 +02:00
Overhang.IO
99f1b11e75 Merge remote-tracking branch 'origin/master' into nightly 2023-06-15 01:27:24 +00:00
Régis Behmo
2dae85807f docs: olive -> palm mentions 2023-06-15 01:34:05 +02:00
Régis Behmo
c575422d9c Merge branch 'master' into nightly 2023-06-14 22:49:05 +02:00
Régis Behmo
42f7819374 v16.0.0 2023-06-14 21:08:49 +02:00
Régis Behmo
64f36d910d fix: double config prompting during upgrade 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
cac8530481 fix: format output of config printvalue as yaml 2023-06-14 21:08:49 +02:00
Régis Behmo
69944e4028 feat: separate mounts command
Manual configuration via the `MOUNTS` setting was inconvenient. We
(re)introduce a new(ish) `tutor mounts` command. Old timers will perhaps
remember that we used to have a `tutor bindmount` command. Well, it's
back! But better and different.
2023-06-14 21:08:49 +02:00
Régis Behmo
a410d2682b docs: bump minimal required docker/compose versions 2023-06-14 21:08:49 +02:00
Régis Behmo
5ce39d36e2 feat: auto-complete image names in images build/pull/... 2023-06-14 21:08:49 +02:00
Régis Behmo
947b37524f feat: auto build "openedx-dev" on "dev launch"
To achieve that, we introduce a new IMAGES_BUILD_REQUIRED filter.
2023-06-14 21:08:49 +02:00
Régis Behmo
17f66fb467 refactor: simplify image tag management 2023-06-14 21:08:49 +02:00
Régis Behmo
2a21b2adf3 feat: images build openedx-dev
We no longer run `docker-compose up --build`. Instead, users are
encouraged to build the "openedx-dev" Docker image.
2023-06-14 21:08:49 +02:00
Régis Behmo
a5dd3017d7 depr: remove obsolete task actions 2023-06-14 21:08:49 +02:00
Régis Behmo
3ab0dcb9e6 depr: templated hooks
Templated hooks we almost completely useless, so we get rid of them.
This allows us to get rid entirely of hook names and hook indexes, which
makes the whole implementation much simpler. Hook removal (with
`clear_all`) is achieved thanks to weak references.
2023-06-14 21:08:49 +02:00
Régis Behmo
cbe32cbc15 docs: improve all available values from ENV_TEMPLATE_VARIABLES 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
7972a75915 feat: leverage RUN --mount for faster image building
We make use of the Docker build cache to install python and nodejs
requirements faster in the case of repeated builds.

This feature is only possible for users of BuildKit, so we detect
whether `docker buildx` is available at runtime.

We do not make use of `COPY --link` because the `--link` option is
incompatible with `--chown=app:app`:
https://github.com/docker/buildx/issues/1408

For reference, see:

https://www.docker.com/blog/dockerfiles-now-support-multiple-build-contexts/
https://docs.docker.com/engine/reference/commandline/buildx_build/#build-context
2023-06-14 21:08:49 +02:00
Régis Behmo
220b8296a9 feat: config save --append/--remove KEY=VAL options
This paves the way for persisting bind-mounts across runs, since this
setting will be a list.
2023-06-14 19:40:58 +02:00
Régis Behmo
c2265c3f11 feat: simplify docker-compose permissions
It was useless to create a *-permissions job for every application.
Instead, we create a single "permissions" service. It can be extended
via the "docker-compose-permissions-command" patch.
2023-06-14 19:40:58 +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
b2a22a6993 fix: remove useless "privileged: false" statements
These values are by default anyway.
2023-06-14 19:40:58 +02:00
Régis Behmo
39a8b46854 depr: drop support for docker-compose
Instead, the compose plugin must be installed.
We deprecate docker-compose because v1 is not supported starting from
the end of June 2023.

See "evolution of compose": https://docs.docker.com/compose/compose-v2/
2023-06-14 19:40:58 +02:00
Régis Behmo
11b2091e32 depr: halt compatibility with python 3.7 2023-06-14 19:40:58 +02:00
Régis Behmo
2d6b9c1767 feat: hide TOS link during registration
Registering a user was causing a 400 error because the LMS expected the
TOS checkbox to be checked, but it's not displayed in the frontend. So
we just disable it.

Close https://github.com/openedx/wg-build-test-release/issues/262
2023-06-14 19:40:58 +02:00
Régis Behmo
6dbb5baf81 feat: importdemocourse --repo-dir=... option
This allows us to run:

    tutor local do importdemocourse --repo=https://github.com/openedx/openedx-test-course --version=open-release/palm.master --repo-dir=test-course/course
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
Régis Behmo
253b69ffe3 feat: faster builds with registry cache
Automatically pull Docker build cache from remote registry. This
considerably improves build performances, as discovered here:
https://github.com/overhangio/test-docker-build/
2023-06-14 19:40:58 +02:00
Overhang.IO
016502aad0 Merge remote-tracking branch 'origin/master' into nightly 2023-06-14 09:20:51 +00:00
Régis Behmo
5c426257fb ci: run on macOS-11 because there no more github runners for macOS 10
Jobs are no longer being picked up:
https://github.com/overhangio/tutor/actions/runs/5259868936/jobs/9515592636
2023-06-14 09:41:44 +02:00