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: true
11 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
12 nfs_server_common: $$NFS_SERVER_COMMON$$
14 - systemctl start rc-local
15 - touch /tmp/before-sed
16 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
17 - sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
18 - sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
20 - service sshd restart
21 - ln -s /sbin/lspci /usr/bin/lspci
22 - ln -s /sbin/pidof /usr/bin/pidof
25 - gecos: User configured by VIRL Configuration Engine 0.21.4
28 plain-text-passwd: cisco
31 - VIRL-USER-SSH-PUBLIC-KEY
32 - VIRL-USER-SSH-PUBLIC-KEY
33 sudo: ALL=(ALL) NOPASSWD:ALL
35 - path: /usr/local/sbin/cloud-instance-name
39 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
47 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
48 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
49 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
50 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
51 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
52 echo My instance name is $instance_name
60 echo "Mounting NFS directories"
62 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
68 mount -t nfs "${nfs_server_common}" /mnt/common
70 mkdir /scratch/$(hostname)
71 cp /VERSION /scratch/$(hostname)/
75 <entry key="Auto-generate config" type="Boolean">false</entry>
77 <interface id="0" name="eth1"/>
78 <interface id="1" name="eth2"/>
79 <interface id="2" name="eth3"/>
80 <interface id="3" name="eth4"/>
81 <interface id="4" name="eth5"/>
82 <interface id="5" name="eth6"/>
84 <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$">
86 <entry key="config" type="string">#cloud-config
88 manage_etc_hosts: true
89 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
90 nfs_server_common: $$NFS_SERVER_COMMON$$
92 - systemctl start rc-local
93 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
94 - sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
95 - sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
97 - service sshd restart
98 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
99 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
100 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
101 - ln -s /sbin/pidof /usr/bin/pidof
102 - ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
103 - ln -s /sbin/fuser /usr/bin/fuser
106 - gecos: User configured by VIRL Configuration Engine 0.21.4
109 plain-text-passwd: cisco
112 - VIRL-USER-SSH-PUBLIC-KEY
113 - VIRL-USER-SSH-PUBLIC-KEY
114 sudo: ALL=(ALL) NOPASSWD:ALL
116 - path: /usr/local/sbin/cloud-instance-name
120 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
123 - path: /etc/rc.local
128 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
129 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
130 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
131 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
132 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
133 echo My instance name is $instance_name
141 echo "Mounting NFS directories"
143 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
149 mount -t nfs "${nfs_server_common}" /mnt/common
151 # Overwrite nested VM image with latest as per NFS
152 if [ -f /mnt/common/nested-vm-current.img ]
154 rm -f /var/lib/vm/vhost-nested.img
155 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
158 mkdir /scratch/$(hostname)
159 cp /VERSION /scratch/$(hostname)/
160 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
163 - path: /etc/sysctl.d/90-csit.conf
166 # Number of 2MB hugepages desired
169 # Must be greater than or equal to (2 * vm.nr_hugepages).
170 vm.max_map_count=20000
172 # All groups allowed to access hugepages
173 vm.hugetlb_shm_group=0
175 # Shared Memory Max must be greator or equal to the total size of hugepages.
176 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
177 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
178 # is greater than the calculated TotalHugepageSize then set this parameter
179 # to current shmmax value.
180 kernel.shmmax=2147483648
183 <interface id="0" name="GigabitEthernet0/4/0"/>
184 <interface id="1" name="GigabitEthernet0/5/0"/>
185 <interface id="2" name="GigabitEthernet0/6/0"/>
186 <interface id="3" name="GigabitEthernet0/7/0"/>
188 <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$">
190 <entry key="config" type="string">#cloud-config
192 manage_etc_hosts: true
193 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
194 nfs_server_common: $$NFS_SERVER_COMMON$$
196 - systemctl start rc-local
197 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
198 - sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
199 - sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/sshd_config
200 - service ssh restart
201 - service sshd restart
202 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
203 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
204 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
205 - ln -s /sbin/pidof /usr/bin/pidof
206 - ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
207 - ln -s /sbin/fuser /usr/bin/fuser
210 - gecos: User configured by VIRL Configuration Engine 0.21.4
213 plain-text-passwd: cisco
216 - VIRL-USER-SSH-PUBLIC-KEY
217 - VIRL-USER-SSH-PUBLIC-KEY
218 sudo: ALL=(ALL) NOPASSWD:ALL
220 - path: /usr/local/sbin/cloud-instance-name
224 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
227 - path: /etc/rc.local
232 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
233 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
234 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
235 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
236 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
237 echo My instance name is $instance_name
245 echo "Mounting NFS directories"
247 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
253 mount -t nfs "${nfs_server_common}" /mnt/common
255 # Overwrite nested VM image with latest as per NFS
256 if [ -f /mnt/common/nested-vm-current.img ]
258 rm -f /var/lib/vm/vhost-nested.img
259 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
262 mkdir /scratch/$(hostname)
263 cp /VERSION /scratch/$(hostname)/
264 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
267 - path: /etc/sysctl.d/90-csit.conf
270 # Number of 2MB hugepages desired
273 # Must be greater than or equal to (2 * vm.nr_hugepages).
274 vm.max_map_count=20000
276 # All groups allowed to access hugepages
277 vm.hugetlb_shm_group=0
279 # Shared Memory Max must be greator or equal to the total size of hugepages.
280 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
281 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
282 # is greater than the calculated TotalHugepageSize then set this parameter
283 # to current shmmax value.
284 kernel.shmmax=2147483648
287 <interface id="0" name="GigabitEthernet0/4/0"/>
288 <interface id="1" name="GigabitEthernet0/5/0"/>
289 <interface id="2" name="GigabitEthernet0/6/0"/>
290 <interface id="3" name="GigabitEthernet0/7/0"/>
292 <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[2]/virl:interface[1]"/>
293 <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
294 <connection dst="/virl:topology/virl:node[2]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[3]"/>
295 <connection dst="/virl:topology/virl:node[2]/virl:interface[4]" src="/virl:topology/virl:node[3]/virl:interface[4]"/>
296 <connection dst="/virl:topology/virl:node[1]/virl:interface[5]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
297 <connection dst="/virl:topology/virl:node[1]/virl:interface[6]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>