Commit Graph

145 Commits

Author SHA1 Message Date
Régis Behmo b557cf9b43 Simplify the release process
Instead of pushing to multiple remotes, push to just one. It will then
sync changes to the other.
2021-03-17 17:33:06 +01:00
Régis Behmo 0a670d7ead refactor: add type annotations
Annotations were generated with pyannotate:
https://github.com/dropbox/pyannotate

We are running in strict mode, which is awesome!

This affects a large part of the code base, which might be an issue for
people running a fork of Tutor. Nonetheless, the behavior should not be
affected. If anything, this process has helped find and resolve a few
type-related bugs. Thus, this is not considered as a breaking change.
2021-03-15 21:46:55 +01:00
Régis Behmo 9afdb3f42b Upgrade github-release to fix "no such host" error
See failing job: https://travis-ci.org/github/overhangio/tutor/jobs/757515583

This is almost certainly due to a change in the github API response:
https://github.com/meterup/github-release/issues/1

See discussion:
https://discuss.overhang.io/t/no-packages-for-release-11-1-4/1278/2
2021-02-04 17:02:40 +01:00
Régis Behmo 728ef966dc v11.0.0 (2020-12-09)
- 💥[Improvement] Upgrade Open edX to Koa
- 💥 Setting changes:
    - The ``ACTIVATE_HTTPS`` setting was renamed to ``ENABLE_HTTPS``.
    - Other ``ACTIVATE_*`` variables were all renamed to ``RUN_*``.
    - The ``WEB_PROXY`` setting was removed and ``RUN_CADDY`` was added.
    - The ``NGINX_HTTPS_PORT`` setting is deprecated.
- Architectural changes:
    - Use Caddy as a web proxy for automated SSL/TLS certificate generation:
	- Nginx no longer listens to port 443 for https traffic
	- The Caddy configuration file comes with a new ``caddyfile`` patch for much simpler SSL/TLS management.
	- Configuration files for web proxies are no longer provided.
	- Kubernetes deployment no longer requires setting up a custom Ingress resource or custom manager.
    - Gunicorn and Whitenoise are replaced by uwsgi: this increases boostrap performance and makes it no longer necessary to mount media folders in the Nginx container.
    - Replace memcached and rabbitmq by redis.
- Additional features:
    - Make it possible to disable all plugins at once with ``plugins disable all``.
    - Add ``tutor k8s wait`` command to wait for a pod to become ready
    - Faster, more reliable static assets with local memory caching
- Deprecation: proxy files for Apache and Nginx are no longer provided out of the box.
- Removed plugin `{{ patch (...) }}` statements:
    - "https-create", "k8s-ingress-rules", "k8s-ingress-tls-hosts": these are no longer necessary. Instead, declare your app in the "caddyfile" patch.
    - "local-docker-compose-nginx-volumes": this patch was primarily used to serve media assets. The recommended is now to serve assets with uwsgi.
2020-12-10 01:05:02 +01:00
Régis Behmo 2ca62be52e Force running tests on creating release
This will help us detect early issues with the releases.
2020-10-15 14:28:18 +02:00
Régis Behmo 9d0f2d9178 Simplify CI
This comes after a big refactoring of our CI pipeline.
2020-10-02 14:17:29 +02:00
Régis Behmo 443d7fa46c Add CI command to view size of bundled tutor binary 2020-07-01 09:32:08 +02:00
Régis Behmo 77150c0424 Push to repo as part of "make release" 2020-06-21 13:47:14 +02:00
Régis Behmo 4d6de0138a v10.0.0 Upgrade to Juniper (2020-06-15)
Here, we upgrade the Open edX platform from Ironwood to Juniper. This
upgrade does not come with many feature changes, but there are many
technical improvements under the hood:

- Upgrade from Python 2.7 to 3.5
- Upgrade from Mongodb v3.2 to v3.6
- Upgrade Ruby to 2.5.7

We took the opportunity to completely rething the way locally running
platforms should be accessed for testing purposes. It is no longer
possible to access a running platform from http://localhost and
http://studio.localhost. Instead, users should access
http://local.overhang.io and https://studio.local.overhang.io. This
drastically simplifies internal communication between Docker containers.

To upgrade, users should simply run:

    tutor local quickstart

For Kubernetes platform, the upgrade process is outlined when running:

    tutor k8s upgrade --from=ironwood
2020-06-15 10:19:07 +02:00
Régis Behmo 103b78a78a Fix github release download in travis CI 2020-04-26 01:05:48 +02:00
Régis Behmo 19d85e621b Fix "distribution was not found and is required by kubernetes" in CI
When running "python setup.py install" in CI, we were getting
"requests distribution was not found and is required by kubernetes"
errors. I can reproduce this issue locally. The error disappears after
the same command is run a second time.

This is a similar issue: https://github.com/pypa/setuptools/issues/498
2020-04-26 00:36:17 +02:00
Régis Behmo fac336e6d7 Upgrade script for pushing github releases
The github-release is no longer maintained by aktau. We need to upgrade
because of Github authentication warnings. We also add a custom python
script for uploading assets to github. We thought it would be a simple
script, but instead we need to deal with deletion of existing assets and
releases, so we decide instead to keep relying on that 3rd-party script.
2020-04-20 06:23:57 +02: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 e2aba3bc93 Fix missing openssl-dev library in CI
This was causing an error during the install of the cryptography module
in CI (alpine linux).
2020-01-13 22:40:10 +01:00
Régis Behmo 237d9d76ee Attempt to pin setuptools/pip to fix CI
We are facing the following issues in CI:

    $ ./dist/tutor --version
    [5201] Failed to execute script pyi_rth_pkgres
    Traceback (most recent call last):
      File "site-packages/PyInstaller/loader/rthooks/pyi_rth_pkgres.py", line 13, in <module>
      File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
          exec(bytecode, module.__dict__)
      File "site-packages/pkg_resources/__init__.py", line 86, in <module>
      ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
    make: *** [ci-bundle] Error 255

And:

    $ make ci-install-python-requirements
    ...
    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
2020-01-13 22:40:10 +01:00
Régis Behmo 2e3ebaf084 Upgrade all requirements
Also, add a `upgrade-requirements` target.
2020-01-10 15:38:17 +01:00
Régis Behmo 42359b8f02 Add "docs" target to root makefile 2020-01-10 15:30:09 +01:00
Régis Behmo 9620447a4d Add the lts plugin to the tutor binary 2019-12-25 01:09:53 +01:00
Régis Behmo 8127546af8 Improve make test-packages
`make test-packages` now tests a single package.
2019-11-22 09:38:53 +01:00
Régis Behmo 11f8c87f4a Make sure tutor-openedx is installed as part of requirements
Otherwise, tutor-openedx will be pulled from pypi during plugin install.
This was failing because the latest pypi release was not installing
correctly (see #261).
2019-10-19 19:13:03 +02:00
Régis Behmo 816f32e610 Fix alpine requirements in CI 2019-10-09 13:40:18 +02:00
Régis Behmo 1224313e7c Make sure twine & pip are up-to-date in CI
We were affected by the following bug when installing pyinstaller in CI:

https://github.com/pyinstaller/pyinstaller/issues/4006
https://github.com/pypa/pip/issues/6163

As a consequence, pip is upgraded in CI. Also, twine is now part of dev
requirements.
2019-10-09 13:22:00 +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 22a5c0ec3e Fix building xqueue/notes as part of CI 2019-07-04 22:52:30 +08:00
Régis Behmo ecf3851c23 Add missing plugin manifest files 2019-07-04 18:01:27 +08:00
Régis Behmo c07032f826 Fix CI image building 2019-07-04 17:29: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 b7937c8c5b Push plugin packages to pypi 2019-06-23 23:11:07 +02:00
Régis Behmo de5b82fd63 Migrate github repo to overhangio organization 2019-06-23 23:11:07 +02:00
Régis Behmo dce234bc1e Move tasks from travis-ci to gitlab CI
We only keep travis-ci for building MacOS/Linux binaries.
2019-06-23 23:11:07 +02:00
Régis Behmo e04f42ec1a Specify CI python version in packaging in case of conflict
On MacOS, when no python version is specified, packaging is run with
python 2.
2019-06-19 12:38:26 +02:00
Régis Behmo aaafd73a8a Fix requirements for packaging 2019-06-19 12:14:49 +02:00
Régis Behmo 2729fe94f0 Test packaging as part of full test suite
We've had issues before with improperly formatted README.rst which was
causing pypi upload failure.
2019-06-19 12:02:28 +02:00
Régis Behmo 84f2060d33 Working Kubernetes quickstart
The k8s quickstart command is now functional, with suppport for https,
xqueue, notes and minio. There are still a few bugs to get rid of,
though.
2019-06-17 22:38:55 +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 3b108d21de 🔌 Introduce a plugin system for tutor
This adds the basic feratures that we need for a working plugin system,
but there are still many TODOs in the codebase.
2019-06-07 22:49:45 +02:00
Régis Behmo 38394c0824 Plugins and tests are linted, too 2019-06-07 22:49:45 +02:00
Régis Behmo 02a7bd5cbc No automated formatting for templates 2019-06-03 15:41:25 +02:00
Régis Behmo a97453135e Blackify tests, too 2019-05-29 09:53:54 +02:00
Régis Behmo 6196defa8b Simplify CI install/testing 2019-05-05 12:30:20 +02:00
Régis Behmo 4ac7dff06a Switch from nose to unittest for running tests
This harmonizes test running between CI and local development.
2019-05-05 12:30:20 +02:00
Régis Behmo 9dd4c26706 Introduce automatic code formatting/linting
Code formatting makes sure that the python code looks decent, but it
does not check for coding errors.
https://black.readthedocs.io/en/stable/

Code linting runs static error detection on the python code, but does
not bother about formatting: https://pylint.readthedocs.io/en/latest/
2019-05-05 12:30:20 +02:00
Régis Behmo acbd5ae371 Test interactive configuration in travis-ci
With this test we would have realised earlier there was a bug with
config defaults.
2019-04-27 10:58:43 +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 1a94b05188 Better release descriptions
By using `github-releases`, we can now generate much better release
description blurbs.
2019-04-22 15:15:47 +02:00
Régis Behmo 847678bb07 Get rid of the "latest" release tag
The "latest" tag is a pain to maintain: it's a tag that we delete and
re-create at every release. Whenever we delete it, the binaries become
unavailable on Github until they are re-generated. Thus, from now on, we
conform to good practices (as examplified by the
github.com/docker/compose) project and distribute only pinned release.

The "nightly" tag remains, for now, as it allows us to distribute beta
features. It may disappear in the future.
2019-04-22 13:36:40 +02:00