diff --git a/confluent_osdeploy/el7/profiles/default/kickstart b/confluent_osdeploy/el7/profiles/default/kickstart index 0b696503..6e5d6e4c 100644 --- a/confluent_osdeploy/el7/profiles/default/kickstart +++ b/confluent_osdeploy/el7/profiles/default/kickstart @@ -39,6 +39,13 @@ python %end +# 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 + %pre profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}') mgr=$(grep deploy_server /etc/confluent/confluent.deploycfg |awk '{print $2}') diff --git a/confluent_osdeploy/el7/profiles/default/scripts/firstboot.sh b/confluent_osdeploy/el7/profiles/default/scripts/firstboot.sh index 986ef719..3fe06efc 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/firstboot.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/firstboot.sh @@ -14,9 +14,7 @@ export nodename mgr profile . /etc/confluent/functions -# Here is the most appropriate place to customize, for example: -#run_remote script.sh -#run_remote_python script.py +run_remote firstboot.custom curl -X POST -d 'status: complete' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus diff --git a/confluent_osdeploy/el7/profiles/default/scripts/post.sh b/confluent_osdeploy/el7/profiles/default/scripts/post.sh index f87bcac2..d235598b 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/post.sh @@ -23,7 +23,8 @@ fi # run_remote will download and execute from /var/lib/confluent/public//scripts/ directory # run_remote_python will use the appropriate python interpreter path to run the specified script +# A post.custom is provided to more conveniently hold customizations, see the post.custom file. -# Add content as below: # run_remote example.sh # run_remote_python example.py +run_remote post.custom diff --git a/confluent_osdeploy/el7/profiles/default/scripts/pre.sh b/confluent_osdeploy/el7/profiles/default/scripts/pre.sh index 10d22677..e2db9440 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/pre.sh @@ -62,3 +62,5 @@ if [ -e /tmp/installdisk ]; then echo ignoredisk --only-use $(cat /tmp/installdisk) >> /tmp/partitioning echo autopart --nohome $LUKSPARTY >> /tmp/partitioning fi +python /etc/confluent/apiclient /confluent-public/os/$profile/kickstart.custom -o /tmp/kickstart.custom +run_remote pre.custom diff --git a/confluent_osdeploy/rhvh4/profiles/default/kickstart b/confluent_osdeploy/rhvh4/profiles/default/kickstart index c7db776d..c1552ef0 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/kickstart +++ b/confluent_osdeploy/rhvh4/profiles/default/kickstart @@ -34,6 +34,13 @@ liveimg --url=file:///tmp/install.img reboot +# 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 + %pre profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}') mgr=$(grep deploy_server /etc/confluent/confluent.deploycfg |awk '{print $2}') diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/firstboot.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/firstboot.sh index 986ef719..3fe06efc 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/firstboot.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/firstboot.sh @@ -14,9 +14,7 @@ export nodename mgr profile . /etc/confluent/functions -# Here is the most appropriate place to customize, for example: -#run_remote script.sh -#run_remote_python script.py +run_remote firstboot.custom curl -X POST -d 'status: complete' -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/updatestatus diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh index f87bcac2..d235598b 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/post.sh @@ -23,7 +23,8 @@ fi # run_remote will download and execute from /var/lib/confluent/public//scripts/ directory # run_remote_python will use the appropriate python interpreter path to run the specified script +# A post.custom is provided to more conveniently hold customizations, see the post.custom file. -# Add content as below: # run_remote example.sh # run_remote_python example.py +run_remote post.custom diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh index e959b759..3788f5f1 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh @@ -67,3 +67,5 @@ python /etc/confluent/apiclient /confluent-public/os/$profile/image.rpm -o image rpm2cpio image.rpm | cpio -dumi ln -s $(find $(pwd) -name *img) /tmp/install.img cd - +python /etc/confluent/apiclient /confluent-public/os/$profile/kickstart.custom -o /tmp/kickstart.custom +run_remote pre.custom