7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-26 08:52:34 +00:00
Commit Graph

221 Commits

Author SHA1 Message Date
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
Régis Behmo
d2f6783306 Fix security issue with jinja2 requirement
https://nvd.nist.gov/vuln/detail/CVE-2019-10906

To fix this issue, all requirements were simply upgraded to the latest
version.
2019-04-17 08:18:45 +02:00
Régis Behmo
b2d8c1b6cc Improve cold start time by moving kubernetes import
"import kubernetes" takes a long time. Moving this import improves
"tutor --version" from 0.8s to 0.3s.
2019-04-09 18:30:12 -07:00
Régis Behmo
becd03cbf8 Allow uppercase "Y" and "N" as answers to boolean questions 2019-04-09 13:38:56 -07:00
Régis Behmo
695cc0d18a v3.3.4 (2019-04-09)
- [Improvement] Rename `--silent` option to `-y/--yes`
- [Bugfix] Fix (again) login from studio when https is activated (#193)
2019-04-09 11:50:09 -07:00
Régis Behmo
3b9880ec74 Rename --silent option to -y/--yes 2019-04-09 11:17:19 -07:00
Régis Behmo
6c13710c79 Fix (again) login from studio when https is activated
Login from studio with https was broken by the fix for localhost login.

Close #193.
2019-04-09 11:11:32 -07:00
Régis Behmo
016210e899 v3.3.3 (2019-03-29)
- [Bugfix] Fix `pip install tutor-openedx`
2019-03-29 06:36:19 -07:00
Régis Behmo
a034f95f83 Fix pip install tutor-openedx
Installing from pip was broken because, for some reason, the
templates/apps/xqueue/settings/ folder contained a __pycache__ folder
with compiled *.pyc files. Rendering the binary files was failing
miserably.
2019-03-29 06:27:34 -07:00
Régis Behmo
e2b0f3bfde Fix login from localhost
Login from localhost/studio.localhost was broken on Ironwood because the
session cookie was configured to be stored under the production domain
name. We fix this by setting the SESSION_COOKIE_DOMAIN to None: in the
edx-platform code, this corresponds to using the current request domain.
2019-03-27 08:16:44 -07:00
Régis Behmo
7c0f3f2d76 v3.3.2 (2019-03-27)
- [Bugfix] Fix Android app image build
2019-03-27 07:57:08 -07:00
Régis Behmo
75a6a2d44c Fix missing configuration parameters for android environment 2019-03-27 07:35:28 -07:00
Régis Behmo
c72fee217e v3.3.1
- [Improvement] Improve assets building for development
- [Improvement] Support CMS login when the CMS is not a subdomain of the
LMS
2019-03-25 07:43:15 -07:00
Régis Behmo
6c44406ba4 use update_assets instead of the custom openedx-assets script
Now that the correct webpack settings are loaded by the `update_assets`
command in Ironwood, we can stop relying on the `openedx-assets` script.
Actually, we could probably remove it.
2019-03-25 07:41:17 -07:00
Régis Behmo
a7ab1c5ace Add missing CMS config (just in case)
I don't think this affects the CMS behaviour, but SESSION_COOKIE_DOMAIN
is used by the CMS, so rather be safe than sorry.
2019-03-23 16:15:51 -07:00
Régis Behmo
76f9f5bb97 v3.3.0
- [Feature] Upgrade from Hawthorn to Ironwood
2019-03-22 23:39:50 +01:00
Régis Behmo
7462f208de Upgrade to Ironwood
Here, we upgrade all images from Ironwood to Hawthorn, except for the
locales, which we did not generate yet.
2019-03-22 23:37:59 +01:00
Régis Behmo
8cb3dde706 v3.2.2
- [Feature] Multiple platforms on a single server \o/
- [Feature] Easily configure web proxy on the host
- [Bugfix] Fix `images pull all` command which failed on "all" image
- [Improvement] Add configurable mongodb, SMTP and rabbitmq
authentication
- [Improvement] Harmonize mysql username/password configuration
parameters
- [Feature] Configurable and pluggable data storage backends (#114)
2019-03-21 19:11:28 +01:00
Régis Behmo
a70d48c6bb Easily launch multiple platforms on a single server
By using a web proxy on the host, it's now extremely easy to launch
multiple platforms on a single server.
2019-03-21 19:06:08 +01:00
Régis Behmo
f45a24caea Easily configurable web proxy
A web proxy is a web server on the host that will forward request to the
tutor web server. We support Apache2 and Nginx.
2019-03-21 17:38:01 +01:00
Régis Behmo
b0d07ef3fe Fix incorrect vendor image pulling 2019-03-21 14:13:15 +01:00
Régis Behmo
a85ee37682 Configurable mongodb username/password/port 2019-03-21 00:47:42 +01:00
Régis Behmo
e35efa3302 Configurable Rabbitmq authentication 2019-03-20 19:02:39 +01:00