2020-04-28 23:43:47 +00:00
|
|
|
%include /tmp/rootpw
|
|
|
|
%include /tmp/timezone
|
|
|
|
%include /tmp/partitioning
|
|
|
|
reboot
|
|
|
|
|
|
|
|
%packages
|
|
|
|
@^minimal-environment
|
|
|
|
chrony
|
|
|
|
rsync
|
|
|
|
python3
|
|
|
|
%end
|
|
|
|
|
|
|
|
%pre
|
2020-05-14 19:47:08 +00:00
|
|
|
profile=$(grep ipv4_server /etc/confluent.deploycfg |awk '{print $2}')
|
2020-04-28 23:43:47 +00:00
|
|
|
mgr=$(grep ipv4_server /etc/confluent.deploycfg |awk '{print $2}')
|
2020-05-14 19:47:08 +00:00
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/pre.sh > /tmp/preinst.sh
|
|
|
|
. /tmp/preinst.sh
|
2020-04-28 23:43:47 +00:00
|
|
|
%end
|
|
|
|
|
|
|
|
%post --nochroot
|
2020-05-14 19:47:08 +00:00
|
|
|
mkdir -p /mnt/sysimage/etc/confluent
|
|
|
|
profile=$(grep ipv4_server /etc/confluent.deploycfg |awk '{print $2}')
|
|
|
|
mgr=$(grep ipv4_server /etc/confluent.deploycfg |awk '{print $2}')
|
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/post.sh > /tmp/postinst.sh
|
|
|
|
. /tmp/postinst.sh
|
|
|
|
|
|
|
|
# Hook firstboot.sh
|
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/firstboot.service > /mnt/sysimage/etc/systemd/system/firstboot.service
|
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/firstboot.sh > /mnt/sysimage/etc/confuent/firstboot.sh
|
|
|
|
chmod +x /mnt/sysimage/etc/confluent/firstboot.sh
|
2020-04-28 23:43:47 +00:00
|
|
|
|
2020-05-14 19:47:08 +00:00
|
|
|
chmod 664 /etc/systemd/system/runonce.service
|
|
|
|
systemctl enable runonce
|
2020-04-28 23:43:47 +00:00
|
|
|
%end
|
|
|
|
|
|
|
|
%post
|
2020-05-14 19:47:08 +00:00
|
|
|
systemctl enable firstboot
|
2020-04-28 23:43:47 +00:00
|
|
|
chgrp ssh_keys /etc/ssh/ssh*key
|
|
|
|
restorecon /etc/ssh/ssh*key /root/.shosts /etc/ssh/shosts.equiv /etc/ssh/ssh_config.d/*
|
|
|
|
%end
|