scripts/vagrant: change vagrant box sources
Some time ago I created a patch which unified all boxes URLs to generic/* which come from a single author/company and seemed to be quite universal. Unfortunately some of the boxes are not that generic as the name suggest, so I am reverting my change and will use boxes from vaious sources. Ubuntu 1804 - had heavy DNS issues due to hardcoded addresses in resolved.conf. Very hard if not impossible to fix if working with synced folders like we do. Centos 7 and 8 - sshfs not available by default. Also had some other minor quirks. Official boxes available so let's use them. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: I514d3b92c6ac5844b1929fdadfd35d6079933247 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1622 Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
a34c17027b
commit
5277a5324e
32
scripts/vagrant/Vagrantfile
vendored
32
scripts/vagrant/Vagrantfile
vendored
@ -7,7 +7,29 @@ def checkboxtype(distro)
|
||||
if localboxes.include? "spdk/"+distro
|
||||
return "spdk/"+distro
|
||||
else
|
||||
return "generic/"+distro
|
||||
case distro
|
||||
when "centos7"
|
||||
return "centos/7"
|
||||
when "centos8"
|
||||
return "centos/8"
|
||||
when "ubuntu1604"
|
||||
return "peru/ubuntu-16.04-server-amd64"
|
||||
when "ubuntu1804"
|
||||
return "peru/ubuntu-18.04-server-amd64"
|
||||
when "fedora30"
|
||||
return "generic/fedora30"
|
||||
when "fedora31"
|
||||
return "generic/fedora31"
|
||||
when "arch"
|
||||
return "generic/arch"
|
||||
when "freebsd11"
|
||||
return "generic/freebsd11"
|
||||
when "freebsd12"
|
||||
return "generic/freebsd12"
|
||||
else
|
||||
"Invalid argument #{distro}"
|
||||
abort("Invalid argument!")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -45,14 +67,6 @@ Vagrant.configure(2) do |config|
|
||||
config.cache.scope = :box
|
||||
end
|
||||
|
||||
if (distro.include?("ubuntu"))
|
||||
# Ubuntu boxes from generic/ubuntuX do not generate /etc/resolv.conf files properly which causes
|
||||
# DNS to not work. Copy host /etc/resolv.conf file to the VM as a workaround.
|
||||
config.vm.network "private_network", type: "dhcp"
|
||||
config.vm.provision "file", source: "/etc/resolv.conf", destination: "/home/vagrant/resolv.conf"
|
||||
config.vm.provision "shell", inline: "sudo mv -f /home/vagrant/resolv.conf /etc/resolv.conf"
|
||||
end
|
||||
|
||||
# use http proxy if avaiable
|
||||
if ENV['http_proxy']
|
||||
if Vagrant.has_plugin?("vagrant-proxyconf")
|
||||
|
Loading…
x
Reference in New Issue
Block a user