Up to this point, you have a vanilla (plain vanilla) Open edX installation running. Now, it's time to make it the Sherab platform by applying our custom theme, custom core platform, and plugins.
Before we begin, ensure your python virtual environment is active, and confirm your tutor version is currently 21.0.1 (Ulmo).
tutor --versionWe need to clone our custom CSS/UI repo into Tutor's theme directory.
- Change into the correct directory:
cd "$(tutor config printroot)/env/build/openedx/themes"
- Clone the theme repository from GitHub:
git clone https://github.com/OpenPecha/Sherab-theme.git
The edx-platform is the massive core codebase for Open edX.
- Navigate back to the Tutor "root" directory:
cd "$(tutor config printroot)"
- Clone our custom edx-platform:
(The
git clone --depth=1 -b sherab-dev https://github.com/Esukhia/edx-platform.git
--depth=1flag saves you hundreds of megabytes by not downloading the entire history.) - "Mount" the platform. This tells Tutor to look at your folder instead of its internal code!
tutor mounts add ./edx-platform
tutor dev launchThis will now use your custom edx-platform and theme.
We have specific Feature Flags and configurations required.
-
Create a folder for local tutor plugins inside the tutor root directory:
mkdir tutor-plugins cd tutor-plugins -
Create a file named
configuration_plugin.ymlin this folder (you can usenano configuration_plugin.ymlin your terminal): (Copy this configuration exactly as is. Do not modify this unless instructed.)name: configuration_plugin version: 0.0.1 patches: openedx-lms-common-settings: | FEATURES['ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER'] = False FEATURES['CUSTOM_COURSES_EDX'] = True FEATURES['ENABLE_CHANGE_USER_PASSWORD_ADMIN'] = True FEATURES['ENABLE_SPECIAL_EXAMS'] = True FEATURES['MILESTONES_APP'] = True FEATURES['ENABLE_PREREQUISITE_COURSES'] = True FEATURES['ENABLE_DISCUSSION_HOME_PANEL'] = True FEATURES['ENABLE_DISCUSSION_EMAIL_DIGEST'] = True FEATURES['ENABLE_ACCOUNT_DELETION'] = False FEATURES['CUSTOM_CERTIFICATE_TEMPLATES_ENABLED'] = True FEATURES['SHOW_HEADER_LANGUAGE_SELECTOR'] = True FEATURES['SHOW_FOOTER_LANGUAGE_SELECTOR'] = False FEATURES['ORGANIZATIONS_APP'] = True FEATURES['ENABLE_COURSE_DISCOVERY'] = True FEATURES['ENABLE_EXTENDED_COURSE_DETAILS'] = True FEATURES['ENABLE_COSMETIC_DISPLAY_PRICE'] = True FEATURES['COURSE_PRODUCT_FALLBACK_URL'] = 'http://localhost:8080/' DEFAULT_FROM_EMAIL = "contact@sherab.org" CONTACT_EMAIL = "contact@sherab.org" DEFAULT_FEEDBACK_EMAIL = "contact@sherab.org" TECH_SUPPORT_EMAIL = "contact@sherab.org" COMMUNITY_FORUM_URL = "" SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True openedx-cms-common-settings: | FEATURES['ENABLE_SPECIAL_EXAMS'] = True FEATURES['MILESTONES_APP'] = True FEATURES['ENABLE_PREREQUISITE_COURSES'] = True FEATURES['ALLOW_PUBLIC_ACCOUNT_CREATION'] = False FEATURES['ENABLE_EXTENDED_COURSE_DETAILS'] = True ENABLE_CUSTOM_COURSE_CONFIG = True DEFAULT_FROM_EMAIL = "contact@sherab.org" CONTACT_EMAIL = "contact@sherab.org" DEFAULT_FEEDBACK_EMAIL = "contact@sherab.org" TECH_SUPPORT_EMAIL = "contact@sherab.org" DEFAULT_MOBILE_AVAILABLE = True GOOGLE_SHEETS_CREDENTIALS_FILE = "****************" GOOGLE_SHEETS_SPREADSHEET_ID = "****************" GOOGLE_SHEETS_SHEET_NAME = "****************" FEATURES['ENABLE_VIDEO_UPLOAD_PIPELINE'] = True FEATURES['AUTO_REGISTER_SOURCE_VIDEO'] = True
-
Create the
mount_python_package.pyfile to automatically register our next plugin:from tutor import hooks hooks.Filters.MOUNTED_DIRECTORIES.add_item( ("openedx", "sherab-custom-plugin") )
The actual backend Python logic specific to Sherab lives in sherab-custom-plugin.
- Go back to Tutor Root:
cd "$(tutor config printroot)"
- Clone the plugin (this contains features like wishlists):
git clone https://github.com/OpenPecha/sherab-custom-plugin.git
- Mount it to Tutor:
tutor mounts add ./sherab-custom-plugin
Let's make sure Tutor sees all of this.
- Check your mounts. You should see both
edx-platformandsherab-custom-plugin.tutor mounts list
- Enable our configuration plugin we made in step 5:
tutor plugins enable configuration_plugin
Because we fundamentally changed the codebase and settings, we must rebuild the Docker image from scratch.
- Rebuild the Open edX Docker container image (this will take time):
tutor images build openedx --no-cache
- Shut down the old version and launch the new one:
(
tutor dev stop tutor dev start -d
-druns it in detached mode so you get your terminal back).
Sometimes python packages fail to attach. Let's physically check the docker container!
- Find the LMS container ID.
(Look for something named
docker ps
tutor_dev_lms_1or similar. Copy the ID under theCONTAINER IDcolumn). - Enter the container:
docker exec -it <your_container_id> bash
- Check if python successfully installed the plugin package:
(If you see
pip list | grep sherabsherab-custom-pluginlisted, it worked!) - IF IT IS NOT INSTALLED: Manually install it via the mount directory.
(If it says folder not found, double check it by running
# Inside the docker container pip install -e /mnt/sherab-custom-plugincd /mnt && ls) - Exit the container back to your machine terminal:
exit
Let's turn the website from default branding to Sherab.
- Apply the theme via Tutor:
tutor dev do settheme Sherab-theme - Restart once more:
tutor dev restart
🎉 You are completely done setting up the core Backend & Database!
Next Step: Are you working on the frontend parts (like dashboards and learner portals)? If so, head to 03-mounting-frontend-mfe.md. If you're setting up eCommerce, head to 04-sherab-ecommerce-setup.md.