2020-05-14 17:36:23 +00:00
|
|
|
#!/bin/sh
|
2020-05-14 18:49:53 +00:00
|
|
|
|
|
|
|
# This script runs at the end of the final boot, updating status
|
|
|
|
|
2020-05-14 17:36:23 +00:00
|
|
|
nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
|
2020-05-15 23:11:22 +00:00
|
|
|
mgr=$(grep ^deploy_server /etc/confluent/confluent.deploycfg|awk '{print $2}')
|
2020-05-14 17:36:23 +00:00
|
|
|
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|sed -e 's/^rootpassword: //')
|
|
|
|
proto=$(grep ^protocol: /etc/confluent/confluent.deploycfg |awk '{print $2}')
|
|
|
|
apikey=$(cat /etc/confluent/confluent.apikey)
|
2020-06-01 20:01:26 +00:00
|
|
|
. /etc/confluent/functions
|
|
|
|
|
2020-10-16 15:34:43 +00:00
|
|
|
run_remote firstboot.custom
|
2021-03-18 18:37:54 +00:00
|
|
|
|
|
|
|
# Firstboot scripts may be placed into firstboot.d, e.g. firstboot.d/01-firstaction.sh, firstboot.d/02-secondaction.sh
|
|
|
|
run_remote_parts firstboot
|
|
|
|
|
|
|
|
# Induce execution of remote configuration, e.g. ansible plays in ansible/firstboot.d/
|
|
|
|
run_remote_config firstboot
|
|
|
|
|
2020-10-16 15:34:43 +00:00
|
|
|
curl --capath /etc/confluent/tls -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" -f -X POST -d "status: complete" https://$mgr/confluent-api/self/updatestatus
|