Vagrantfile: Add openSUSE support
In preparation for adding openSUSE support, we extend the Vagrantfile to support openSUSE Leap 42.2/42.3 and extend the btrfs filesystem to the requested size. The parted version in Leap 42.2/42.3 does not allow online partition size alternations so we delete and re-create the partition using fdisk. Change-Id: Icfd7d2944fda0b419e742f153d338914fedcc20d
This commit is contained in:
parent
15c420206f
commit
2603e5a74e
37
Vagrantfile
vendored
37
Vagrantfile
vendored
@ -59,4 +59,41 @@ Vagrant.configure(2) do |config|
|
|||||||
./scripts/gate-check-commit.sh
|
./scripts/gate-check-commit.sh
|
||||||
SHELL
|
SHELL
|
||||||
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",
|
||||||
|
# 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.
|
||||||
|
privileged: true,
|
||||||
|
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 /
|
||||||
|
./scripts/gate-check-commit.sh
|
||||||
|
SHELL
|
||||||
|
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",
|
||||||
|
# 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.
|
||||||
|
privileged: true,
|
||||||
|
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 /
|
||||||
|
./scripts/gate-check-commit.sh
|
||||||
|
SHELL
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user