Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vagrantplugins
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ required_plugins = {
'vagrant-useradd' => '0.0.1',
'vagrant-bindfs' => '1.0.8',
'vagrant-persistent-storage' => '0.0.33',
'vagrant-gatling-rsync' => '~>0.9.0',
}

needs_restart = false
Expand Down
15 changes: 14 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ packaging_mode = false
forward_ssh_agent = false
vm_name = "precip"
use_packaged_precip = false
rsync = false

# Determine if this is our first boot or not.
# If there's a better way to figure this out we now have a single place to change.
Expand Down Expand Up @@ -78,7 +79,19 @@ Vagrant.configure(2) do |config|
config.ssh.forward_agent = forward_ssh_agent

# Synced Folders
if Vagrant::Util::Platform.windows?
if rsync
# For large codebases, rsync is *far* more performant than NFS.
config.vm.synced_folder drupal_basepath, "/srv/www", type: "rsync", rsync__exclude: [".git/", "*.sql", "db/", "**/sites/*/files"], owner: "vagrant", group: "www-data"
# Vagrant's own rsync plugin is absurdly slow to sync, so use Gatling instead:
# https://github.com/smerrill/vagrant-gatling-rsync
# Configure the window for gatling to coalesce writes.
if Vagrant.has_plugin?("vagrant-gatling-rsync")
config.gatling.latency = 1
config.gatling.time_format = "%H:%M:%S"
# Automatically sync when machines with rsync folders come up.
config.gatling.rsync_on_startup = true
end
elsif Vagrant::Util::Platform.windows?
# Windows gets vboxsf, because it can't do nfs + bindfs
config.vm.synced_folder drupal_basepath, "/srv/www", owner: "www-data", group: "www-data"
else
Expand Down
4 changes: 4 additions & 0 deletions config.rb-dist
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
#
# vm_name = "not-precip"

# Use rsync instead of NFS for site files. This can improve performance on larger sites.
#
# rsync = true

# We offer a partially pre-built version of the Precip Base Box, which ships with
# all keys and base packages pre-installed, so all that's left is installing PHP,
# Apache, MySQL, and Configuring everything. This can help on restrictive networks
Expand Down