Some live cd image building updates
This commit is contained in:
parent
967c929e82
commit
f3c9088c94
|
@ -32,3 +32,14 @@ appliance-source:
|
|||
--proxy http://192.168.122.1:3128 \
|
||||
--make-appliance \
|
||||
--tmp .
|
||||
|
||||
livecd-tools-iso:
|
||||
livecd-creator \
|
||||
--debug \
|
||||
--verbose \
|
||||
--config instack-livecd.ks \
|
||||
--title "OpenStack Management Title" \
|
||||
--product "OpenStack Management Fedora" \
|
||||
--releasever 20 \
|
||||
--cache /var/cache/livecd-tools \
|
||||
--tmpdir /tmp
|
||||
|
|
|
@ -31,7 +31,7 @@ Version=0.9.4
|
|||
Type=Application
|
||||
Name=instack
|
||||
Comment=
|
||||
Exec=/home/stack/instack-undercloud/scripts/instack-apply-config
|
||||
Exec=/usr/bin/instack-apply-config
|
||||
OnlyShowIn=XFCE;
|
||||
StartupNotify=false
|
||||
Terminal=true
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
%include /usr/share/spin-kickstarts/fedora-livecd-xfce.ks
|
||||
|
||||
# Network information
|
||||
network --device=eth0 --nameserver=8.8.8.8 --bootproto=dhcp --onboot=on --activate
|
||||
|
||||
# Disk partitioning information
|
||||
part / --fstype="ext4" --size=4000
|
||||
part swap --size=1000
|
||||
|
||||
%post
|
||||
|
||||
/usr/sbin/useradd stack
|
||||
/usr/sbin/usermod -G wheel -a stack
|
||||
echo stack | passwd stack --stdin
|
||||
|
||||
# Remove root password
|
||||
passwd -d root > /dev/null
|
||||
|
||||
# Show harddisk install on the desktop
|
||||
mkdir /home/stack/Desktop
|
||||
cp /usr/share/applications/liveinst.desktop /home/stack/Desktop
|
||||
sed -i -e 's/NoDisplay=true/NoDisplay=false/' /home/stack/Desktop/liveinst.desktop
|
||||
sed -i -e 's/Exec=\/usr\/bin\/liveinst/\0 --kickstart \/home\/stack\/instack-undercloud\/live\/instack-install.ks/' /home/stack/Desktop/liveinst.desktop
|
||||
sed -i -e 's/Terminal=false/Terminal=true/' /home/stack/Desktop/liveinst.desktop
|
||||
mkdir -p /home/stack/.config/autostart
|
||||
ln -s /home/stack/Desktop/liveinst.desktop /home/stack/.config/autostart
|
||||
|
||||
# and mark it as executable (new Xfce security feature)
|
||||
chmod +x /home/stack/Desktop/liveinst.desktop
|
||||
|
||||
# deactivate xfce4-panel first-run dialog (#693569)
|
||||
mkdir -p /home/stack/.config/xfce4/xfconf/xfce-perchannel-xml
|
||||
cp /etc/xdg/xfce4/panel/default.xml /home/stack/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
|
||||
|
||||
pushd /home/stack
|
||||
|
||||
ssh-keygen -t rsa -N "" -f /home/stack/id_rsa_virt_power
|
||||
|
||||
curl -o /etc/yum.repos.d/slagle-openstack-m.repo https://copr.fedoraproject.org/coprs/slagle/openstack-m/repo/fedora-20/slagle-openstack-m-fedora-20.repo
|
||||
yum -y install https://slagle.fedorapeople.org/copr/instack-undercloud-1.0.10-1.fc20.noarch.rpm
|
||||
cp /usr/share/doc/instack-undercloud/instack.answers.sample /home/stack/instack.answers
|
||||
cp /usr/share/doc/instack-undercloud/deploy-virt-overcloudrc /home/stack/deploy-overcloudrc
|
||||
# instack-install-undercloud sources ~/instack.answers, and during the
|
||||
# %chroot phase, apparently ~ evaluates to /tmp. So, we need to copy the
|
||||
# answers file there as well.
|
||||
cp instack-undercloud/instack-baremetal.answers.sample ~/instack.answers
|
||||
|
||||
export RUN_ORC=0
|
||||
export HOME=/home/stack
|
||||
export PATH=/usr/bin:/usr/sbin/:/sbin
|
||||
instack-install-undercloud-source
|
||||
|
||||
cat << EOF >> /etc/fstab
|
||||
tmpfs /mnt tmpfs rw 0 0
|
||||
EOF
|
||||
|
||||
# Clean up answers file
|
||||
rm -f ~/instack.answers
|
||||
|
||||
popd
|
||||
|
||||
# this goes at the end after all other changes.
|
||||
chown -R stack:stack /home/stack
|
||||
restorecon -R /home/stack
|
||||
|
||||
# disable os-collect-config
|
||||
rm -f /etc/systemd/system/multi-user.target.wants/os-collect-config.service
|
||||
|
||||
# need to reinstall anaconda
|
||||
yum -y install anaconda
|
||||
# firewalld is installed back by anaconda, so we must totally disable it.
|
||||
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
|
||||
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
|
||||
|
||||
%end
|
||||
|
||||
%packages
|
||||
anaconda
|
||||
firefox
|
||||
ucs-miscfixed-fonts
|
||||
bitmap-fixed-fonts
|
||||
shadow-utils
|
||||
|
||||
-@xfce-apps
|
||||
-@xfce-extra-plugins
|
||||
-@xfce-media
|
||||
-@xfce-office
|
||||
-@virtualization
|
||||
|
||||
%end
|
|
@ -79,7 +79,7 @@ sed -i 's/^#user-session=.*/user-session=xfce/' /etc/lightdm/lightdm.conf
|
|||
mkdir /home/stack/Desktop
|
||||
cp /usr/share/applications/liveinst.desktop /home/stack/Desktop
|
||||
sed -i -e 's/NoDisplay=true/NoDisplay=false/' /home/stack/Desktop/liveinst.desktop
|
||||
sed -i -e 's/Exec=\/usr\/bin\/liveinst/\0 --kickstart \/home\/stack\/instack-undercloud\/live\/instack-install.ks/' /home/stack/Desktop/liveinst.desktop
|
||||
sed -i -e 's/Exec=\/usr\/bin\/liveinst/\0 --kickstart \/usr\/share\/instack-undercloud\/live\/instack-install.ks/' /home/stack/Desktop/liveinst.desktop
|
||||
sed -i -e 's/Terminal=false/Terminal=true/' /home/stack/Desktop/liveinst.desktop
|
||||
mkdir -p /home/stack/.config/autostart
|
||||
ln -s /home/stack/Desktop/liveinst.desktop /home/stack/.config/autostart
|
||||
|
@ -95,19 +95,17 @@ pushd /home/stack
|
|||
|
||||
ssh-keygen -t rsa -N "" -f /home/stack/virtual-power-key
|
||||
|
||||
yum -y install git
|
||||
git clone https://github.com/agroup/instack-undercloud
|
||||
cp instack-undercloud/instack-baremetal.answers.sample /home/stack/instack.answers
|
||||
cp instack-undercloud/deploy-virt-overcloudrc /home/stack/deploy-overcloudrc
|
||||
curl -o /etc/yum.repos.d/slagle-openstack-m.repo https://copr.fedoraproject.org/coprs/slagle/openstack-m/repo/fedora-20/slagle-openstack-m-fedora-20.repo
|
||||
yum -y install https://slagle.fedorapeople.org/copr/instack-undercloud-1.0.10-1.fc20.noarch.rpm
|
||||
cp /usr/share/doc/instack-undercloud/instack.answers.sample /home/stack/instack.answers
|
||||
cp /usr/share/doc/instack-undercloud/deploy-virt-overcloudrc /home/stack/deploy-overcloudrc
|
||||
# instack-install-undercloud sources ~/instack.answers, and during the
|
||||
# %chroot phase, apparently ~ evaluates to /tmp. So, we need to copy the
|
||||
# answers file there as well.
|
||||
cp instack-undercloud/instack-baremetal.answers.sample ~/instack.answers
|
||||
cp /usr/share/doc/instack-undercloud/instack.answers.sample ~/instack.answers
|
||||
|
||||
export RUN_ORC=0
|
||||
export LKG=1
|
||||
source instack-undercloud/instack-sourcerc
|
||||
instack-undercloud/scripts/instack-install-undercloud-source
|
||||
instack-install-undercloud-source
|
||||
|
||||
cat << EOF >> /etc/fstab
|
||||
tmpfs /mnt tmpfs rw 0 0
|
||||
|
@ -122,11 +120,10 @@ popd
|
|||
chown -R stack:stack /home/stack
|
||||
restorecon -R /home/stack
|
||||
|
||||
# Always force the source install
|
||||
echo "source /home/stack/instack-undercloud/instack-sourcerc" >> /home/stack/.bashrc
|
||||
|
||||
# disable os-collect-config
|
||||
rm -f /etc/systemd/system/multi-user.target.wants/os-collect-config.service
|
||||
# disable crond so that os-refresh-config on boot job does not start
|
||||
rm -f /etc/systemd/system/multi-user.target.wants/crond.service
|
||||
|
||||
# need to reinstall anaconda
|
||||
yum -y install anaconda
|
||||
|
|
Loading…
Reference in New Issue