Created
June 28, 2019 18:09
-
-
Save YtvwlD/c99d23407e76dd55abaf5549b3fad0be to your computer and use it in GitHub Desktop.
NFS minimal example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
config.vm.provider "virtualbox" do |v| | |
v.memory = 256 | |
end | |
config.vm.define "server" do |server| | |
server.vm.hostname = "server" | |
server.vm.network "private_network", ip: "10.0.0.10" | |
server.vm.provision "shell", inline: <<-SHELL | |
apt-get update | |
apt-get install -y avahi-daemon libnss-mdns nfs-kernel-server vsftpd | |
mkdir /export | |
echo "/export *(rw,no_root_squash)" >> /etc/exports | |
exportfs -a -r | |
echo "10.0.0.11 client" >> /etc/hosts | |
SHELL | |
end | |
config.vm.define "client" do |client| | |
client.vm.hostname = "client" | |
client.vm.network "private_network", ip: "10.0.0.11" | |
client.vm.provision "shell", inline: <<-SHELL | |
apt-get update | |
apt-get install -y avahi-daemon libnss-mdns nfs-common ftp curlftpfs | |
mkdir /import | |
echo "10.0.0.10 server" >> /etc/hosts | |
SHELL | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment