• Stars
    star
    243
  • Rank 166,489 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An rsync watcher for Vagrant 1.5.1+ that uses fewer host resources.

vagrant-gatling-rsync

An rsync watcher for Vagrant 1.5.1+ that uses fewer host resources at the potential cost of more rsync actions.

Getting started

To get started, you need to have Vagrant 1.5.1 installed on your Linux, Mac, or Windows host machine. To install the plugin, use the following command.

vagrant plugin install vagrant-gatling-rsync

Working with this plugin

Add the following information to the Vagrantfile to set the coalescing threshold in seconds. If you do not set it, it will default to 1.5.

You may also specify what Time.strftime options the plugin will use when it reports on completed rsyncs. The default is "%I:%M:%S %p".

You will also need to have at least one synced folder set to type "rsync" to use the plugin.

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "hashicorp/precise64"

  config.vm.synced_folder "../files", "/opt/vagrant/rsynced_folder", type: "rsync",
    rsync__exclude: [".git/", ".idea/"]

  # Configure the window for gatling to coalesce writes.
  if Vagrant.has_plugin?("vagrant-gatling-rsync")
    config.gatling.latency = 2.5
    config.gatling.time_format = "%H:%M:%S"
  end

  # Automatically sync when machines with rsync folders come up.
  config.gatling.rsync_on_startup = true
end

With the Vagrantfile configured in this fashion, you can run the following command to sync files.

vagrant gatling-rsync-auto

As of version 0.9.0, vagrant-gatling-rsync will automatically start the sync engine on vagrant up or vagrant reload when the machines that you bring up have one or more rsync folders defined. You can disable this behavior by setting config.gatling.rsync_on_startup to false.

Why "gatling"?

The gatling gun was the first gun capable of firing continuously.

This plugin

The built-in rsync-auto plugin sometimes uses a lot of CPU and disk I/O when it starts up on very large rsynced directories. This plugin is designed to work well with such large rsynced folders.

The rsync-auto command that ships with Vagrant 1.5 uses the listen gem. The Listen gem is quite thorough - it uses Celluloid to spin up an actor system and it checks file contents on OS X to ensure that running "touch" on a file (to do a write but not update its content) will not fire the rsync command.

The downside of using Listen is that it takes a large amount of host resources to monitor large directory structures. This gem works well with to monitor directories hierarchies with 10,000-100,000 files.

This gem's implementation is much closer to the underlying fsevent or inotify APIs, which allows for higher performance.

Event coalescing

This plugin also coalesces events for you. The default latency is 1.5 seconds. It is configurable through the config.gatling.latency parameter. If you specify a latency of two seconds, this plugin will not fire a vagrant rsync until two contiguous seconds without file events have passed. This will delay rsyncs from happening if many writes are happening on the host (during a make or a git clone, for example) until the activity has leveled off.

Authors

Steven Merrill (@stevenmerrill) originally had the idea to tap into rb-fsevent and rb-inotify to more efficiently rsync files.

Doug Marcey (@dougmarcey) provided considerable guidance in the implementation of the coalescing functionality and wrote the initial sketch of the Linux and Windows adapters.

More Repositories

1

vagrant-rsync-back

Rsync from Vagrant guest to host. Insanity!
Ruby
107
star
2

packer-templates

Templates for use with Packer. Caveats in the README.
Shell
42
star
3

vcl-vim-plugin

A VCL highlighting plugin for vim.
Vim Script
18
star
4

dotfiles

There's no place like $HOME.
Vim Script
14
star
5

brew-pip

Install pip packages as homebrew formulas
Python
9
star
6

scala-norvig-spell-check

Peter Norvig's simple spell checker, implemented in Scala.
Scala
7
star
7

libmemcached-example

Writing my first libmemcached project in C.
C
7
star
8

openshift-php-fpm

A php-fpm 5.4.x cartridge for OpenShift. Designed to run Drupal (including 8) well.
C
6
star
9

node-sedbot

A node.js-powered bot to execute sed commands in IRC. Experimental: run at your own risk.
JavaScript
4
star
10

openshift-community-git-ssh

A tiny cartridge to make git-based Jenkins builds better with the OpenShift Jenkins.
PHP
4
star
11

puppet-softwarecollectionsorg

An easy way to add software collections from softwarecollections.org.
Ruby
3
star
12

vagrant-vim

Vagrant integration for vim.
Vim Script
3
star
13

puphpet-do-rsync

Helping @jtreminio with rsync and DigitalOcean for PuPHPet
Ruby
3
star
14

drupalcampct-vagrant-puppet-demos

Learn Vagrant and Puppet (and Veewee) from Sam and Steven!
Ruby
3
star
15

grenadesandwich.com

My Jekyll-based blog.
CSS
3
star
16

openatrium-2-quickstart

Run OpenAtrium 2 on OpenShift.
PHP
2
star
17

pressflow-vcl

Modifying and updating the Pressflow VCL to work with Varnish 3.0.
2
star
18

vim-arduino

Vim syntax highlighting for Arduino files.
Vim Script
2
star
19

limechat-stutter

A fork of the whisper theme for LimeChat.
2
star
20

os-x-click

Click a mouse button (for use in AppleScripts, etc.)
Objective-C
2
star
21

openshift-community-drush-master

Drush from git master for OpenShift
PHP
2
star
22

openshift-community-pressflow7

PHP
2
star
23

solr-deb

A really simple .deb packaging of SOLR 4.x through fpm.
Shell
2
star
24

project-euler-clojure

Project Euler in Clojure.
Clojure
2
star
25

clojure-norvig-spell-check

Peter Norvig's Python spell checker in Clojure.
Clojure
2
star
26

vagrant-docker-nsenter

A Vagrant plugin to run commands or shells in Vagrant-managed Docker containers.
Ruby
2
star
27

php-webdriver-experiments

Fun with WebDriver.
PHP
2
star
28

membase-pkgbuild

A PKGBUILD for the membase server.
2
star
29

docker-vagrant-ubuntu

A monolithic Ubuntu 14.04 container that runs /sbin/init and sshd for use with the Docker provisioner.
Shell
2
star
30

puppykitty-drupal-module

A Drupal module that shows how NOT to scale a site with external caching.
PHP
2
star
31

drupalcs-github

Check GitHub pull requests with drupalcs.
PHP
2
star
32

handlersocker-mysql-pkgbuild

PKGBUILD for HandlerSocket on Arch Linux.
1
star
33

clojure-async-stocks

An implementation of the oft-used Scala stock prices example in Clojure.
Clojure
1
star
34

d7-views-content-cache

Porting the 'Views Content Cache' module to Drupal 7.
PHP
1
star
35

quix-app

Configuration for http://quixapp.com/.
1
star
36

openshift-leiningen-clojure

Run Clojure applications on OpenShift through Leiningen.
Shell
1
star
37

rocketship

1
star
38

has-opinions

Tim Cosgrove has opinionsโ„ข.
1
star
39

recipes

Delicious recipes.
1
star
40

pressflow-7-quickstart

The best Drupal 7 quickstart for OpenShift.
PHP
1
star
41

zombiefood

Designed to be eaten by zombies.
1
star
42

drupal8html5status

My drup8html5 status Presentation
JavaScript
1
star
43

docker-vagrant-centos

A monolithic CentOS container that runs /sbin/init and sshd for use with the Docker provisioner.
Shell
1
star
44

project-euler-haskell

Project Euler in Haskell
Haskell
1
star
45

golang-stocks

A translation of a favorite Scala example to golang.
Go
1
star
46

timetrap-reconciliation

Reconcile two timetrap databases. This might be useful if you keep them in Dropbox.
Ruby
1
star
47

emojiping

An OS X menu bar app that tells you how good your network connection is with emoji.
Swift
1
star
48

varnish-3-pkgbuild

A PKGBUILD of Varnish 3 betas for Arch Linux.
Shell
1
star
49

Drush-PHP-Manifests

Puppet manifests to install PHP and Drush; includes Vagrantfile and Rakefile
Ruby
1
star
50

vagrant-webdav

A simple plugin to mount WebDAV shares from a Vagrant guest on an OS X host.
Ruby
1
star
51

drupal-esi

Merging the Panels ESI cache into the Drupal ESI module.
PHP
1
star
52

puppet-graphiteapi

Use Puppet to install graphite-api from pip in a virtualenv.
Ruby
1
star
53

rxvt-unicode

A CVS mirror of rxvt-unicode.
C
1
star
54

node-sweetdudebot

A node.js IRC bot that responds as though it were the star of "Dude, Where's My Car." Adapted from node-sedbot.
JavaScript
1
star
55

elixir-fun

Working through the Programming Elixir book.
Elixir
1
star
56

php-52-suhosin-pkgbuild

A non-functional (yet) php52 PKGBUILD for Arch Linux.
1
star
57

simple-php-build-script

A simple script to build a vendored PHP and PHP-FPM. Only tested on RHEL 6.4.
Shell
1
star
58

fedora-laptop-setup

Set up a Fedora laptop using Ansible.
Shell
1
star
59

chef-repo

Messin' about with Chef.
Ruby
1
star
60

docker-centos-rpmbuild

An image that can be used to build CentOS RPMs.
Shell
1
star
61

kandr

Working through the K&R C book.
C
1
star
62

php-handlersocket-pkgbuild

Build the HandlerSocket extension for PHP.
1
star
63

basecoach

A simple daemon inspired by Umpire that helps you build HTTP-based monitoring alerts based on ELK-stack data.
Go
1
star