aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/virl/topologies/double-ring-nested.virl
diff options
context:
space:
mode:
authorCarsten Koester <ckoester@cisco.com>2016-05-25 05:58:29 -0400
committerDave Wallace <dwallacelf@gmail.com>2016-06-02 00:18:28 +0000
commit9d378548cc86028c55baf17260d32d0055603b78 (patch)
tree1cc67da7195459abcaca5f12f0f4b74bc399b60e /resources/tools/virl/topologies/double-ring-nested.virl
parent036f36181c177e4c77f22cdbdcb87fb2f94df3bf (diff)
CSIT-111: Add Packer based framework to auto-generate disk images
Change-Id: Ia18ea34a6288aec0f12f176f4cc264d0f215d1fd Signed-off-by: Carsten Koester <ckoester@cisco.com>
Diffstat (limited to 'resources/tools/virl/topologies/double-ring-nested.virl')
-rw-r--r--resources/tools/virl/topologies/double-ring-nested.virl25
1 files changed, 22 insertions, 3 deletions
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 @@
<extensions>
<entry key="management_network" type="String">flat</entry>
</extensions>
- <node name="tg1" type="SIMPLE" subtype="server" location="570,238" vmImage="server-java-nested">
+ <node name="tg1" type="SIMPLE" subtype="server" location="570,238" vmImage="$$VM_IMAGE$$">
<extensions>
<entry key="config" type="String">#cloud-config&#xD;
bootcmd:&#xD;
@@ -91,6 +91,7 @@ write_files:&#xD;
mount -t nfs "${nfs_server_common}" /mnt/common
mkdir /scratch/$(hostname)
+ cp /VERSION /scratch/$(hostname)/
exit 0&#xD;
</entry>
@@ -103,7 +104,7 @@ write_files:&#xD;
<interface id="4" name="eth5"/>
<interface id="5" name="eth6"/>
</node>
- <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="server-java-nested">
+ <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$">
<extensions>
<entry key="config" type="string">#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&#xD;
</entry>
@@ -201,7 +211,7 @@ write_files:
<interface id="2" name="GigabitEthernet0/6/0"/>
<interface id="3" name="GigabitEthernet0/7/0"/>
</node>
- <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="server-java-nested">
+ <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$">
<extensions>
<entry key="config" type="string">#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&#xD;
</entry>