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 ...@@ -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 edxapp /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
...@@ -234,12 +237,9 @@ EOF ...@@ -234,12 +237,9 @@ EOF
/edx/app/xqueue/xqueue/manage.py migrate \ /edx/app/xqueue/xqueue/manage.py migrate \
--settings=xqueue.aws_settings --noinput --fake-initial --settings=xqueue.aws_settings --noinput --fake-initial
fi fi
# Run the forums migrations again to catch things made while this script
# was running.
mongo cs_comments_service migrate-008-context.js
fi fi
echo "Updating to final version of code"
cd configuration/playbooks cd configuration/playbooks
echo "edx_platform_version: $TARGET" > vars.yml echo "edx_platform_version: $TARGET" > vars.yml
echo "ora2_version: $TARGET" >> vars.yml echo "ora2_version: $TARGET" >> vars.yml
...@@ -252,6 +252,20 @@ sudo ansible-playbook \ ...@@ -252,6 +252,20 @@ sudo ansible-playbook \
--extra-vars="@vars.yml" \ --extra-vars="@vars.yml" \
$SERVER_VARS \ $SERVER_VARS \
vagrant-$CONFIGURATION.yml 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 / cd /
sudo rm -rf $TEMPDIR 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