From 7957a6abd4b3855a97a01397794786d1b61cdf15 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 29 Mar 2021 14:03:11 -0400 Subject: [PATCH] Add invoking syncfile activity to the default profiles --- confluent_osdeploy/el7/profiles/default/scripts/post.sh | 4 ++++ confluent_osdeploy/el8/profiles/default/scripts/post.sh | 4 ++++ confluent_osdeploy/genesis/profiles/default/scripts/onboot.sh | 4 ++++ confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh | 4 ++++ .../ubuntu20.04/profiles/default/scripts/post.sh | 2 ++ 5 files changed, 18 insertions(+) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/post.sh b/confluent_osdeploy/el7/profiles/default/scripts/post.sh index 9fbd9915..e5b2c137 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/post.sh @@ -30,6 +30,10 @@ run_remote_python add_local_repositories # 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. +# This will induce server side processing of the syncfile contents if +# present +run_remote_python syncfileclient + # run_remote example.sh # run_remote_python example.py run_remote post.custom diff --git a/confluent_osdeploy/el8/profiles/default/scripts/post.sh b/confluent_osdeploy/el8/profiles/default/scripts/post.sh index ca3f351e..98f3b0c1 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/post.sh @@ -28,6 +28,10 @@ run_remote_python add_local_repositories # 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. +# This will induce server side processing of the syncfile contents if +# present +run_remote_python syncfileclient + # run_remote example.sh # run_remote_python example.py run_remote post.custom diff --git a/confluent_osdeploy/genesis/profiles/default/scripts/onboot.sh b/confluent_osdeploy/genesis/profiles/default/scripts/onboot.sh index 12cf0d91..a05957d4 100644 --- a/confluent_osdeploy/genesis/profiles/default/scripts/onboot.sh +++ b/confluent_osdeploy/genesis/profiles/default/scripts/onboot.sh @@ -6,6 +6,10 @@ # run_remote and run_remote_python are available to download scripts and # execute them. +# This will induce server side processing of the syncfile contents if +# present +run_remote_python syncfileclient + # Induce execution of remote configuration, e.g. ansible plays in ansible/onboot.d/ run_remote_config onboot diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh index 19cc051b..8c64bf29 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh @@ -21,6 +21,10 @@ chmod og-rwx /etc/confluent/* export mgr profile nodename . /etc/confluent/functions +# This will induce server side processing of the syncfile contents if +# present +run_remote_python syncfileclient + run_remote post.custom # Also, scripts may be placed into 'post.d', e.g. post.d/01-runfirst.sh, post.d/02-runsecond.sh diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh index 98f6dcca..fe705538 100755 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh @@ -65,8 +65,10 @@ echo " ChrootDirectory /target" >> /etc/ssh/sshd_config kill -HUP $(cat /run/sshd.pid) cat /target/etc/confluent/tls/*.pem > /target/etc/confluent/ca.pem cat /target/etc/confluent/tls/*.pem > /etc/confluent/ca.pem +chroot /target bash -c "source /etc/confluent/functions; run_remote_python syncfileclient" chroot /target bash -c "source /etc/confluent/functions; run_remote_parts post" source /target/etc/confluent/functions + run_remote_config post umount /target/sys /target/dev /target/proc