diff --git a/iso/ks.template b/iso/ks.template index acff3a11b..7ef9c0aff 100644 --- a/iso/ks.template +++ b/iso/ks.template @@ -469,10 +469,6 @@ set -x source "/root/anaconda.cmdline.vars" SOURCE=/tmp/source -# Install bootstrap_admin_node.sh and enabling it -install -m 0777 -D ${SOURCE}/bootstrap_admin_node.sh /usr/local/sbin/bootstrap_admin_node.sh -echo "ENABLED=1" > /etc/sysconfig/bootstrap_admin_node - # Prepare bootstrap_admin_node config mkdir -p /etc/fuel cat > /etc/fuel/bootstrap_admin_node.conf << EOF @@ -513,8 +509,10 @@ cat >> /root/.bashrc << 'EOF' if [[ "$(tty)" == "/dev/tty1" && -f /etc/systemd/system/getty@tty1.service.d/autologin.conf ]]; then rm -Rf "/etc/systemd/system/getty@tty1.service.d" /bin/systemctl daemon-reload - if [ -x /usr/local/sbin/bootstrap_admin_node.sh ]; then - exec /usr/local/sbin/bootstrap_admin_node.sh + yum makecache + yum install -y fuel-setup + if [ -x /usr/sbin/bootstrap_admin_node.sh ]; then + exec /usr/sbin/bootstrap_admin_node.sh fi fi EOF diff --git a/iso/module.mk b/iso/module.mk index c609a5a52..7eab5bc15 100644 --- a/iso/module.mk +++ b/iso/module.mk @@ -77,7 +77,6 @@ $(BUILD_DIR)/iso/isoroot-files.done: \ $(ISOROOT)/isolinux/isolinux.cfg \ $(ISOROOT)/isolinux/splash.jpg \ $(ISOROOT)/ks.cfg \ - $(ISOROOT)/bootstrap_admin_node.sh \ $(ISOROOT)/send2syslog.py $(ACTION.TOUCH) @@ -103,7 +102,6 @@ $(ISOROOT)/ks.cfg: $(SOURCE_DIR)/iso/ks.template $(SOURCE_DIR)/iso/ks.py $(ISORO -o $@.tmp mv $@.tmp $@ -$(ISOROOT)/bootstrap_admin_node.sh: $(SOURCE_DIR)/iso/bootstrap_admin_node.sh ; $(ACTION.COPY) $(ISOROOT)/send2syslog.py: $(BUILD_DIR)/repos/fuel-nailgun/bin/send2syslog.py ; $(ACTION.COPY) $(BUILD_DIR)/repos/fuel-nailgun/bin/send2syslog.py: $(BUILD_DIR)/repos/fuel-nailgun.done diff --git a/specs/fuel-main.spec b/specs/fuel-main.spec index 538dc6303..79ee06f55 100644 --- a/specs/fuel-main.spec +++ b/specs/fuel-main.spec @@ -50,6 +50,9 @@ install -D -m 644 %{_builddir}/%{name}-%{version}/fuel-release/RPM-GPG-KEY-mos % for file in %{_builddir}/%{name}-%{version}/fuel-release/*.repo ; do install -D -m 644 "$file" %{buildroot}/etc/yum.repos.d done +install -D -p -m 755 %{_builddir}/%{name}-%{version}/iso/bootstrap_admin_node.sh %{buildroot}%{_sbindir}/bootstrap_admin_node.sh +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/ +echo "ENABLED=1" > %{buildroot}%{_sysconfdir}/sysconfig/bootstrap_admin_node %clean rm -rf %{buildroot} @@ -79,4 +82,20 @@ and Yum configuration for Fuel online repositories. %dir /etc/pki/fuel-gpg /etc/pki/fuel-gpg/* +%package -n fuel-setup + +Summary: Fuel deployment script package +Version: %{version} +Release: %{release} +License: GPLv2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +URL: http://github.com/Mirantis + +%description -n fuel-setup +This packages provides script to deploy Fuel components. + +%files -n fuel-setup +%defattr(-,root,root) +%{_sysconfdir}/sysconfig/bootstrap_admin_node +%{_sbindir}/bootstrap_admin_node.sh