From ee4b34b6ad83bcbc115814fcccf03aef56960fb9 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sat, 8 Jun 2013 13:02:53 -0300 Subject: [PATCH] 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 --- README.md | 4 ++-- Vagrantfile | 2 +- scripts/vagrant-provisioning.sh | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5aa792a089..65807205a4 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Using edX --------- 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): @@ -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 `/opt/edx-platform`). +those files to run edX, mirroring the folder in `/opt/edx/edx-platform`). Stopping & starting ------------------- diff --git a/Vagrantfile b/Vagrantfile index ac17764219..0d409cc408 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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 ".", "/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 # use SSH private keys that are present on the host without copying diff --git a/scripts/vagrant-provisioning.sh b/scripts/vagrant-provisioning.sh index d0df984d10..6a00035dcc 100755 --- a/scripts/vagrant-provisioning.sh +++ b/scripts/vagrant-provisioning.sh @@ -56,7 +56,8 @@ chown vagrant.vagrant ~vagrant/.ssh/known_hosts # 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 # 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 [[ -f ~vagrant/.bash_profile ]] && { 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 #################################################### @@ -76,8 +77,8 @@ sudo -u vagrant -i bash -c "cd /opt/edx-platform && ./scripts/create-dev-env.sh # Directory ################################################################### -grep "cd /opt/edx-platform" ~vagrant/.bash_profile || { - echo -e "\ncd /opt/edx-platform\n" >> ~vagrant/.bash_profile +grep "cd /opt/edx/edx-platform" ~vagrant/.bash_profile || { + echo -e "\ncd /opt/edx/edx-platform\n" >> ~vagrant/.bash_profile }