- Docker: v18.06.0+
- Docker Compose: v1.22.0+
- Ports 80 and 443 should be open
- Hardware:
- Minimum configuration: 4 GB RAM, 2 CPU, 8 GB disk space
- Recommended configuration: 8 GB RAM, 4 CPU, 25 GB disk space
- Other requirements:
sudo apt install python3 python3-pip libyaml-dev
There are 2 ways to install Tutor:
- Install with pip:
Or download the pre-compiled binary and place thepip install "tutor[full]==v13.3.0"
tutor
executable in your path:sudo curl -L "https://github.com/overhangio/tutor/releases/download/v13.3.0/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor sudo chmod 0755 /usr/local/bin/tutor
- Run
tutor local quickstart
- Answer a few questions
- And Open edX is installed!
-
tutor local help
-
tutor local stop tutor local start -d tutor local restart tutor local restart lms
-
# Change lms with the service name for which you want to check logs tutor local logs lms -f --tail 100
-
(tutor config printroot)/data/lms/logs/tracking.log (tutor config printroot)/data/cms/logs/tracking.log
-
tutor local status
-
tutor local createuser --staff --superuser -pedx edx [email protected]
-
tutor local importdemocourse
-
# For first time only git clone https://github.com/jramnai/mytheme.git cp -r /home/ubuntu/mytheme "$(tutor config printroot)/env/build/openedx/themes/" tutor local settheme mytheme # If there is some change in `mytheme` cd mytheme git pull origin main rm -rf "$(tutor config printroot)/env/build/openedx/themes/mytheme" cp -r /home/ubuntu/mytheme "$(tutor config printroot)/env/build/openedx/themes/" tutor local settheme mytheme
-
Running management commands, find some useful management commands here
tutor local run cms ./manage.py cms reindex_course --all --setup --settings tutor.production tutor local run lms ./manage.py lms compile_sass --settings tutor.production
-
tutor local exec lms reload-uwsgi
-
# replace lms with your service/container name tutor local exec lms bash tutor local exec mysql bash
-
# For first time only cd $(tutor config printroot)/env/build/openedx/requirements/ git clone https://github.com/jramnai/my_package.git echo "-e ./my_package" >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt" tutor images build openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/jramnai/edx-platform.git --build-arg EDX_PLATFORM_VERSION=open-release/maple.master tutor local stop tutor local start -d # If there is some change in `my_package` cd $(tutor config printroot)/env/build/openedx/requirements/my_package git pull origin main tutor images build openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/jramnai/edx-platform.git --build-arg EDX_PLATFORM_VERSION=open-release/maple.master tutor local stop tutor local start -d
or simple
echo "git+https://github.com/open-craft/xblock-pdf@b4e404b1f94ffab15c52de5c1382d61235cd8c81#egg=xblock-pdf==1.1.0" >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt" tutor images build openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/jramnai/edx-platform.git --build-arg EDX_PLATFORM_VERSION=open-release/maple.master tutor local stop tutor local start -d
-
cat "$(tutor config printroot)/config.yml"
-
tutor config save --set PARAM1=VALUE1 --set PARAM2=VALUE2
-
tutor config printvalue OPENEDX_COMMON_VERSION
-
tutor images build openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/jramnai/edx-platform.git --build-arg EDX_PLATFORM_VERSION=open-release/maple.master or tutor images build openedx --no-cache --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/jramnai/edx-platform.git --build-arg EDX_PLATFORM_VERSION=open-release/maple.master
-
pip install tutor-myapp tutor plugins enable myapp tutor local quickstart
-
tutor plugins list
-
tutor plugins enable myplugin tutor plugins disable myplugin tutor config save
-
tutor plugins printroot
-
- Check connectivity
telnet smtp.gmail.com 587
- Disable Tutor SMTP server
tutor config save --set RUN_SMTP=false
- Configure SMTP credentials
tutor config save \ --set SMTP_HOST=smtp.gmail.com \ --set SMTP_PORT=587 \ --set SMTP_USE_SSL=false \ --set SMTP_USE_TLS=true \ --set [email protected] \ --set SMTP_PASSWORD='YOURPASSWORD'
- Restart your platform
tutor local quickstart
- Test it
tutor local run --no-deps lms ./manage.py lms shell -c \ "from django.core.mail import send_mail; send_mail('test subject', 'test message', '[email protected]', ['[email protected]'])"
- Check connectivity
-
tutor local exec \ -e USERNAME="$(tutor config printvalue MYSQL_ROOT_USERNAME)" \ -e PASSWORD="$(tutor config printvalue MYSQL_ROOT_PASSWORD)" \ mysql sh -c 'mysqldump --all-databases --user=$USERNAME --password=$PASSWORD > /var/lib/mysql/dump.sql' tutor local exec mongodb mongodump --out=/data/db/dump.mongodb
The
dump.sql
anddump.mongodb
files will be located in$(tutor config printroot)/data/mysql
and$(tutor config printroot)/data/mongodb
. -
- Create plugins root folder
mkdir -p "$(tutor plugins printroot)"
- Create an empty “myplugin.py” file in this folder
touch "$(tutor plugins printroot)/myplugin.py"
- Verify plugin is correctly detected
tutor plugins list
- Add content in myplugin.py file (the setting which you want to set/modify)
from tutor import hooks hooks.Filters.ENV_PATCHES.add_item( ( "openedx-common-settings", """ X_FRAME_OPTIONS = "ALLOWALL" """ ) )
- Enable the myplugin
tutor plugins enable myplugin
- Re-render your environment
tutor config save
- Restart the platform
tutor local restart
- Create plugins root folder
Where you have
tutor local importdemocourse
it should be
tutor local do importdemocourse
Thanks for writing this doc!