mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-15 04:07:51 +00:00
26 lines
1.4 KiB
Plaintext
26 lines
1.4 KiB
Plaintext
|
# 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
|
||
|
/opt/confluent/bin/copernicus > /etc/confluent/confluent.info
|
||
|
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}')
|
||
|
/opt/confluent/bin/clortho $node $mgr > /etc/confluent/confluent.apikey
|
||
|
/opt/confluent/bin/apiclient /confluent-api/self/deploycfg > /etc/confluent/confluent.deploycfg
|
||
|
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg | sed -e 's/^profile: //')
|
||
|
/opt/confluent/bin/apiclient /confluent-public/os/$profile/kickstart > /etc/confluent/ks.cfg
|
||
|
/opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/makeksnet > /tmp/makeksnet
|
||
|
chmod +x /tmp/makeksnet
|
||
|
/tmp/makeksnet > /tmp/ksnet
|
||
|
rootpw=$(grep ^rootpassword: /etc/confluent/confluent.deploycfg|sed -e 's/^rootpassword: //')
|
||
|
echo rootpw --iscrypted $rootpw > /tmp/rootpw
|
||
|
export BOOT_OPTIONS=ks=/etc/confluent/ks.cfg
|
||
|
exec /bin/install
|
||
|
|