From: Markos Chandras Date: Tue, 5 Sep 2017 08:40:35 +0000 (+0100) Subject: Vagrantfile: Update base OS before installing XCI X-Git-Tag: 6.0.0~317 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F41617%2F2;p=releng-xci.git Vagrantfile: Update base OS before installing XCI The Vagrant image may be old and have stale metadata leading to failures when installing packages. As such, it's best to update it as soon as possible. This is also inline with the AIO documentation which suggests to always use an up to date OS. Change-Id: I43d9f8431e1a6ed877936adc65c54be466b76aff Signed-off-by: Markos Chandras --- diff --git a/Vagrantfile b/Vagrantfile index 26a2a326..58b6368e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -37,6 +37,7 @@ Vagrant.configure(2) do |config| config.vm.provision "shell"do |s| s.privileged = false s.inline = <<-SHELL + sudo apt-get update cd /vagrant export XCI_FLAVOR=${XCI_FLAVOR:-mini} export VM_CPU=${VM_CPU:-2} @@ -65,6 +66,7 @@ Vagrant.configure(2) do |config| config.vm.provision "shell" do |s| s.privileged = false s.inline = <<-SHELL + sudo yum update cd /vagrant PART_START=$(sudo parted /dev/sda --script unit MB print | awk '/^ 3 / {print $3}') sudo parted /dev/sda --script unit MB mkpart primary ${PART_START} 100% @@ -101,6 +103,7 @@ Vagrant.configure(2) do |config| # btrfs filesystem. s.privileged = false s.inline = <<-SHELL + sudo zypper -n up -l cd /vagrant echo -e 'd\n2\nn\np\n\n\n\nn\nw' | sudo fdisk /dev/sda PART_END=$(sudo fdisk -l /dev/sda | grep ^/dev/sda2 | awk '{print $4}') @@ -128,6 +131,7 @@ Vagrant.configure(2) do |config| # btrfs filesystem. s.privileged = false s.inline = <<-SHELL + sudo zypper -n up -l cd /vagrant echo -e 'd\n2\nn\np\n\n\n\nn\nw' | sudo fdisk /dev/sda PART_END=$(sudo fdisk -l /dev/sda | grep ^/dev/sda2 | awk '{print $4}')