mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 11:30:23 +00:00
Add the refactored files
The refactoring put the files in new places, add those to tracking.
This commit is contained in:
parent
0254963432
commit
e7cb3f9a0c
14
confluent_osdeploy/el8/profiles/default/scripts/functions
Normal file
14
confluent_osdeploy/el8/profiles/default/scripts/functions
Normal file
@ -0,0 +1,14 @@
|
||||
run_remote() {
|
||||
cd $(mktemp -d)
|
||||
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
|
||||
chmod +x $1
|
||||
./$1
|
||||
cd -
|
||||
}
|
||||
|
||||
run_remote_python {
|
||||
cd $(mktemp -d)
|
||||
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
|
||||
/usr/libexec/platform-python $1
|
||||
cd -
|
||||
}
|
19
confluent_osdeploy/el8/profiles/default/scripts/post.sh
Normal file
19
confluent_osdeploy/el8/profiles/default/scripts/post.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# need to copy over ssh key info
|
||||
nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
|
||||
export mgr profile nodename
|
||||
. /etc/confluent/functions
|
||||
|
||||
# This script will execute in the installed system, but using the installer kernel prior to reboot.
|
||||
# This is an appropriate place to run post install activities that do not require the actual installed
|
||||
# kernel to run. For example adding drivers that would be needed for first boot to run cleanly.
|
||||
# If, for example, there is a post script that has a dependency on a driver or filesystem that
|
||||
# cannot work until booting into the installer, use firstboot.sh instead
|
||||
|
||||
# run_remote will download and execute from /var/lib/confluent/public/<os>/scripts/ directory
|
||||
# run_remote_python will use the appropriate python interpreter path to run the specified script
|
||||
|
||||
# Add content as below:
|
||||
|
||||
# run_remote example.sh
|
||||
# run_remote_python example.py
|
23
confluent_osdeploy/el8/profiles/default/scripts/setupssh.sh
Normal file
23
confluent_osdeploy/el8/profiles/default/scripts/setupssh.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
grep HostCert /etc/ssh/sshd_config.anaconda >> /mnt/sysimage/etc/ssh/sshd_config
|
||||
echo HostbasedAuthentication yes >> /mnt/sysimage/etc/ssh/sshd_config
|
||||
echo HostbasedUsesNameFromPacketOnly yes >> /mnt/sysimage/etc/ssh/sshd_config
|
||||
echo IgnoreRhosts no >> /mnt/sysimage/etc/ssh/sshd_config
|
||||
sshconf=/etc/ssh/ssh_config
|
||||
if [ -d /mnt/sysimage/etc/ssh/ssh_config.d/ ]; then
|
||||
sshconf=/mnt/sysimage/etc/ssh/ssh_config.d/01-confluent.conf
|
||||
fi
|
||||
echo 'Host *' >> $sshconf
|
||||
echo ' HostbasedAuthentication yes' >> $sshconf
|
||||
echo ' EnableSSHKeysign yes' >> $sshconf
|
||||
echo ' HostbasedKeyTypes *ed25519*' >> $sshconf
|
||||
|
||||
cp /etc/ssh/ssh_host_* /mnt/sysimage/etc/ssh/
|
||||
mkdir /mnt/sysimage/root/.ssh/
|
||||
chmod 700 /mnt/sysimage/root/.ssh/
|
||||
cp /root/.ssh/authorized_keys /mnt/sysimage/root/.ssh/
|
||||
chmod 600 /mnt/sysimage/root/.ssh/authorized_keys
|
||||
cp /etc/ssh/ssh_known_hosts /mnt/sysimage/etc/ssh/
|
||||
curl -f -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $(cat /etc/confluent.apikey)" https://$mgr/confluent-api/self/nodelist > /tmp/allnodes
|
||||
cp /tmp/allnodes /mnt/sysimage/etc/ssh/shosts.equiv
|
||||
cp /tmp/allnodes /mnt/sysimage/root/.shosts
|
Loading…
Reference in New Issue
Block a user