Browse Source

cloud-init scripts for LXCs fixed by Christoph Hardegen

master
Sebastian Rieger 8 years ago
parent
commit
f75a15b3ca
  1. 195
      GIT-VIRL-HS-Fulda/Advanced Computer Networks (Master AI)/advcompnet-lab2-dcn-fabricpath.virl

195
GIT-VIRL-HS-Fulda/Advanced Computer Networks (Master AI)/advcompnet-lab2-dcn-fabricpath.virl

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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">
<topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.95" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.95/virl.xsd">
<extensions>
<entry key="management_network" type="String">exclusive</entry>
</extensions>
<node name="nxosv-spine1" type="SIMPLE" subtype="NX-OSv" location="353,94" ipv4="192.168.0.1">
<node name="nxosv-spine1" type="SIMPLE" subtype="NX-OSv" location="353,94">
<extensions>
<entry key="config" type="string">!Command: show running-config
!Time: Tue Jun 23 19:24:32 2015
@ -840,7 +840,7 @@ router bgp 1
<interface id="2" name="Ethernet2/3" ipv4="10.0.0.13" netPrefixLenV4="30"/>
<interface id="3" name="Ethernet2/4" ipv4="10.0.0.17" netPrefixLenV4="30"/>
</node>
<node name="nxosv-spine2" type="SIMPLE" subtype="NX-OSv" location="533,94" ipv4="192.168.0.2">
<node name="nxosv-spine2" type="SIMPLE" subtype="NX-OSv" location="533,94">
<extensions>
<entry key="config" type="string">!Command: show running-config
!Time: Tue Jun 23 19:24:33 2015
@ -1671,7 +1671,7 @@ router bgp 1
<interface id="2" name="Ethernet2/3" ipv4="10.0.0.29" netPrefixLenV4="30"/>
<interface id="3" name="Ethernet2/4" ipv4="10.0.0.33" netPrefixLenV4="30"/>
</node>
<node name="nxosv-leaf2" type="SIMPLE" subtype="NX-OSv" location="368,240" ipv4="192.168.0.4">
<node name="nxosv-leaf2" type="SIMPLE" subtype="NX-OSv" location="368,240">
<extensions>
<entry key="AutoNetkit.mgmt_ip" type="string"></entry>
<entry key="config" type="String">!Command: show running-config&#xD;
@ -2457,7 +2457,7 @@ router bgp 1&#xD;
<interface id="1" name="Ethernet2/2" ipv4="10.0.0.26" netPrefixLenV4="30"/>
<interface id="2" name="Ethernet2/3"/>
</node>
<node name="nxosv-leaf3" type="SIMPLE" subtype="NX-OSv" location="532,240" ipv4="192.168.0.5">
<node name="nxosv-leaf3" type="SIMPLE" subtype="NX-OSv" location="532,240">
<extensions>
<entry key="AutoNetkit.mgmt_ip" type="string"></entry>
<entry key="config" type="String">!Command: show running-config&#xD;
@ -3243,7 +3243,7 @@ router bgp 1&#xD;
<interface id="1" name="Ethernet2/2" ipv4="10.0.0.30" netPrefixLenV4="30"/>
<interface id="2" name="Ethernet2/3"/>
</node>
<node name="nxosv-leaf4" type="SIMPLE" subtype="NX-OSv" location="712,240" ipv4="192.168.0.6">
<node name="nxosv-leaf4" type="SIMPLE" subtype="NX-OSv" location="712,240">
<extensions>
<entry key="config" type="string">!Command: show running-config
!Time: Tue Jun 23 19:24:30 2015
@ -4032,7 +4032,7 @@ router bgp 1
<interface id="1" name="Ethernet2/2" ipv4="10.0.0.18" netPrefixLenV4="30"/>
<interface id="2" name="Ethernet2/3"/>
</node>
<node name="nxosv-leaf1" type="SIMPLE" subtype="NX-OSv" location="200,240" ipv4="192.168.0.11">
<node name="nxosv-leaf1" type="SIMPLE" subtype="NX-OSv" location="200,240">
<extensions>
<entry key="config" type="string">!Command: show running-config
!Time: Tue Jun 23 19:24:31 2015
@ -4833,34 +4833,207 @@ router bgp 1
<interface id="1" name="Ethernet2/2" ipv4="10.0.0.22" netPrefixLenV4="30"/>
<interface id="2" name="Ethernet2/3"/>
</node>
<node name="lxc-iperf-1" type="SIMPLE" subtype="lxc-iperf" location="204,337" ipv4="192.168.100.1">
<node name="lxc-iperf-1" type="SIMPLE" subtype="lxc-iperf" location="198,337" ipv4="192.168.100.1">
<extensions>
<entry key="config" type="String">#cloud-config&#xD;
bootcmd:&#xD;
- ln -s -t /etc/rc.d /etc/rc.local&#xD;
hostname: lxc-iperf-1&#xD;
manage_etc_hosts: true&#xD;
runcmd:&#xD;
- systemctl start rc-local&#xD;
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
- echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
- service ssh restart&#xD;
- service sshd restart&#xD;
users:&#xD;
- default&#xD;
- gecos: User configured by VIRL Configuration Engine 0.20.22&#xD;
lock-passwd: false&#xD;
name: cisco&#xD;
plain-text-passwd: cisco&#xD;
shell: /bin/bash&#xD;
ssh-authorized-keys:&#xD;
- VIRL-USER-SSH-PUBLIC-KEY&#xD;
sudo: ALL=(ALL) ALL&#xD;
write_files:&#xD;
- path: /etc/systemd/system/dhclient@.service&#xD;
content: |&#xD;
[Unit]&#xD;
Description=Run dhclient on %i interface&#xD;
After=network.target&#xD;
[Service]&#xD;
Type=oneshot&#xD;
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
RemainAfterExit=yes&#xD;
owner: root:root&#xD;
permissions: '0644'&#xD;
- path: /etc/rc.local&#xD;
owner: root:root&#xD;
permissions: '0755'&#xD;
content: |-&#xD;
#!/bin/sh&#xD;
ifconfig eth1 up 192.168.100.1 netmask 255.255.255.0&#xD;
exit 0&#xD;
</entry>
</extensions>
<interface id="0" name="eth1" ipv4="192.168.100.1" netPrefixLenV4="24">
<extensions>
<entry key="AutoNetkit.vlan" type="Integer">10</entry>
</extensions>
</interface>
</node>
<node name="lxc-iperf-2" type="SIMPLE" subtype="lxc-iperf" location="371,337" ipv4="192.168.100.2">
<node name="lxc-iperf-2" type="SIMPLE" subtype="lxc-iperf" location="365,337" ipv4="192.168.100.2">
<extensions>
<entry key="config" type="String">#cloud-config&#xD;
bootcmd:&#xD;
- ln -s -t /etc/rc.d /etc/rc.local&#xD;
hostname: lxc-iperf-2&#xD;
manage_etc_hosts: true&#xD;
runcmd:&#xD;
- systemctl start rc-local&#xD;
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
- echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
- service ssh restart&#xD;
- service sshd restart&#xD;
users:&#xD;
- default&#xD;
- gecos: User configured by VIRL Configuration Engine 0.20.22&#xD;
lock-passwd: false&#xD;
name: cisco&#xD;
plain-text-passwd: cisco&#xD;
shell: /bin/bash&#xD;
ssh-authorized-keys:&#xD;
- VIRL-USER-SSH-PUBLIC-KEY&#xD;
sudo: ALL=(ALL) ALL&#xD;
write_files:&#xD;
- path: /etc/systemd/system/dhclient@.service&#xD;
content: |&#xD;
[Unit]&#xD;
Description=Run dhclient on %i interface&#xD;
After=network.target&#xD;
[Service]&#xD;
Type=oneshot&#xD;
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
RemainAfterExit=yes&#xD;
owner: root:root&#xD;
permissions: '0644'&#xD;
- path: /etc/rc.local&#xD;
owner: root:root&#xD;
permissions: '0755'&#xD;
content: |-&#xD;
#!/bin/sh&#xD;
ifconfig eth1 up 192.168.100.2 netmask 255.255.255.0&#xD;
exit 0&#xD;
</entry>
</extensions>
<interface id="0" name="eth1" ipv4="192.168.100.2" netPrefixLenV4="24">
<extensions>
<entry key="AutoNetkit.vlan" type="Integer">10</entry>
</extensions>
</interface>
</node>
<node name="lxc-iperf-3" type="SIMPLE" subtype="lxc-iperf" location="536,337" ipv4="192.168.100.3">
<node name="lxc-iperf-3" type="SIMPLE" subtype="lxc-iperf" location="529,336" ipv4="192.168.100.3">
<extensions>
<entry key="config" type="String">#cloud-config&#xD;
bootcmd:&#xD;
- ln -s -t /etc/rc.d /etc/rc.local&#xD;
hostname: lxc-iperf-3&#xD;
manage_etc_hosts: true&#xD;
runcmd:&#xD;
- systemctl start rc-local&#xD;
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
- echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
- service ssh restart&#xD;
- service sshd restart&#xD;
users:&#xD;
- default&#xD;
- gecos: User configured by VIRL Configuration Engine 0.20.22&#xD;
lock-passwd: false&#xD;
name: cisco&#xD;
plain-text-passwd: cisco&#xD;
shell: /bin/bash&#xD;
ssh-authorized-keys:&#xD;
- VIRL-USER-SSH-PUBLIC-KEY&#xD;
sudo: ALL=(ALL) ALL&#xD;
write_files:&#xD;
- path: /etc/systemd/system/dhclient@.service&#xD;
content: |&#xD;
[Unit]&#xD;
Description=Run dhclient on %i interface&#xD;
After=network.target&#xD;
[Service]&#xD;
Type=oneshot&#xD;
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
RemainAfterExit=yes&#xD;
owner: root:root&#xD;
permissions: '0644'&#xD;
- path: /etc/rc.local&#xD;
owner: root:root&#xD;
permissions: '0755'&#xD;
content: |-&#xD;
#!/bin/sh&#xD;
ifconfig eth1 up 192.168.100.3 netmask 255.255.255.0&#xD;
exit 0&#xD;
</entry>
</extensions>
<interface id="0" name="eth1" ipv4="192.168.100.3" netPrefixLenV4="24">
<extensions>
<entry key="AutoNetkit.vlan" type="Integer">10</entry>
</extensions>
</interface>
</node>
<node name="lxc-iperf-4" type="SIMPLE" subtype="lxc-iperf" location="715,337" ipv4="192.168.100.4">
<node name="lxc-iperf-4" type="SIMPLE" subtype="lxc-iperf" location="711,333" ipv4="192.168.100.4">
<extensions>
<entry key="config" type="String">#cloud-config&#xD;
bootcmd:&#xD;
- ln -s -t /etc/rc.d /etc/rc.local&#xD;
hostname: lxc-iperf-4&#xD;
manage_etc_hosts: true&#xD;
runcmd:&#xD;
- systemctl start rc-local&#xD;
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config&#xD;
- echo "UseDNS no" &gt;&gt; /etc/ssh/sshd_config&#xD;
- service ssh restart&#xD;
- service sshd restart&#xD;
users:&#xD;
- default&#xD;
- gecos: User configured by VIRL Configuration Engine 0.20.22&#xD;
lock-passwd: false&#xD;
name: cisco&#xD;
plain-text-passwd: cisco&#xD;
shell: /bin/bash&#xD;
ssh-authorized-keys:&#xD;
- VIRL-USER-SSH-PUBLIC-KEY&#xD;
sudo: ALL=(ALL) ALL&#xD;
write_files:&#xD;
- path: /etc/systemd/system/dhclient@.service&#xD;
content: |&#xD;
[Unit]&#xD;
Description=Run dhclient on %i interface&#xD;
After=network.target&#xD;
[Service]&#xD;
Type=oneshot&#xD;
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease&#xD;
RemainAfterExit=yes&#xD;
owner: root:root&#xD;
permissions: '0644'&#xD;
- path: /etc/rc.local&#xD;
owner: root:root&#xD;
permissions: '0755'&#xD;
content: |-&#xD;
#!/bin/sh&#xD;
ifconfig eth1 up 192.168.100.4 netmask 255.255.255.0&#xD;
exit 0&#xD;
</entry>
</extensions>
<interface id="0" name="eth1" ipv4="192.168.100.4" netPrefixLenV4="24">
<extensions>
<entry key="AutoNetkit.vlan" type="Integer">10</entry>
</extensions>
</interface>
</node>
<annotations/>
<connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
<connection dst="/virl:topology/virl:node[2]/virl:interface[2]" src="/virl:topology/virl:node[3]/virl:interface[2]"/>
<connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[4]/virl:interface[1]"/>

Loading…
Cancel
Save