2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Carry API key past initramfs

This enables api calls during
the installer.
This commit is contained in:
Jarrod Johnson 2020-04-16 11:54:40 -04:00
parent 86a68bf7f9
commit 4e8cc3d801
2 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,10 @@ nodename=$(grep ^NODENAME /tmp/confluent.info|awk '{print $2}')
if [ -z "$apikey" ]; then
apikey=$(/opt/confluent/bin/clortho $nodename $mgr)
fi
oum=$(umask)
umask 0077
echo $apikey > /etc/confluent.apikey
umask $oum
mgr="[$mgr]"
curl -f -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/deploycfg > /tmp/confluent.deploycfg

View File

@ -10,4 +10,5 @@ sed -i 's/root::/root:*:/' /sysroot/etc/shadow
mkdir -p /sysroot/root/.ssh
chmod 700 /sysroot/root/.ssh
cp /ssh/authorized_keys /sysroot/root/.ssh
chmod 600 /sysroot/root/.ssh/authorized_keys
chmod 600 /sysroot/root/.ssh/authorized_keys
cp /etc/confluent.apikey /sysroot/etc/