Commit 41f4aa25 by Ned Batchelder

Add two more management commands, and make manage.py invocation uniform

parent 19e01278
...@@ -84,6 +84,11 @@ if [[ $CONFIGURATION == none ]]; then ...@@ -84,6 +84,11 @@ if [[ $CONFIGURATION == none ]]; then
exit 1 exit 1
fi fi
APPUSER=edxapp
if [[ $CONFIGURATION == fullstack ]] ; then
APPUSER=www-data
fi
# Birch details # Birch details
if [[ $TARGET == *birch* && $INTERACTIVE == true ]] ; then if [[ $TARGET == *birch* && $INTERACTIVE == true ]] ; then
...@@ -204,7 +209,7 @@ EOF ...@@ -204,7 +209,7 @@ EOF
make_config_venv make_config_venv
# Need to get rid of South from edx-platform, or things won't work. # Need to get rid of South from edx-platform, or things won't work.
sudo -u edxapp /edx/app/edxapp/venvs/edxapp/bin/pip uninstall -y South sudo -u $APPUSER /edx/bin/pip.edxapp uninstall -y South
echo "Upgrading to the beginning of Django 1.8" echo "Upgrading to the beginning of Django 1.8"
cd configuration/playbooks/vagrant cd configuration/playbooks/vagrant
...@@ -221,10 +226,8 @@ EOF ...@@ -221,10 +226,8 @@ EOF
echo "Running the Django 1.8 faked migrations" echo "Running the Django 1.8 faked migrations"
for item in lms cms; do for item in lms cms; do
sudo -u edxapp \ sudo -u $APPUSER -E /edx/bin/python.edxapp \
/edx/app/edxapp/venvs/edxapp/bin/python \ /edx/bin/manage.edxapp $item migrate --settings=aws --noinput --fake-initial
/edx/app/edxapp/edx-platform/manage.py $item migrate \
--settings=aws --noinput --fake-initial
done done
if [[ $CONFIGURATION == fullstack ]] ; then if [[ $CONFIGURATION == fullstack ]] ; then
...@@ -235,6 +238,13 @@ EOF ...@@ -235,6 +238,13 @@ EOF
--settings=xqueue.aws_settings --noinput --fake-initial --settings=xqueue.aws_settings --noinput --fake-initial
fi fi
echo "Running fix-up management commands"
sudo -u $APPUSER -E /edx/bin/python.edxapp \
/edx/bin/manage.edxapp lms --settings=aws generate_course_overview --all
sudo -u $APPUSER -E /edx/bin/python.edxapp \
/edx/bin/manage.edxapp lms --settings=aws post_cohort_membership_fix --commit
# Run the forums migrations again to catch things made while this script # Run the forums migrations again to catch things made while this script
# was running. # was running.
mongo cs_comments_service migrate-008-context.js mongo cs_comments_service migrate-008-context.js
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment