From d4a47ded38a7a0a11573a9405f616f91de23a675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 27 Jan 2022 11:55:17 +0100 Subject: [PATCH 1/4] docs: fix smtp port default value See: https://discuss.overhang.io/t/default-smtp-configuration-timeout/2367 --- docs/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 8dac2bf..6df489b 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -163,7 +163,7 @@ SMTP - ``RUN_SMTP`` (default: ``true``) - ``SMTP_HOST`` (default: ``"smtp"``) -- ``SMTP_PORT`` (default: ``25``) +- ``SMTP_PORT`` (default: ``8025``) - ``SMTP_USERNAME`` (default: ``""``) - ``SMTP_PASSWORD`` (default: ``""``) - ``SMTP_USE_TLS`` (default: ``false``) From f0aee87ed5d5cfc5256c94f6002d54ff2137c61c Mon Sep 17 00:00:00 2001 From: "iamcristye@outlook.com" Date: Thu, 27 Jan 2022 21:35:10 +0800 Subject: [PATCH 2/4] docs: fix typo in uninstallation process --- docs/install.rst | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/install.rst b/docs/install.rst index c230751..f1f944e 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -149,15 +149,10 @@ Uninstallation It is fairly easy to completely uninstall Tutor and to delete the Open edX platforms that is running locally. -First of all, stop any locally-running platform:: - - tutor local stop - tutor dev stop - -Remove all containers:: +First of all, stop any locally-running platform and remove all Tutor containers:: tutor local dc down --remove-orphans - tutor local dc down --remove-orphans + tutor dev dc down --remove-orphans Then, delete all data associated to your Open edX platform:: From 36c1ac0aa48de273f8af64b6e8da1e83ffb71fac Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Fri, 28 Jan 2022 14:01:53 +0100 Subject: [PATCH 3/4] docs: Explain passing the Click context to a plugin command Clarify how plugin authors can access the Click context, and from it the Tutor configuration, from the function implementing a plugin command. Reference: https://discuss.overhang.io/t/how-does-a-plugin-command-access-the-tutor-configuration/2372 --- docs/plugins/api.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/plugins/api.rst b/docs/plugins/api.rst index ca91c78..c43cab6 100644 --- a/docs/plugins/api.rst +++ b/docs/plugins/api.rst @@ -176,20 +176,28 @@ When saving the environment, template files that are stored in a template root w command ~~~~~~~ -A plugin can provide custom command line commands. Commands are assumed to be `click.Command `__ objects. +A plugin can provide custom command line commands. Commands are assumed to be `click.Command `__ objects, and you typically implement them using the `click.command `__ decorator. + +You may also use the `click.pass_obj `__ decorator to pass the CLI `context `__, such as when you want to access Tutor configuration settings from your command. Example:: import click + from tutor import config as tutor_config @click.command(help="I'm a plugin command") - def command(): + @click.pass_obj + def command(context): + config = tutor_config.load(context.root) + lms_host = config["LMS_HOST"] click.echo("Hello from myplugin!") + click.echo(f"My LMS host is {lms_host}") Any user who installs the ``myplugin`` plugin can then run:: $ tutor myplugin Hello from myplugin! + My LMS host is demo.openedx.overhang.io You can even define subcommands by creating `command groups `__:: From bc87f78866f0d3e8a48f5033fc47ff665dad67d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 27 Jan 2022 10:10:53 +0100 Subject: [PATCH 4/4] fix: `k8s start caddy` command Caddy was not properly starting because its associated configmap was not starting. Close #577. --- CHANGELOG.md | 2 ++ tutor/templates/kustomization.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1261ae6..08511ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Bugfix] Fix `k8s start caddy` command. + ## v13.1.2 (2022-01-30) - [Bugfix] Fix auto-renewal of certificates revoked by Let's Encrypt (see [discussion](https://community.letsencrypt.org/t/questions-about-renewing-before-tls-alpn-01-revocations/170449/21)). diff --git a/tutor/templates/kustomization.yml b/tutor/templates/kustomization.yml index cfb82d5..a5a2815 100644 --- a/tutor/templates/kustomization.yml +++ b/tutor/templates/kustomization.yml @@ -30,6 +30,9 @@ configMapGenerator: - name: caddy-config files: - apps/caddy/Caddyfile + options: + labels: + app.kubernetes.io/name: caddy - name: openedx-settings-lms files:{% for file in "apps/openedx/settings/lms"|walk_templates %} - {{ file }}{% endfor %}