6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-04 20:37:52 +00:00
Commit Graph

228 Commits

Author SHA1 Message Date
Régis Behmo
0cf8958e3a Fix nginx DNS resolution of restarted services
Previously, a common error when restarting e.g: the lms or the cms was
that nginx redirected to the wrong container. For instance:

    access studio.localhost
    tutor local restart lms cms
    access studio.localhost

In the second call to studio.localhost, we were frequently trying to
access the LMS, which resulted in a 400 error.

We solve this issue by setting a TTL of 10s on the nginx proxy name
resolution.

More docs:
http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver
2020-03-12 09:53:18 +01:00
Régis Behmo
e2a3a2d912 Allow multiple services in "local restart" command 2020-03-12 09:52:22 +01:00
Régis Behmo
00ec6930ae Add simple gunicorn reload script to openedx image 2020-03-10 10:37:14 +01:00
Régis Behmo
0325e7ad95 Rename worker containers from x_worker to x-worker
This is more coherent with k8s.
2020-03-10 10:37:14 +01:00
Régis Behmo
c2628d2b9c Add the management plugin to the rabbitmq container
The management plugin exposes an http API that makes it possible to
monitor rabbitmq. By default, we do not expose the management dashboard.
As a consequence, the API is only usable by other internal containers.
2020-03-10 10:37:14 +01:00
Régis Behmo
702e8cca7d Make it possible to run an Elasticsearch service on https
This is useful when running elasticsearch from 3rd-party vendors.
2020-03-10 10:37:14 +01:00
Régis Behmo
479e9ca34a v3.11.5 (2020-02-27)
- [Improvement] Switch edx-platform from open-release/ironwood.2 tag to
the open-release/ironwood.master branch
- [Security] Upgrade django to 1.11.28
- [Improvement] Make it possible to configure the elasticsearch heap
size
- [Bugfix] Fix broken elasticsearch environment variables
- [Improvement] Restore more recent Android app version (#289).
2020-02-27 18:08:04 +01:00
Régis Behmo
872883e36f Switch edx-platform from ironwood.2 to ironwood.master
There are too many patches on top of ironwood.2, and it's not practical
to pull them all one by one. We still want to build on top of a specific
version, and not a branch, so we use a dirty hack to guarantee that the
docker image is properly rebuilt by CI when we change it.
2020-02-27 17:42:43 +01:00
Régis Behmo
5e626114de Security upgrade django 1.11.27 -> 1.11.28 2020-02-27 17:13:42 +01:00
Régis Behmo
83459d43d5 Fix broken elasticsearch configuration
Because we are running a version of elasticsearch older than Methusalem,
the docker environment variables were not properly taken into account.
For instance, the cluster name and "mlockall" settings were incorrect,
as we could see by running:

    $ tutor local run lms curl elasticsearch:9200 | grep cluster_name
    ...
      "cluster_name" : "elasticsearch",
    $ tutor local run lms curl elasticsearch:9200/_nodes/process?pretty | grep mlock
      ...
     "mlockall" : false

See
https://discuss.overhang.io/t/elastic-container-is-not-being-removed/312/3
for discussion.

This fix also introduces a new tutor configuration setting to adjust the
elasticsearch heap size.
2020-02-26 11:47:43 +01:00
Régis Behmo
ff3fea6930 Restore more recent Android app tagged release
A prior change used the ironwood.1 tag to build the Android app in an
attempt to solve #289. Turns out that this change was unnecessary. So
here we revert to a more recent release of the Android app. Instead of
building from the master branch (which might create suprises) we build
from a fixed release tag.

The source repo and version are customisable via build arguments.
2020-02-25 17:29:53 +01:00
Régis Behmo
e166a749e4 v3.11.4 (2020-02-16)
- [Bugfix] Fix auth problem in Android app (#289)
2020-02-16 16:00:35 +01:00
Régis Behmo
50238129a9 Downgrade android build version to ironwood.1
The android master branch was failing because of authentication errors.

Close #289
2020-02-16 16:00:35 +01:00
Régis Behmo
29ed111c7f v3.11.3 (2020-01-21)
- [Bugfix] Fix incorrectly parsed empty strings for `config save --set
...=...` commands
2020-01-21 18:32:34 +01:00
Régis Behmo
731de6a747 Fix incorrectly parsed empty strings in config save --set ...=...
When running `config save --set KEY=""`, KEY was incorrectly interpreted
as null.
2020-01-21 18:32:34 +01:00
Régis Behmo
6716668ff9 v3.11.2 (2020-01-17)
- [Bugfix] Make sure `docker-compose.override.yml` are loaded in dev and
local contexts
2020-01-17 12:12:47 +01:00
Régis Behmo
cdc221b20e Fix loading of docker-compose.override files
Override files are not automatically loaded when running with `-f`, so
we need to specify them manually.
2020-01-17 09:46:59 +01:00
Régis Behmo
6b083fee4e v3.11.1 (2020-01-16)
- [Feature] Add `config render` command
2020-01-16 23:58:20 +01:00
Régis Behmo
72e23f3f96 Add config render command
This is going to be useful for using custom themes with user-defined
variables.
2020-01-16 17:15:55 +01:00
Régis Behmo
3ca0c6cf46 v3.11.0 (2020-01-14)
- [Feature] Add support for simple, YAML-based plugins
- 💥[Improvement] The output of `plugins list` now includes plugin
version numbers
2020-01-14 17:35:51 +01:00
Régis Behmo
e3444d668c Add support for simple, yaml-based plugins
Those plugins are stored as yaml files in ~/.local/share/tutor-plugins
and follow the same specifications as entrypoint plugins.
2020-01-14 17:35:51 +01:00
Régis Behmo
159e24a95d Refactor plugin internals
This is for supporting json-based plugins. The great thing about this
change is that it allows us to easily print plugin version numbers in
`plugins list`.
2020-01-14 15:41:42 +01:00
Régis Behmo
e611b90441 3.10.1 (2020-01-13)
- [Improvement] Explicitely point to docker.io images, when necessary,
for [podman](https://podman.io/) compatibility.
2020-01-13 22:40:10 +01:00
Régis Behmo
079c5bc778 v3.10.0
- [Bugfix] Fix oauth authentication in dev mode
- [Improvement] Upgrade to the 3.7 docker-compose syntax
- [Improvement] The `dev runserver` command can now be run for just any
service
- 💥[Feature] `dev run/exec` commands now support generic options which
are passed to docker-compose. Consequently, defining the
`TUTOR_EDX_PLATFORM_PATH` environment variable no longer works. Instead,
users are encouraged to explicitely pass the `-v` option, define a
command alias or create a `docker-compose.override.yml` file.
2020-01-10 16:42:27 +01:00
Régis Behmo
54918647ee Clarify changelog regarding docker-compose.override file 2020-01-10 16:07:35 +01:00
Régis Behmo
c636a39af9 Fix oauth authentication in dev mode
This was causing issues with the discovery service in development mode.
2020-01-10 13:14:55 +01:00
Régis Behmo
899e4dfb9a Upgrade to v3.7 for docker-compose service definition
We were encountering issues when overriding service definitions with
"x-...". These were solved by upgrading docker-compose and switching to
3.7 service definition. As a consequence, the minimum supported docker
version is 18.06.0, as specified by
https://docs.docker.com/compose/compose-file/#compose-and-docker-compatibility-matrix
2020-01-10 11:10:54 +01:00
Régis Behmo
3540627691 Make it possible to run dev runserver for any service 2020-01-10 11:10:54 +01:00
Régis Behmo
d17fdaa658 More feature-complete dev/local docker-compose commands
By de-duplicating the code between dev.py and local.py, we are able to
support more docker-compose run/up/stop options passed from tutor. To do
so, we had to disable some features, such as automatically mounting the
edx-platform repo when the TUTOR_EDX_PLATFORM_PATH environment variable
was defined.
2020-01-10 11:10:54 +01:00
Régis Behmo
fcf2dd0d6f v3.9.1
- [Improvement] Make it possible to override the project name in development mode
- [Bugfix] Fix user switching in development mode
- [Bugfix] Fix "k8s quickstart" crash
2020-01-08 20:09:33 +01:00
Régis Behmo
5ffad38677 Add missing info from changelog 2020-01-08 20:08:50 +01:00
Régis Behmo
f82cbd84f1 Fix crash on "k8s quickstart"
This was due to the recent context refactoring.

See https://discuss.overhang.io/t/error-with-kubernetes-deployment/240
2020-01-08 20:07:25 +01:00
Régis Behmo
41c9bfc337 v3.9.0
- [Security] Apply django 1.11.21 -> 1.11.27 security patches
- [Bugfix] Fix running dev image with `sudo`
- [Improvement] Add `cms/lms-env-features` patches (#276)
- [Feature] Add plugin subcommands
- 💥[Improvement] Move ``-r/--root`` option to parent command level
- [Bugfix] Fix course about page visibility
- [Improvement] Print gunicorn access logs in the console
- 💥[Improvement] Get rid of the `indexcourses` and `portainer` command
(#269)
2019-12-21 16:54:57 +01:00
Régis Behmo
2ba57fb8ba Apply django 1.11.21 -> 1.11.27 security patches 2019-12-21 15:18:29 +01:00
Régis Behmo
25f98250cb Fix running dev openedx image with sudo
When running with `sudo`, the USERID image ARG is 0. The docker
entrypoint needed to take this case into account.

See:
https://discuss.overhang.io/t/openedx-is-not-the-name-of-a-known-user/224/5
2019-12-16 09:33:43 +01:00
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