Commit ee4b34b6 by Xavier Antoviaque Committed by David Baumgold

vagrant: Moves from `/opt/edx-platform` to `/opt/edx/edx-platform`

To allow the vagrant user to create the /opt/edx/[log|data|db] folders
parent 293aaedc
...@@ -44,7 +44,7 @@ Using edX ...@@ -44,7 +44,7 @@ Using edX
--------- ---------
Once inside the VM, you can start Studio and LMS with the following commands Once inside the VM, you can start Studio and LMS with the following commands
(from the `/opt/edx-platform` folder): (from the `/opt/edx/edx-platform` folder):
Learning management system (LMS): Learning management system (LMS):
...@@ -65,7 +65,7 @@ Once started, open the following URLs in your browser: ...@@ -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 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 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 `/opt/edx-platform`). those files to run edX, mirroring the folder in `/opt/edx/edx-platform`).
Stopping & starting Stopping & starting
------------------- -------------------
......
...@@ -13,7 +13,7 @@ Vagrant.configure("2") do |config| ...@@ -13,7 +13,7 @@ Vagrant.configure("2") do |config|
config.vm.network :private_network, ip: "192.168.20.40" config.vm.network :private_network, ip: "192.168.20.40"
nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
config.vm.synced_folder ".", "/opt/edx-platform", id: "vagrant-root", :nfs => nfs_setting config.vm.synced_folder ".", "/opt/edx/edx-platform", id: "vagrant-root", :nfs => nfs_setting
# Make it so that network access from the vagrant guest is able to # 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 # use SSH private keys that are present on the host without copying
......
...@@ -56,7 +56,8 @@ chown vagrant.vagrant ~vagrant/.ssh/known_hosts ...@@ -56,7 +56,8 @@ chown vagrant.vagrant ~vagrant/.ssh/known_hosts
# edX - Development environment ############################################### # edX - Development environment ###############################################
sudo -u vagrant chown vagrant.vagrant /opt/edx-platform
chown vagrant.vagrant /opt/edx
# For convenience with `vagrant ssh`, the `edx-platform` 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 # loaded after the first run, so we need to deactivate that behavior to run
...@@ -64,7 +65,7 @@ sudo -u vagrant chown vagrant.vagrant /opt/edx-platform ...@@ -64,7 +65,7 @@ sudo -u vagrant chown vagrant.vagrant /opt/edx-platform
[[ -f ~vagrant/.bash_profile ]] && { [[ -f ~vagrant/.bash_profile ]] && {
mv ~vagrant/.bash_profile ~vagrant/.bash_profile.bak mv ~vagrant/.bash_profile ~vagrant/.bash_profile.bak
} }
sudo -u vagrant -i bash -c "cd /opt/edx-platform && ./scripts/create-dev-env.sh -ynq" sudo -u vagrant -i bash -c "cd /opt/edx/edx-platform && ./scripts/create-dev-env.sh -ynq"
# Virtualenv - Always load #################################################### # Virtualenv - Always load ####################################################
...@@ -76,8 +77,8 @@ sudo -u vagrant -i bash -c "cd /opt/edx-platform && ./scripts/create-dev-env.sh ...@@ -76,8 +77,8 @@ sudo -u vagrant -i bash -c "cd /opt/edx-platform && ./scripts/create-dev-env.sh
# Directory ################################################################### # Directory ###################################################################
grep "cd /opt/edx-platform" ~vagrant/.bash_profile || { grep "cd /opt/edx/edx-platform" ~vagrant/.bash_profile || {
echo -e "\ncd /opt/edx-platform\n" >> ~vagrant/.bash_profile echo -e "\ncd /opt/edx/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