Commit 293aaedc by David Baumgold

Vagrant: install edx-platform under /opt

Compatibility with the Filesystem Hierarchy Standard: http://www.pathname.com/fhs/
parent e614d1aa
......@@ -44,7 +44,7 @@ Using edX
---------
Once inside the VM, you can start Studio and LMS with the following commands
(from the `/edx/edx-platform` folder):
(from the `/opt/edx-platform` folder):
Learning management system (LMS):
......@@ -65,7 +65,7 @@ Once started, open the following URLs in your browser:
You can develop by editing the files directly in the `edx-platform/` directory you
downloaded before, you don't need to connect to the VM to edit them (the VM uses
those files to run edX, mirroring the folder in `/edx/edx-platform`).
those files to run edX, mirroring the folder in `/opt/edx-platform`).
Stopping & starting
-------------------
......
......@@ -13,7 +13,7 @@ Vagrant.configure("2") do |config|
config.vm.network :private_network, ip: "192.168.20.40"
nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
config.vm.synced_folder ".", "/edx/edx-platform", id: "vagrant-root", :nfs => nfs_setting
config.vm.synced_folder ".", "/opt/edx-platform", id: "vagrant-root", :nfs => nfs_setting
# Make it so that network access from the vagrant guest is able to
# use SSH private keys that are present on the host without copying
......
......@@ -3,6 +3,7 @@
# Copyright (C) 2013 edX <info@edx.org>
#
# Authors: Xavier Antoviaque <xavier@antoviaque.org>
# David Baumgold <david@davidbaumgold.com>
#
# This software's license gives you freedom; you can copy, convey,
# propagate, redistribute and/or modify this program under the terms of
......@@ -55,16 +56,15 @@ chown vagrant.vagrant ~vagrant/.ssh/known_hosts
# edX - Development environment ###############################################
sudo -u vagrant chown vagrant.vagrant /opt/edx-platform
chown vagrant.vagrant /edx
# For convenience with `vagrant ssh`, the `edx-plateform` virtualenv is always
# For convenience with `vagrant ssh`, the `edx-platform` virtualenv is always
# loaded after the first run, so we need to deactivate that behavior to run
# `create-dev-env.sh`.
[[ -f ~vagrant/.bash_profile ]] && {
mv ~vagrant/.bash_profile ~vagrant/.bash_profile.bak
}
sudo -u vagrant -i bash -c "cd /edx/edx-platform && ./scripts/create-dev-env.sh -ynq"
sudo -u vagrant -i bash -c "cd /opt/edx-platform && ./scripts/create-dev-env.sh -ynq"
# Virtualenv - Always load ####################################################
......@@ -76,8 +76,8 @@ sudo -u vagrant -i bash -c "cd /edx/edx-platform && ./scripts/create-dev-env.sh
# Directory ###################################################################
grep "cd /edx/edx-platform" ~vagrant/.bash_profile || {
echo -e "\ncd /edx/edx-platform\n" >> ~vagrant/.bash_profile
grep "cd /opt/edx-platform" ~vagrant/.bash_profile || {
echo -e "\ncd /opt/edx-platform\n" >> ~vagrant/.bash_profile
}
......
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