Merge "Add the Fuel node bootstrap script to the "fuel-setup" package"

This commit is contained in:
Jenkins 2016-02-19 15:29:52 +00:00 committed by Gerrit Code Review
commit 5766b810d8
3 changed files with 23 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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