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

243 Commits

Author SHA1 Message Date
Régis Behmo
2ee5b49841 Add cms/lms-env-features patches
Close #276
2019-12-15 18:52:58 +01:00
Régis Behmo
0b1cac5134 Make it possible to run plugin subcommands 2019-12-15 18:52:58 +01:00
Régis Behmo
13de3c8adc Move "-r/--root" option to parent command level 2019-12-15 18:52:58 +01:00
Régis Behmo
494838956a Fix course about page visibility
"Course visibility In Catalog" advanced CMS setting was being ignored
because the default the COURSE_CATALOG_VISIBILITY_PERMISSION and
COURSE_ABOUT_VISIBILITY_PERMISSION settings were incorrectly set to the
legacy default, which "see_exists".

See
https://discuss.overhang.io/t/catalog-visibility-in-tutor-deployed-open-edx/214
2019-12-09 10:18:54 +01:00
Régis Behmo
a028bad636 Print gunicorn access logs in the console
See docs: https://docs.gunicorn.org/en/stable/settings.html#accesslog
2019-12-05 12:41:00 +01:00
Régis Behmo
302e1fc986 Get rid of the local portainer command
It makes more sense to document this command instead of adding it to the
`local` commands. If need be, in the future we should be able to re-add
it as a plugin.
2019-12-05 11:54:44 +01:00
Régis Behmo
0fb9bfe008 Get rid of the indexcourses command
This command adds a burden on the `local` and `k8s` command. It does not
make sense to provide this command out of the box, and not other
administration commands. Instead, we should better document how to run
regular `manage.py` commands from tutor.

Close #269.
2019-12-05 11:49:53 +01:00
Régis Behmo
74b3baab47 v3.8.0
- [Improvement] Add `k8s-deployments-nginx-volume-mounts` patch
- [Bugfix] Fix running forum locally when both elasticsearch and mongodb
are not activated (#266)
- [Bugfix] Fix MongoDb url in forum when running separate service (#267)
- 💥[Improvement] Better `dev` commands, with dedicated development
docker image. One of the consequences is that the `dev watchthemes`
command is replaced by `dev run lms watchthemes`.
- [Improvement] `images` commands now accept multiple `image` arguments
2019-11-22 13:01:42 +01:00
Régis Behmo
07aa0e47f2 Add k8s-deployments-nginx-volume-mounts plugin patch
This is for mounting discovery/ecommerce static asset folders in nginx.
2019-11-22 11:54:49 +01:00
Régis Behmo
993694909a Fix forum depends_on when data services are disabled
When both mongodb and elasticsearch were not activated, there was a
syntax error in the local docker-compose.yml file.

Close #266
2019-11-22 09:21:59 +01:00
Régis Behmo
475df37729 Fix Mongodb url in forum when running separate service
MONGOHQ_URL was not properly set when MONGODB_HOST/PORT was customised.
That's because the environment variable was being defined in the
Dockerfile, and not at runtime.

Close #267
2019-11-22 08:56:30 +01:00
Régis Behmo
b01f4d9c0e Better dev environment
The `dev` commands now rely on a different openedx-dev docker image.
This gives us multiple improvements:

- no more chown in base image
- faster chown in development
- mounted requirements volume in development
- fix static assets issues
- bundled ipdb/vim/... packages, which are convenient for development

Close #235
2019-10-24 20:03:36 +02:00
Régis Behmo
a3f39b3526 v3.7.4 (2019-10-19)
- [Bugfix] Fix missing requirements file in pypi package (#261)
- [Improvement] Add missing cms/lms production/development setting
patches
- [Improvement] Allow SigV4 authentication for video upload to S3
- [Bugfix] Fix cms development settings
2019-10-19 19:13:57 +02:00
Régis Behmo
b03ff585a3 Fix missing requirements file in pypi package
Close #261.
2019-10-19 18:30:11 +02:00
Régis Behmo
38ed7d4985 Add missing cms/lms production/development setting patches 2019-10-18 18:19:38 +02:00
Régis Behmo
9cc4074f53 Support SigV4 authentication for video upload 2019-10-18 18:19:38 +02:00
Régis Behmo
1c9111198f 3.7.3 (2019-10-09)
- [Improvement] Upgrade openedx locales to Ironwood
2019-10-17 17:23:16 +02:00
Régis Behmo
eec60dd248 Upgrade openedx locales to Ironwood 2019-10-09 15:50:32 +02:00
Régis Behmo
8918724021 v3.7.2 (2019-10-09)
- [Improvement] Properly set studio title (#246)
- [Improvement] Enable Mysql strict mode
2019-10-09 13:40:18 +02:00
Régis Behmo
73277059bc Properly set studio title
This title is visible in the browser title bar and the main page of the
CMS.

Close #246.
2019-10-09 12:04:15 +02:00
Régis Behmo
56850683b3 Get rid of mysql strict trans mode warnings
Here, we adopt the same behaviour as edX.org.

See the following links for documentation:
https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-sql-mode
https://dev.mysql.com/doc/refman/en/sql-mode.html#sql-mode-strict
2019-10-07 16:39:24 +02:00
Régis Behmo
1d4826dc3d v3.7.1
- [Feature] Introduce tutor docker image
- [Feature] Introduce `local hook` command for plugin development.
- [Bugfix] Persist `private.txt` file between two runs of `config save`.
(#247)
- [Improvement] Added configuration values to limit the number of
gunicorn workers for the LMS and CMS.
2019-10-07 14:40:49 +02:00
Régis Behmo
7dd96d7842 Add tutor docker image (experimental) 2019-10-04 12:01:26 +02:00
Régis Behmo
762e7984c2 Introduce local hook command 2019-10-04 11:44:24 +02:00
Régis Behmo
74d50e52c3 Persist private.txt between two runs of "config save"
Close #247.
2019-09-23 11:32:10 +02:00
Régis Behmo
8659b6e7ac Added config values for #gunicorn workers 2019-09-19 15:39:18 +02:00
Régis Behmo
a2f072faa9 v3.7.0 (2019-09-03)
- 💥[Improvement] Get rid of mysql-client container
- [Improvement] Add "local-docker-compose-lms/cms-dependencies" plugin
patches
- [Improvement] Use "exec" instead of "run" to initialise local platform
2019-09-03 11:12:10 +02:00
Régis Behmo
0c0db78310 Get rid of mysql-client container
This has an impact on plugin hooks. Plugin hooks that needed to run
inside mysql-client now need to run inside mysql container. This
simplifies the deployment, as we no longer have an empty mysql-client
container sitting around.

When mysql is not enabled (ACTIVATE_MYSQL=False) the mysql container is
simply a mysql client.
2019-09-03 10:36:10 +02:00
Régis Behmo
14dd9e54a9 Add lms/cms dependency patches
This makes it possible to declare that the lms/cms depend on minio.
2019-09-03 09:35:55 +02:00
Régis Behmo
5a24056b8e Switch from "run" to "exec" for local initialisation
We ran into an issue when trying to run migrations when the MinIO plugin
is activated. As seen in issues #243 and #244, the
certificates.0003_data__default_modes migration requires access to
MinIO. To do so, the MinIO host must be reached. That means that SSL
certificates must be in place (if https is enabled) and that the nginx
server must be booted. However, it does not make sense to require that
the minio container depends on the nginx container. So, in effect, we
need a fully working platform to run migrations.

In a sense, this is better as it harmonises the init task with k8s: in
k8s, init was already run with exec.

Next step is to get rid of these ugly mysql-client/minio-client
containers that must be up at all times. It would be much simpler to
just exec the commands inside the mysql/minio containers.
2019-09-03 09:29:38 +02:00
Régis Behmo
88d94bcc24 v3.6.3 (2019-08-31)
- [Security] Fix CustomTagModule mako template injection
- [Improvement] Move all plugins outside of the tutor repo
- [Bugfix/Improvement] Add all plugins (with data) into binary bundle
(#242)
2019-08-31 13:41:11 +02:00
Régis Behmo
bcf1ffe556 Fix CustomTagModule mako template injection
See announcement: https://groups.google.com/forum/#!topic/openedx-ops/aVHomKimstU
2019-08-31 12:13:19 +02:00
Régis Behmo
a94cbc2914 Move plugins to dedicated repositories
minio, notes and xqueue plugins are moved to tutor-* github repos.
2019-08-21 18:32:39 +02:00
Régis Behmo
7790028cf7 Move tutor-minio to dedicated plugin repo 2019-08-20 17:46:53 +02:00
Régis Behmo
be1ff08917 Add all plugins (with data) to binary bundle
All existing plugins are added to the binary bundle, in their latest
version, so that users don't need to pip install tutor.

Also, the tutor MANIFEST.in file was removed to simplify the management
of package data.

Close #242.
2019-08-20 17:03:46 +02:00
Régis Behmo
4d7ec486f3 v3.6.2 (2019-08-07)
- [Bugfix] Fix missing templates in bundled plugins
- [Bugfix] Enable html certificate view
2019-08-07 14:27:31 +02:00
Régis Behmo
f732a9e3eb Fix missing templates folder in pypi plugins
This was causing a `TemplateNotFound` error. For instance:
https://discuss.overhang.io/t/error-trying-to-enable-xqueue-plugin/110
2019-08-07 13:29:12 +02:00
Régis Behmo
91e357b460 Enable HTML certificates by default
See this discussion
https://discuss.overhang.io/t/how-to-generate-a-certificate-for-students/100/3
2019-07-31 13:11:22 +02:00
Régis Behmo
caefbb0148 Clarify release date of v3.6.1 in changelog 2019-07-28 11:46:15 +02:00
Régis Behmo
2a883603c8 v3.6.1
- [Bugfix] Fix missing patches from minio plugin (thanks @Wejie!)
2019-07-26 23:22:46 +02:00
Régis Behmo
41d7432fe3 Release 0.1.0 of tutor-minio 2019-07-26 23:19:40 +02:00
Régis Behmo
f93f62a3a9 v3.6.0 (2019-07-11)
- [Feature] Modify ``createuser`` commands to define a password from the
command line
- [Improvement] Better yaml value parsing from command line
- [Feature] Add `dev exec` command
- [Bugfix] Fix incorrect notes settings definition
- [Improvement] Make it possible to start/stop/reboot a selection of
services
- [Improvement] Add `local/k8s reboot` commands
- [Improvement] Add `-U/--unset` option to `config save`
- [Bugfix] Fix insecure static asset loading when web proxy is enabled
- [Improvement] Rename `SECRET_KEY` configuration parameter to
`OPENEDX_SECRET_KEY`
- [Improvement] Add support for SSL and TLS in external SMTP server
(#231)
- [Bugfix] Fix missing video transcripts in LMS (#229)
- [Improvement] Make it possible to enable/disable multiple plugins at
once
- [Improvement] Add a few local and k8s patches for plugins
2019-07-11 14:26:51 +08:00
Régis Behmo
d9a18790d3 Define a password from the CLI on user creation
Add a `-p/--password` option to `createuser` commands.
2019-07-11 11:56:18 +08:00
Régis Behmo
c9a3ea875a Add nginx volumes patch for k8s 2019-07-10 16:39:58 +08:00
Régis Behmo
50f5af989c Add patch for nginx init containers in k8s 2019-07-10 15:22:32 +08:00
Régis Behmo
e33b61fd04 Improve command line yaml value deserialization 2019-07-10 15:22:12 +08:00
Régis Behmo
c7513bc567 Minor changelog formatting 2019-07-09 17:59:11 +08:00
Régis Behmo
52f04d909e Add dev exec command for debugging apps in dev mode 2019-07-09 17:59:11 +08:00
Régis Behmo
53294ffc37 Fix incorrect notes settings definition 2019-07-09 17:59:11 +08:00
Régis Behmo
b75d92f88a Make it possible to start/stop/reboot a selection of services 2019-07-09 17:59:11 +08:00
Régis Behmo
c31c9bdc89 Add local/k8s reboot commands
This is to replace `tutor local stop && tutor local start`, which I type
way too frequently.
2019-07-08 13:59:14 +08:00
Régis Behmo
ce8a0315cb Add `-U/--unset option to config save` 2019-07-08 06:29:24 +08:00
Régis Behmo
d7477ba348 Add support for SMTP SSL, in addition to TLS
Note that SSL and TLS are incompatible.

Close #231.
2019-07-08 06:24:35 +08:00
Régis Behmo
c431fb81ff Fix insecure asset loading with web proxy enabled
This issue is well described in this post:
https://discuss.overhang.io/t/reverse-proxy-and-mixed-content-issue/86

When WEB_PROXY=True and ACTIVATE_HTTPS=True the containerized nginx sets
an incorrect value for X-Forwarded-Proto.
2019-07-07 17:14:31 +08:00
Régis Behmo
90650b691a Rename SECRET_KEY to OPENEDX_SECRET_KEY 2019-07-07 10:17:49 +08:00
Régis Behmo
a68dc4f68f Add support for external SMTP server with TLS
Note that this setting will not work with the default namshi smtp server
shipped with tutor.

Close #231.
2019-07-07 10:17:49 +08:00
Régis Behmo
69d3ba72a7 Fix missing video transcripts in LMS
Video transcripts uploaded in the CMS were not visible in the LMS. This
was a symptom caused by the fact that the LMS and the CMS do not share
the same MEDIA_ROOT. We initially thought that data uploaded in the CMS
(such as transcripts) was stored in a shared data service, such as
mongodb. It is, in fact, not. This makes it even more important to run
an object storage service like minio for distributed services.

Close #229
2019-07-07 09:12:41 +08:00
Régis Behmo
92fabd14b1 Enable/Disable multiple plugins in one command 2019-07-07 09:12:41 +08:00
Régis Behmo
e30bfec81c Add 'local-docker-compose-nginx-volumes' patch 2019-07-07 06:30:00 +08:00
Régis Behmo
8fc96a9ef2 v3.5.3 (2019-07-05)
- [Bugfix] Add pre-init hook for correct initialisation of minio
2019-07-05 14:36:10 +08:00
Régis Behmo
931dac2e68 Add pre-init hook
The 0003 migration from the certificates app of the LMS requires that
the S3-like platform is correctly setup during initialisation. To solve
this issue, we introduce a pre-init hook that is run prior to the LMS
migrations.
2019-07-05 14:19:23 +08:00
Régis Behmo
7c13be4eec v3.5.2 (2019-07-05)
- [Security] Apply certificate XSS security patch
2019-07-05 06:29:28 +08:00
Régis Behmo
c02fabb493 Apply XSS certificate vulnerability patch
https://github.com/edx/edx-platform/pull/20904
https://groups.google.com/forum/#!msg/openedx-ops/fi2WVlD0iNo/hFZrAnLpCAAJ
2019-07-05 06:29:20 +08:00
Régis Behmo
1ed0185dfd v3.5.1 (2019-07-04)
- [Feature] Make it possible for plugins to patch the build templates
- [Improvement] Move Xqueue and Student notes to a dedicated plugin
2019-07-04 22:56:38 +08:00
Régis Behmo
32ac977dda v3.5.0 (2019-07-04)
- [Feature] Make it possible for plugins to patch the build templates
- [Improvement] Move Xqueue and Student notes to a dedicated plugin
2019-07-04 17:22:09 +08:00
Régis Behmo
cb49bfd814 Make it possible to patch build templates
Thus, build templates are no longer copied, but rendered.
2019-07-04 17:14:30 +08:00
Régis Behmo
11e735f4e5 Migrate notes to a dedicated plugin 2019-07-04 09:31:12 +08:00
Régis Behmo
07a0323d8e Move Xqueue to a dedicated plugin
This gives us the opportunity to develop new hooks: build-image and
remote-image.
2019-07-04 09:31:12 +08:00
Régis Behmo
9dbe4b4cb5 v3.4.3 (2019-06-24)
- [Bugfix] Fix missing password values from generated configuration
2019-06-24 12:37:19 +02:00
Régis Behmo
1f69e67b9f Fix missing password values from generated configuration
Passwords were not being stored to config.yml during the first
quickstart.
2019-06-24 12:36:19 +02:00
Régis Behmo
de5b82fd63 Migrate github repo to overhangio organization 2019-06-23 23:11:07 +02:00
Régis Behmo
205cd9bf1c v3.4.2 (2019-06-23)
- [Bugfix] Fix incorrect settings during lms/cms init (#224)
2019-06-23 15:50:00 +02:00
Régis Behmo
dda3614af5 Fix incorrect settings during lms/cms init
During init, the DJANGO_SETTINGS_MODULE environment variable was
undefined, as the entrypoint is overridden.

Close #224.
2019-06-23 15:49:28 +02:00
Régis Behmo
8b6271a5cc v3.4.1 (2019-06-23)
- [Bugfix] Fix install from pypi
- [Improvement] Get rid of kubernetes python package dependency
2019-06-23 13:26:13 +02:00
Régis Behmo
b42ed3638e Fix install from pypi
After installing from pypi, install was broken with
"ModuleNotFoundError: No module named 'tutor.command".
2019-06-23 13:23:27 +02:00
Régis Behmo
4c96e83e3c Get rid of kubernetes requirement from pypi package
v3.4.0 package from pypi was still installing the kubernetes
requirement, although is wasn't required anymore.
2019-06-23 13:22:59 +02:00
Régis Behmo
536932cf20 v3.4.0 (2019-06-17)
- [Feature] Creation of a plugin system
- [Feature] Kubernetes support out of beta
- [Improvement] Switch to pinned image tags for easier upgrades
- 💥[Improvement] Remove the `-y/--yes` option: `tutor config save` is
now non-interactive by default. Use `-i/--interactive` to force
interactive mode.
- 💥[Improvement] Replace the `databases` command by `init`.
- [Improvement] Upgrade to ironwood.2
- [Improvement] Add `-y/--yes` option to `local quickstart` for
non-interactive quickstart
- [Improvement] Persist LMS/CMS logs to disk by default (with
collaboration from @silviot 💪)
- [Bugfix] Fix installing a locally cloned requirement repository
- [Improvement] Add `--no-cache` option to `images build`
- [Improvement] Make it possible to configure the notes service hostname
- [Improvement] Better, more robust MySQL initialisation
2019-06-17 22:38:55 +02:00
Régis Behmo
d9b6895629 Pin docker image tags to tutor versions
Having an identical "ironwood" tag for all releases is not practical, in
particular for breaking changes. Thus, docker images are now pinned to
the tutor version that they were build with.
2019-06-17 20:40:46 +02:00
Régis Behmo
bc21102cf4 Make configuration silent (non-interactive) by default
Thus, we remove the -y/--yes options, which were kind of unintuitive,
and we add instead `-i/--interactive`. The quickstart commands remain
interactive by default, but can be silenced with `-I/--non-interactive`.
2019-06-07 22:49:45 +02:00
Régis Behmo
18d05fcbbb Replace databases command by init.
Since initialisation does not only refer to database migrations, it
makes more sense to rename this command.
2019-06-07 22:49:45 +02:00
Régis Behmo
1a79e9f045 v3.3.11 (2019-06-07)
- [Improvement] Upgrade to ironwood.2
- [Improvement] Add `-y/--yes` option to `local quickstart` for non-interactive quickstart
- [Improvement] Persist LMS/CMS logs to disk by default (with collaboration from @silviot 💪)
- [Bugfix] Fix installing a locally cloned requirement repository
- [Improvement] Add `--no-cache` option to `images build`
- [Improvement] Make it possible to configure the notes service hostname
- [Improvement] Better, more robust MySQL initialization
2019-06-07 22:49:45 +02:00
Régis Behmo
7a3c0e2f84 Upgrade from ironwood.1 to ironwood.2
Because https://github.com/edx/edx-platform/pull/20325/ was merged in
ironwood.2, we no longer need this patch.
2019-06-07 22:49:45 +02:00
Régis Behmo
b5f51687a7 Add -y/--yes option to local quickstart 2019-05-29 10:31:53 +02:00
Régis Behmo
badb28b361 Better mysql initialization
For initializing the mysql database, we now run the mysql client from
the mysql container. That means that the mysql client is no longer
required in the openedx container, as previously suggested in PR #209.
2019-05-29 09:53:54 +02:00
Régis Behmo
3362308ad3 Improve lms/cms logging
- deduplicate stdout logs
- don't persist celery logs
- persist logs to all.log by default
2019-05-29 09:53:15 +02:00
Régis Behmo
f11f47f9f0 Fix installing a locally cloned requirement repository
When running `pip install -r /path/to/x.txt`, relative paths listed in
x.txt are supposed to be relative to the current folder, and not the
x.txt folder. This results in an error during `pip install`:

   ./xblock-poll/ should either be a path to a local project or a VCS
   url beginning with svn+, git+, hg+, or bzr+

This error was first reported here:
https://discuss.overhang.io/t/installing-custom-xblock/61
2019-05-22 20:03:46 +02:00
Régis Behmo
0a49c2422a Add --no-cache option to images build 2019-05-22 19:17:54 +02:00
Régis Behmo
2234510cfb Make it possible to configure the notes service hostname
This is important, in particular in development.
2019-05-15 10:52:45 +02:00
Régis Behmo
79ad1871d2 v3.3.10 (2019-05-15)
- [Bugfix] Fix boolean configuration choices
2019-05-15 10:33:29 +02:00
Régis Behmo
71ee7bc980 Fix boolean configuration choices
Since the ask_bool refactoring, boolean choices were no longer taken
into account during interactive configuration.
2019-05-15 10:19:51 +02:00
Régis Behmo
e1c5ea4e3e v3.3.9 (2019-05-13)
- [Improvement] Add `local exec` command for running commands inside
existing containers
- [Bugfix] Fix triple display of courses in LMS search (upstream patch,
2019-05-13 17:28:23 +02:00
Régis Behmo
4f9bb7d752 Add local exec command 2019-05-05 12:30:20 +02:00
Régis Behmo
25d1d38f85 Fix triple course display in LMS search dashboard
Apply upstream patch from https://github.com/edx/edx-platform/pull/20325/

Close #189.
2019-04-29 19:41:53 +02:00
Régis Behmo
31efc550c3 Less gunicorn workers for less RAM usage
Settings the number of workers for the LMS and the CMS to 2*|CPU|+1
results in 4*|CPU]+2 gunicorn workers, which is too much for a laptop to
cope with.

Close #207
2019-04-28 09:34:02 +02:00
Régis Behmo
1d6dc5f609 v3.3.7 (2019-04-28)
- [Bugfix] Fix "Timeout after 20s" on running migrations
2019-04-28 08:31:43 +02:00
Régis Behmo
a2241a07c6 v3.3.6 (2019-04-27)
- [Bugfix] Fix KeyError on first quickstart
- [Improvement] De-duplication of prod/dev settings. Thanks @silviot! 😺
2019-04-27 10:49:45 +02:00
Régis Behmo
dafd5d2fc8 Fix changelog version typos 2019-04-25 21:57:44 +02:00
Régis Behmo
555845474d v3.3.5 (2019-04-22)
- [Feature] Pluggable LMS/CMS/forum
- [Improvement] Safer environment overwrite. Thanks @silviot! 👐
- [Security] Fix Jinja2 vulnerability
- [Improvement] Improve CLI cold start performance
- [Improvement] Allow uppercase "Y" and "N" as answers to boolean
questions
2019-04-22 16:50:09 +02:00
Régis Behmo
d1f386c149 Pluggable lms/cms/forum
LMS, CMS and forum can now be independently (de)activated. This will be
useful to deploy Tutor on multiple servers.
2019-04-22 11:59:53 +02:00
Régis Behmo
97c646f875 Crash on env overwrite in non-interactive mode
We took the opportunity to replace the custom ask_bool code by
click.confirm, which just simpler.
2019-04-20 00:02:47 +02:00