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
22 - gecos: User configured by VIRL Configuration Engine 0.21.4
25 plain-text-passwd: cisco
28 - VIRL-USER-SSH-PUBLIC-KEY
29 - VIRL-USER-SSH-PUBLIC-KEY
30 sudo: ALL=(ALL) NOPASSWD:ALL
32 - path: /usr/local/sbin/cloud-instance-name
36 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
44 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
45 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
46 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
47 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
48 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
49 echo My instance name is $instance_name
57 echo "Mounting NFS directories"
59 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
65 mount -t nfs "${nfs_server_common}" /mnt/common
67 mkdir /scratch/$(hostname)
68 cp /VERSION /scratch/$(hostname)/
72 <entry key="Auto-generate config" type="Boolean">false</entry>
74 <interface id="0" name="eth1"/>
75 <interface id="1" name="eth2"/>
76 <interface id="2" name="eth3"/>
77 <interface id="3" name="eth4"/>
78 <interface id="4" name="eth5"/>
79 <interface id="5" name="eth6"/>
81 <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$">
83 <entry key="config" type="string">#cloud-config
85 manage_etc_hosts: true
86 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
87 nfs_server_common: $$NFS_SERVER_COMMON$$
89 - systemctl start rc-local
90 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
91 - echo "UseDNS no" >> /etc/ssh/sshd_config
93 - service sshd restart
94 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
95 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
96 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
99 - gecos: User configured by VIRL Configuration Engine 0.21.4
102 plain-text-passwd: cisco
105 - VIRL-USER-SSH-PUBLIC-KEY
106 - VIRL-USER-SSH-PUBLIC-KEY
107 sudo: ALL=(ALL) NOPASSWD:ALL
109 - path: /usr/local/sbin/cloud-instance-name
113 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
116 - path: /etc/rc.local
121 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
122 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
123 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
124 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
125 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
126 echo My instance name is $instance_name
134 echo "Mounting NFS directories"
136 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
142 mount -t nfs "${nfs_server_common}" /mnt/common
144 # Overwrite nested VM image with latest as per NFS
145 if [ -f /mnt/common/nested-vm-current.img ]
147 rm -f /var/lib/vm/vhost-nested.img
148 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
151 mkdir /scratch/$(hostname)
152 cp /VERSION /scratch/$(hostname)/
153 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
156 - path: /etc/sysctl.d/90-csit.conf
159 # Number of 2MB hugepages desired
162 # Must be greater than or equal to (2 * vm.nr_hugepages).
163 vm.max_map_count=20000
165 # All groups allowed to access hugepages
166 vm.hugetlb_shm_group=0
168 # Shared Memory Max must be greator or equal to the total size of hugepages.
169 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
170 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
171 # is greater than the calculated TotalHugepageSize then set this parameter
172 # to current shmmax value.
173 kernel.shmmax=2147483648
176 <interface id="0" name="GigabitEthernet0/4/0"/>
177 <interface id="1" name="GigabitEthernet0/5/0"/>
178 <interface id="2" name="GigabitEthernet0/6/0"/>
179 <interface id="3" name="GigabitEthernet0/7/0"/>
181 <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$">
183 <entry key="config" type="string">#cloud-config
185 manage_etc_hosts: true
186 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
187 nfs_server_common: $$NFS_SERVER_COMMON$$
189 - systemctl start rc-local
190 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
191 - echo "UseDNS no" >> /etc/ssh/sshd_config
192 - service ssh restart
193 - service sshd restart
194 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
195 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
196 - ln -s /dev/null /etc/sysctl.d/80-vpp.conf
199 - gecos: User configured by VIRL Configuration Engine 0.21.4
202 plain-text-passwd: cisco
205 - VIRL-USER-SSH-PUBLIC-KEY
206 - VIRL-USER-SSH-PUBLIC-KEY
207 sudo: ALL=(ALL) NOPASSWD:ALL
209 - path: /usr/local/sbin/cloud-instance-name
213 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl', 'rb').read()).metadata['name']
216 - path: /etc/rc.local
221 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
222 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
223 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
224 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
225 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
226 echo My instance name is $instance_name
234 echo "Mounting NFS directories"
236 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
242 mount -t nfs "${nfs_server_common}" /mnt/common
244 # Overwrite nested VM image with latest as per NFS
245 if [ -f /mnt/common/nested-vm-current.img ]
247 rm -f /var/lib/vm/vhost-nested.img
248 cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img
251 mkdir /scratch/$(hostname)
252 cp /VERSION /scratch/$(hostname)/
253 cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION
256 - path: /etc/sysctl.d/90-csit.conf
259 # Number of 2MB hugepages desired
262 # Must be greater than or equal to (2 * vm.nr_hugepages).
263 vm.max_map_count=20000
265 # All groups allowed to access hugepages
266 vm.hugetlb_shm_group=0
268 # Shared Memory Max must be greator or equal to the total size of hugepages.
269 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
270 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
271 # is greater than the calculated TotalHugepageSize then set this parameter
272 # to current shmmax value.
273 kernel.shmmax=2147483648
276 <interface id="0" name="GigabitEthernet0/4/0"/>
277 <interface id="1" name="GigabitEthernet0/5/0"/>
278 <interface id="2" name="GigabitEthernet0/6/0"/>
279 <interface id="3" name="GigabitEthernet0/7/0"/>
281 <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[2]/virl:interface[1]"/>
282 <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
283 <connection dst="/virl:topology/virl:node[2]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[3]"/>
284 <connection dst="/virl:topology/virl:node[2]/virl:interface[4]" src="/virl:topology/virl:node[3]/virl:interface[4]"/>
285 <connection dst="/virl:topology/virl:node[1]/virl:interface[5]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
286 <connection dst="/virl:topology/virl:node[1]/virl:interface[6]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>