2020-06-10 14:37:14 +00:00
|
|
|
#!/bin/sh
|
2020-06-08 21:24:48 +00:00
|
|
|
# copernicus is hard coded, easier to script a fake sysfs
|
|
|
|
uuid=$(vsish -e get /hardware/bios/dmiInfo|grep -A15 UUID|sed -e 's/.*://'|sed -e ':a;N;$!ba;s/\n//g' | sed -e 's/ *0x//g')
|
|
|
|
uuid=${uuid:0:8}-${uuid:8:4}-${uuid:12:4}-${uuid:16:4}-${uuid:20:12}
|
|
|
|
mkdir -p /sys/devices/virtual/dmi/id/
|
|
|
|
echo $uuid > /sys/devices/virtual/dmi/id/product_uuid
|
|
|
|
mkdir -p /etc/confluent
|
|
|
|
localcli network firewall unload
|
|
|
|
touch /etc/confluent/confluent.info
|
|
|
|
while ! grep NODENAME /etc/confluent/confluent.info; do
|
2021-02-11 16:06:02 +00:00
|
|
|
echo "Searching for deployment service on local network..."
|
2020-06-08 21:24:48 +00:00
|
|
|
/opt/confluent/bin/copernicus > /etc/confluent/confluent.info
|
2021-02-11 16:06:02 +00:00
|
|
|
esxcfg-nics -l
|
2020-06-08 21:24:48 +00:00
|
|
|
done
|
|
|
|
node=$(grep NODENAME: /etc/confluent/confluent.info|head -n 1|awk '{print $2}')
|
|
|
|
mgr=$(grep MANAGER: /etc/confluent/confluent.info|head -n 1|awk '{print $2}')
|
2020-06-10 14:37:14 +00:00
|
|
|
cp /opt/confluent/bin/clortho /clortho
|
|
|
|
/clortho $node $mgr > /etc/confluent/confluent.apikey
|
|
|
|
cat /tls/*.pem > /etc/confluent/ca.pem
|
2021-01-05 16:55:30 +00:00
|
|
|
/opt/confluent/bin/apiclient /confluent-api/self/deploycfg > /etc/confluent/confluent.deploycfg.new
|
|
|
|
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg.new | sed -e 's/^profile: //')
|
2020-06-08 21:24:48 +00:00
|
|
|
/opt/confluent/bin/apiclient /confluent-public/os/$profile/kickstart > /etc/confluent/ks.cfg
|
2020-06-11 14:29:22 +00:00
|
|
|
/opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/modinstall > /tmp/modinstall
|
2021-01-05 16:55:30 +00:00
|
|
|
mv /etc/confluent/confluent.deploycfg.new /etc/confluent/confluent.deploycfg
|
2020-06-11 14:29:22 +00:00
|
|
|
export node mgr profile
|
|
|
|
. /tmp/modinstall
|
|
|
|
exec /bin/install
|