From d8266ea6c921801d08bd8ad4630a34e0e83d612f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 1 Jun 2020 12:25:30 -0400 Subject: [PATCH] Update firstboot to have some comments Make it clearer how it would be edited. --- .../el8/profiles/default/scripts/firstboot.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh b/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh index 6101c019..986ef719 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh @@ -1,7 +1,24 @@ #!/bin/sh + +# This script is executed on the first boot after install has +# completed. It is best to edit the middle of the file as +# noted below so custom commands are executed before +# the script notifies confluent that install is fully complete. + nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') apikey=$(cat /etc/confluent/confluent.apikey) mgr=$(grep deploy_server /etc/confluent/confluent.deploycfg|awk '{print $2}') -curl --capath /etc/confluent/tls -X POST -d 'status: complete' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus +profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|awk '{print $2}') +cat /etc/confluent/tls/*.pem >> /etc/pki/tls/certs/ca-bundle.crt +export nodename mgr profile +. /etc/confluent/functions + + +# Here is the most appropriate place to customize, for example: +#run_remote script.sh +#run_remote_python script.py + + +curl -X POST -d 'status: complete' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus systemctl disable firstboot rm /etc/systemd/system/firstboot.service