From 5ea26a2277389ec42b6f22e02dbd4c04796ee304 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 24 Aug 2017 12:58:29 +0100 Subject: xci: Vagrantfile: Add openSUSE Leap 42.2 and 42.3 support Add support for testing the XCI in the latest openSUSE Leap releases. Change-Id: I9b649b7076e031b162a10a976debf305299cf4f7 Signed-off-by: Markos Chandras --- xci/Vagrantfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'xci/Vagrantfile') diff --git a/xci/Vagrantfile b/xci/Vagrantfile index cdcd705a..d58ed62e 100644 --- a/xci/Vagrantfile +++ b/xci/Vagrantfile @@ -87,4 +87,54 @@ Vagrant.configure(2) do |config| } end end + + config.vm.define "opensuse422" do |leap422| + leap422.disksize.size = disk_size + leap422.vm.box = "opensuse/openSUSE-42.2-x86_64" + leap422.vm.provision "shell" do |s| + # NOTE(hwoarang) The parted version in Leap 42.2 can't do an online + # partition resize so we must create a new one and attach it to the + # btrfs filesystem. + s.privileged = true, + s.inline = <<-SHELL + cd /vagrant + echo -e 'd\n2\nn\np\n\n\n\nn\nw' | fdisk /dev/sda + PART_END=$(fdisk -l /dev/sda | grep ^/dev/sda2 | awk '{print $4}') + resizepart /dev/sda 2 $PART_END + btrfs fi resize max / + export XCI_FLAVOR=${XCI_FLAVOR:-mini} + export VM_CPU=${VM_CPU:-2} + export VM_DISK=${VM_DISK:-40} + export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-2048} + export VM_DOMAIN_TYPE=qemu + [[ ! -e ${HOME}/.ssh/id_rsa ]] && ssh-keygen -q -P '' -f ${HOME}/.ssh/id_rsa + ./xci-deploy.sh + SHELL + end + end + + config.vm.define "opensuse423" do |leap423| + leap423.disksize.size = disk_size + leap423.vm.box = "opensuse/openSUSE-42.3-x86_64" + leap423.vm.provision "shell" do |s| + # NOTE(hwoarang) The parted version in Leap 42.3 can't do an online + # partition resize so we must create a new one and attach it to the + # btrfs filesystem. + s.privileged = true, + s.inline = <<-SHELL + cd /vagrant + echo -e 'd\n2\nn\np\n\n\n\nn\nw' | fdisk /dev/sda + PART_END=$(fdisk -l /dev/sda | grep ^/dev/sda2 | awk '{print $4}') + resizepart /dev/sda 2 $PART_END + btrfs fi resize max / + export XCI_FLAVOR=${XCI_FLAVOR:-mini} + export VM_CPU=${VM_CPU:-2} + export VM_DISK=${VM_DISK:-40} + export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-2048} + export VM_DOMAIN_TYPE=qemu + [[ ! -e ${HOME}/.ssh/id_rsa ]] && ssh-keygen -q -P '' -f ${HOME}/.ssh/id_rsa + ./xci-deploy.sh + SHELL + end + end end -- cgit 1.2.3-korg