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

1136 Commits

Author SHA1 Message Date
Silvio Tomatis
9a782c5c37 Use the actually recommended value, not a random copy-paste I found somewhere and shamefully didn't check 2019-04-17 10:35:37 +02:00
Silvio Tomatis
f812ed7dc3 Tell openedx gunicorn to fork workers based on CPU count 2019-04-17 10:35:37 +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
1a706889b2 Minor docs improvement for k8s 2019-04-09 13:53:42 -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
be9b820a59 Fix broken android app build
We are forced to clone the full edx-app-android repo: if not, the build
crashes, complaining of missing git names.
2019-03-27 07:35:33 -07:00
Régis Behmo
75a6a2d44c Fix missing configuration parameters for android environment 2019-03-27 07:35:28 -07:00
Régis Behmo
c28d5e948c wip 2019-03-26 15:31:58 -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
ddbcedab5a Fix pyyaml deprecated warning
We were getting the following warning with the latest version of pyyaml:

    YAMLLoadWarning: calling yaml.load() without Loader=... is
    deprecated, as the default Loader is unsafe. Please read
    https://msg.pyyaml.org/load for full details.
2019-03-24 14:43:17 -07:00
Régis Behmo
92c9132180 Move all yaml-related code to dedicated module 2019-03-24 14:34:50 -07:00
Régis Behmo
288dc12796 Fix yaml parsing of "null" 2019-03-24 14:27:00 -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
328cd2b1ac Simpler proxy config
http redirects to http
https redirects to https
and the life of servers becomes more simple
2019-03-23 15:44:05 -07:00
Régis Behmo
d6a40c681d Fix incorrect web proxy redirect
With WEB_PROXY=true, web server only listens on NGINX_HTTP_PORT.
2019-03-23 14:26:57 -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
33239c14fd Activate SSO studio login in HTTPS only
With the upgrade to Ironwood, studio login redirects to the LMS by
default. This breaks login from studio.localhost. So we activate SSO
login only when HTTPS is activated, which should happen only when the
domains are correctly configured.
2019-03-22 23:37:59 +01:00
Régis Behmo
604093217f Fix HTTPS openedx config value 2019-03-22 23:37:59 +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
e2018c29b2 Refactoring: merge ops and scripts module
The "scripts" template folder is not rendered to the environment, as we
want to keep the possibility to make radical changes to this folder.
2019-03-22 18:50:33 +01:00
Régis Behmo
65433e1e1f Fix SMTP which should be enabled only when required 2019-03-22 18:00:49 +01:00
Régis Behmo
78a81ab509 Fail early on certbot failures 2019-03-21 22:27:28 +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
Régis Behmo
0a02d65760 Configurable SMTP server authentication
We can now define non-empty username/password for sending email.
2019-03-20 18:52:57 +01:00
Régis Behmo
7e2bfaf217 Harmonize mysql usernames and passwords
We were using the same password both for the root and the openedx user.
This used to be fine, but alas it is so no longer.
2019-03-20 18:45:20 +01:00
Régis Behmo
259b8961c8 Pluggable SMTP service
This is part of #114
2019-03-20 18:45:09 +01:00
Régis Behmo
960816b002 Add missing smtp service to kubernetes 2019-03-20 18:35:09 +01:00
Régis Behmo
f6d6fb642d Make it possible to (de)activate individual data services
Close #114
2019-03-20 18:59:09 +01:00
Régis Behmo
58ca0beb39 Make it possible to configure data services host/port
In the future, we want to allow users to rely on third-party services
for data storage, such as hosted MySQL and such. To do so, we need to be
able to configure the host/port of these services, which we do here.

This is to address part of #114.
2019-03-20 18:57:10 +01:00
Régis Behmo
ba394669fe v3.2.1
- [Feature] Enable grade downloads by default (#143)
- [Improvement] Remove orphan containers on `local start`
2019-03-19 01:04:45 +01:00
Régis Behmo
abfbf1cc21 Enable grade download by default
It was tricky to define correct settings: the "localfs" default storage
backend was causing incorrect urls of the form "/media/<id>/<name>.csv".

Close #143
2019-03-19 01:02:08 +01:00
Régis Behmo
9cd79fb44f Remove useless logging in "local" commands 2019-03-19 00:51:49 +01:00
Régis Behmo
98c24ee243 Remove orphan containers on local start 2019-03-18 23:04:07 +01:00
Régis Behmo
ed47177ca5 v3.2.0
- [Improvement] `images pull` now also pulls vendor images
- [Feature] Add convenient `config printvalue` command
- [Feature] Customize docker registry
- [Feature] Load configuration parameters from the system environment
- [Improvement] Automatic environment re-generation after
re-configuration
- [Improvement] Error and interrupt handling in UI and web UI
- [Bugfix] Fix missing webui env directory
2019-03-18 22:56:03 +01:00
Régis Behmo
87f7e29740 Store images in a local registry on AWS
FVor security reasons, it's better if docker images all point to a local
registry on AWS.
2019-03-18 22:56:03 +01:00
Régis Behmo
6a746eada0 Pull vendor images from the command line
Vendor docker image versions are no longer hardcoded in environment
files.
2019-03-18 22:40:37 +01:00
Régis Behmo
b84b0a6eed Add convenient "config printvalue" command 2019-03-18 22:38:55 +01:00
Régis Behmo
bccbd58e20 Easily customise the docker registry
As a consequence, `images` commands lose the `--namespace/--version`
arguments, which were confusing anyway.
2019-03-18 21:53:18 +01:00
Régis Behmo
e3b10b72f2 Load configuration values from environment
Configuration values can be loaded from the system environment by adding
a "TUTOR_" prefix.

Environment values supersede values from the user configuration file, so
that we can set values from the command line with "KEY=VAL tutor config
save --silent" even when KEY is already present in the user
configuration file.
2019-03-18 21:47:59 +01:00
Régis Behmo
07b3d113d4 Simplify environment generation
Environment is no longer generated separately for each target, but only
once the configuration is saved.

Note that the environment is automatically updated during
re-configuration, based on a "version" file stored in the environment.
2019-03-18 18:34:42 +01:00
Régis Behmo
63a633b3fc Handle command errors and ctrl+d commands in UI 2019-03-16 12:20:28 +01:00
Régis Behmo
dabf22282c Pull vendor images as part of aws deployment
Also, don't run clean script as sudo.
2019-03-13 18:28:13 +01:00
Régis Behmo
9d7a67bb69 Fix missing webui env directory 2019-03-10 18:02:20 +01:00
Régis Behmo
bb8be6eaed v3.1.0
- [Improvement] Install python requirements in virtual env in docker
image
- [Bugfix] Add missing volume for theme development
- [Improvement] Rename "config [non]interactive" command to "config save
[--silent]"
- [Improvement] More explicit logging during environment generation
- [Improvement] Configurable docker images (#122)
- [Bugfix] Fix "android pullimage" command
- [Improvement] Do not upgrade images as part of quickstart
- [Bugfix] Fix USERID setup in development mode and various dev-related
docs (#177)
2019-03-09 17:53:34 +01:00
Régis Behmo
3e5e494bd8 Install python requirements in venv in docker image
Installing the requirements in a virtualenv is necessary to run "pip
install ..." commands in development mode, when the USERID is != 0.
2019-03-09 17:51:25 +01:00
Régis Behmo
b7c31d770f Add missing volume for theme development
The documentation instructions could not be working, as the theme folder
was not being mounted in the dev container.
2019-03-09 15:39:33 +01:00
Régis Behmo
970ab607b5 Rename "config [non]interactive" command to "config save [--silent]" 2019-03-09 11:27:51 +01:00
Régis Behmo
9b35490449 More explicit env generation logging 2019-03-09 11:17:48 +01:00
Régis Behmo
6d19b99b66 Configurable docker images
Docker images for each service can now be configured one by one.

Close #122.
2019-03-09 11:17:48 +01:00
Régis Behmo
976453c838 Fix "android pullimage" command 2019-03-09 11:17:48 +01:00
Régis Behmo
70d2ef37d3 Do not pull images as part of local quickstart
Pulling images is slow, often unnecessary, and sometimes suprising for
the user, as the newer images may break the older tutor version.
Instead, we add a "--pullimages" option to "quickstart" to explicitely
update docker images.
2019-03-09 11:17:23 +01:00
Régis Behmo
9d6874fc0e Fix USERID setting in development mode
USERID environment variable was no longer passed to docker image in
development mode.

We take the opportunity to improve the documentation regarding the dev
environment.

Close #177.
2019-03-09 11:16:12 +01:00
Régis Behmo
64eb8e0c92 v3.0.6
- [Bugfix] Fix import/export of demo course (#175)
2019-02-26 20:54:22 +01:00
Régis Behmo
4adaa67e3e Fix "[Errno 2] No such file or directory" error on course export
Close #175
2019-02-26 20:47:43 +01:00
Régis Behmo
1485d8c4d6 Add missing lynx dependency to openedx container
First seen here:
a9bee65dff
2019-02-26 09:25:03 +01:00
Régis Behmo
1e2166dacf Fix android app build/auth
We had to backtrack from the latest release of the
android app, which is not compatible with the mobile api v0.5 available
in Hawthorn. This should change in ironwood.

Also, we included the correct oauth client ID in the app, which
prevented communication with the LMS.

The android app is now out of beta \o/

Close #89
2019-02-20 19:17:20 +01:00
Régis Behmo
e54a3cc8ca v3.0.5
- [Feature] Add cloud deployment script
- [Improvement] Run `images pull` command
- [Improvement] Run `indexcourses` on importing demo course
- [Improvement] Add `runserver stop` command
2019-02-14 08:39:11 +01:00
Régis Behmo
877a2239f7 Make tutor ready for the AWS cloud 2019-02-13 23:55:15 +01:00
Régis Behmo
5df069f42a Add cloud deployment script for AWS 2019-02-13 22:57:31 +01:00
Régis Behmo
b3288613c7 Add runserver stop command 2019-02-13 17:25:17 +01:00
Régis Behmo
da84299c8b v3.0.4
- [Minor] Minimum required `click` version is 7.0 (#171)
- [Bugfix] Fix `runserver` dev command (#172)
- [Minor] Fix non-https link to documentation in pypi
- [Minor] Fix `createuser` documentation
2019-02-13 17:15:18 +01:00
Régis Behmo
22aff4dbf5 Fix runserver dev command
Close #172
2019-02-13 17:09:07 +01:00
Régis Behmo
484bb59ec6 v3.0.3
- [Bugfix] Add missing template data to pypi package
- [Bugfix] Fix quickstart on Kubernetes (#164)
- [Improvement] Add datatases task to Kubernetes quickstart (#167)
2019-02-12 09:21:31 +01:00
Régis Behmo
ab2098b7f5 Run databases task on k8s quickstart
Close #167
2019-02-12 09:17:18 +01:00
Régis Behmo
253b816a0a Fix k8s quickstart
Close #164
2019-02-12 09:11:38 +01:00
Régis Behmo
e738a3b13f v3.0.2
- [Bugfix] Fix import paths -- 🚀 thanks @silviot!
- [Improvement] Properly set docker project name in mysql logs -- 🦊
thanks again @silviot!
2019-02-12 08:37:37 +01:00
Silvio Tomatis
d08bc10bb6 Align docker-compose logs invocation to the docker-compose up call 2019-02-12 08:29:07 +01:00
Régis Behmo
486e5c5794 Fix settings import paths 2019-02-12 08:26:50 +01:00
Régis Behmo
ed8606e63c v3.0.1
- [Bugfix] fix mysql initialization (#159, #160)
- [Improvement] Better handling of continuous integration
- [Bugfix] fix `tutor --version` (#156)
- [Improvement] Absolute settings imports -- 📯 thanks @tonytan4ever!
2019-02-11 09:39:19 +01:00
Régis Behmo
09fdc30784 Fix mysql connection errror on boot
Mysql triggers "Host 'xxx' is not allowed to connect to this MySQL
server" error because of race condition.

This was an issue that had been (painfully) solved in v2 and has reared
its ugly head again in v3.

Close #159
Close #160
2019-02-11 09:38:34 +01:00
Régis Behmo
d65a7a1b38 Fix version information in bundle
`./dist/tutor --version` raises an error:

Traceback (most recent call last):
  File "main", line 4, in <module>
  File "tutor/cli.py", line 21, in main
  File "click/core.py", line 764, in __call__
  File "click/core.py", line 716, in main
  File "click/core.py", line 641, in make_context
  File "click/core.py", line 1089, in parse_args
  File "click/core.py", line 940, in parse_args
  File "click/core.py", line 1477, in handle_parse_result
  File "click/core.py", line 96, in invoke_param_callback
  File "click/decorators.py", line 270, in callback
RuntimeError: Could not determine version
[1659] Failed to execute script main

To address this, we pass the version value directly to click.

This is for issue #156.
2019-02-10 19:29:37 +01:00
tonytan4ever
608e686198 Improve import in openedx config settings
Signed-off-by: tonytan4ever <tonytan198211@gmail.com>
2019-02-10 19:17:06 +01:00
Régis Behmo
4331bc5712 Tutor v3 complete rewrite
Replace all make commands by a single "tutor" binary. Environment and
data are all moved to ~/.tutor/local/share/tutor. We take the
opportunity to add a web UI and revamp the documentation.

This is a complete rewrite.

Close #121.
Close #147.
2019-02-09 20:30:01 +01:00