1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.9" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.9/virl.xsd">
4 <entry key="management_network" type="String">flat</entry>
6 <node name="tg1" type="SIMPLE" subtype="server" location="570,238" vmImage="$$VM_IMAGE$$">
8 <entry key="config" type="String">#cloud-config
10 manage_etc_hosts: false
11 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
12 nfs_server_common: $$NFS_SERVER_COMMON$$
14 - hostnamectl set-hostname tg1
15 - systemctl start rc-local
16 - touch /tmp/before-sed
17 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
18 - sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
19 - sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
21 - service sshd restart
22 - ln -s /sbin/lspci /usr/bin/lspci
23 - ln -s /sbin/pidof /usr/bin/pidof
26 - gecos: User configured by VIRL Configuration Engine 0.21.4
29 plain-text-passwd: cisco
32 - VIRL-USER-SSH-PUBLIC-KEY
33 - VIRL-USER-SSH-PUBLIC-KEY
34 sudo: ALL=(ALL) NOPASSWD:ALL
36 - path: /usr/local/sbin/cloud-instance-name
40 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
48 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
49 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
50 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
51 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
52 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
53 echo My instance name is $instance_name
61 echo "Mounting NFS directories"
63 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
69 mount -t nfs "${nfs_server_common}" /mnt/common
71 mkdir /scratch/$(hostname)
72 cp /VERSION /scratch/$(hostname)/
76 <entry key="Auto-generate config" type="Boolean">false</entry>
78 <interface id="0" name="eth1"/>
79 <interface id="1" name="eth2"/>
80 <interface id="2" name="eth3"/>
81 <interface id="3" name="eth4"/>
82 <interface id="4" name="eth5"/>
83 <interface id="5" name="eth6"/>
85 <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$">
87 <entry key="config" type="string">#cloud-config
89 manage_etc_hosts: false
90 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
91 nfs_server_common: $$NFS_SERVER_COMMON$$
93 - hostnamectl set-hostname sut1
94 - systemctl start rc-local
95 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
96 - sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
97 - sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
99 - service sshd restart
100 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
101 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
102 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
103 - ln -s /sbin/pidof /usr/bin/pidof
104 - ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
105 - ln -s /sbin/fuser /usr/bin/fuser
108 - gecos: User configured by VIRL Configuration Engine 0.21.4
111 plain-text-passwd: cisco
114 - VIRL-USER-SSH-PUBLIC-KEY
115 - VIRL-USER-SSH-PUBLIC-KEY
116 sudo: ALL=(ALL) NOPASSWD:ALL
118 - path: /usr/local/sbin/cloud-instance-name
122 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
125 - path: /etc/rc.local
130 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
131 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
132 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
133 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
134 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
135 echo My instance name is $instance_name
143 echo "Mounting NFS directories"
145 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
151 mount -t nfs "${nfs_server_common}" /mnt/common
153 # Overwrite nested VM image with latest as per NFS
154 if [ -f /mnt/common/nested-vm-current.img ]
156 rm -f /var/lib/vm/vhost-nested.img
157 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
160 mkdir /scratch/$(hostname)
161 cp /VERSION /scratch/$(hostname)/
162 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
165 - path: /etc/sysctl.d/90-csit.conf
168 # Number of 2MB hugepages desired
171 # Must be greater than or equal to (2 * vm.nr_hugepages).
172 vm.max_map_count=20000
174 # All groups allowed to access hugepages
175 vm.hugetlb_shm_group=0
177 # Shared Memory Max must be greator or equal to the total size of hugepages.
178 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
179 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
180 # is greater than the calculated TotalHugepageSize then set this parameter
181 # to current shmmax value.
182 kernel.shmmax=2147483648
185 <interface id="0" name="GigabitEthernet0/4/0"/>
186 <interface id="1" name="GigabitEthernet0/5/0"/>
187 <interface id="2" name="GigabitEthernet0/6/0"/>
188 <interface id="3" name="GigabitEthernet0/7/0"/>
190 <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$">
192 <entry key="config" type="string">#cloud-config
194 manage_etc_hosts: false
195 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
196 nfs_server_common: $$NFS_SERVER_COMMON$$
198 - hostnamectl set-hostname sut2
199 - systemctl start rc-local
200 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
201 - sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
202 - sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
203 - service ssh restart
204 - service sshd restart
205 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
206 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
207 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
208 - ln -s /sbin/pidof /usr/bin/pidof
209 - ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
210 - ln -s /sbin/fuser /usr/bin/fuser
213 - gecos: User configured by VIRL Configuration Engine 0.21.4
216 plain-text-passwd: cisco
219 - VIRL-USER-SSH-PUBLIC-KEY
220 - VIRL-USER-SSH-PUBLIC-KEY
221 sudo: ALL=(ALL) NOPASSWD:ALL
223 - path: /usr/local/sbin/cloud-instance-name
227 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
230 - path: /etc/rc.local
235 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
236 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
237 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
238 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
239 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
240 echo My instance name is $instance_name
248 echo "Mounting NFS directories"
250 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
256 mount -t nfs "${nfs_server_common}" /mnt/common
258 # Overwrite nested VM image with latest as per NFS
259 if [ -f /mnt/common/nested-vm-current.img ]
261 rm -f /var/lib/vm/vhost-nested.img
262 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
265 mkdir /scratch/$(hostname)
266 cp /VERSION /scratch/$(hostname)/
267 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
270 - path: /etc/sysctl.d/90-csit.conf
273 # Number of 2MB hugepages desired
276 # Must be greater than or equal to (2 * vm.nr_hugepages).
277 vm.max_map_count=20000
279 # All groups allowed to access hugepages
280 vm.hugetlb_shm_group=0
282 # Shared Memory Max must be greator or equal to the total size of hugepages.
283 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
284 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
285 # is greater than the calculated TotalHugepageSize then set this parameter
286 # to current shmmax value.
287 kernel.shmmax=2147483648
290 <interface id="0" name="GigabitEthernet0/4/0"/>
291 <interface id="1" name="GigabitEthernet0/5/0"/>
292 <interface id="2" name="GigabitEthernet0/6/0"/>
293 <interface id="3" name="GigabitEthernet0/7/0"/>
295 <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[2]/virl:interface[1]"/>
296 <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
297 <connection dst="/virl:topology/virl:node[2]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[3]"/>
298 <connection dst="/virl:topology/virl:node[2]/virl:interface[4]" src="/virl:topology/virl:node[3]/virl:interface[4]"/>
299 <connection dst="/virl:topology/virl:node[1]/virl:interface[5]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
300 <connection dst="/virl:topology/virl:node[1]/virl:interface[6]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>