2020-05-14 17:36:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-06-01 20:01:26 +00:00
|
|
|
# This script runs at the end of install in the installed system
|
|
|
|
# but still under the installer kernel.
|
2020-05-14 17:36:23 +00:00
|
|
|
|
2020-06-01 20:01:26 +00:00
|
|
|
# This is a good place to run most customizations that do not have any
|
|
|
|
# dependency upon the install target kernel being active.
|
2020-05-14 17:36:23 +00:00
|
|
|
|
2020-06-01 20:01:26 +00:00
|
|
|
# If there are dependencies on the kernel (drivers or special filesystems)
|
|
|
|
# then firstboot.sh would be the script to customize.
|
2020-05-14 17:36:23 +00:00
|
|
|
|
2020-06-01 20:01:26 +00:00
|
|
|
mgr=$(grep ^deploy_server /etc/confluent/confluent.deploycfg|awk '{print $2}')
|
|
|
|
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|sed -e 's/^profile: //')
|
|
|
|
nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
|
2020-07-01 18:20:40 +00:00
|
|
|
apikey=$(cat /etc/confluent/confluent.apikey)
|
|
|
|
|
|
|
|
chmod 700 /etc/confluent
|
|
|
|
chmod og-rwx /etc/confluent/*
|
|
|
|
|
|
|
|
|
2020-06-01 20:01:26 +00:00
|
|
|
export mgr profile nodename
|
2020-07-01 13:52:17 +00:00
|
|
|
. /etc/confluent/functions
|
2020-05-14 17:36:23 +00:00
|
|
|
|
2020-07-01 18:20:40 +00:00
|
|
|
curl -X POST -d 'status: staged' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus
|
|
|
|
|
2020-06-01 20:01:26 +00:00
|
|
|
# Customizations may go here
|
2020-05-14 17:36:23 +00:00
|
|
|
|
2020-06-01 20:01:26 +00:00
|
|
|
# Examples:
|
|
|
|
# run_remote script.sh
|
|
|
|
# run_remote_python script.py
|