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="server-java-nested">
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$$
17 - systemctl start getty@ttyS0.service
18 - systemctl start rc-local
19 - touch /tmp/before-sed
20 - sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
21 - echo "UseDNS no" >> /etc/ssh/sshd_config
22 - service ssh restart
23 - service sshd restart
26 - gecos: User configured by VIRL Configuration Engine 0.21.4
27 lock-passwd: false
29 plain-text-passwd: cisco
31 ssh-authorized-keys:
32 - VIRL-USER-SSH-PUBLIC-KEY
33 - VIRL-USER-SSH-PUBLIC-KEY
34 sudo: ALL=(ALL) NOPASSWD:ALL
36 - path: /etc/init/ttyS0.conf
40 # This service maintains a getty on ttyS0 from the point the system is
41 # started until it is shut down again.
42 start on stopped rc or RUNLEVEL=[12345]
43 stop on runlevel [!12345]
45 exec /sbin/getty -L 115200 ttyS0 vt102
46 permissions: '0644'
47 - path: /etc/systemd/system/dhclient@.service
50 Description=Run dhclient on %i interface
51 After=network.target
54 ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
55 RemainAfterExit=yes
57 permissions: '0644'
58 - path: /usr/local/sbin/cloud-instance-name
62 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl').read()).metadata['name']
65 - path: /etc/rc.local
67 permissions: '0755'
70 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
71 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
72 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
73 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
74 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
75 echo My instance name is $instance_name
83 echo "Mounting NFS directories"
85 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
91 mount -t nfs "${nfs_server_common}" /mnt/common
93 mkdir /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="server-java-nested">
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$$
117 - systemctl start getty@ttyS0.service
118 - systemctl start rc-local
119 - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
120 - echo "UseDNS no" >> /etc/ssh/sshd_config
121 - service ssh restart
122 - service sshd restart
123 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
124 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.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').read()).metadata['name']
166 - path: /etc/rc.local
167 owner: root:root
168 permissions: '0755'
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 mkdir /scratch/$(hostname)
199 <interface id="0" name="GigabitEthernet0/4/0"/>
200 <interface id="1" name="GigabitEthernet0/5/0"/>
201 <interface id="2" name="GigabitEthernet0/6/0"/>
202 <interface id="3" name="GigabitEthernet0/7/0"/>
204 <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="server-java-nested">
206 <entry key="config" type="string">#cloud-config
208 - ln -s -t /etc/rc.d /etc/rc.local
210 manage_etc_hosts: true
211 nfs_server_scratch: $$NFS_SERVER_SCRATCH$$
212 nfs_server_common: $$NFS_SERVER_COMMON$$
215 - systemctl start getty@ttyS0.service
216 - systemctl start rc-local
217 - sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
218 - echo "UseDNS no" >> /etc/ssh/sshd_config
219 - service ssh restart
220 - service sshd restart
221 - sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf
222 - sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf
225 - gecos: User configured by VIRL Configuration Engine 0.21.4
228 plain-text-passwd: cisco
231 - VIRL-USER-SSH-PUBLIC-KEY
232 - VIRL-USER-SSH-PUBLIC-KEY
233 sudo: ALL=(ALL) NOPASSWD:ALL
235 - path: /etc/init/ttyS0.conf
239 # This service maintains a getty on ttyS0 from the point the system is
240 # started until it is shut down again.
241 start on stopped rc or RUNLEVEL=[12345]
242 stop on runlevel [!12345]
244 exec /sbin/getty -L 115200 ttyS0 vt102
246 - path: /etc/systemd/system/dhclient@.service
249 Description=Run dhclient on %i interface
253 ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
257 - path: /usr/local/sbin/cloud-instance-name
261 print pickle.loads(open('/var/lib/cloud/instance/obj.pkl').read()).metadata['name']
264 - path: /etc/rc.local
265 owner: root:root
266 permissions: '0755'
269 grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1
270 grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1
271 nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
272 nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }')
273 instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>')
274 echo My instance name is $instance_name
282 echo "Mounting NFS directories"
284 while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch
290 mount -t nfs "${nfs_server_common}" /mnt/common
292 mkdir /scratch/$(hostname)
297 <interface id="0" name="GigabitEthernet0/4/0"/>
298 <interface id="1" name="GigabitEthernet0/5/0"/>
299 <interface id="2" name="GigabitEthernet0/6/0"/>
300 <interface id="3" name="GigabitEthernet0/7/0"/>
302 <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[2]/virl:interface[1]"/>
303 <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[2]/virl:interface[2]"/>
304 <connection dst="/virl:topology/virl:node[2]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[3]"/>
305 <connection dst="/virl:topology/virl:node[2]/virl:interface[4]" src="/virl:topology/virl:node[3]/virl:interface[4]"/>
306 <connection dst="/virl:topology/virl:node[1]/virl:interface[5]" src="/virl:topology/virl:node[3]/virl:interface[1]"/>
307 <connection dst="/virl:topology/virl:node[1]/virl:interface[6]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>