Created
March 22, 2017 19:50
-
-
Save efischer19/e5509f94a6fde57ea8be90de32a1296a to your computer and use it in GitHub Desktop.
Devstack reinstallation
This file contains hidden or 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
ericfischer@dhcp-18-189-111-194:~/scripts$ cat readme.txt | |
First, reset devstack: | |
. ./reset_devstack.sh | |
Then, install ora2 and copy some files into devstack: | |
. ./setup_devstack.sh | |
Then, install the newly cloned src repos locally: | |
vagrant ssh | |
sudo su edxapp | |
./ora2_reinstall.sh | |
exit | |
Then, install base requirements: | |
cd /edx/app/edxapp/edx-platform | |
. ./first_time_vagrant_user.sh | |
Then do some final edxapp setup: | |
sudo su edxapp | |
. ./first_time_edxapp.sh | |
There you go, ready to develop. | |
ericfischer@dhcp-18-189-111-194:~/scripts$ cat reset_devstack.sh | |
#!/bin/bash | |
echo 'Before running this command, ensure there are no running processes using port 8000' | |
echo 'If a process appears in the following command, quit this script and kill that, then run script again' | |
echo 'sudo lsof -i :8000' | |
sudo lsof -i :8000 | |
rm -rf ../devstack | |
mkdir ../devstack | |
curl -L https://raw.githubusercontent.com/edx/configuration/master/vagrant/release/devstack/Vagrantfile > Vagrantfile | |
cp VagrantFile ../devstack | |
cd ../devstack | |
vagrant plugin install vagrant-vbguest | |
vagrant up | |
cd ../scripts | |
ericfischer@dhcp-18-189-111-194:~/scripts$ cat setup_devstack.sh | |
#!/bin/bash | |
cp .bash_history ../devstack/edx-platform/ | |
cp .transifexrc ../devstack/edx-platform/ | |
cp ora2_* ../devstack/edx-platform/ | |
cp first_time_* ../devstack/edx-platform/ | |
cp test_db_reset.sh ../devstack/edx-platform/ | |
echo 'ora2_*.sh' >> ../devstack/edx-platform/.git/info/exclude | |
echo 'first_time_*.sh' >> ../devstack/edx-platform/.git/info/exclude | |
echo "test_db_reset.sh" >> ../devstack/edx-platform/.git/info/exclude | |
cd ../devstack/src/ | |
git clone https://github.com/edx/edx-ora2 | |
git clone [email protected]:edx/edx-submissions.git | |
cp ../../scripts/gitadd_ora2.sh edx-ora2/ | |
echo 'gitadd_ora2.sh' >> edx-ora2/.git/info/exclude | |
echo 'edx-ora2/' >> edx-ora2/.git/info/exclude | |
cd .. | |
ericfischer@dhcp-18-189-111-194:~/scripts$ cat ora2_reinstall.sh | |
#!/bin/bash | |
pip uninstall ora2 -y | |
pip uninstall edx-submissions -y | |
pip install -e /edx/src/edx-submissions | |
pip install -e /edx/src/edx-ora2 | |
ericfischer@dhcp-18-189-111-194:~/scripts$ cat ora2_env.sh | |
#!/bin/bash | |
cd /edx/src/edx-ora2 | |
source edx-ora2/bin/activate | |
export ORA_SANDBOX_URL=https://staff:[email protected] | |
export DISPLAY=:1 | |
ericfischer@dhcp-18-189-111-194:~/scripts$ cat first_time_vagrant_user.sh | |
#!/bin/bash | |
cd /edx/src/edx-ora2 | |
make install-sys-requirements | |
echo "/usr/lib/atlas-base" | sudo tee /etc/ld.so.conf.d/atlas-lib.conf | |
sudo ldconfig | |
ericfischer@dhcp-18-189-111-194:~/scripts$ cat first_time_edxapp.sh | |
#!/bin/bash | |
mv .transifexrc /edx/app/edxapp/ | |
mv .bash_history /edx/app/edxapp/ | |
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', '[email protected]', 'edx')" | ./manage.py lms --settings=devstack shell | |
cd /edx/src/edx-ora2 | |
virtualenv edx-ora2 | |
source edx-ora2/bin/activate | |
make install | |
export ORA_SANDBOX_URL=https://staff:[email protected] | |
export DISPLAY=:1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment