From 87980f484b7d9c74c45876fe75f78b32d6546227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 26 Dec 2018 00:17:23 +0100 Subject: [PATCH] Rename custom settings from "universal" to "tutor" --- android/templates/edx.properties | 2 +- android/templates/{universal.yaml => tutor.yaml} | 2 +- build/notes/Dockerfile | 4 ++-- build/openedx/Dockerfile | 14 +++++++------- build/xqueue/Dockerfile | 4 ++-- deploy/singleserver/Makefile | 2 +- deploy/templates/notes/{universal.py => tutor.py} | 0 .../openedx/{universal => tutor}/cms/__init__.py | 0 .../{universal => tutor}/cms/development.py | 0 .../openedx/{universal => tutor}/cms/production.py | 0 .../openedx/{universal => tutor}/lms/__init__.py | 0 .../{universal => tutor}/lms/development.py | 0 .../openedx/{universal => tutor}/lms/production.py | 0 deploy/templates/xqueue/{universal.py => tutor.py} | 2 +- docs/dev.rst | 10 +++++----- 15 files changed, 20 insertions(+), 20 deletions(-) rename android/templates/{universal.yaml => tutor.yaml} (84%) rename deploy/templates/notes/{universal.py => tutor.py} (100%) rename deploy/templates/openedx/{universal => tutor}/cms/__init__.py (100%) rename deploy/templates/openedx/{universal => tutor}/cms/development.py (100%) rename deploy/templates/openedx/{universal => tutor}/cms/production.py (100%) rename deploy/templates/openedx/{universal => tutor}/lms/__init__.py (100%) rename deploy/templates/openedx/{universal => tutor}/lms/development.py (100%) rename deploy/templates/openedx/{universal => tutor}/lms/production.py (100%) rename deploy/templates/xqueue/{universal.py => tutor.py} (94%) diff --git a/android/templates/edx.properties b/android/templates/edx.properties index e242f54..6913998 100644 --- a/android/templates/edx.properties +++ b/android/templates/edx.properties @@ -1,3 +1,3 @@ edx.android { - configFiles = ['universal.yaml'] + configFiles = ['tutor.yaml'] } diff --git a/android/templates/universal.yaml b/android/templates/tutor.yaml similarity index 84% rename from android/templates/universal.yaml rename to android/templates/tutor.yaml index 21d6f22..43ea4e5 100644 --- a/android/templates/universal.yaml +++ b/android/templates/tutor.yaml @@ -1,5 +1,5 @@ API_HOST_URL: '{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ LMS_HOST }}' -ENVIRONMENT_DISPLAY_NAME: 'universal' +ENVIRONMENT_DISPLAY_NAME: 'tutor' PLATFORM_NAME: '{{ PLATFORM_NAME }}' PLATFORM_DESTINATION_NAME: '{{ LMS_HOST }}' FEEDBACK_EMAIL_ADDRESS: 'support@{{ LMS_HOST }}' diff --git a/build/notes/Dockerfile b/build/notes/Dockerfile index 7bc084e..31eb979 100644 --- a/build/notes/Dockerfile +++ b/build/notes/Dockerfile @@ -10,8 +10,8 @@ WORKDIR /openedx/edx-notes-api RUN pip install -r requirements/base.txt -ENV DJANGO_SETTINGS_MODULE notesserver.settings.universal -RUN ln -s /openedx/config/universal.py notesserver/settings/universal.py +ENV DJANGO_SETTINGS_MODULE notesserver.settings.tutor +RUN ln -s /openedx/config/tutor.py notesserver/settings/tutor.py EXPOSE 8000 CMD gunicorn --name notes --bind=0.0.0.0:8000 --max-requests=1000 notesserver.wsgi:application diff --git a/build/openedx/Dockerfile b/build/openedx/Dockerfile index 4dc4dbc..1608fc9 100644 --- a/build/openedx/Dockerfile +++ b/build/openedx/Dockerfile @@ -62,15 +62,15 @@ RUN touch /openedx/requirements/private.txt \ # Link configuration files to common /openedx/config folder, which should later # be mounted as a volume. Note that this image will not be functional until # config files have been mounted inside the container -RUN mkdir -p /openedx/env/universal/lms /openedx/env/universal/cms \ - && ln -s /openedx/env/universal/lms/ /openedx/edx-platform/lms/envs/universal \ - && ln -s /openedx/env/universal/cms/ /openedx/edx-platform/cms/envs/universal \ +RUN mkdir -p /openedx/env/tutor/lms /openedx/env/tutor/cms \ + && ln -s /openedx/env/tutor/lms/ /openedx/edx-platform/lms/envs/tutor \ + && ln -s /openedx/env/tutor/cms/ /openedx/edx-platform/cms/envs/tutor \ && ln -s /openedx/env/lms.env.json /openedx/ \ && ln -s /openedx/env/cms.env.json /openedx/ \ && ln -s /openedx/env/lms.auth.json /openedx/ \ && ln -s /openedx/env/cms.auth.json /openedx/ -COPY settings/lms/*.py /openedx/env/universal/lms/ -COPY settings/cms/*.py /openedx/env/universal/cms/ +COPY settings/lms/*.py /openedx/env/tutor/lms/ +COPY settings/cms/*.py /openedx/env/tutor/cms/ # Copy scripts COPY ./bin /openedx/bin @@ -89,11 +89,11 @@ RUN openedx-assets xmodule \ && openedx-assets common COPY ./themes/ /openedx/themes/ RUN openedx-assets themes \ - && openedx-assets collect --settings=universal.assets + && openedx-assets collect --settings=tutor.assets # service variant is "lms" or "cms" ENV SERVICE_VARIANT lms -ENV SETTINGS universal.production +ENV SETTINGS tutor.production # Entrypoint will fix permissions of all files and run commands as openedx ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/build/xqueue/Dockerfile b/build/xqueue/Dockerfile index ab0b3a7..840e6c1 100644 --- a/build/xqueue/Dockerfile +++ b/build/xqueue/Dockerfile @@ -10,8 +10,8 @@ WORKDIR /openedx/xqueue RUN pip install -r requirements.txt -ENV DJANGO_SETTINGS_MODULE xqueue.universal -RUN ln -s /openedx/config/universal.py xqueue/universal.py +ENV DJANGO_SETTINGS_MODULE xqueue.tutor +RUN ln -s /openedx/config/tutor.py xqueue/tutor.py EXPOSE 8040 CMD gunicorn --name xqueue --bind=0.0.0.0:8040 --max-requests=1000 xqueue.wsgi:application diff --git a/deploy/singleserver/Makefile b/deploy/singleserver/Makefile index 115e726..589894b 100644 --- a/deploy/singleserver/Makefile +++ b/deploy/singleserver/Makefile @@ -3,7 +3,7 @@ PWD = $$(pwd) USERID ?= $$(id -u) -EDX_PLATFORM_SETTINGS ?= universal.production +EDX_PLATFORM_SETTINGS ?= tutor.production -include $(PWD)/Makefile.env DOCKER_COMPOSE_RUN = docker-compose run --rm diff --git a/deploy/templates/notes/universal.py b/deploy/templates/notes/tutor.py similarity index 100% rename from deploy/templates/notes/universal.py rename to deploy/templates/notes/tutor.py diff --git a/deploy/templates/openedx/universal/cms/__init__.py b/deploy/templates/openedx/tutor/cms/__init__.py similarity index 100% rename from deploy/templates/openedx/universal/cms/__init__.py rename to deploy/templates/openedx/tutor/cms/__init__.py diff --git a/deploy/templates/openedx/universal/cms/development.py b/deploy/templates/openedx/tutor/cms/development.py similarity index 100% rename from deploy/templates/openedx/universal/cms/development.py rename to deploy/templates/openedx/tutor/cms/development.py diff --git a/deploy/templates/openedx/universal/cms/production.py b/deploy/templates/openedx/tutor/cms/production.py similarity index 100% rename from deploy/templates/openedx/universal/cms/production.py rename to deploy/templates/openedx/tutor/cms/production.py diff --git a/deploy/templates/openedx/universal/lms/__init__.py b/deploy/templates/openedx/tutor/lms/__init__.py similarity index 100% rename from deploy/templates/openedx/universal/lms/__init__.py rename to deploy/templates/openedx/tutor/lms/__init__.py diff --git a/deploy/templates/openedx/universal/lms/development.py b/deploy/templates/openedx/tutor/lms/development.py similarity index 100% rename from deploy/templates/openedx/universal/lms/development.py rename to deploy/templates/openedx/tutor/lms/development.py diff --git a/deploy/templates/openedx/universal/lms/production.py b/deploy/templates/openedx/tutor/lms/production.py similarity index 100% rename from deploy/templates/openedx/universal/lms/production.py rename to deploy/templates/openedx/tutor/lms/production.py diff --git a/deploy/templates/xqueue/universal.py b/deploy/templates/xqueue/tutor.py similarity index 94% rename from deploy/templates/xqueue/universal.py rename to deploy/templates/xqueue/tutor.py index a5eea31..46adcff 100644 --- a/deploy/templates/xqueue/universal.py +++ b/deploy/templates/xqueue/tutor.py @@ -13,7 +13,7 @@ DATABASES = { LOGGING = get_logger_config( log_dir="/openedx/data/", - logging_env="universal", + logging_env="tutor", dev_env=True, ) diff --git a/docs/dev.rst b/docs/dev.rst index cf0b719..0a6b35a 100644 --- a/docs/dev.rst +++ b/docs/dev.rst @@ -7,7 +7,7 @@ In addition to running Open edX in production, you can use the docker containers To begin with, define development settings:: - export EDX_PLATFORM_SETTINGS=universal.development + export EDX_PLATFORM_SETTINGS=tutor.development Run a local webserver --------------------- @@ -40,12 +40,12 @@ All development commands will then automatically mount your local repo. For inst Note: containers are built on the Hawthorn release. If you are working on a different version of Open edX, you will have to rebuild the images with the right ``EDX_PLATFORM_VERSION`` argument. You may also want to change the ``EDX_PLATFORM_REPOSITORY`` argument to point to your own fork of edx-platform. -With a customised edx-platform repo, you must be careful to have settings that are compatible with the docker environment. You are encouraged to copy the ``universal.development`` settings files to our own repo: +With a customised edx-platform repo, you must be careful to have settings that are compatible with the docker environment. You are encouraged to copy the ``tutor.development`` settings files to our own repo: - cp -r config/openedx/universal/lms/ /path/to/edx-platform/lms/envs/universal - cp -r config/openedx/universal/cms/ /path/to/edx-platform/cms/envs/universal + cp -r config/openedx/tutor/lms/ /path/to/edx-platform/lms/envs/tutor + cp -r config/openedx/tutor/cms/ /path/to/edx-platform/cms/envs/tutor -You can then run your platform with the ``universal.development`` settings. +You can then run your platform with the ``tutor.development`` settings. Develop customised themes -------------------------