Custom Search

SUBSCRIBE

SUBSCRIBE : 300 + Free Video Tutorials Programming (Python, golang, Julia), DevOps

Wednesday, September 3, 2014

edx configuration


https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack

1)
Stop lms and cms

#sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf stop edxapp:

2)
Start lms and cms in debug mode

#sudo -u www-data /edx/bin/python.edxapp ./manage.py lms runserver 0.0.0.0:8000 --settings aws

Then goto http://ip-of-your-system:8000/

* Here "aws" is a setting. Please check /edx/app/edxapp/edx-platform/lms/envs/aws.py

3)
Get Help
#sudo -u www-data /edx/bin/python.edxapp ./manage.py --help

#sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws --help

4)
Location of staticfiles
#cd /edx/data/edxapp/staticfiles

5)
Location of edx-platform
#cd /edx/app/edxapp/edx-platform

6)
Location of lms configuration file
#vim /edx/app/edxapp/lms.env.json

7)
Location of manage.py
#vim /edx/app/edxapp/edx-platform/manage.py

8)
Location of "aws" settings
#vim /edx/app/edxapp/edx-platform/lms/envs/aws.py

* "aws.py" reads configuration file /edx/app/edxapp/lms.env.json
* Goto "/edx/app/edxapp/edx-platform/lms/envs" to see more settings.

9)
How to debug
* Open a *.py file and put a print statement there. OR use python debuggers like pdb and pudb.
Example:
#vim /edx/app/edxapp/edx-platform/lms/envs/aws.py

* Then run the server in debug mode

#sudo -u www-data /edx/bin/python.edxapp ./manage.py lms runserver 0.0.0.0:8000 --settings aws

10)
How to enable debug mode in selected setting
* Goto the settings file you selected. For example, if you given "--settings aws" in "runserver" command or if you are using "aws" setting, then goto /edx/app/edxapp/edx-platform/lms/envs/aws.py and make following flags "True" and restart the server

DEBUG = False
TEMPLATE_DEBUG = False


* Restart the server in debug mode using "./manage.py lms runserver".
#sudo -u www-data /edx/bin/python.edxapp ./manage.py lms runserver 0.0.0.0:8000 --settings aws

OR

* Restart the server in normal node
#sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:

11)
Location of supervisor configuration files
#cd /edx/app/supervisor/conf.d
cms.conf
edxapp.conf
lms.conf
workers.conf









No comments:

Post a Comment