lmakarov / boot2docker-vagrant

[DEPRECATED] Boot2docker Vagrant box for optimized Docker and Docker Compose use on Mac and Windows
145 stars 41 forks source link

Source code of blinkreaction/boot2docker box #53

Closed rivaros closed 8 years ago

rivaros commented 8 years ago

Hi Leonid,

Is it possible to seesomewhere the source of vagrant blinkreaction/boot2docker box ?

Is it build with packer or smth else? Looks like it is very close to what is included in DockerToolbox itself, but still different. Something similar can be found in dduportal/boot2docker-vagrant-box, but it is still not so close.

lmakarov commented 8 years ago

Hi @rivaros, sure, here you go: https://github.com/lmakarov/boot2docker-vagrant-box/tree/docker-machine

I originally forked it from dduportal/boot2docker-vagrant-box, then replaced packer with docker-machine. I guess I should clean it up and bring under /blinkreaction on Github.

rivaros commented 8 years ago

Thanks for the hint & sorry for my late reaction. Your vagrant-box looks really great, and very close to original docker-machine box.

After dealing with it a little have got a chain of questions - do you personally use OSX or Windows + vagrant rsync folders as your dev setup? If yes, did you think about dropping off vagrant rsync-auto completely and using some more reliable rsync solution? And actually is vagrant really necessary, provided docker-machine has quite nice command interface to setup a docker host.

lmakarov commented 8 years ago

I'm on Mac and have a Windows laptop on my desk for testing purposes.

Dropping off vagrant rsync-auto completely and using some more reliable rsync solution

Can you list the options you have in mind?

I'm using NFS (the new experimental nfs2 option) on Mac for my own needs. The performance is very close to native (e.i. using rsync). I've also started looking closer at rsync as the recommended option for Windows users, since SMB has a noticeable performance impact.

is vagrant really necessary

It is for our needs - cross-platform docker support with decent synced folders performance. Everything we are doing in the Vagrantfile can be achieved with a bunch of shell and other scripts, but it does not really make much sense to reinvent the wheel.

For a single platform + synced folder option scenario Vagrant is not that important.

lmakarov commented 8 years ago

See https://github.com/blinkreaction/boot2docker-vagrant/issues/48 for using https://github.com/smerrill/vagrant-gatling-rsync as an alternative option for rsync.

rivaros commented 8 years ago

Thanks for sharing info on your devops. About rsync - I spent already much time with it (since we work both on OSX and Windows, where nfs2 is not an option).

Here is my imho:

  1. Vagrant rsync comsumes sometimes too much resources and is badly written & supported. Really difficult to change the list of synced folders, since they are stored in .vagrant/synced_folders and only changed on vagrant reload/up. Rather weird.
  2. Best solution I found for OSX is https://github.com/drunomics/syncd
  3. vagrant-gatling-rsync does not work on Windows since it does not support its native file change events , so we are now writing our own "windows" version of drunomics sync based on inotifywait for windows (https://github.com/thekid/inotify-win) and rsync.
  4. In general Vagrant stil supports more virtualized platforms than docker-machine (like Parallels), so we still keep it.
achekulaev commented 8 years ago

Nice to see some more Ukrainians here @rivaros About your note

vagrant-gatling-rsync does not work on Windows since it does not support its native file change events

It looks like it is actually using native driver event model. See https://github.com/smerrill/vagrant-gatling-rsync/blob/master/lib/vagrant-gatling-rsync/listen/listenwindows.rb for reference

rivaros commented 8 years ago

@achekulaev, greetings

Concerning gatling that's my own experience and also this thread mentions this https://github.com/smerrill/vagrant-gatling-rsync/issues/12 Anyway I am not a fan of vagrant stuff any more.)

iturdikulov commented 8 years ago

@rivaros

Hey, what about unison? https://keylocation.sg/blog/vagrant-and-unison-without-a-plugin/

lmakarov commented 8 years ago

I'm going to close this, since the original issue topic was addressed. Please create new issues for further discussions about rsync/unison/etc.

We are now using vagrant-gatling-rsync by default. See https://github.com/blinkreaction/boot2docker-vagrant/issues/48#issuecomment-160990669 We are also exploring syncthing. See https://github.com/blinkreaction/boot2docker-vagrant/issues/65