From 9d378548cc86028c55baf17260d32d0055603b78 Mon Sep 17 00:00:00 2001 From: Carsten Koester Date: Wed, 25 May 2016 05:58:29 -0400 Subject: CSIT-111: Add Packer based framework to auto-generate disk images Change-Id: Ia18ea34a6288aec0f12f176f4cc264d0f215d1fd Signed-off-by: Carsten Koester --- .../tools/virl/topologies/double-ring-nested.virl | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'resources/tools/virl/topologies/double-ring-nested.virl') diff --git a/resources/tools/virl/topologies/double-ring-nested.virl b/resources/tools/virl/topologies/double-ring-nested.virl index 9018cb529f..4dd5885281 100644 --- a/resources/tools/virl/topologies/double-ring-nested.virl +++ b/resources/tools/virl/topologies/double-ring-nested.virl @@ -3,7 +3,7 @@ flat - + #cloud-config bootcmd: @@ -91,6 +91,7 @@ write_files: mount -t nfs "${nfs_server_common}" /mnt/common mkdir /scratch/$(hostname) + cp /VERSION /scratch/$(hostname)/ exit 0 @@ -103,7 +104,7 @@ write_files: - + #cloud-config bootcmd: @@ -191,7 +192,16 @@ write_files: mount -t nfs "${nfs_server_common}" /mnt/common + # Overwrite nested VM image with latest as per NFS + if [ -f /mnt/common/nested-vm-current.img ] + then + rm -f /var/lib/vm/vhost-nested.img + cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img + fi + mkdir /scratch/$(hostname) + cp /VERSION /scratch/$(hostname)/ + cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION exit 0 @@ -201,7 +211,7 @@ write_files: - + #cloud-config bootcmd: @@ -289,7 +299,16 @@ write_files: mount -t nfs "${nfs_server_common}" /mnt/common + # Overwrite nested VM image with latest as per NFS + if [ -f /mnt/common/nested-vm-current.img ] + then + rm -f /var/lib/vm/vhost-nested.img + cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img + fi + mkdir /scratch/$(hostname) + cp /VERSION /scratch/$(hostname)/ + cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION exit 0 -- cgit 1.2.3-korg