diff options
author | 2017-08-31 11:52:06 +0000 | |
---|---|---|
committer | 2017-08-31 11:52:06 +0000 | |
commit | 16d1f79eb8289978c2cc8aaa75745c257c931fa3 (patch) | |
tree | 40527a4eaac44c13a910b608279dc5766ef8bc27 | |
parent | 27e42951862cc5a06d4d726779d4cb590f7f1dcf (diff) | |
parent | 5ea26a2277389ec42b6f22e02dbd4c04796ee304 (diff) |
Merge "xci: Vagrantfile: Add openSUSE Leap 42.2 and 42.3 support"
-rw-r--r-- | xci/Vagrantfile | 50 |
1 files changed, 50 insertions, 0 deletions
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 |