ansible: resize VNF image 25/42925/1
authorRoss Brattain <ross.b.brattain@intel.com>
Fri, 1 Sep 2017 09:17:54 +0000 (02:17 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Mon, 25 Sep 2017 07:29:39 +0000 (00:29 -0700)
commite487ba0ec96a7f2324a03778f1dc0097f818553b
treedf80e924b5ff7656bc8165988beebcdce562f822
parent76ce36d88d9bcb274e65ed816f437a31fd2830a1
ansible: resize VNF image

When compiling Trex, DPDK, collectd and all the SampleVNFs
we use more than the 2.2GB size of the original Ubuntu cloud image.

Accordingly we need to resize the image.

If we were not inside a docker container we would use virt-resize
to automatically handle all the cases, but virt-resize launches qemu.

Instead we can use qemu-img to add extra space, then
luckily we can use parted to resize the partition and finally
resize2fs to resize the filesystem.

This limits us to only ext3/4 images, but if we need to
we could add support for other filesystems by checking
file system type.

Change-Id: Iac84b8e6967af5be64c280a7b1eaaf09f5d6b3aa
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
ansible/build_yardstick_image.yml