datadryad / vagrant-dryad

Vagrant and Ansible config for building a (v1) Dryad VM
0 stars 4 forks source link

added synced_folder entries to Vagrantfile #24

Closed ghost closed 8 years ago

ghost commented 10 years ago

Added two config.vm.synced_folder entries to enable a couple of useful guest directories to be available from the host system.

This config does not create any directories on the host or guest system, so before 'vagrant up' is run, the host directories (./sync/...) must be created. Vagrant warns and exits if the local directories are not present.

dleehr commented 10 years ago

Thanks, the synced folders are great, and this will certainly make it easier to edit code/debug from the host.

There's a handful of issues though

First, the directory that contains the Vagrantfile is already synced to the vm at /vagrant. So everything would get duplicated there on the VM. If you look in /vagrant you'll see them synced there too.

Some possible workarounds:

  1. disable the default sync folder. The bootstrap-dryad.sql is synced over this way but that's on its way out (See #8)
  2. Move these new synced folders outside the source tree (but then where to put them?)
  3. Move the directory containing the Vagrantfile to a vagrant subdirectory (I did this in dplace-vagrant)

And a couple other minor things:

  1. If these directories live in the source tree they should be .gitignored
  2. I'm not sure if synced_folder makes sense for the Amazon EC2 provider. That was added upstream. Probably just need to put these in the config.vm.provider "virtualbox" do |vb, override| block.
ghost commented 10 years ago

I had noticed the /vagrant share, but hadn't thought about the duplication issues. I'm not sure how heavy-weight it is, though, given that (presumably) the subdirectories are on the FS as a link or mount instead of taking up virtual drive space. Not having had any use for the /vagrant drive yet, I would probably be inclined to disable it, but that is only based on my usage to this point and not based on any of the setup that is being done.

The Vagrantfile in my fork has your VB and gitignore items implemented (updated here).

ghost commented 10 years ago

Thanks for catching the override error -- fixed. The README is also updated to mention the sync configuration.

daisieh commented 8 years ago

These changes are now in #45.