Hi all,
I have been attempting to get the vagrant devstack working on windows 8.1 and I want to share my results so far.
The main problem when running the edx-platform on windows as the host OS are the symlinks on the shared folders. It is just not supported.
With this in mind I am doing the following workaround. The line endings are not a problem this time, because the git doing the pull int the one installed inside the machine.
First I start by using a modified Vagrant file which does not share the directories. I put it in a gist:
# empanada
# foccacia
Then I let vagrant run once through.
vagrant up
If anyone following this only wants to test drive the platform but not modify the code, then you could stop here, ssh into the machine and start the devstack It should work flawlessly.
Now my workaround is to copy all the code in a temp folder, then reload the vagrant configuration and this time do share the directories and copy the code back.
Steps:
vagrant ssh
mkdir /var/tmp/code_tmp
sudo chmod a+w /var/tmp/code_tmp
sudo su edxapp
mv /edx/app/edxapp/edx-platform /var/tmp/code_tmp/
#ctrl + D
sudo su forum
mv /edx/app/forum/cs_comments_service /var/tmp/code_tmp/
#ctrl + D
sudo su ora
mv /edx/app/ora/ora /var/tmp/code_tmp/
#ctrl + D
Exit the machine, and change the configuration:
vagrant halt
uncomment lines 63-64-65 from the Vagrantfile
vagrant up
# This time the provision will not run because it already has
# Now log in and copy the code back
sudo su edxapp
cp -r /var/tmp/code_tmp/edx-platform/* .
cp -r /var/tmp/code_tmp/edx-platform/.git* .
#ctrl + D
sudo su forum
cp -r /var/tmp/code_tmp/cs_comments_service/* .
cp -r /var/tmp/code_tmp/cs_comments_service/.git* .
#ctrl + D
sudo su ora
cp -r /var/tmp/code_tmp/ora/* .
cp -r /var/tmp/code_tmp/ora/.git* .
#ctrl + D
sudo su edxapp
# If you try to run now, most probably coffescript wont install, because it is on a shared unit, so install it in a directory belonging to the guest SO only.
npm install -g --prefix ~/node/
# And now two choices, either you add the installation of coffescript to your path, say
export PATH=/edx/app/edxapp/node/lib/node_modules/edx/node_modules/.bin/:$PATH
# and change lines 34 and 36 of assets.rake in edx-platform/rakelib/ to remove the path and use only coffe
# example
if watch
"coffee --compile --watch lms/ cms/ common/"
else
"coffee --compile `find lms/ cms/ common/ -type f -name *.coffee` "
end
# or you use the full path in assets.rake
# example
if watch
"/edx/app/edxapp/node/lib/node_modules/edx/node_modules/.bin/coffee --compile --watch lms/ cms/ common/"
else
"/edx/app/edxapp/node/lib/node_modules/edx/node_modules/.bin/coffee --compile `find lms/ cms/ common/ -type f -name *.coffee` "
end
after all this, I was expecting the symlinks to work only after being replaced by method that had worked before [
#dealing-with-line-endings-and-symlinks-under-windows], but they just worked normally, so much better. Just run "
rake devstack[lms]" or studio, as you would normally.
For reference I'm running on win 8.1, Virtualbox 4.2.12 (r84980) and vagrant 1.4.3.
Please let me know if something can be done in a better/cleaner/nicer way, or if something doesn't work for you and we can try to iron it out.
Cheers,
Felipe Montoya