Commit 46e00b54 authored by Kamil Godzwon's avatar Kamil Godzwon Committed by Jim Harris
Browse files

scripts/vagrant: adjust scripts to supported distros



Added fedora37 and fedora38.
Removed ubuntu1604, ubuntu1804, centos8, fedora33-36,
freebsd11.

Updated the example of using create_vbox.sh script.
Updated the default distro used via Vagrantfile.

Signed-off-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ib2e5f89f14b752e75980a1e2378c10329c994d4d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17640


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 9b518c79
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -9,15 +9,10 @@ def get_box_type(distro, force_distro)

  distro_to_type = {
    'centos7'    => 'centos/7',
    'centos8'    => 'centos/8',
    'ubuntu1604' => 'peru/ubuntu-16.04-server-amd64',
    'ubuntu1804' => 'peru/ubuntu-18.04-server-amd64',
    'ubuntu2004' => 'peru/ubuntu-20.04-server-amd64',
    'ubuntu2204' => 'generic/ubuntu2204',
    'fedora33'   => 'generic/fedora33',
    'fedora34'   => 'generic/fedora34',
    'fedora35'   => 'generic/fedora35',
    'fedora36'   => 'generic/fedora36',
    'fedora37'   => 'generic/fedora37',
    'fedora38'   => 'generic/fedora38',
    'arch'       => 'generic/arch',
    'freebsd12'  => 'generic/freebsd12',
    'freebsd13'  => 'generic/freebsd13',
@@ -340,8 +335,8 @@ def setup_libvirt(config, vmcpu, vmram, distro)
end

#################################################################################################
# Pick the right distro and bootstrap, default is fedora33
distro = (ENV['SPDK_VAGRANT_DISTRO'] || "fedora33")
# Pick the right distro and bootstrap, default is fedora37
distro = (ENV['SPDK_VAGRANT_DISTRO'] || "fedora37")
provider = (ENV['SPDK_VAGRANT_PROVIDER'] || "virtualbox")

# Get all variables for creating vm
+10 −12
Original line number Diff line number Diff line
@@ -22,9 +22,7 @@ display_help() {
	echo
	echo " Usage: ${0##*/} [-b nvme-backing-file] [-n <num-cpus>] [-s <ram-size>] [-x <http-proxy>] [-hvrldcufaoH] <distro>"
	echo
	echo "  distro = <centos7 | centos8 | ubuntu1604 | ubuntu1804 | ubuntu2004 | ubuntu2204 | fedora33 |"
	echo "            fedora34 | fedora35 | fedora36 | fedora37 | freebsd11 | freebsd12 | freebsd13 | arch | "
	echo "            clearlinux | rocky8>"
	echo "  distro = <centos7 | ubuntu2004 | ubuntu2204 | fedora37 | fedora38 | freebsd12 | freebsd13 | arch | clearlinux | rocky8>"
	echo
	echo "  -s <ram-size> in MB             Default: ${SPDK_VAGRANT_VMRAM}"
	echo "  -n <num-cpus> 1 to 4            Default: ${SPDK_VAGRANT_VMCPU}"
@@ -65,12 +63,12 @@ display_help() {
	echo
	echo " Examples:"
	echo
	echo "  $0 -x http://user:password@host:port fedora33"
	echo "  $0 -s 2048 -n 2 ubuntu16"
	echo "  $0 -x http://user:password@host:port fedora37"
	echo "  $0 -s 2048 -n 2 ubuntu2204"
	echo "  $0 -rv freebsd"
	echo "  $0 fedora33"
	echo "  $0 -b /var/lib/libvirt/images/nvme1.img,nvme,/var/lib/libvirt/images/nvme1n1.img fedora33"
	echo "  $0 -b none fedora33"
	echo "  $0 fedora37"
	echo "  $0 -b /var/lib/libvirt/images/nvme1.img,nvme,/var/lib/libvirt/images/nvme1n1.img fedora37"
	echo "  $0 -b none fedora37"
	echo
}

@@ -185,10 +183,10 @@ shift "$((OPTIND - 1))" # Discard the options and sentinel --
SPDK_VAGRANT_DISTRO="$*"

case "${SPDK_VAGRANT_DISTRO}" in
	centos[78]) ;&
	ubuntu1[68]04 | ubuntu2[02]04) ;&
	fedora3[3-7]) ;&
	freebsd1[1-3]) ;&
	centos7) ;&
	ubuntu2[02]04) ;&
	fedora3[7-8]) ;&
	freebsd1[2-3]) ;&
	rocky8) ;&
	arch | clearlinux) ;;
	*)