mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-21 17:11:58 +00:00
Advance concetpual debian support
This commit is contained in:
parent
2aed973a8b
commit
1125e4c712
@ -42,10 +42,10 @@ cd $predir
|
||||
profile=$(grep ^profile: /etc/confluent/deploycfg|cut -d ' ' -f 2)
|
||||
wget https://$mgr/confluent-public/os/$profile/scripts/pre.sh
|
||||
chmod u+x pre.sh
|
||||
setdebopt preseed/early_command $predir/pre.sh string
|
||||
wget https://$mgr/confluent-public/os/$profile/preseed.cfg
|
||||
mv preseed.cfg /
|
||||
setdebopt auto-install/enable true boolean
|
||||
setdebopt partman/early_command $predir/pre.sh string
|
||||
cd -
|
||||
ip -4 a flush dev $nic
|
||||
setdebopt netcfg/choose_interface $nic select
|
||||
|
18
confluent_osdeploy/debian/profiles/default/scripts/pre.sh
Normal file
18
confluent_osdeploy/debian/profiles/default/scripts/pre.sh
Normal file
@ -0,0 +1,18 @@
|
||||
anna-install openssh-server-udeb
|
||||
mkdir -p ~/.ssh/
|
||||
cat /ssh/*pubkey > ~/.ssh/authorized_keys
|
||||
ssh-keygen -A
|
||||
mgr=$(grep ^MANAGER:.*\\. /etc/confluent/confluent.info|head -n 1|cut -d: -f 2|sed -e 's/ //')
|
||||
nodename=$(grep ^NODENAME: /etc/confluent/confluent.info|head -n 1|cut -d: -f 2|sed -e 's/ //')
|
||||
apikey=$(cat /etc/confluent/confluent.apikey)
|
||||
for pubkey in /etc/ssh/ssh_host*key.pub; do
|
||||
certfile=${pubkey%.pub}-cert.pub
|
||||
keyfile=${pubkey%.pub}
|
||||
wget --post-file=$pubkey --header='CONFLUENT_NODENAME: '$nodename --header="CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/sshcert -O $certfile
|
||||
echo HostKey $keyfile >> /etc/ssh/sshd_config
|
||||
echo HostCertificate $certfile >> /etc/ssh/sshd_config
|
||||
done
|
||||
|
||||
echo sshd:x:939:939::/: >> /etc/passwd
|
||||
/usr/sbin/sshd
|
||||
|
Loading…
Reference in New Issue
Block a user