Skip to main content

A Tutor plugin for course discovery, the Open edX service for providing access to consolidated course and program metadata

Project description

This is a plugin for Tutor that integrates the Course Discovery application in an Open edX platform. it is useful for integration with, for example, Ecommerce or an external course catalog.


This plugin requires tutor>=3.6.0. If you have installed tutor from a pre-compiled binary, it already comes bundled with the discovery plugin. Otherwise:

pip install tutor-discovery

Then, to enable this plugin, run:

tutor plugins enable discovery

You will have to re-generate the environment:

tutor config save

Then, run migrations:

tutor local init

This last step is unnecessary if you run instead tutor local launch.


Creating a user

The discovery user interface will be available at for a local test instance, and at DISCOVERY_HOST (by default: http(s)://discovery.<your lms host>) in production. In order to run commands from the UI, a user must be created:

tutor local run discovery ./ createsuperuser

Then, you must login with this user at

Alternatively, you can login with oauth2 using a pre-existing user created on the LMS/CMS by accessing http(s)://discovery.<your lms host>/login. To do so, the proper domain names must exist and point to the production server.

Index configuration

Discovery uses separate indices for different models (the names are: course, course_run, person and program by default). And you can overwrite theses names by configuring DISCOVERY_INDEX_OVERRIDES:

  course_discovery.apps.course_metadata.search_indexes.documents.course: your-course-index-name
  course_discovery.apps.course_metadata.search_indexes.documents.course_run: your-course-run-index-name
  course_discovery.apps.course_metadata.search_indexes.documents.person: your-person-index-name
  course_discovery.apps.course_metadata.search_indexes.documents.program: your-program-index-name

Re-indexing courses

tutor local run discovery ./ refresh_course_metadata --partner_code=openedx
tutor local run discovery ./ update_index --disable-change-limit

Caching programs

In order to cache programs in the LMS, you will need to manually create a catalog integration. This step should be performed just once:

tutor local run lms ./ lms create_catalog_integrations --enabled \
    --internal_api_url="" \


tutor local run lms ./ lms cache_programs

This last step should be performed every time you create new or make changes to existing programs.


To debug the course discovery service, you are encouraged to mount the course-discovery repo from the host in the development container:

tutor dev start –mount /path/to/course-discovery/ discovery

You can then access the development server at Feel free to add breakpoints (import pdb; pdb.set_trace()) anywhere in your source code to debug your application.

Once a local repository is mounted in the image, you will have to install nodejs dependencies and collect static assets:

tutor dev run discovery npm install --development
tutor dev run discovery make


This Tutor plugin is maintained by Régis Behmo from Overhang.IO. Community support is available from the official Open edX forum. Do you need help with this plugin? See the troubleshooting section from the Tutor documentation.

Max retries exceeded with url

When running in production with HTTPS enabled, you may face this error during the init phase of tutor local launch:

` requests.exceptions.ConnectionError: HTTPSConnectionPool(host='<LMS_HOST>', port=443): Max retries exceeded with url: /api/courses/v1/courses/?page=1&page_size=10&username=discovery `

This error may be due to an incorrect DNS resolution of the LMS DNS record. With some cloud providers (for instance: [DigitalOcean]( the /etc/hosts file on the host automatically contains the following entry: <LMS HOST>

This entry may be present if you named your server with the LMS hostname.


This work is licensed under the terms of the GNU Affero General Public License (AGPL).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tutor-discovery-15.0.0.tar.gz (10.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page