2020-06-01 14:52:01 +00:00
|
|
|
# In this OS profile, data is largely filled in during the %pre
|
|
|
|
# phase, rather than the kickstart actually having the content.
|
|
|
|
# None of the files shall be replaced during an upgrade in
|
|
|
|
# /var/lib/confluent/public/os/<profile>, so customization should
|
|
|
|
# be done by modifying files in /var/lib/confluent/public/os/<profile>
|
|
|
|
|
|
|
|
# /tmp/rootpw will provide a 'rootpw' line, either locking password if not configured
|
|
|
|
# or the crypted form.
|
2020-04-28 23:43:47 +00:00
|
|
|
%include /tmp/rootpw
|
2020-06-01 14:52:01 +00:00
|
|
|
|
|
|
|
# timezone is fetched from confluent server, which provides the
|
|
|
|
# timezone that the management server itself is in by default.
|
2020-04-28 23:43:47 +00:00
|
|
|
%include /tmp/timezone
|
2020-06-01 14:52:01 +00:00
|
|
|
|
|
|
|
# similar to timezone, confluent is asked to provide the
|
|
|
|
# deployment servers language info and replicate that
|
|
|
|
# to the deployment target.
|
2020-05-18 16:52:31 +00:00
|
|
|
%include /tmp/langinfo
|
2020-06-01 14:52:01 +00:00
|
|
|
|
2020-06-02 20:05:44 +00:00
|
|
|
# bootloader may be specified if crypted.grubpassword is set on
|
|
|
|
# a node. This will become a bootloader line if a password
|
|
|
|
# was specified
|
|
|
|
%include /tmp/grubpw
|
|
|
|
|
2020-06-01 14:52:01 +00:00
|
|
|
# The default partition scheme is applied to a single drive, using
|
|
|
|
# the getinstalldisk script to make a best guess as to the most
|
|
|
|
# appropriate device. See pre.sh and getinstalldisk to customize
|
|
|
|
# the automatic behavior, or comment out/delete the
|
|
|
|
# following line and provide your own manual partition plan
|
|
|
|
# instead
|
|
|
|
%include /tmp/partitioning
|
|
|
|
|
2020-04-28 23:43:47 +00:00
|
|
|
reboot
|
|
|
|
|
|
|
|
%packages
|
|
|
|
@^minimal-environment
|
|
|
|
chrony
|
|
|
|
rsync
|
|
|
|
python3
|
2020-10-07 19:27:06 +00:00
|
|
|
tar
|
|
|
|
pciutils
|
|
|
|
%include /tmp/addonpackages
|
2020-07-14 18:40:05 +00:00
|
|
|
%include /tmp/cryptpkglist
|
2020-04-28 23:43:47 +00:00
|
|
|
%end
|
|
|
|
|
2020-07-24 14:59:15 +00:00
|
|
|
# A kickstart.custom file is provided to enable easily adding
|
|
|
|
# kickstart content without modifying the stock file.
|
|
|
|
# While the stock file may be safely modified, using the .custom
|
|
|
|
# files may allow for more easily rebasing custom profiles to newer
|
|
|
|
# stock profiles
|
|
|
|
%include /tmp/kickstart.custom
|
|
|
|
|
2020-04-28 23:43:47 +00:00
|
|
|
%pre
|
2020-07-01 12:57:08 +00:00
|
|
|
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}')
|
|
|
|
mgr=$(grep deploy_server /etc/confluent/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-07-01 12:57:08 +00:00
|
|
|
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}')
|
2020-07-01 13:52:17 +00:00
|
|
|
mgr=$(grep deploy_server /etc/confluent/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-06-02 21:44:19 +00:00
|
|
|
cat /etc/confluent/tls/*.pem >> /etc/pki/tls/certs/ca-bundle.crt
|
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
|