Commit 00055c27 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

install new machines in InternetX rack with muc-internetx-capri-001 machine

parent eba01eb3
......@@ -5,14 +5,14 @@ SCRIPT_DIR=$(realpath `dirname "$0"`)
cd $SCRIPT_DIR
. $SCRIPT_DIR/../download_boot_systems.sh
download_debian_10_if_needed
download_debian_11_if_needed
#download_sysrescuecd_if_needed
#UPDATE THOSE VARIABLES DEPENDING ON YOUR SITE
MY_IF_NAME=eth0
MY_IP_ADDR=192.168.46.2
MY_IF_NAME=eno1
MY_IP_ADDR=192.168.46.51
DHCP_RANGE=192.168.46.100,static,255.255.255.0
ROUTER_ADDR=192.168.46.2
ROUTER_ADDR=192.168.46.51
DNS_SERVER=1.1.1.1
#This is to make linux output visible in IPMI SOL. Remove if you are using a graphical card.
......@@ -23,6 +23,8 @@ mac='
00:22:4d:dd:64:4a
4c:38:d5:1e:35:12
00:22:4d:dd:64:f0
00:22:4d:dd:64:34
00:22:4d:dd:64:d0
'
i=1
hostname_prefix=muc-internetx-capri-
......@@ -74,21 +76,26 @@ allow-hotplug eno1
iface eno1 inet dhcp
# The first SFP+ interface
allow-hotplug enp193s0f0
iface enp193s0f0 inet static
address 85.236.52.$(( 76 + $i ))/29
gateway 85.236.52.73
allow-hotplug enp193s0f0np0
iface enp193s0f0np0 inet static
address 192.168.111.$i/24
gateway 192.168.111.1
dns-nameservers 62.116.162.126 62.116.130.3 85.236.36.4
iface enp193s0f0np0 inet6 static
address 2001:4178:4:1200::$( printf "%x" $(( 4 + $i )) )/56
gateway 2001:4178:4:1200::1
# dns-nameservers 2001:4178:2:13::126 2001:4178:2:14::126 2001:4178:2:10::6
# The second SFP+ interace (not used)
#iface-hotplug enp193s0f1
#iface enp193s0f1 inet dhcp
#iface-hotplug enp193s0f1np1
#iface enp193s0f1np1 inet dhcp
EOF
i=`expr $i + 1`
done
# create authorized_keys if it doesn't exist
# create authorized_keys if it doesn't exist
[ -f authorized_keys ] || ln -s ../authorized_keys
exec dnsmasq -d --port=0 --log-dhcp \
--interface=$MY_IF_NAME \
......@@ -109,3 +116,7 @@ exec dnsmasq -d --port=0 --log-dhcp \
--dhcp-host=00:22:4d:dd:64:4a,192.168.46.108,1h \
--dhcp-host=4c:38:d5:1e:35:12,192.168.46.107,1h \
--dhcp-host=00:22:4d:dd:64:f0,192.168.46.109,1h \
--dhcp-host=00:22:4d:dd:64:34,192.168.46.110,1h \
--dhcp-host=00:22:4d:dd:64:35,192.168.46.111,1h \
--dhcp-host=00:22:4d:dd:64:d0,192.168.46.112,1h \
--dhcp-host=00:22:4d:dd:64:d1,192.168.46.113,1h \
......@@ -33,10 +33,10 @@ d-i pkgsel/include string ssh aptitude bwm-ng ca-certificates dbus-user-session
# - enable page up/down to search the history
d-i preseed/late_command string set -e; \
cd /target/root; sed -i /^mesg/q .profile; \
mkdir -m 0700 .ssh; cd .ssh; tftp -g -r authorized_keys 192.168.46.2; \
mkdir -m 0700 .ssh; cd .ssh; tftp -g -r authorized_keys 192.168.46.51; \
cd ../../etc; rm -f grub.d/30_otheros; echo LANG=C.UTF-8 >default/locale; \
sed -i '/history-search-/s/# //' inputrc; \
cd network; tftp -g -r `hostname`/interfaces 192.168.46.2; \
cd network; tftp -g -r `hostname`/interfaces 192.168.46.51; \
in-target sh -ec 'passwd -ld root; sed -i /^GRUB_CMDLINE_LINUX_DEFAULT=/s/quiet// /etc/default/grub; update-grub'
d-i time/zone string UTC
tasksel tasksel/first string
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment