2020-04-28 23:43:47 +00:00
|
|
|
%include /tmp/rootpw
|
|
|
|
%include /tmp/timezone
|
|
|
|
%include /tmp/partitioning
|
2020-05-18 16:52:31 +00:00
|
|
|
%include /tmp/langinfo
|
2020-04-28 23:43:47 +00:00
|
|
|
reboot
|
|
|
|
|
|
|
|
%packages
|
|
|
|
@^minimal-environment
|
|
|
|
chrony
|
|
|
|
rsync
|
|
|
|
python3
|
|
|
|
%end
|
|
|
|
|
|
|
|
%pre
|
2020-05-14 21:16:26 +00:00
|
|
|
profile=$(grep ^profile: /etc/confluent.deploycfg |awk '{print $2}')
|
2020-05-15 20:06:57 +00:00
|
|
|
mgr=$(grep deploy_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
|
2020-05-14 21:16:26 +00:00
|
|
|
profile=$(grep ^profile: /etc/confluent.deploycfg |awk '{print $2}')
|
2020-05-15 20:06:57 +00:00
|
|
|
mgr=$(grep deploy_server /etc/confluent.deploycfg |awk '{print $2}')
|
2020-06-01 13:08:41 +00:00
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/prechroot.sh > /tmp/postinst.sh
|
2020-05-14 19:47:08 +00:00
|
|
|
. /tmp/postinst.sh
|
|
|
|
|
|
|
|
# Hook firstboot.sh
|
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/firstboot.service > /mnt/sysimage/etc/systemd/system/firstboot.service
|
2020-05-14 22:24:35 +00:00
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/firstboot.sh > /mnt/sysimage/etc/confluent/firstboot.sh
|
2020-05-14 19:47:08 +00:00
|
|
|
chmod +x /mnt/sysimage/etc/confluent/firstboot.sh
|
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
|
2020-05-14 22:24:35 +00:00
|
|
|
restorecon /etc/ssh/ssh*key /root/.shosts /etc/ssh/shosts.equiv /etc/ssh/ssh_config.d/* /etc/confluent/firstboot.sh
|
2020-06-01 13:08:41 +00:00
|
|
|
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}')
|
|
|
|
mgr=$(grep deploy_server /etc/confluent/confluent.deploycfg |awk '{print $2}')
|
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/post.sh > /tmp/postinst.sh
|
|
|
|
. /tmp/postinst.sh
|
2020-04-28 23:43:47 +00:00
|
|
|
%end
|