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 - ln -s -t /etc/rc.d /etc/rc.local
12 manage_etc_hosts: true
13 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
14 nfs_server_common: $$NFS_SERVER_COMMON$$
16 - systemctl start getty@ttyS0.service
17 - systemctl start rc-local
18 - touch /tmp/before-sed
19 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
20 - echo "UseDNS no" >> /etc/ssh/sshd_config
22 - service sshd restart
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: /etc/init/ttyS0.conf
39 # This service maintains a getty on ttyS0 from the point the system is
40 # started until it is shut down again.
41 start on stopped rc or RUNLEVEL=[12345]
42 stop on runlevel [!12345]
44 exec /sbin/getty -L 115200 ttyS0 vt102
46 - path: /etc/systemd/system/dhclient@.service
49 Description=Run dhclient on %i interface
53 ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
57 - path: /usr/local/sbin/cloud-instance-name
61 print(pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read(), encoding="ACSII").metadata['name'])
69 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
70 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
71 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
72 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
73 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
74 echo My instance name is $instance_name
82 echo "Mounting NFS directories"
84 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
90 mount -t nfs "${nfs_server_common}" /mnt/common
92 mkdir /scratch/$(hostname)
93 cp /VERSION /scratch/$(hostname)/
97 <entry key="Auto-generate config" type="Boolean">false</entry>
99 <interface id="0" name="eth1"/>
100 <interface id="1" name="eth2"/>
101 <interface id="2" name="eth3"/>
102 <interface id="3" name="eth4"/>
103 <interface id="4" name="eth5"/>
104 <interface id="5" name="eth6"/>
106 <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$">
108 <entry key="config" type="string">#cloud-config
110 - ln -s -t /etc/rc.d /etc/rc.local
112 manage_etc_hosts: true
113 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
114 nfs_server_common: $$NFS_SERVER_COMMON$$
116 - systemctl start getty@ttyS0.service
117 - systemctl start rc-local
118 - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
119 - echo "UseDNS no" >> /etc/ssh/sshd_config
120 - service ssh restart
121 - service sshd restart
122 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
123 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
124 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
127 - gecos: User configured by VIRL Configuration Engine 0.21.4
130 plain-text-passwd: cisco
133 - VIRL-USER-SSH-PUBLIC-KEY
134 - VIRL-USER-SSH-PUBLIC-KEY
135 sudo: ALL=(ALL) NOPASSWD:ALL
137 - path: /etc/init/ttyS0.conf
141 # This service maintains a getty on ttyS0 from the point the system is
142 # started until it is shut down again.
143 start on stopped rc or RUNLEVEL=[12345]
144 stop on runlevel [!12345]
146 exec /sbin/getty -L 115200 ttyS0 vt102
148 - path: /etc/systemd/system/dhclient@.service
151 Description=Run dhclient on %i interface
155 ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
159 - path: /usr/local/sbin/cloud-instance-name
163 print(pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read(), encoding="ACSII").metadata['name'])
166 - path: /etc/rc.local
171 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
172 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
173 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
174 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
175 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
176 echo My instance name is $instance_name
184 echo "Mounting NFS directories"
186 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
192 mount -t nfs "${nfs_server_common}" /mnt/common
194 # Overwrite nested VM image with latest as per NFS
195 if [ -f /mnt/common/nested-vm-current.img ]
197 rm -f /var/lib/vm/vhost-nested.img
198 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
201 mkdir /scratch/$(hostname)
202 cp /VERSION /scratch/$(hostname)/
203 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
206 - path: /etc/sysctl.d/90-csit.conf
209 # Number of 2MB hugepages desired
212 # Must be greater than or equal to (2 * vm.nr_hugepages).
213 vm.max_map_count=20000
215 # All groups allowed to access hugepages
216 vm.hugetlb_shm_group=0
218 # Shared Memory Max must be greator or equal to the total size of hugepages.
219 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
220 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
221 # is greater than the calculated TotalHugepageSize then set this parameter
222 # to current shmmax value.
223 kernel.shmmax=2147483648
226 <interface id="0" name="GigabitEthernet0/4/0"/>
227 <interface id="1" name="GigabitEthernet0/5/0"/>
228 <interface id="2" name="GigabitEthernet0/6/0"/>
229 <interface id="3" name="GigabitEthernet0/7/0"/>
231 <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$">
233 <entry key="config" type="string">#cloud-config
235 - ln -s -t /etc/rc.d /etc/rc.local
237 manage_etc_hosts: true
238 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
239 nfs_server_common: $$NFS_SERVER_COMMON$$
241 - systemctl start getty@ttyS0.service
242 - systemctl start rc-local
243 - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
244 - echo "UseDNS no" >> /etc/ssh/sshd_config
245 - service ssh restart
246 - service sshd restart
247 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
248 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
249 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
252 - gecos: User configured by VIRL Configuration Engine 0.21.4
255 plain-text-passwd: cisco
258 - VIRL-USER-SSH-PUBLIC-KEY
259 - VIRL-USER-SSH-PUBLIC-KEY
260 sudo: ALL=(ALL) NOPASSWD:ALL
262 - path: /etc/init/ttyS0.conf
266 # This service maintains a getty on ttyS0 from the point the system is
267 # started until it is shut down again.
268 start on stopped rc or RUNLEVEL=[12345]
269 stop on runlevel [!12345]
271 exec /sbin/getty -L 115200 ttyS0 vt102
273 - path: /etc/systemd/system/dhclient@.service
276 Description=Run dhclient on %i interface
280 ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
284 - path: /usr/local/sbin/cloud-instance-name
288 print(pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read(), encoding="ACSII").metadata['name'])
291 - path: /etc/rc.local
296 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
297 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
298 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
299 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
300 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
301 echo My instance name is $instance_name
309 echo "Mounting NFS directories"
311 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
317 mount -t nfs "${nfs_server_common}" /mnt/common
319 # Overwrite nested VM image with latest as per NFS
320 if [ -f /mnt/common/nested-vm-current.img ]
322 rm -f /var/lib/vm/vhost-nested.img
323 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
326 mkdir /scratch/$(hostname)
327 cp /VERSION /scratch/$(hostname)/
328 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
331 - path: /etc/sysctl.d/90-csit.conf
334 # Number of 2MB hugepages desired
337 # Must be greater than or equal to (2 * vm.nr_hugepages).
338 vm.max_map_count=20000
340 # All groups allowed to access hugepages
341 vm.hugetlb_shm_group=0
343 # Shared Memory Max must be greator or equal to the total size of hugepages.
344 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
345 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
346 # is greater than the calculated TotalHugepageSize then set this parameter
347 # to current shmmax value.
348 kernel.shmmax=2147483648
351 <interface id="0" name="GigabitEthernet0/4/0"/>
352 <interface id="1" name="GigabitEthernet0/5/0"/>
353 <interface id="2" name="GigabitEthernet0/6/0"/>
354 <interface id="3" name="GigabitEthernet0/7/0"/>
356 <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[2]/virl:interface[1]"/>
357 <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
358 <connection dst="/virl:topology/virl:node[2]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[3]"/>
359 <connection dst="/virl:topology/virl:node[2]/virl:interface[4]" src="/virl:topology/virl:node[3]/virl:interface[4]"/>
360 <connection dst="/virl:topology/virl:node[1]/virl:interface[5]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
361 <connection dst="/virl:topology/virl:node[1]/virl:interface[6]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>