- These instructions are WIP.
- These instructions are currently specific to Mac OS.
This proof-of-concept Tutor config depends on a separate marketing frontend running at edly.io:8888
. See the gym-eleventy repo for specific instructions on running locally it using the netlify CLI.
- Install direnv
brew install direnv
Be sure to add the relevant hook to your shell: https://direnv.net/docs/hook.html
- Install Tutor Version Manager
pip install git+https://github.com/eduNEXT/tvm.git
- Install the Tutor version you wish to use.
tvm install v17.0.1
- Create a main directory to house your tutor configs (for example
your-home folder/dev/tutor/
), ideally one that you can find easily via CLI.
mkdir ~/tutor
- Create a new TVM project Please note the project title cannot include periods, lest TVM puke. In this case, TVM will automatically create a new directory for you.
tvm project init quince_1 v17.0.1
- enter the directory:
cd quince_1
- Activate the environment:
source .tvm/bin/activate
Test this by confirming your Tutor root:
echo $TUTOR_ROOT
The output should match the directory you're in.
- Run tutor once to ensure it is set up properly
tutor local launch
Once you've confirmed it's running successfully, let's go about implementing the customizations:
- Stop Tutor:
tutor local stop
- Clone the this repo into the directory
git init .
git remote add origin https://github.com/gymnasium/gym-custom-tutor-config
git pull origin gym.quince.1 --recurse-submodules
The following commands should be executed from the project root folder. Make sure your static site is running at port 8888.
On first install, run the following to install packages for our customized Tutor:
git submodule update --init --recursive
pip install -U -r requirements.txt
Install our custom plugins (from the project root)
pip install -e plugins/gym-theme
pip install -e plugins/gym-mfe
Then, enable the plugins:
tutor plugins enable gym-mfe gym-theme
Save the config again:
tutor config save
Then to run in dev mode, make sure 11ty is running in local
mode: npm run local
, and available at http://edly.io:8888
.
tutor config save
Build dev images
tutor images build openedx-dev --no-cache --no-registry-cache
tutor images build account-dev --no-cache --no-registry-cache
tutor images build authn-dev --no-cache --no-registry-cache
tutor images build course-about-dev --no-cache --no-registry-cache
tutor images build course-authoring-dev --no-cache --no-registry-cache
tutor images build discussions-dev --no-cache --no-registry-cache
tutor images build learner-dashboard-dev --no-cache --no-registry-cache
tutor images build learning-dev --no-cache --no-registry-cache
tutor images build profile-dev --no-cache --no-registry-cache
Since dev uses bind mounts in the config, you'll need to go to each MFE folder and run:
nvm use
npm install
###n Start Tutor in Dev Mode Theoretically, you should be able to:
tutor dev launch
This is to run tutor in "production" mode.
Make sure eleventy is running in tutor:local
mode: npm run tutor:local
.
Disable development course-about plugin:
tutor plugins disable course-about-mfe
Enable production course-about plugin:
tutor plugins enable course-about-mfe-prod
tutor images build openedx --no-cache --no-registry-cache
tutor images build mfe --no-cache --no-registry-cache
And then:
tutor local launch
tutor dev do settheme gym-theme
tutor dev restart openedx
Subsequently, start up as follows:
git submodule update --recursive --remote
tutor config save
tutor dev launch
Start/stop services with:
tutor dev start
tutor dev stop
- Marketing site: http://edly.io:8888
- LMS: http://local.edly.io:8000
- Studio: http://local.edly.io:8001
- Account: http://apps.local.edly.io:1997/account/
- Authn: http://apps.local.edly.io:1999/authn/
- Course About: http://apps.local.edly.io:3000/courses/{course-id}/about
- Learning (Courseware): http://apps.local.edly.io:2000/learning/course/{course-id}/home
- Profile: http://apps.local.edly.io:1995/profile/u/{username}
- Marketing site: http://edly.io:8888
- LMS: http://local.edly.io
- Studio: http://studio.local.edly.io
- Account: http://apps.local.edly.io/account/
- Course About: http://apps.local.edly.io/courses/{course-id}/about
- Learning (Courseware): http://apps.local.edly.io/learning/course/{course-id}/home
- Profile: http://apps.local.edly.io/profile/u/{username}
tutor dev do createuser --staff --superuser admin admin@example.com
To run an MFE in development mode, you would need to clone it and to mount its directory
Assuming you need to modify frontend-app-account
.
- Clone it if it's not already
- from within the MFE directory,
npm install
make sure you are on the correct node versionnode --version
it shall matchcat .nvmrc
- from the tutor root directory,
tutor mounts add "./mfe/frontend-app-account"
.
The following is an example of overriding a header
- Clone it if it's not already
npm install
make sure you are on the correct node versionnode --version
it shall matchcat .nvmrc
- Mount the pkg to the container
tutor mounts add "account:./mfe/frontend-component-header:/openedx/frontend-component-header"
scheme:service:host_path:containter_path
- Mount the
module.config.js
file, assuming it'smfe/
,tutor mounts add account:./mfe/module.config.js:/openedx/app/module.config.js
- then run
npm install
Note: in step 2 we run it inside header, now inside account mfe - Similar to adding the header we can also add other pkgs, like footer, brand, paragon...etc.
If you want to test the MFEs in a production like environment (e.g. the platform root page will be replaced by the Home MFE application) you can do so by running:
tutor images build mfe
tutor local start mfe caddy
tutor local run cms ./manage.py cms reindex_course --all
tutor local run cms ./manage.py cms backfill_course_outlines
tutor local run cms ./manage.py cms backfill_course_tabs
tutor local run cms ./manage.py cms backfill_course_end_dates