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 - echo "UseDNS no" >> /etc/ssh/sshd_config
19 - service sshd restart
20 - ln -s /sbin/lspci /usr/bin/lspci
21 - ln -s /sbin/pidof /usr/bin/pidof
24 - gecos: User configured by VIRL Configuration Engine 0.21.4
27 plain-text-passwd: cisco
30 - VIRL-USER-SSH-PUBLIC-KEY
31 - VIRL-USER-SSH-PUBLIC-KEY
32 sudo: ALL=(ALL) NOPASSWD:ALL
34 - path: /usr/local/sbin/cloud-instance-name
38 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
46 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
47 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
48 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
49 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
50 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
51 echo My instance name is $instance_name
59 echo "Mounting NFS directories"
61 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
67 mount -t nfs "${nfs_server_common}" /mnt/common
69 mkdir /scratch/$(hostname)
70 cp /VERSION /scratch/$(hostname)/
74 <entry key="Auto-generate config" type="Boolean">false</entry>
76 <interface id="0" name="eth1"/>
77 <interface id="1" name="eth2"/>
78 <interface id="2" name="eth3"/>
79 <interface id="3" name="eth4"/>
80 <interface id="4" name="eth5"/>
81 <interface id="5" name="eth6"/>
83 <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$">
85 <entry key="config" type="string">#cloud-config
87 manage_etc_hosts: true
88 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
89 nfs_server_common: $$NFS_SERVER_COMMON$$
91 - systemctl start rc-local
92 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
93 - echo "UseDNS no" >> /etc/ssh/sshd_config
95 - service sshd restart
96 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
97 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
98 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
99 - ln -s /sbin/pidof /usr/bin/pidof
100 - ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
101 - ln -s /sbin/fuser /usr/bin/fuser
104 - gecos: User configured by VIRL Configuration Engine 0.21.4
107 plain-text-passwd: cisco
110 - VIRL-USER-SSH-PUBLIC-KEY
111 - VIRL-USER-SSH-PUBLIC-KEY
112 sudo: ALL=(ALL) NOPASSWD:ALL
114 - path: /usr/local/sbin/cloud-instance-name
118 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
121 - path: /etc/rc.local
126 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
127 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
128 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
129 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
130 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
131 echo My instance name is $instance_name
139 echo "Mounting NFS directories"
141 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
147 mount -t nfs "${nfs_server_common}" /mnt/common
149 # Overwrite nested VM image with latest as per NFS
150 if [ -f /mnt/common/nested-vm-current.img ]
152 rm -f /var/lib/vm/vhost-nested.img
153 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
156 mkdir /scratch/$(hostname)
157 cp /VERSION /scratch/$(hostname)/
158 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
161 - path: /etc/sysctl.d/90-csit.conf
164 # Number of 2MB hugepages desired
167 # Must be greater than or equal to (2 * vm.nr_hugepages).
168 vm.max_map_count=20000
170 # All groups allowed to access hugepages
171 vm.hugetlb_shm_group=0
173 # Shared Memory Max must be greator or equal to the total size of hugepages.
174 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
175 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
176 # is greater than the calculated TotalHugepageSize then set this parameter
177 # to current shmmax value.
178 kernel.shmmax=2147483648
181 <interface id="0" name="GigabitEthernet0/4/0"/>
182 <interface id="1" name="GigabitEthernet0/5/0"/>
183 <interface id="2" name="GigabitEthernet0/6/0"/>
184 <interface id="3" name="GigabitEthernet0/7/0"/>
186 <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$">
188 <entry key="config" type="string">#cloud-config
190 manage_etc_hosts: true
191 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
192 nfs_server_common: $$NFS_SERVER_COMMON$$
194 - systemctl start rc-local
195 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
196 - echo "UseDNS no" >> /etc/ssh/sshd_config
197 - service ssh restart
198 - service sshd restart
199 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
200 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
201 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
202 - ln -s /sbin/pidof /usr/bin/pidof
203 - ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
204 - ln -s /sbin/fuser /usr/bin/fuser
207 - gecos: User configured by VIRL Configuration Engine 0.21.4
210 plain-text-passwd: cisco
213 - VIRL-USER-SSH-PUBLIC-KEY
214 - VIRL-USER-SSH-PUBLIC-KEY
215 sudo: ALL=(ALL) NOPASSWD:ALL
217 - path: /usr/local/sbin/cloud-instance-name
221 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
224 - path: /etc/rc.local
229 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
230 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
231 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
232 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
233 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
234 echo My instance name is $instance_name
242 echo "Mounting NFS directories"
244 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
250 mount -t nfs "${nfs_server_common}" /mnt/common
252 # Overwrite nested VM image with latest as per NFS
253 if [ -f /mnt/common/nested-vm-current.img ]
255 rm -f /var/lib/vm/vhost-nested.img
256 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
259 mkdir /scratch/$(hostname)
260 cp /VERSION /scratch/$(hostname)/
261 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
264 - path: /etc/sysctl.d/90-csit.conf
267 # Number of 2MB hugepages desired
270 # Must be greater than or equal to (2 * vm.nr_hugepages).
271 vm.max_map_count=20000
273 # All groups allowed to access hugepages
274 vm.hugetlb_shm_group=0
276 # Shared Memory Max must be greator or equal to the total size of hugepages.
277 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
278 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
279 # is greater than the calculated TotalHugepageSize then set this parameter
280 # to current shmmax value.
281 kernel.shmmax=2147483648
284 <interface id="0" name="GigabitEthernet0/4/0"/>
285 <interface id="1" name="GigabitEthernet0/5/0"/>
286 <interface id="2" name="GigabitEthernet0/6/0"/>
287 <interface id="3" name="GigabitEthernet0/7/0"/>
289 <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[2]/virl:interface[1]"/>
290 <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
291 <connection dst="/virl:topology/virl:node[2]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[3]"/>
292 <connection dst="/virl:topology/virl:node[2]/virl:interface[4]" src="/virl:topology/virl:node[3]/virl:interface[4]"/>
293 <connection dst="/virl:topology/virl:node[1]/virl:interface[5]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
294 <connection dst="/virl:topology/virl:node[1]/virl:interface[6]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>