edX Managing the Production Stack - apigee/edx-configuration GitHub Wiki
NOTE: This is only for the production stack configuration, not for devstack.
login to the server and change to the /edx/app/edxapp/edx-platform directory to use manage.py
- list all manage.py commands -
sudo /edx/bin/python.edxapp ./manage.py lms --settings aws help - create a new user -
sudo /edx/bin/python.edxapp ./manage.py lms --settings aws create_user -e [email protected]
See help and help <cmd> for more information!
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf
you should see something like the following:
certs RUNNING pid 19862, uptime 0:00:04
discern RUNNING pid 19926, uptime 0:00:02
discern_celery RUNNING pid 19857, uptime 0:00:04
edxapp:cms RUNNING pid 19884, uptime 0:00:03
edxapp:lms RUNNING pid 19879, uptime 0:00:03
edxapp_worker:cms_default_4 RUNNING pid 19915, uptime 0:00:03
edxapp_worker:cms_high_1 RUNNING pid 19901, uptime 0:00:03
edxapp_worker:cms_low_3 RUNNING pid 19890, uptime 0:00:03
edxapp_worker:lms_default_3 RUNNING pid 19897, uptime 0:00:03
edxapp_worker:lms_high_4 RUNNING pid 19922, uptime 0:00:03
edxapp_worker:lms_high_mem_2 RUNNING pid 19894, uptime 0:00:03
edxapp_worker:lms_low_1 RUNNING pid 19908, uptime 0:00:03
forum RUNNING pid 19855, uptime 0:00:04
ora RUNNING pid 19875, uptime 0:00:04
ora_celery RUNNING pid 19866, uptime 0:00:04
xqueue RUNNING pid 19853, uptime 0:00:04
xqueue_consumer RUNNING pid 19860, uptime 0:00:04
xserver RUNNING pid 19854, uptime 0:00:04
- LMS/CMS -
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp: - Workers -
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp_worker:
Use the /edx/bin/update to update repo versions on the server.
Allowed repo names [cs_comments_service,ease,discern,xqueue,xserver,edx-platform,configuration,edx-ora]
Examples:
-
sudo /edx/bin/update edx-platform master- change edx-platform to use the latest on the master branch -
sudo /edx/bin/update cs_comments_service master- change the forums service to use the latest on the master branch
-
sudo rm -rf /edx/app/edxapp/edx-platform- change the remote you need to remove the existing edx-platform checkout - Add the following line to
/edx/etc/server-vars.yml-edx_platform_repo: "https://github.com/<user>/edx-platform.git" -
sudo /edx/bin/update edx-platform master- update edx-platform using the forked repo
To compile javascript and css outside of the update script run the following commands:
sudo -u edxapp bashsource /edx/app/edxapp/edxapp_envcd /edx/app/edxapp/edx-platformrake lms:gather_assets:awsrake cms:gather_assets:aws
Check to see if nginx is running:
sudo service nginx statussudo service nginx start
NGINX logs are located in /edx/var/log/nginx
NGINX configurations are located in /edx/app/nginx/sites-enabled
Check to see if the lms/cms is running
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf status edxapp:
Kill all webserver processes and restart
sudo nginx stopsudo supervisor stopsudo supervisor.devpi stopsudo pkill -u www-datasudo nginx startsudo supervisor startsudo supervisor.devpi start
- The production stack sends all application logs to rsyslog which writes config files to the
/edx/var/logdirectory. - Supervisor logs stderr and stdout, its logs are located in
/edx/var/log/supervisor