Skip to content

Devstack guide (Tutor)

Setup

Setting up a devstack is documented in OpenCraft's onboarding course in the "Setting up a master devstack using Tutor" unit, as well as in "Setting up named release devstack using Tutor".

Tutor devstack cheatsheet

See Using Tutor for Open edX development for the official documentation. Here's a cheatsheet of some additional useful commands that aren't necessarily listed there:

Reset and refresh everything

1
2
tutor config save
tutor dev launch -I

Run migrations

1
tutor dev exec lms ./manage.py lms migrate

Rebuild static assets

1
tutor dev exec lms npm run build-dev

Access Meilisearch

You can access the UI at meilisearch.local.openedx.io:7700 using the API key that you get from tutor config printvalue MEILISEARCH_API_KEY.

Access container as root

e.g. if you need to install a package into a Tutor container, using apt-get:

1
tutor dev exec --user root lms bash

Running edx-platform Python tests

Run all CMS tests:

1
tutor dev exec -e DJANGO_SETTINGS_MODULE=cms.envs.tutor.test cms pytest

Run specific CMS tests (content_libraries in this case):

1
tutor dev exec -e DJANGO_SETTINGS_MODULE=cms.envs.tutor.test cms pytest openedx/core/djangoapps/content_libraries/

Run all LMS tests:

1
tutor dev exec -e DJANGO_SETTINGS_MODULE=lms.envs.tutor.test lms pytest
As with cms, you can add an additional parameter to run only specific tests, or specify any other pytest options.

Running "Karma" JS tests

See this PR's description if you need to run the edx-platform "JS" tests locally.