mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-04 02:24:42 +00:00
31 lines
1.3 KiB
Plaintext
Executable File
31 lines
1.3 KiB
Plaintext
Executable File
cd /sys/class/net
|
|
for nic in *; do
|
|
ip link set $nic up
|
|
done
|
|
mkdir -p /custom-installation
|
|
cp -a /opt/confluent /custom-installation
|
|
touch /custom-installation/confluent/confluent.info
|
|
while ! grep NODENAME /custom-installation/confluent/confluent.info; do
|
|
/opt/confluent/bin/copernicus -t > /custom-installation/confluent/confluent.info
|
|
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
|
|
if [ ! -z "$cons" ]; then
|
|
echo "Preparing to deploy $osprofile from $MGR" > ${cons%,*}
|
|
fi
|
|
echo "Preparing to deploy $osprofile from $MGR"
|
|
echo $osprofile > /custom-installation/confluent/osprofile
|
|
echo URL=http://${MGR}/confluent-public/os/$osprofile/distribution/install.iso >> /conf/param.conf
|
|
fcmdline="$(cat /custom-installation/confluent/cmdline.orig) url=http://${MGR}/confluent-public/os/$osprofile/distribution/install.iso"
|
|
if [ ! -z "$cons" ]; then
|
|
fcmdline="$fcmdline console=${cons#/dev/}"
|
|
fi
|
|
echo $fcmdline > /custom-installation/confluent/fakecmdline
|
|
mount -o bind /custom-installation/confluent/fakecmdline /proc/cmdline
|
|
|
|
|