Tutor: Developing with Course Discovery
prerequisite: have edx-plaform setup w/ tutor-nightly
Setup Steps
To avoid issues with changing the tutor config I recommend stopping all services
tutor dev stop
Full installation of tutor-nightly should already include the nightly release of the discovery plugin
run
tutor plugins list
to verify
Enable the discovery plugin
tutor plugins enable discovery
Rebuild your tutor config
tutor config save
Run setup. This will handle database access, migrations, DOT application setup, sync courses etc
tutor dev init -l discovery
(needs fix) the final step to run
refresh_course_metadata
will fail this can be fixed after the factthis might fail the first time you run it due to the LMS and/or mysql still spinning up. Just repeat the command again and it should go through.
if you want to dig into the scripts see https://github.com/overhangio/tutor-discovery/tree/master/tutordiscovery/templates/discovery/hooks
we may want to look into the new plugin api before fixing this
Create a superuser to gain access to Django admin
tutor dev run discovery ./manage.py createsuperuser
you should be able to log in with your superuser at http://discovery.local.overhang.io:8381/admin
to use your existing LMS user via OAuth visit the /login page. You will need your superuser to make yourself staff in django admin.
(needs fix) Disable production site configuration
Init script will create two site configurations, the non-dev one won’t work locally so I recommend disabling it.
http://local.overhang.io:8000/admin/site_configuration/siteconfiguration/
keep=
local.overhang.io:8000
disable=
local.overhang.io
Running the Service with Local Checkout
Make sure any running discovery container is stopped
tutor dev stop
Install requirements based on local checkout
tutor dev run --mount=discovery:/path/to/course-discovery:/openedx/discovery discovery bash tutor dev run discovery make requirements
Start with --mount option
Running Cache Programs
make sure the lms service user has the correct permissions
(needs fix) init does not create a user with correct perms
run cache_programs