diff options
author | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2015-10-03 16:54:43 +0200 |
---|---|---|
committer | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2015-10-03 16:54:43 +0200 |
commit | 11dbe27afb96c5b54b9f4f0a1c8b21194f59dc7b (patch) | |
tree | 1ee6814c36c7af010cff9d67a1cf1643b233a378 /fuel/build/f_isoroot/f_kscfg/ks.cfg | |
parent | 0d4a1f4143d71fc616f456a3708d5c8c2a24ec3f (diff) |
Moving tag arno.2015.1.0 from genesis to fuel/stable/arnoarno.2015.1.0
Change-Id: I8bb3e28a814e04ad15e8a4b24b40bd7685600f46
Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
Diffstat (limited to 'fuel/build/f_isoroot/f_kscfg/ks.cfg')
-rwxr-xr-x[-rw-r--r--] | fuel/build/f_isoroot/f_kscfg/ks.cfg | 122 |
1 files changed, 49 insertions, 73 deletions
diff --git a/fuel/build/f_isoroot/f_kscfg/ks.cfg b/fuel/build/f_isoroot/f_kscfg/ks.cfg index 12cd1abab..508f04436 100644..100755 --- a/fuel/build/f_isoroot/f_kscfg/ks.cfg +++ b/fuel/build/f_isoroot/f_kscfg/ks.cfg @@ -26,12 +26,10 @@ skipx drives="" removable_drives="" for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do - if !(blkid | grep -q "${drv}.*Fuel"); then - if (grep -q 0 /sys/block/${drv}/removable); then - drives="${drives} ${drv}" - else - removable_drives="${removable_drives} ${drv}" - fi + if (grep -q 0 /sys/block/${drv}/removable); then + drives="${drives} ${drv}" + else + removable_drives="${removable_drives} ${drv}" fi done default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'` @@ -154,9 +152,9 @@ if [ "$format_confirmed" != "yes" ] ; then chvt 1 fi -# verify tgtdrive is at least 41GB +# verify tgtdrive is at least 30GB tgtdrivesize=$(( $(cat "/sys/class/block/${tgtdrive}/size") / 2 / 1024 )) -if [ $tgtdrivesize -lt 41984 ]; then +if [ $tgtdrivesize -lt 30720 ]; then exec < /dev/tty3 > /dev/tty3 2>&1 chvt 3 clear @@ -164,7 +162,7 @@ if [ $tgtdrivesize -lt 41984 ]; then echo '********************************************************************' echo '* E R R O R *' echo '* *' - echo '* Your disk is under 41GB in size. Installation cannot continue. *' + echo '* Your disk is under 30GB in size. Installation cannot continue. *' echo '* Restart installation with a larger disk. *' echo '* *' echo '********************************************************************' @@ -177,9 +175,7 @@ fi tgtdrive=$(echo $tgtdrive | sed -e 's/!/\//') # source -if test -e /dev/disk/by-label/"OpenStack_Fuel"; then - echo "harddrive --partition=LABEL="OpenStack_Fuel" --dir=/" > /tmp/source.ks -elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then +if test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then echo "harddrive --partition=UUID=will_be_substituted_with_actual_uuid --dir=/" > /tmp/source.ks else echo "cdrom" > /tmp/source.ks @@ -208,18 +204,16 @@ else fi echo > /tmp/partition.ks echo "partition /boot --onpart=/dev/${bootdev}3" >> /tmp/partition.ks -echo "partition /boot/efi --onpart=/dev/${bootdev}2" >> /tmp/partition.ks -echo "partition pv.001 --ondisk=${tgtdrive} --size=41000 --grow" >> /tmp/partition.ks +echo "partition pv.001 --ondisk=${tgtdrive} --size=30000 --grow" >> /tmp/partition.ks echo "volgroup os pv.001" >> /tmp/partition.ks echo "logvol swap --vgname=os --recommended --name=swap" >> /tmp/partition.ks echo "logvol / --vgname=os --size=10000 --name=root --fstype=ext4" >> /tmp/partition.ks -echo "logvol /var --vgname=os --size=10000 --percent 30 --grow --name=var --fstype=ext4" >> /tmp/partition.ks -echo "logvol /var/lib/docker --vgname=os --size=17000 --percent 20 --grow --name=varlibdocker --fstype=ext4" >> /tmp/partition.ks -echo "logvol /var/log --vgname=os --size=4096 --percent 50 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks +echo "logvol /var --vgname=os --size=10000 --percent 60 --grow --name=var --fstype=ext4" >> /tmp/partition.ks +echo "logvol /var/log --vgname=os --size=4096 --percent 40 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks # bootloader -echo "bootloader --location=partition --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks +echo "bootloader --location=mbr --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks # Anaconda can not install grub 0.97 on disks which are >4T. # The reason is that grub does not support such large geometries @@ -239,9 +233,6 @@ echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --no-floppy --batch %packages --nobase --excludedocs @Core -fuel -fuel-library -fuel-dockerctl authconfig bind-utils cronie @@ -250,12 +241,7 @@ curl daemonize dhcp docker-io -fuel-bootstrap-image -fuel-createmirror -fuel-target-centos-images -fuel-package-updates fuelmenu -fuel-docker-images gdisk lrzip lsof @@ -263,10 +249,8 @@ man mlocate nmap-ncat ntp -ntpdate openssh-clients policycoreutils -python-daemon rsync ruby21-puppet ruby21-rubygem-netaddr @@ -282,7 +266,6 @@ vim-enhanced virt-what wget yum -yum-plugin-priorities %include /tmp/post_partition.ks @@ -302,8 +285,6 @@ echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.c %post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log #!/bin/sh -set -x - SOURCE="/mnt/sysimage/tmp/source" for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done @@ -361,7 +342,6 @@ function save_cfg { else echo GATEWAY=$gw >> /etc/sysconfig/network fi - [ -n "$build_images" -a "$build_images" != "0" ] && echo -e "$build_images" > /root/.build_images } # Default FQDN @@ -376,7 +356,6 @@ gw=$gw device="eth0" hwaddr=`ifconfig $device | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` dhcp_interface=$dhcp_interface -build_images=$build_images save_cfg # Mounting installation source @@ -387,9 +366,7 @@ echo mkdir -p ${SOURCE} mkdir -p ${FS} -if test -e /dev/disk/by-label/"OpenStack_Fuel"; then - mount /dev/disk/by-label/"OpenStack_Fuel" ${SOURCE} -elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then +if test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then mount /dev/disk/by-uuid/will_be_substituted_with_actual_uuid ${FS} mount -o loop ${FS}/nailgun.iso ${SOURCE} fi @@ -413,47 +390,61 @@ cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64 # Copying Ubuntu files mkdir -p ${repodir}/ubuntu/x86_64/images +cp -r ${SOURCE}/ubuntu/conf ${repodir}/ubuntu/x86_64 +cp -r ${SOURCE}/ubuntu/db ${repodir}/ubuntu/x86_64 cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64 +cp -r ${SOURCE}/ubuntu/indices ${repodir}/ubuntu/x86_64 cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64 - -# We do not ship debian-installer kernel and initrd on ISO. -# But we still need to be able to create ubuntu cobbler distro -# which requires kernel and initrd to be available. So, we -# just touch these files to work around cobbler's limitation. -touch ${repodir}/ubuntu/x86_64/images/linux -touch ${repodir}/ubuntu/x86_64/images/initrd.gz +cp -r ${SOURCE}/ubuntu/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux ${repodir}/ubuntu/x86_64/images +cp -r ${SOURCE}/ubuntu/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz ${repodir}/ubuntu/x86_64/images # make links for backward compatibility ln -s ${repodir}/centos ${wwwdir}/centos ln -s ${repodir}/ubuntu ${wwwdir}/ubuntu +# Copying bootstrap image +mkdir -p ${wwwdir}/bootstrap +cp -r ${SOURCE}/bootstrap/initramfs.img ${wwwdir}/bootstrap +cp -r ${SOURCE}/bootstrap/linux ${wwwdir}/bootstrap + +# Copying target images +cp -r ${SOURCE}/targetimages ${wwwdir} + +mkdir -p /root/.ssh +chmod 700 /root/.ssh +cp ${SOURCE}/bootstrap/bootstrap.rsa /root/.ssh +chmod 600 /root/.ssh/bootstrap.rsa + # -------------------------- # UNPACKING PUPPET MANIFESTS # -------------------------- # create folders -#mkdir -p /etc/puppet/${OPENSTACK_VERSION}/manifests/ -#mkdir -p /etc/puppet/${OPENSTACK_VERSION}/modules/ -#rm -rf /etc/puppet/modules/ +mkdir -p /etc/puppet/${OPENSTACK_VERSION}/manifests/ +mkdir -p /etc/puppet/${OPENSTACK_VERSION}/modules/ +rm -rf /etc/puppet/modules/ # TODO(ikalnitsky): investigate why we need this -#cp ${SOURCE}/puppet-slave.tgz ${wwwdir}/ +cp ${SOURCE}/puppet-slave.tgz ${wwwdir}/ # place modules and manifests -#tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/${OPENSTACK_VERSION}/modules -#cp /etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/examples/site.pp /etc/puppet/${OPENSTACK_VERSION}/manifests/site.pp +tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/${OPENSTACK_VERSION}/modules +cp /etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/examples/site.pp /etc/puppet/${OPENSTACK_VERSION}/manifests/site.pp cp ${SOURCE}/centos-versions.yaml ${SOURCE}/ubuntu-versions.yaml /etc/puppet/${OPENSTACK_VERSION}/manifests/ # make links for backward compatibility -#pushd /etc/puppet -#ln -s ${OPENSTACK_VERSION}/manifests/ /etc/puppet/manifests -#ln -s ${OPENSTACK_VERSION}/modules/ /etc/puppet/modules -#popd +pushd /etc/puppet +ln -s ${OPENSTACK_VERSION}/manifests/ /etc/puppet/manifests +ln -s ${OPENSTACK_VERSION}/modules/ /etc/puppet/modules +popd cp ${SOURCE}/send2syslog.py /bin/send2syslog.py mkdir -p /var/lib/hiera touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml +# Deploy docker images and ctl tools if we built ISO with docker containers support +[ -d "${SOURCE}/docker" ] && cp -r ${SOURCE}/docker ${wwwdir}/docker + # Prepare local repository specification rm /etc/yum.repos.d/CentOS*.repo cat > /etc/yum.repos.d/nailgun.repo << EOF @@ -470,24 +461,6 @@ sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf # Disable GSSAPI in ssh server config sed -i -e "/^\s*GSSAPICleanupCredentials yes/d" -e "/^\s*GSSAPIAuthentication yes/d" /etc/ssh/sshd_config -# Enable MOTD banner in sshd -sed -i -e "s/^\s*PrintMotd no/PrintMotd yes/g" /etc/ssh/sshd_config - -# Add note regarding local repos creation to MOTD -cat >> /etc/motd << EOF - -All environments use online repositories by default. -Use the following commands to create local repositories -on master node and change default repository settings: - -* CentOS: fuel-package-updates (see --help for options) -* Ubuntu: fuel-createmirror (see --help for options) - -Please refer to the following guide for more information: -https://docs.mirantis.com/openstack/fuel/fuel-6.1/reference-architecture.html#fuel-rep-mirror - -EOF - # Copying bootstrap_admin_node.sh, chmod it and # adding /etc/init/bootstrap_admin_node.conf cp ${SOURCE}/bootstrap_admin_node.sh /usr/local/sbin/bootstrap_admin_node.sh @@ -573,7 +546,10 @@ rm -rf ${SOURCE} umount -f ${FS} || true rm -rf ${FS} -echo "tos orphan 7" >> /etc/ntp.conf +# Enabling/configuring NTPD and ntpdate services +echo "server 127.127.1.0" >> /etc/ntp.conf +echo "fudge 127.127.1.0 stratum 10" >> /etc/ntp.conf +echo "tos orphan 7" >> /etc/ntp.conf # Do not show error message on ntpdate failure. Customers should not be confused # if admin node does not have access to the internet time servers. @@ -595,4 +571,4 @@ cp -f /etc/skel/.bash* /root/ # Blacklist i2c_piix4 module for VirtualBox so it does not create kernel errors [[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf -%end
\ No newline at end of file +%end |