Last active
August 29, 2015 14:14
-
-
Save singingwolfboy/5732051761f876c207ba to your computer and use it in GitHub Desktop.
Open edX: Migrate Aspen to Birch RC2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is for devstack | |
INTERACTIVE=true | |
while getopts "y" opt; do | |
case "$opt" in | |
y) | |
INTERACTIVE=false | |
esac | |
done | |
if [ "$INTERACTIVE" = true ] ; then | |
cat <<"EOM" | |
WARNING WARNING WARNING WARNING WARNING | |
The Birch release of Open edX depends on MySQL 5.6 and MongoDB 2.6.4. | |
The Aspen release of Open edX depended on MySQL 5.5 and MongoDB 2.4.7. | |
Please make sure that you have already upgraded MySQL and MongoDB | |
before continuing. | |
If MySQL or MongoDB are not at the correct version, this script will | |
attempt to automatically upgrade them for you. However, this process | |
can fail, and IT RUNS THE RISK OF CORRUPTING ALL YOUR DATA. | |
Here there be dragons. | |
.> )\;`a__ | |
( _ _)/ /-." ~~ | |
`( )_ )/ | |
<_ <_ | |
Once you have verified that your MySQL and MongoDB versions are correct, | |
or you have decided to risk the automatic upgrade process, type "yes" | |
followed by enter to continue. Otherwise, press ctrl-c to quit. You can | |
also run this script with the -y flag to skip this check. | |
Do you wish to proceed? | |
EOM | |
read input | |
if [ "$input" != "yes" -a "$input" != "y" ]; then | |
echo "Quitting" | |
exit 1 | |
fi | |
fi | |
TEMPDIR=`mktemp -d` | |
chmod 777 $TEMPDIR | |
cd $TEMPDIR | |
git clone https://github.com/edx/configuration.git --depth=1 --single-branch --branch=named-release/birch/rc | |
echo "edx_platform_version: named-release/birch.rc3" >> vars.yml | |
echo "ora2_version: named-release/birch.rc3" >> vars.yml | |
echo "certs_version: named-release/birch.rc3" >> vars.yml | |
echo "forum_version: named-release/birch.rc3" >> vars.yml | |
echo "xqueue_version: named-release/birch.rc3" >> vars.yml | |
cd configuration/playbooks | |
sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook -i localhost, -c local vagrant-devstack.yml -e "@../../vars.yml" | |
cd / | |
rm -rf $TEMPDIR | |
echo "Migration complete. Please reboot your machine." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is for fullstack | |
INTERACTIVE=true | |
while getopts "y" opt; do | |
case "$opt" in | |
y) | |
INTERACTIVE=false | |
esac | |
done | |
if [ "$INTERACTIVE" = true ] ; then | |
cat <<"EOM" | |
WARNING WARNING WARNING WARNING WARNING | |
The Birch release of Open edX depends on MySQL 5.6 and MongoDB 2.6.4. | |
The Aspen release of Open edX depended on MySQL 5.5 and MongoDB 2.4.7. | |
Please make sure that you have already upgraded MySQL and MongoDB | |
before continuing. | |
If MySQL or MongoDB are not at the correct version, this script will | |
attempt to automatically upgrade them for you. However, this process | |
can fail, and IT RUNS THE RISK OF CORRUPTING ALL YOUR DATA. | |
Here there be dragons. | |
.> )\;`a__ | |
( _ _)/ /-." ~~ | |
`( )_ )/ | |
<_ <_ | |
Once you have verified that your MySQL and MongoDB versions are correct, | |
or you have decided to risk the automatic upgrade process, type "yes" | |
followed by enter to continue. Otherwise, press ctrl-c to quit. You can | |
also run this script with the -y flag to skip this check. | |
Do you wish to proceed? | |
EOM | |
read input | |
if [ "$input" != "yes" -a "$input" != "y" ]; then | |
echo "Quitting" | |
exit 1 | |
fi | |
fi | |
sudo /edx/bin/supervisorctl stop all | |
TEMPDIR=`mktemp -d` | |
chmod 777 $TEMPDIR | |
cd $TEMPDIR | |
git clone https://github.com/edx/configuration.git --depth=1 --single-branch --branch=named-release/birch/rc | |
echo "edx_platform_version: named-release/birch.rc3" >> vars.yml | |
echo "ora2_version: named-release/birch.rc3" >> vars.yml | |
echo "certs_version: named-release/birch.rc3" >> vars.yml | |
echo "forum_version: named-release/birch.rc3" >> vars.yml | |
echo "xqueue_version: named-release/birch.rc3" >> vars.yml | |
cd configuration/playbooks | |
sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook -i localhost, -c local vagrant-fullstack.yml -e "@/edx/app/edx_ansible/server-vars.yml" -e "@../../vars.yml" | |
cd / | |
rm -rf $TEMPDIR | |
echo "Migration complete. Please reboot your machine." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here could be an error with git version apt-get install git, update it and can countinue.