mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 19:40:12 +00:00
d17b1d060c
The 'profile' variable notably induces dracut to be excruciatingly slow, mitigate chance by putting confluent before apikey, mgr, and profile. Further, it has been requested to have the scripts use same name on server for directory moving forward. Implement this request while allowing existing OS profiles to keep working.
19 lines
924 B
Bash
Executable File
19 lines
924 B
Bash
Executable File
#!/bin/bash
|
|
echo "Confluent first boot is running"
|
|
cp -a /etc/confluent/ssh/* /etc/ssh/
|
|
systemctl restart sshd
|
|
rootpw=$(grep ^rootpassword: /etc/confluent/confluent.deploycfg |awk '{print $2}')
|
|
if [ ! -z "$rootpw" -a "$rootpw" != "null" ]; then
|
|
echo root:$rootpw | chpasswd -e
|
|
fi
|
|
nodename=$(grep ^NODENAME: /etc/confluent/confluent.info | awk '{print $2}')
|
|
confluent_apikey=$(cat /etc/confluent/confluent.apikey)
|
|
confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg |awk '{print $2}')
|
|
hostnamectl set-hostname $(grep ^NODENAME: /etc/confluent/confluent.info | awk '{print $2}')
|
|
touch /etc/cloud/cloud-init.disabled
|
|
source /etc/confluent/functions
|
|
|
|
run_remote_parts firstboot.d
|
|
run_remote_config firstboot.d
|
|
curl --capath /etc/confluent/tls -f -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $confluent_apikey" -X POST -d "status: complete" https://$confluent_mgr/confluent-api/self/updatestatus
|