diff --git a/docs/dev.rst b/docs/dev.rst index ccff6d1..87a2600 100644 --- a/docs/dev.rst +++ b/docs/dev.rst @@ -178,31 +178,6 @@ You will have to re-build the openedx Docker image once:: You should then run the development server as usual, with ``runserver``. Every change made to the ``mypackage`` folder will be picked up and the development server will be automatically reloaded. -Loading custom edx-platform settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default, tutor settings files are mounted inside the docker images at ``/openedx/edx-platform/lms/envs/tutor/`` and ``/openedx/edx-platform/cms/envs/tutor/``. In the various ``dev`` commands, the default ``edx-platform`` settings module is set to ``tutor.development`` and you don't have to do anything to set up these settings. - -If for some reason, you want to use different settings, you will need to define the ``TUTOR_EDX_PLATFORM_SETTINGS`` environment variable. - -For instance, let's assume you have created the ``/path/to/edx-platform/lms/envs/mysettings.py`` and ``/path/to/edx-platform/cms/envs/mysettings.py`` modules. These settings should be pretty similar to the following files:: - - $(tutor config printroot)/env/apps/openedx/tutor/lms/development.py - $(tutor config printroot)/env/apps/openedx/tutor/cms/development.py - -Alternatively, the ``mysettings.py`` files can import the tutor development settings:: - - # Beginning of mysettings.py - from .tutor.development import * - -You should then specify the settings to use on the host:: - - export TUTOR_EDX_PLATFORM_SETTINGS=mysettings - -From then on, all ``dev`` commands will use the ``mysettings`` module. For instance:: - - tutor dev runserver lms - Running edx-platform unit tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 8c07a9b..e786bc1 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -97,15 +97,6 @@ This might occur when you run a ``paver`` command. ``/dev/null`` eats the actual The error produced should help you better understand what is happening. -"ValueError: Unable to configure handler 'local'" ---------------------------------------------------- - -:: - - ValueError: Unable to configure handler 'local': [Errno 2] No such file or directory - -This will occur if you try to run a development environment without patching the LOGGING configuration, as indicated in the `development_` section. Maybe you correctly patched the development settings, but they are not taken into account? For instance, you might have correctly defined the ``TUTOR_EDX_PLATFORM_SETTINGS`` environment variable, but ``paver`` uses the ``devstack`` settings (which does not patch the ``LOGGING`` variable). This is because calling ``paver lms --settings=development`` or ``paver cms --settings=development`` ignores the ``--settings`` argument. Yes, it might be considered an edx-platform bug... Instead, you should run the ``update_assets`` and ``runserver`` commands, as explained above. - The chosen default language does not display properly ----------------------------------------------------- diff --git a/docs/tutorials/edx-platform-settings.rst b/docs/tutorials/edx-platform-settings.rst index 54e8ec5..e3c5cf2 100644 --- a/docs/tutorials/edx-platform-settings.rst +++ b/docs/tutorials/edx-platform-settings.rst @@ -1,9 +1,4 @@ Modifying ``edx-platform`` settings ----------------------------------- -The default settings module loaded by ``edx-platform`` is ``tutor.production`` in production and ``tutor.development`` in development. The folders ``$(tutor config printroot)/env/apps/openedx/settings/lms`` and ``$(tutor config printroot)/env/apps/openedx/settings/cms`` are mounted as ``edx-platform/lms/envs/tutor`` and ``edx-platform/cms/envs/tutor`` inside the docker containers. Thus, to use your own settings, you must do two things: - -1. Copy your settings files for the lms and the cms to ``$(tutor config printroot)/env/apps/openedx/settings/lms/mysettings.py`` and ``$(tutor config printroot)/env/apps/openedx/settings/cms/mysettings.py``. -2. Load your settings by adding ``TUTOR_EDX_PLATFORM_SETTINGS=tutor.mysettings`` to ``$(tutor config printroot)/env/local/.env``. - -Of course, your settings should be compatible with the docker installation. You can get some inspiration from the ``production.py`` settings modules generated by Tutor, or just import it as a base by adding ``from .production import *`` at the top of ``mysettings.py``. +The default settings module loaded by ``edx-platform`` is ``tutor.production`` in production and ``tutor.development`` in development. The folders ``$(tutor config printroot)/env/apps/openedx/settings/lms`` and ``$(tutor config printroot)/env/apps/openedx/settings/cms`` are mounted as ``edx-platform/lms/envs/tutor`` and ``edx-platform/cms/envs/tutor`` inside the docker containers. To modify these settings you must create a plugin that implements one or more of the patch statements in those setting files. See the :ref:`plugin_development_tutorial` tutorial for more information on how to create a plugin. diff --git a/tutor/templates/dev/docker-compose.yml b/tutor/templates/dev/docker-compose.yml index c984398..7b2041d 100644 --- a/tutor/templates/dev/docker-compose.yml +++ b/tutor/templates/dev/docker-compose.yml @@ -9,7 +9,7 @@ x-openedx-service: args: APP_USER_ID: "{{ HOST_USER_ID }}" environment: - SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.development} + SETTINGS: tutor.development volumes: # Settings & config - ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro diff --git a/tutor/templates/local/docker-compose.jobs.yml b/tutor/templates/local/docker-compose.jobs.yml index a691bdc..53f1f83 100644 --- a/tutor/templates/local/docker-compose.jobs.yml +++ b/tutor/templates/local/docker-compose.jobs.yml @@ -9,7 +9,7 @@ services: image: {{ DOCKER_IMAGE_OPENEDX }} environment: SERVICE_VARIANT: lms - SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production} + SETTINGS: tutor.production volumes: - ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro - ../apps/openedx/settings/cms:/openedx/edx-platform/cms/envs/tutor:ro @@ -20,7 +20,7 @@ services: image: {{ DOCKER_IMAGE_OPENEDX }} environment: SERVICE_VARIANT: cms - SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production} + SETTINGS: tutor.production volumes: - ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro - ../apps/openedx/settings/cms:/openedx/edx-platform/cms/envs/tutor:ro diff --git a/tutor/templates/local/docker-compose.yml b/tutor/templates/local/docker-compose.yml index b5c97d3..16aaf67 100644 --- a/tutor/templates/local/docker-compose.yml +++ b/tutor/templates/local/docker-compose.yml @@ -105,7 +105,7 @@ services: environment: SERVICE_VARIANT: lms UWSGI_WORKERS: {{ OPENEDX_LMS_UWSGI_WORKERS }} - SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production} + SETTINGS: tutor.production restart: unless-stopped volumes: - ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro @@ -136,7 +136,7 @@ services: environment: SERVICE_VARIANT: cms UWSGI_WORKERS: {{ OPENEDX_CMS_UWSGI_WORKERS }} - SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production} + SETTINGS: tutor.production restart: unless-stopped volumes: - ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro @@ -169,7 +169,7 @@ services: image: {{ DOCKER_IMAGE_OPENEDX }} environment: SERVICE_VARIANT: lms - SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production} + SETTINGS: tutor.production command: celery worker --app=lms.celery --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild=100 --exclude-queues=edx.cms.core.default restart: unless-stopped volumes: @@ -187,7 +187,7 @@ services: image: {{ DOCKER_IMAGE_OPENEDX }} environment: SERVICE_VARIANT: cms - SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production} + SETTINGS: tutor.production command: celery worker --app=cms.celery --loglevel=info --hostname=edx.cms.core.default.%%h --maxtasksperchild 100 --exclude-queues=edx.lms.core.default restart: unless-stopped volumes: