Single puppet manifest for AIO controllers
Create a single puppet manifest for AIO controllers. This change includes: 1. remove workerconfig from an AIO controller deployment 2. running puppet based on subfunctions of the nodes Depends-on: https://review.opendev.org/c/starlingx/stx-puppet/+/780600 Partial-Bug: 1918139 Signed-off-by: Bin Qian <bin.qian@windriver.com> Change-Id: Ie3693219e3c19460ac5b617cc216cbc809ec2403
This commit is contained in:
parent
a40a3bd892
commit
6acd2e3564
@ -6,7 +6,6 @@
|
||||
# workerconfig
|
||||
workerconfig
|
||||
workerconfig-standalone
|
||||
workerconfig-subfunction
|
||||
|
||||
# controllerconfig
|
||||
controllerconfig
|
||||
|
@ -588,7 +588,7 @@ start()
|
||||
|
||||
if [ -f ${HOST_HIERA} ]; then
|
||||
echo "$0: Running puppet manifest apply"
|
||||
puppet-manifest-apply.sh ${HIERADATA_PATH} ${IPADDR} controller
|
||||
puppet-manifest-apply.sh ${HIERADATA_PATH} ${IPADDR} ${subfunction}
|
||||
RC=$?
|
||||
if [ $RC -ne 0 ]
|
||||
then
|
||||
|
@ -22,13 +22,6 @@ Group: base
|
||||
%description -n workerconfig-standalone
|
||||
Initial worker node configuration
|
||||
|
||||
%package -n workerconfig-subfunction
|
||||
Summary: workerconfig
|
||||
Group: base
|
||||
|
||||
%description -n workerconfig-subfunction
|
||||
Initial worker node configuration
|
||||
|
||||
%define initddir /etc/init.d/
|
||||
%define goenableddir /etc/goenabled.d/
|
||||
%define systemddir /etc/systemd/system/
|
||||
@ -53,19 +46,6 @@ else
|
||||
fi
|
||||
systemctl enable workerconfig.service
|
||||
|
||||
|
||||
%post -n workerconfig-subfunction
|
||||
if [ ! -e $D%{systemddir}/workerconfig.service ]; then
|
||||
cp $D%{systemddir}/config/workerconfig-combined.service $D%{systemddir}/workerconfig.service
|
||||
else
|
||||
cmp -s $D%{systemddir}/config/workerconfig-combined.service $D%{systemddir}/workerconfig.service
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f $D%{systemddir}/workerconfig.service
|
||||
cp $D%{systemddir}/config/workerconfig-combined.service $D%{systemddir}/workerconfig.service
|
||||
fi
|
||||
fi
|
||||
systemctl enable workerconfig.service
|
||||
|
||||
%clean
|
||||
|
||||
%files
|
||||
@ -79,7 +59,3 @@ systemctl enable workerconfig.service
|
||||
%{systemddir}/config/workerconfig-standalone.service
|
||||
%{goenableddir}/*
|
||||
|
||||
%files -n workerconfig-subfunction
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{systemddir}/config
|
||||
%{systemddir}/config/workerconfig-combined.service
|
||||
|
@ -23,13 +23,6 @@ Group: System/Packages
|
||||
%description -n workerconfig-standalone
|
||||
Initial worker node configuration for StarlingX project.
|
||||
|
||||
%package -n workerconfig-subfunction
|
||||
Summary: The worker config subfunction package
|
||||
Group: System/Packages
|
||||
|
||||
%description -n workerconfig-subfunction
|
||||
Initial worker node configuration for StarlingX project.
|
||||
|
||||
%define initddir %{_sysconfdir}/init.d/
|
||||
%define goenableddir %{_sysconfdir}/goenabled.d/
|
||||
%define systemddir %{_sysconfdir}/systemd/system/
|
||||
@ -46,11 +39,6 @@ make install INITDDIR=%{buildroot}%{initddir} GOENABLEDDIR=%{buildroot}%{goenabl
|
||||
cp $D%{systemddir}/config/workerconfig-standalone.service $D%{systemddir}/workerconfig.service
|
||||
systemctl enable workerconfig.service
|
||||
|
||||
|
||||
%post -n workerconfig-subfunction
|
||||
cp $D%{systemddir}/config/workerconfig-combined.service $D%{systemddir}/workerconfig.service
|
||||
systemctl enable workerconfig.service
|
||||
|
||||
%clean
|
||||
|
||||
%files
|
||||
@ -68,12 +56,4 @@ systemctl enable workerconfig.service
|
||||
%dir %{_sysconfdir}/systemd/system
|
||||
%config %{systemddir}/config/workerconfig-standalone.service
|
||||
|
||||
%files -n workerconfig-subfunction
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{systemddir}/config
|
||||
%{systemddir}/config/workerconfig-combined.service
|
||||
%dir %{_sysconfdir}/systemd
|
||||
%dir %{_sysconfdir}/systemd/system
|
||||
%config %{systemddir}/config/workerconfig-combined.service
|
||||
|
||||
%changelog
|
||||
|
@ -14,4 +14,3 @@ install:
|
||||
install -p -D -m 700 worker_config $(INITDDIR)/worker_config
|
||||
install -p -D -m 755 config_goenabled_check.sh $(GOENABLEDDIR)/config_goenabled_check.sh
|
||||
install -p -D -m 664 workerconfig.service $(SYSTEMDDIR)/config/workerconfig-standalone.service
|
||||
install -p -D -m 664 workerconfig-combined.service $(SYSTEMDDIR)/config/workerconfig-combined.service
|
||||
|
@ -1,21 +0,0 @@
|
||||
[Unit]
|
||||
Description=workerconfig service
|
||||
After=syslog.target network.service remote-fs.target
|
||||
After=sw-patch.service
|
||||
After=affine-platform.sh.service
|
||||
After=controllerconfig.service config.service
|
||||
After=goenabled.service
|
||||
After=sysinv-agent.service
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/etc/init.d/worker_config start
|
||||
ExecStop=
|
||||
ExecReload=
|
||||
StandardOutput=syslog+console
|
||||
StandardError=syslog+console
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user