From f157ab1ef3a48acbbabaed8192050a2b4db71a7b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 1 Jul 2020 14:20:40 -0400 Subject: [PATCH] Use the 'staged' profile in some linux The staged was added to control netboot mostly, and is mostly optional but change some default profiles to use it. --- confluent_osdeploy/el8/profiles/default/scripts/post.sh | 7 +++++++ confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh | 8 ++++++++ confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/confluent_osdeploy/el8/profiles/default/scripts/post.sh b/confluent_osdeploy/el8/profiles/default/scripts/post.sh index f258b4b1..9bfe52b8 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/post.sh @@ -1,9 +1,16 @@ #!/bin/sh # need to copy over ssh key info nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') +apikey=$(cat /etc/confluent/confluent.apikey) + +chmod 700 /etc/confluent +chmod og-rwx /etc/confluent/* export mgr profile nodename . /etc/confluent/functions +curl -X POST -d 'status: staged' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus + + if [ -f /tmp/cryptboot ]; then run_remote tpm_luks.sh fi diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh index f258b4b1..f87bcac2 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh @@ -1,9 +1,17 @@ #!/bin/sh # need to copy over ssh key info nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') +apikey=$(cat /etc/confluent/confluent.apikey) + +chmod 700 /etc/confluent +chmod og-rwx /etc/confluent/* + export mgr profile nodename . /etc/confluent/functions +curl -X POST -d 'status: staged' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus + + if [ -f /tmp/cryptboot ]; then run_remote tpm_luks.sh fi diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh index 69cb1539..85411e26 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh @@ -12,9 +12,17 @@ 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}') +apikey=$(cat /etc/confluent/confluent.apikey) + +chmod 700 /etc/confluent +chmod og-rwx /etc/confluent/* + + export mgr profile nodename . /etc/confluent/functions +curl -X POST -d 'status: staged' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus + # Customizations may go here # Examples: