[Container-tools] Query on mounted volumes being inaccessible between host and guest - ADB Issue #118 (Blocker)

Max Rydahl Andersen manderse at redhat.com
Fri Feb 12 17:51:23 UTC 2016


> Hi team,
>
> I had some queries and was seeking some opinions on 
> https://github.com/projectatomic/adb-atomic-developer-bundle/issues/118 
> about mounted volumes not being accessible from the host
>
> It says,
> Mounted volumes on Docker containers should be accessible from the 
> Host VM, so a user can deploy his application from his IDE on the Host 
> VM into the mounted volume (ie, a specific directory in the host VM) 
> and the application server in the Docker container will be able to 
> pick the changes automatically.
>
> The way I understand, what we are trying to achieve is:
>
> Mounting volumes from host to guest (problem), then guest to Docker 
> containers (not a problem)

If we don't have two-way sync we won't be completive with 
docker-machine-like setups.

If it is only one-way there is no way to get the output of a docker 
container easily on to my host disk nor
is it easy to use existing tools on host to get data into to docker 
containers.


> One way sync from host to guest:
>
> Linux: This is what Vagrant does by default (rsync), and as already 
> pointed out on the GitHub issue page, `vagrant rsync-auto` can be used 
> for a continuous one way sync
>
> Windows: rsync will have to be packaged with the installer (Cygwin has 
> it?) (not tested rsync, yet)

could be a fallback - I would prefer it not to be default.

> Two way sync from host to guest:
>
> Solution 1 - SSHFS (vagrant-sshfs plugin) (testing in progress)
>
> Pros:
> - One solution for all platforms
>
> Cons:
> - No longer maintained, so it has to be maintained by us since it 
> might break with future Vagrant versions
> - Performance issues (high latency, reliable over heavy load?) since 
> it's working over SSH
> - SSH server has to be packaged with the Windows installer

How is security handled here ? how is the vagrant box able to connect to 
the host ? do users need to configure
username/passwords ?

> --
>
> Solution 2 - NFS (Linux + Mac) and SMB (Windows)
>
> https://www.vagrantup.com/docs/synced-folders/nfs.html
> https://www.vagrantup.com/docs/synced-folders/smb.html
>
> Pros:
> - Maintained by Vagrant, so easier to maintain. Also, this will have 
> more testing and user feedback backing it than our customized 
> vagrant-sshfs plugin will have.
> - Works out of the box, just one `vagrant up`
> - No tinkering required on the Windows host (but NFS server required 
> on Linux and Mac hosts)

Mac has smb built in afaik. don't know about NFS - but if users need to 
install it this feels doomed since
we already have a ton of other things that need to be configured.

>
> Cons:
> - The Vagrantfile gets a bit typical to understand, but can we also 
> make this solution into a plugin (don't know how that works)?
> - Multiple solutions for one problem, but both of these are well built 
> in and their implementation (mounts) is automated and hidden away from 
> the end user, so no change in the user experience, rather it is more 
> seamless
> - Vagrant is not 'supposed' to maintain these in the future, but if we 
> have to maintain the solution, then why not this than vagrant-sshfs?
>
> I have tried out the second solution and the resultant Vagrantfile 
> might look something like this,
> https://raw.githubusercontent.com/containscafeine/dots/master/Vagrantfile 
> (please change the mount points according to your environment)
>
> This Vagrantfile will not work out of the box since Vagrant does not 
> provision before mounting the synced folders, but it should not matter 
> if cifs-utils is packaged inside the adb vagrant box, so if someone 
> wants to try it:
>
> Steps for Windows:
> - `vagrant up`
> - `vagrant provision`
> - `vagrant reload`
>
> Steps for Linux:
> - Allow incoming connections to the NFS server on the host
> - `vagrant up`

I'm not following why the steps are different between the OS's here ?

And if users need to learn to run all three vagrant up/provision/reload 
and different between OS's this is bad/not good either ;/

...feels like its time to consider to implement our own guest additions 
?

/max
http://about.me/maxandersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/container-tools/attachments/20160212/ec5702c8/attachment.htm>


More information about the Container-tools mailing list