#38 Preload fuse-sshfs
Opened 7 years ago by smilner. Modified 7 years ago

Using Fedora Atomic with Vagrant on Linux+libvirt can be a bit tough. Either one uses the NFS which can be finicky or the popular sshfs. However, sshfs is provided as a plugin to Vagrant and must be installed on the Vagrant machine. While it's possible to start the box, get on it, run sudo rpm-ostree install fuse-sshfs, and then restart the Vagrant box it does add uncommon manual steps for folks trying out software via Vagrant.

See: https://github.com/projectatomic/commissaire/pull/67#issuecomment-265238825


This is a pain point but I don't know if we want fuse-sshfs in the base ostree. One idea colin had was to add fuse-sshfs to the kickstart for the vagrant box once anaconda supports package layering

@smilner As a stop-gap, you can modify your Vagrantfile to run a short bash script to install the package. Combined with the vagrant-reload plugin to reboot the box during provisioning.

Something like this:

# -*- mode: ruby -*-
# vi: set ft=ruby :
$fusesshfs = <<FUSESSHFS
#!/bin/bash
set -xeou pipefail
sudo rpm-ostree install fuse-sshfs
FUSESSHFS
Vagrant.configure(2) do |config|
  config.vm.box = "fedora/25-atomic-host"
  config.vm.synced_folder "./", "/vagrant", disabled: 'true'
  config.vm.provision "shell", inline: $fusesshfs
  config.vm.provision :reload
end

I just sanity tested this snippet and it worked well, but did increase provisioning time (as expected).

should we add in the vagrant kickstart a snippet to add fuse-sshfs? or will it get lost when updating the tree and not be worth it?

should we add in the vagrant kickstart a snippet to add fuse-sshfs? or will it get lost when updating the tree and not be worth it?

support for package layering in kickstart is "in the works", we can't do this right now. https://github.com/rhinstaller/anaconda/issues/799

@miabbott great! Thanks!

Unfortunately it looks like the order or operations doesn't allow this to work with ssh-fs on atomic host but it was a good idea.

@dustymabe Could it make more sense to add atomic host support at https://github.com/dustymabe/vagrant-sshfs/blob/9a1e8f6cd52d5b82b0df99faadbd02e693b368d2/lib/vagrant-sshfs/cap/guest/fedora/sshfs_client.rb#L2-L7 ?

Login to comment on this ticket.

Metadata