building and major patches still
This commit is contained in:
parent
5e417e0440
commit
c467b30914
|
@ -1,3 +1,7 @@
|
||||||
debian/.debhelper
|
debian/.debhelper
|
||||||
debian/debhelper-build-stamp
|
debian/debhelper-build-stamp
|
||||||
debian/wit-hypervisor/
|
debian/wit-hypervisor/
|
||||||
|
debian/files
|
||||||
|
debian/wit-hypervisor.postinst.debhelper
|
||||||
|
debian/wit-hypervisor.prerm.debhelper
|
||||||
|
debian/wit-hypervisor.substvars
|
||||||
|
|
|
@ -2,4 +2,4 @@ wit-hypervisor (1.0) unstable; urgency=low
|
||||||
|
|
||||||
* Initial release.
|
* Initial release.
|
||||||
|
|
||||||
-- Toby Paler <toby@wit.com> Wed, 25 Jul 2018 22:54:00 +0100
|
-- Toby <toby@wit.com> Wed, 25 Jul 2018 22:54:00 +0100
|
||||||
|
|
|
@ -21,6 +21,25 @@ set -e
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
|
|
||||||
|
echo "auto lo:0" >/etc/network/interfaces.d/lo
|
||||||
|
echo "iface lo:0 inet static\n address 10.1.$TIER_ID.$NODE_ID/32" >> /etc/network/interfaces.d/lo
|
||||||
|
echo "iface lo:0 inet6 static\n address 2604:bbc0::$TIER_ID:$NODE_ID/128" >> /etc/network/interfaces.d/lo
|
||||||
|
|
||||||
|
sed -e "s/VTEPINDEX/$MYID/" -e "s/TIERID/$TIERID/" -e "s/TIERASN/$(printf "%03d" $TIERID)/" -e "s/VTEPASN/$(printf "%03d" $MYID)/" /usr/share/wit-hypervisor/frr.conf.tmpl >/etc/frr/frr.conf
|
||||||
|
|
||||||
|
|
||||||
|
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'$MGMT_MAC'", ATTR{type}=="1", NAME="mgmt1"' >/etc/udev/rules.d/70-persistent-net.rules
|
||||||
|
i=0
|
||||||
|
for nic in $(ip -br link | awk '{ print $1 }'); do
|
||||||
|
if ethtool $nic | grep -q 10000; then
|
||||||
|
i=$((i+1))
|
||||||
|
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'$(cat /sys/class/net/$nic/address)'", ATTR{type}=="1", NAME="feth'$i'"' >>/etc/udev/rules.d/70-persistent-net.rules
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
sed -i "/$MGMT_MAC.*feth./d" /etc/udev/rules.d/70-persistent-net.rules
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
systemctl stop systemd-networkd.socket
|
systemctl stop systemd-networkd.socket
|
||||||
systemctl stop systemd-networkd.service
|
systemctl stop systemd-networkd.service
|
||||||
systemctl stop systemd-networkd-wait-online
|
systemctl stop systemd-networkd-wait-online
|
||||||
|
|
|
@ -20,6 +20,7 @@ case "$1" in
|
||||||
[ -z "$NODE_ID" ] && export NODE_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $4 }')
|
[ -z "$NODE_ID" ] && export NODE_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $4 }')
|
||||||
|
|
||||||
MGMT_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $3 }')
|
MGMT_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $3 }')
|
||||||
|
MGMT_MAC=$(ip -br link show dev $(ip -4 -br addr | grep 10.0. | awk '{ print $1 }') | awk '{ print $3 }')
|
||||||
|
|
||||||
|
|
||||||
[ "$MGMT_ID" -ge 0 -a "$MGMT_ID" -lt 16 ] && export DOMAINNAME=.usw1.wit.com
|
[ "$MGMT_ID" -ge 0 -a "$MGMT_ID" -lt 16 ] && export DOMAINNAME=.usw1.wit.com
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
/etc/systemd/network/*
|
/etc/systemd/network/*
|
||||||
|
/etc/frr/daemons
|
||||||
|
/etc/bash.bashrc
|
||||||
|
/etc/systemd/timesyncd.conf.wit
|
||||||
|
|
|
@ -5,10 +5,10 @@ files/rc.local etc
|
||||||
files/10-frr.conf etc/sysctl.d
|
files/10-frr.conf etc/sysctl.d
|
||||||
files/wit-gc usr/bin
|
files/wit-gc usr/bin
|
||||||
files/resolv.conf etc
|
files/resolv.conf etc
|
||||||
files/bashrc-witaddon root
|
files/bashrc-witaddon etc
|
||||||
files/qemu-ifdown etc/libvirt/hooks
|
files/qemu-ifdown etc/libvirt/hooks
|
||||||
files/qemu-ifup-public etc/libvirt/hooks
|
files/qemu-ifup-public etc/libvirt/hooks
|
||||||
files/qemu-ifup etc/libvirt/hooks
|
files/qemu-ifup etc/libvirt/hooks
|
||||||
files/firewall etc/init.d
|
files/firewall etc/init.d
|
||||||
files/frr.conf etc/frr
|
|
||||||
files/interfaces etc/network
|
files/interfaces etc/network
|
||||||
|
files/frr.conf.tmpl usr/share/wit-hypervisor
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
/etc/network/interfaces sed -e "s/TIERID/$TIER_ID/g"
|
/etc/frr/daemons.wit sed -e 's/bgpd=no/bgpd=yes/' -e 's/zebra=no/zebra=yes/'
|
||||||
/etc/frr/frr.conf sed -e "s/VTEPINDEX/$NODE_ID/" -e "s/TIERID/$TIER_ID/" -e "s/TIERASN/$(printf "%03d" $TIER_ID)/" -e "s/VTEPASN/$(printf "%03d" $NODE_ID)/"
|
/etc/systemd/timesyncd.conf.wit sed -e 's/#NTP=.*/NTP=ipv6.ntp.ubuntu.com/g'
|
||||||
/etc/hosts sed -e "/.*debcore1/d" -e "/.*$MYHOSTNAME/d" -e "$ s/$/\n10.1.$TIER_ID.$NODE_ID\t$MYHOSTNAME/"
|
/etc/bash.bashrc.wit sed -e '/.*bashrc-witaddon.*/d' -e '$ s/$/\nsource \/etc\/bashrc-witaddon/'
|
||||||
/etc/frr/daemons sed -e 's/bgpd=no/bgpd=yes/' -e 's/zebra=no/zebra=yes/'
|
|
||||||
/etc/ssh/sshd_config sed -e '/PasswordAuthentication/d' -e '$ s/$/\nPasswordAuthentication no/'
|
|
||||||
/etc/systemd/timesyncd.conf sed -e 's/#NTP=.*/NTP=ipv6.ntp.ubuntu.com/g'
|
|
||||||
/etc/default/grub sed -e '/GRUB_CMDLINE_LINUX_DEFAULT=/d' -e '/GRUB_CMDLINE_LINUX=/d' -e '/GRUB_SERIAL_COMMAND=/d' -e '/GRUB_TERMINAL=/d' -e '$ s/$/\nGRUB_CMDLINE_LINUX_DEFAULT=""\nGRUB_CMDLINE_LINUX="console=tty0 console=ttyS1,115200n8"\nGRUB_TERMINAL=serial\nGRUB_SERIAL_COMMAND="serial --speed=115200 --unit=1 --word=8 --parity=no --stop=1"/'
|
|
||||||
/root/.bashrc sed -e '/.*bashrc-witaddon.*/d' -e '$ /$/\nsource ~/bashrc-witaddon/'
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
auto lo
|
auto lo
|
||||||
iface lo inet loopback
|
iface lo inet loopback
|
||||||
|
|
||||||
auto lo:0
|
|
||||||
iface lo:0 inet static
|
|
||||||
address 10.1.TIERID.VTEPINDEX/32
|
|
||||||
|
|
||||||
iface lo:0 inet6 static
|
|
||||||
address 2604:bbc0::TIERID:VTEPINDEX/128
|
|
||||||
|
|
||||||
auto mgmt1
|
auto mgmt1
|
||||||
iface mgmt1 inet6 auto
|
iface mgmt1 inet6 auto
|
||||||
iface mgmt1 inet dhcp
|
iface mgmt1 inet dhcp
|
||||||
|
@ -26,3 +19,4 @@ iface feth2 inet manual
|
||||||
mtu 9000
|
mtu 9000
|
||||||
|
|
||||||
|
|
||||||
|
source-directory /etc/network/interfaces.d
|
||||||
|
|
Loading…
Reference in New Issue