From c8dc0218dd16de481910987d9bab95ce2e3591e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 21 Jul 2020 09:11:04 +0200 Subject: [PATCH] Make it possible to override individual docker registry --- README.rst | 8 ++++---- tutornotes/__about__.py | 2 +- tutornotes/patches/k8s-deployments | 2 +- tutornotes/patches/k8s-jobs | 2 +- tutornotes/patches/local-docker-compose-jobs-services | 2 +- tutornotes/patches/local-docker-compose-services | 2 +- tutornotes/plugin.py | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index b6707d3..aa72659 100644 --- a/README.rst +++ b/README.rst @@ -10,13 +10,13 @@ Installation ------------ The plugin is currently bundled with the `binary releases of Tutor `_. If you have installed Tutor from source, you will have to install this plugin from source, too:: - + pip install tutor-notes Then, to enable this plugin, run:: - + tutor plugins enable notes - + You should beware that the ``notes.`` domain name should exist and point to your server. For instance, if your LMS is hosted at http://myopenedx.com, the notes service should be found at http://notes.myopenedx.com. If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.overhang.io. @@ -29,7 +29,7 @@ Configuration - ``NOTES_MYSQL_PASSWORD`` (default: ``"{{ 8|random_string }}"``) - ``NOTES_SECRET_KEY`` (default: ``"{{ 24|random_string }}"``) - ``NOTES_OAUTH2_SECRET`` (default: ``"{{ 24|random_string }}"``) -- ``NOTES_DOCKER_IMAGE`` (default: ``"overhangio/openedx-notes:{{ NOTES_VERSION }}"``) +- ``NOTES_DOCKER_IMAGE`` (default: ``"{{ DOCKER_REGISTRY }}overhangio/openedx-notes:{{ NOTES_VERSION }}"``) - ``NOTES_HOST`` (default: ``"notes.{{ LMS_HOST }}"``) - ``NOTES_MYSQL_DATABASE`` (default: ``"notes"``) - ``NOTES_MYSQL_USERNAME`` (default: ``"notes"``) diff --git a/tutornotes/__about__.py b/tutornotes/__about__.py index ab64964..7c417a9 100644 --- a/tutornotes/__about__.py +++ b/tutornotes/__about__.py @@ -1 +1 @@ -__version__ = "10.0.1" +__version__ = "10.1.0" diff --git a/tutornotes/patches/k8s-deployments b/tutornotes/patches/k8s-deployments index 6ae25f8..de64de8 100644 --- a/tutornotes/patches/k8s-deployments +++ b/tutornotes/patches/k8s-deployments @@ -16,7 +16,7 @@ spec: spec: containers: - name: notes - image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }} + image: {{ NOTES_DOCKER_IMAGE }} ports: - containerPort: 8000 env: diff --git a/tutornotes/patches/k8s-jobs b/tutornotes/patches/k8s-jobs index ead72e3..b34b5a9 100644 --- a/tutornotes/patches/k8s-jobs +++ b/tutornotes/patches/k8s-jobs @@ -11,7 +11,7 @@ spec: restartPolicy: Never containers: - name: notes - image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }} + image: {{ NOTES_DOCKER_IMAGE }} env: - name: DJANGO_SETTINGS_MODULE value: notesserver.settings.tutor diff --git a/tutornotes/patches/local-docker-compose-jobs-services b/tutornotes/patches/local-docker-compose-jobs-services index 2be52e4..757391c 100644 --- a/tutornotes/patches/local-docker-compose-jobs-services +++ b/tutornotes/patches/local-docker-compose-jobs-services @@ -1,5 +1,5 @@ notes-job: - image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }} + image: {{ NOTES_DOCKER_IMAGE }} environment: DJANGO_SETTINGS_MODULE: notesserver.settings.tutor volumes: diff --git a/tutornotes/patches/local-docker-compose-services b/tutornotes/patches/local-docker-compose-services index 1a36b61..9534b21 100644 --- a/tutornotes/patches/local-docker-compose-services +++ b/tutornotes/patches/local-docker-compose-services @@ -1,6 +1,6 @@ ############# Notes: backend store for edX Student Notes notes: - image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }} + image: {{ NOTES_DOCKER_IMAGE }} environment: DJANGO_SETTINGS_MODULE: notesserver.settings.tutor volumes: diff --git a/tutornotes/plugin.py b/tutornotes/plugin.py index 7440970..8d27e3c 100644 --- a/tutornotes/plugin.py +++ b/tutornotes/plugin.py @@ -14,7 +14,7 @@ config = { }, "defaults": { "VERSION": __version__, - "DOCKER_IMAGE": "overhangio/openedx-notes:{{ NOTES_VERSION }}", + "DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-notes:{{ NOTES_VERSION }}", "HOST": "notes.{{ LMS_HOST }}", "MYSQL_DATABASE": "notes", "MYSQL_USERNAME": "notes", @@ -24,8 +24,8 @@ config = { templates = pkg_resources.resource_filename("tutornotes", "templates") hooks = { "init": ["mysql", "lms", "notes"], - "build-image": {"notes": "{{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}"}, - "remote-image": {"notes": "{{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}"}, + "build-image": {"notes": "{{ NOTES_DOCKER_IMAGE }}"}, + "remote-image": {"notes": "{{ NOTES_DOCKER_IMAGE }}"}, }