diff options
author | Stefan K. Berg <stefan.k.berg@ericsson.com> | 2015-02-13 17:09:52 +0100 |
---|---|---|
committer | Stefan K. Berg <stefan.k.berg@ericsson.com> | 2015-02-17 16:22:42 +0100 |
commit | ec0606c650706be7444370128624924a3dd1767e (patch) | |
tree | c36e86482c38d119bd8a06301af47fb09bc3494a /fuel-build/f_isoroot/f_kscfg/ks.cfg | |
parent | 41048f09b545b34ff1ed398b1dd76aad48a98718 (diff) |
Update of Fuel based build system to Fuel 6.0.1
Rebase of the build system to build Fuel from the stable/6.0 branch
which currently creates Fuel 6.0.1. The Fuel baseline thus becomes:
- OpenStack Juno
- Ubuntu 12.04.4
- CentOS 6.5
An additional patch is added to the Fuel build system to enable
a newer version of Fuel to be built under Docker (as the Ubuntu
sandbox chroot is installing atd, where the post install expects
upstart to be running which is not the case in the build container).
Rebase of patches on top of Fuel to support 6.0.1.
Change-Id: I2e884d27e1533be8d60c071a7ea9db998a4f5fea
Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
Diffstat (limited to 'fuel-build/f_isoroot/f_kscfg/ks.cfg')
-rwxr-xr-x | fuel-build/f_isoroot/f_kscfg/ks.cfg | 90 |
1 files changed, 61 insertions, 29 deletions
diff --git a/fuel-build/f_isoroot/f_kscfg/ks.cfg b/fuel-build/f_isoroot/f_kscfg/ks.cfg index 8194e8d..932e9ac 100755 --- a/fuel-build/f_isoroot/f_kscfg/ks.cfg +++ b/fuel-build/f_isoroot/f_kscfg/ks.cfg @@ -57,7 +57,7 @@ function confirm_format { parted -s /dev/$check_drive print echo read -p "Are you sure you want to erase ALL data on disk $check_drive? (y/N)" confirm_format - if [[ "$confirm_format" == "y" ]] || [[ "$forceformat" == "yes" ]]; then + if [[ "$confirm_format" == "y" ]] || [[ "$confirm_format" == "Y" ]] || [[ "$forceformat" == "yes" ]]; then return 0 else return 1 @@ -369,54 +369,86 @@ if test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then mount -o loop ${FS}/nailgun.iso ${SOURCE} fi -# Copying Repo to the nailgun /var/www directory -repodir="/var/www/nailgun" -mkdir -p ${repodir}/centos/fuelweb/x86_64 -cp -r ${SOURCE}/images ${repodir}/centos/fuelweb/x86_64 -cp -r ${SOURCE}/isolinux ${repodir}/centos/fuelweb/x86_64 -cp -r ${SOURCE}/repodata ${repodir}/centos/fuelweb/x86_64 -cp -r ${SOURCE}/Packages ${repodir}/centos/fuelweb/x86_64 -cp ${SOURCE}/.treeinfo ${repodir}/centos/fuelweb/x86_64 +OPENSTACK_VERSION=`cat ${SOURCE}/openstack_version` + +# ---------------------- +# UNPACKING REPOSITORIES +# ---------------------- + +wwwdir="/var/www/nailgun" +repodir="${wwwdir}/${OPENSTACK_VERSION}" + +# Copying Centos files +mkdir -p ${repodir}/centos/x86_64 +cp -r ${SOURCE}/images ${repodir}/centos/x86_64 +cp -r ${SOURCE}/isolinux ${repodir}/centos/x86_64 +cp -r ${SOURCE}/repodata ${repodir}/centos/x86_64 +cp -r ${SOURCE}/Packages ${repodir}/centos/x86_64 +cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64 # Copying Ubuntu files -mkdir -p ${repodir}/ubuntu/fuelweb/x86_64/images -cp -r ${SOURCE}/ubuntu/conf ${repodir}/ubuntu/fuelweb/x86_64 -cp -r ${SOURCE}/ubuntu/db ${repodir}/ubuntu/fuelweb/x86_64 -cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/fuelweb/x86_64 -cp -r ${SOURCE}/ubuntu/indices ${repodir}/ubuntu/fuelweb/x86_64 -cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/fuelweb/x86_64 -cp -r ${SOURCE}/ubuntu/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux ${repodir}/ubuntu/fuelweb/x86_64/images -cp -r ${SOURCE}/ubuntu/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz ${repodir}/ubuntu/fuelweb/x86_64/images +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 +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 ${repodir}/bootstrap -cp -r ${SOURCE}/bootstrap/initramfs.img ${repodir}/bootstrap -cp -r ${SOURCE}/bootstrap/linux ${repodir}/bootstrap +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 for master and slave -cp ${SOURCE}/puppet-slave.tgz ${repodir}/ -tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/modules -mkdir -p /etc/puppet/manifests/ -cp /etc/puppet/modules/osnailyfacter/examples/site.pp /etc/puppet/manifests/site.pp -cp ${SOURCE}/centos-versions.yaml ${SOURCE}/ubuntu-versions.yaml /etc/puppet/manifests/ +# -------------------------- +# UNPACKING PUPPET MANIFESTS +# -------------------------- + +# create folders +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}/ + +# 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 +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 + 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 ${repodir}/docker +[ -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 [nailgun] name=Nailgun Local Repo -baseurl=file:/var/www/nailgun/centos/fuelweb/x86_64 +baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/centos/x86_64 gpgcheck=0 EOF @@ -481,7 +513,7 @@ if [ "\$first" = "yes" ]; then ipstr="Fuel UI is available on: http://\$ip:8000" first=no else - ipstr=\$(printf "%s\n%51s" "\$ipstr" "http://\$ip:8000") + ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "http://\$ip:8000") fi done tmpissue=\$(mktemp) |