scripts/vagrant: Move getting variables into one place

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id63cd5fa330dd21f73875f11ecfd964e67dfd949
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2945
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Maciej Wawryk 2020-06-18 13:13:44 +02:00 committed by Tomasz Zawadzki
parent 8f6fdefd53
commit 6fac35a3f4

View File

@ -41,6 +41,17 @@ Vagrant.configure(2) do |config|
distro = ( ENV['SPDK_VAGRANT_DISTRO'] || "fedora30")
provider = (ENV['SPDK_VAGRANT_PROVIDER'] || "virtualbox")
# Get all variables for creating vm
vmcpu=(ENV['SPDK_VAGRANT_VMCPU'] || 2)
vmram=(ENV['SPDK_VAGRANT_VMRAM'] || 4096)
spdk_dir=(ENV['SPDK_DIR'] || "none")
vmemulator=(ENV['SPDK_QEMU_EMULATOR'] || "")
emulated_nvme_types=(ENV['NVME_DISKS_TYPE'] || "nvme").split(',')
nvme_namespaces=(ENV['NVME_DISKS_NAMESPACES'] || "").split(',')
nvme_file=(ENV['NVME_FILE'] || "").split(',')
nvme_cmbs=(ENV['NVME_CMB'] || "").split(',')
vagrantfile_dir=(ENV['VAGRANTFILE_DIR'] || "none")
# generic/freebsd boxes do not work properly with vagrant-proxyconf and
# have issues installing rsync and sshfs for syncing files. NFS is
# pre-installed, so use it.
@ -121,16 +132,6 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell", inline: $freebsd_spdk_repo
end
vmcpu=(ENV['SPDK_VAGRANT_VMCPU'] || 2)
vmram=(ENV['SPDK_VAGRANT_VMRAM'] || 4096)
spdk_dir=(ENV['SPDK_DIR'] || "none")
vmemulator=(ENV['SPDK_QEMU_EMULATOR'] || "")
emulated_nvme_types=(ENV['NVME_DISKS_TYPE'] || "nvme").split(',')
nvme_namespaces=(ENV['NVME_DISKS_NAMESPACES'] || "").split(',')
nvme_file=(ENV['NVME_FILE'] || "").split(',')
nvme_cmbs=(ENV['NVME_CMB'] || "").split(',')
vagrantfile_dir=(ENV['VAGRANTFILE_DIR'] || "none")
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
if ENV['VAGRANT_PASSWORD_AUTH'] == "1"