Files
mini-ndn/Vagrantfile
T
Giovanni Grieco bb31ed2fcd install.sh: quiet apt install for Vagrant
Vagrant VM provisioning doesn't have any mechanism for user interaction.
For this reason, it is necessary to tell APT that we are in a
non-interactive session and any install question should be answered
automatically by its preset.

For this reason, according to issue #42 and GitHub PR #43, I propose to
add "quiet" option to install.sh. This option tells Debian-based systems
to run APT in non-interactive mode. In case of important questions
during install, we can update the preset list specified in quiet_install
subroutine.

Flag functionality can always be extended in the future to support
unexpected cases where Vagrant provision hangs due to user interaction
request by some other program.

Change-Id: Iab3ce5f9b19cd6bfcf2fa180c433fb5d5d521914
2020-03-24 12:18:22 +01:00

29 lines
684 B
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
ln -s /vagrant /home/vagrant/mini-ndn
# Check if install.sh is present or someone just copied the Vagrantfile directly
if [[ -f /home/vagrant/mini-ndn/install.sh ]]; then
pushd /home/vagrant/mini-ndn
else
# Remove the symlink
rm /home/vagrant/mini-ndn
git clone --depth 1 https://github.com/named-data/mini-ndn.git
pushd mini-ndn
fi
./install.sh -qa
SCRIPT
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provision "shell", privileged: false, inline: $script
config.vm.provider "virtualbox" do |vb|
vb.name = "mini-ndn_box"
vb.memory = 4096
vb.cpus = 4
end
end