Commit 445ad57d by Ned Batchelder

Merge pull request #2764 from edx/ned/two-more-management-commands

Add two more management commands, and make manage.py invocation uniform
parents 15b3e84e f1fecc4c
......@@ -84,6 +84,11 @@ if [[ $CONFIGURATION == none ]]; then
exit 1
fi
APPUSER=edxapp
if [[ $CONFIGURATION == fullstack ]] ; then
APPUSER=www-data
fi
# Birch details
if [[ $TARGET == *birch* && $INTERACTIVE == true ]] ; then
......@@ -204,7 +209,7 @@ EOF
make_config_venv
# 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 edxapp /edx/bin/pip.edxapp uninstall -y South
echo "Upgrading to the beginning of Django 1.8"
cd configuration/playbooks/vagrant
......@@ -221,10 +226,8 @@ EOF
echo "Running the Django 1.8 faked migrations"
for item in lms cms; do
sudo -u edxapp \
/edx/app/edxapp/venvs/edxapp/bin/python \
/edx/app/edxapp/edx-platform/manage.py $item migrate \
--settings=aws --noinput --fake-initial
sudo -u $APPUSER -E /edx/bin/python.edxapp \
/edx/bin/manage.edxapp $item migrate --settings=aws --noinput --fake-initial
done
if [[ $CONFIGURATION == fullstack ]] ; then
......@@ -234,12 +237,9 @@ EOF
/edx/app/xqueue/xqueue/manage.py migrate \
--settings=xqueue.aws_settings --noinput --fake-initial
fi
# Run the forums migrations again to catch things made while this script
# was running.
mongo cs_comments_service migrate-008-context.js
fi
echo "Updating to final version of code"
cd configuration/playbooks
echo "edx_platform_version: $TARGET" > vars.yml
echo "ora2_version: $TARGET" >> vars.yml
......@@ -252,6 +252,20 @@ sudo ansible-playbook \
--extra-vars="@vars.yml" \
$SERVER_VARS \
vagrant-$CONFIGURATION.yml
cd ../..
if [[ $TARGET == *dogwood* ]] ; then
echo "Running data fixup 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
# was running.
mongo cs_comments_service migrate-008-context.js
fi
cd /
sudo rm -rf $TEMPDIR
......
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