2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-26 19:10:30 +00:00

Add install disk detection to ubuntu

This commit is contained in:
Jarrod Johnson 2020-05-01 22:04:32 -04:00
parent 3f8d825540
commit fa40793dfa
3 changed files with 9 additions and 5 deletions

View File

@ -38,8 +38,10 @@ else
fi
ipv4s=$(grep ^ipv4_server $deploycfg|awk '{print $2}')
osprofile=$(cat /custom-installation/confluent/osprofile)
fcmdline='quiet autoinstall ds=nocloud-net;s=https://'${ipv4s}'/confluent-public/os/'${osprofile}'/autoinstall/'
cons=$(cat /custom-installation/autocons.info)
fcmdline="$(cat /custom-installation/confluent/cmdline.orig) autoinstall ds=nocloud-net;s=https://${ipv4s}/confluent-public/os/${osprofile}/autoinstall/"
if [ -f /custom-installation/autocons.info ]; then
cons=$(cat /custom-installation/autocons.info)
fi
if [ ! -z "$cons" ]; then
echo "Installation will proceed on graphics console, autoconsole cannot work during install for Ubuntu" > ${cons%,*}
#fcmdline="$fcmdline console=${cons#/dev/}"

View File

@ -12,3 +12,6 @@ for pubkey in /etc/ssh/ssh_host*key.pub; do
echo HostCertificate $certfile >> /etc/ssh/sshd_config.d/confluent.conf
done
systemctl restart sshd
curl https://$mgr/confluent-public/confluent/util/getinstalldisk > /custom-installation/getinstalldisk
python3 /custom-installation/getinstalldisk
sed -i s!%%INSTALLDISK%%!/dev/$(cat /tmp/installdisk)! /autoinstall.yaml

View File

@ -10,6 +10,7 @@ while ! grep NODENAME /custom-installation/confluent/confluent.info; do
done
MGR="[$(grep MANAGER: /custom-installation/confluent/confluent.info | head -n 1 | awk '{print $2}')]"
osprofile=$(sed -e 's/.*osprofile=//' -e 's/ .*//' /proc/cmdline)
cat /proc/cmdline > /custom-installation/confluent/cmdline.orig
if [ -f /custom-installation/autocons.info ]; then
cons=$(cat /custom-installation/autocons.info)
fi
@ -19,11 +20,9 @@ fi
echo "Preparing to deploy $osprofile from $MGR"
echo $osprofile > /custom-installation/confluent/osprofile
echo URL=http://${MGR}/confluent-public/os/$osprofile/distribution/live.iso >> /conf/param.conf
fcmdline="url=http://${MGR}/confluent-public/os/$osprofile/distribution/live.iso"
fcmdline="$(cat /custom-installation/confluent/cmdline.orig) url=http://${MGR}/confluent-public/os/$osprofile/distribution/live.iso"
if [ ! -z "$cons" ]; then
fcmdline="$fcmdline console=${console#/dev/}"
elif grep console= /proc/cmdline; then
fcmdline=$fcmdline" "$(sed -e s/.*console=/console=/ -e 's/ .*//' /proc/cmdline)
fi
echo $fcmdline > /custom-installation/confluent/fakecmdline
mount -o bind /custom-installation/confluent/fakecmdline /proc/cmdline