From 26caffab76466e02034e4117cd9c0aec310bc8ae Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 19 May 2020 13:36:49 -0400 Subject: [PATCH] Have Ubuntu report deployment completion --- .../ubuntu20.04/profiles/default/scripts/firstboot.sh | 5 ++++- .../ubuntu20.04/profiles/default/scripts/post.sh | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/firstboot.sh b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/firstboot.sh index 08466532..b9cb32e3 100755 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/firstboot.sh +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/firstboot.sh @@ -6,6 +6,9 @@ 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}') +apikey=$(cat /etc/confluent/confluent.apikey) +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 -rm -rf /etc/confluent/ +curl --capath /etc/confluent/tls -f -X POST -d "status: complete" https://$mgr/confluent-api/self/updatestatus diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh index 6a7dcafa..7698c9e1 100755 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh @@ -1,7 +1,9 @@ #!/bin/bash cp -a /root/.ssh /target/root/ mkdir -p /target/etc/confluent/ssh/sshd_config.d/ +chmod 700 /target/etc/confluent cp /custom-installation/confluent/* /target/etc/confluent/ +chmod go-rwx /etc/confluent/* for i in /custom-installation/ssh/*.ca; do echo '@cert-authority *' $(cat $i) >> /target/etc/ssh/ssh_known_hosts done