kalamuna / kalastack

Local development environment for drupal
Other
43 stars 21 forks source link

Use Rsync instead of NFS #84

Open reynoldsalec opened 10 years ago

reynoldsalec commented 10 years ago

We'll need to use Vagrant 1.5+ in Kalabox to make this work AND add something to the Kalabox initialization to use vagrant auto-sync, but the modification for this on Kalastack is pretty simple:

config.vm.synced_folder Dir.home + conf["synced_www_folder"]["host_path"] + "/", conf["synced_www_folder"]["guest_path"], :create => conf["synced_www_folder"]["create"], type: "rsync", rsync__args: ["-a"]

Will patch, just don't want to forget.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

andrewmallis commented 10 years ago

Should we should note impact on disk space in the readme?

Also note to check what happens if you have an existing ~/www/mysite but no kalabox vhost entry yet, then import that site. This use-case most often happens if the uninstall tool is run, then kalabox re-installed – we recommend this to users in support.

pirog commented 10 years ago

Now that we are in the github space it might be good to just start generating wiki articles for some of these concerns.

reynoldsalec commented 10 years ago

Hmm, the biggest problem with switching over to rsync is that automatic syncing from the virtual down to the host machine isn't working yet. Would have to wait for https://github.com/mitchellh/vagrant/issues/3062 to get completed before we can move forward on this; I'll write a wiki piece about using it for people who are having issues with NFS and want faster performance, but probably not practical right now. Sad.

reynoldsalec commented 10 years ago

Suggestion via @pirog: try implementing @substack's https://github.com/substack/sinker.

reynoldsalec commented 10 years ago

Added a wiki page regarding basic use of rsync: https://github.com/kalamuna/kalastack/wiki/Using-Rsync-Instead-of-NFS

pirog commented 10 years ago

@reynoldsalec would love to hear any and all feedback regarding sinker implementation!

reynoldsalec commented 10 years ago

Trying a proof of concept right now; got it to "work", but it seems to only be doing an initial sync and then not doing any further sync beyond that when further edits are made.

As for basic implementation, would run a host script from Kalabox (@pirog suggested running from the initialize function on the box) and client script from the virtual machine (will need to add the initialization script via init.d).

Pinged @substack on the Sinker queue: https://github.com/substack/sinker/issues/1

pirog commented 10 years ago

I might play around with this later in the week.

@reynoldsalec can you push what you've done to another branch? So we can

image

pirog commented 10 years ago

well, maybe just the collab part

reynoldsalec commented 10 years ago

I haven't gone further than what I posted on the Sinker issue queue; with some sort of script to start it on startup, that'd probably be something we could commit, will be working on that on Friday, feel free to branch it before that if you're eager to get going.

pirog commented 10 years ago

@substack is in China now but will be back Monday and is down to help work on Sinker for our purposes :)