diff options
Diffstat (limited to 'build/f_isoroot')
-rw-r--r-- | build/f_isoroot/Makefile | 6 | ||||
-rwxr-xr-x | build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh | 44 | ||||
-rw-r--r-- | build/f_isoroot/f_isolinux/Makefile | 46 | ||||
-rw-r--r-- | build/f_isoroot/f_isolinux/isolinux.cfg | 32 | ||||
-rw-r--r-- | build/f_isoroot/f_isolinux/isolinux.cfg.orig | 32 | ||||
-rw-r--r-- | build/f_isoroot/f_kscfg/Makefile | 6 | ||||
-rw-r--r-- | build/f_isoroot/f_kscfg/ks.cfg | 27 | ||||
-rw-r--r-- | build/f_isoroot/f_kscfg/ks.cfg.orig | 12 | ||||
-rw-r--r-- | build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile | 9 | ||||
-rw-r--r-- | build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/config.mk | 5 | ||||
-rwxr-xr-x | build/f_isoroot/f_repobuild/select_ubuntu_repo.sh | 28 |
11 files changed, 202 insertions, 45 deletions
diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile index 8f84b6a73..ec0db48a3 100644 --- a/build/f_isoroot/Makefile +++ b/build/f_isoroot/Makefile @@ -14,10 +14,12 @@ PLUGINS = f_odlpluginbuild f_qemupluginbuild f_ovs-nsh-dpdk-pluginbuild f_onosfw # If the BUILD_FUEL_PLUGINS environment variable is set, only build the plugins # indicated therein. ifdef BUILD_FUEL_PLUGINS -SUBDIRS = f_kscfg f_bootstrap f_repobuild $(BUILD_FUEL_PLUGINS) +#SUBDIRS = f_kscfg f_bootstrap f_isolinux f_repobuild $(BUILD_FUEL_PLUGINS) +SUBDIRS = f_kscfg f_bootstrap f_isolinux $(BUILD_FUEL_PLUGINS) $(warning Overriding plugin build selection to $(BUILD_FUEL_PLUGINS)) else -SUBDIRS = f_kscfg f_bootstrap f_repobuild $(PLUGINS) +#SUBDIRS = f_kscfg f_bootstrap f_isolinux f_repobuild $(PLUGINS) +SUBDIRS = f_kscfg f_bootstrap f_isolinux $(PLUGINS) endif SUBCLEAN = $(addsuffix .clean,$(SUBDIRS)) diff --git a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh index 065d0cb7d..6318c5d39 100755 --- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh +++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh @@ -111,32 +111,24 @@ get_bootstrap_flavor () { # Actually build the bootstrap image build_ubuntu_bootstrap () { - local ret=1 - local max_attempts=3 - local config='/etc/fuel-bootstrap-image.conf' - local log='/var/log/fuel-bootstrap-image-build.log' - if ! grep -qE '^BOOTSTRAP_SSH_KEYS' "$config"; then - # FIXME: config file generated by fuelmenu has no trailing newline - echo >> "$config" - cat >> "$config" <<-EOF - BOOTSTRAP_SSH_KEYS=/root/.ssh/id_rsa.pub - EOF - fi - for n in `seq 1 $max_attempts`; do - echo "Bulding bootstrap image, attempt $n" >&2 - if fuel-bootstrap-image >>"$log" 2>&1; then - ret=0 - fuel-bootstrap-image-set "ubuntu" - break - fi - done - if [ $ret -ne 0 ]; then - warning="WARNING: failed to build the bootstrap image, see $log for details. -Perhaps your Internet connection is broken. Please fix the problem and run -\`fuel-bootstrap-image-set ubuntu\`" - fuel notify --topic warning --send "$warning" - fi - return $ret + local ret=1 + echo ${bs_progress_message} >&2 + set_ui_bootstrap_error "${bs_progress_message}" >&2 +# OPNFV modification to turn off biosdevname on the line below (extend-kopts) + if fuel-bootstrap -v --debug build --activate \ + --extend-kopts "biosdevname=0 net.ifnames=0 debug ignore_loglevel log_buf_len=10M print_fatal_signals=1 LOGLEVEL=8" \ + >>"$bs_build_log" 2>&1; then + ret=0 + fuel notify --topic "done" --send "${bs_done_message}" + else + ret=1 + set_ui_bootstrap_error "${bs_error_message}" >&2 + fi + # perform hard-return from func + # this part will update input $1 variable + local __resultvar=$1 + eval $__resultvar="'${ret}'" + return $ret } diff --git a/build/f_isoroot/f_isolinux/Makefile b/build/f_isoroot/f_isolinux/Makefile new file mode 100644 index 000000000..b683ea38c --- /dev/null +++ b/build/f_isoroot/f_isolinux/Makefile @@ -0,0 +1,46 @@ +############################################################################## +# Copyright (c) 2016 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) + +.PHONY: all +all: + @mkdir -p release/isolinux + grep -q OpenStack_Fuel isolinux.cfg + sed "s/OpenStack_Fuel/$(PRODNO)_$(REVSTATE)/g" isolinux.cfg > isolinux.cfg.patched + @cp isolinux.cfg.patched release/isolinux/isolinux.cfg + @cp isolinux.cfg.orig release/isolinux/ + +.PHONY: clean +clean: + @rm -rf release isolinux.cfg.patched + +.PHONY: release +release: all + @cp -Rvp release/* ../release + +############################################################################# +# Cache operations - only used when building through ci/build.sh +############################################################################# + +# Clean local data related to caching - called prior to ordinary build +.PHONY: clean-cache +clean-cache: clean + @echo "clean-cache not implemented" + +# Try to download cache - called prior to ordinary build +.PHONY: get-cache +get-cache: + @echo "get-cache not implemented" + +# Store cache if not already stored - called after ordinary build +.PHONY: put-cache +put-cache: + @echo "put-cache not implemented" diff --git a/build/f_isoroot/f_isolinux/isolinux.cfg b/build/f_isoroot/f_isolinux/isolinux.cfg new file mode 100644 index 000000000..0948c95ac --- /dev/null +++ b/build/f_isoroot/f_isolinux/isolinux.cfg @@ -0,0 +1,32 @@ +default vesamenu.c32 +#prompt 1 +timeout 300 + +display boot.msg + +menu background splash.jpg +menu title Welcome to Fuel Installer (version: 8.0) +menu color border 0 #ffffffff #00000000 +menu color sel 7 #ffffffff #ff000000 +menu color title 0 #ffffffff #00000000 +menu color tabmsg 0 #ffffffff #00000000 +menu color unsel 0 #ffffffff #00000000 +menu color hotsel 0 #ff000000 #ffffffff +menu color hotkey 7 #ffffffff #ff000000 +menu color scrollbar 0 #ffffffff #00000000 + +label nailgun + menu label ^1. Fuel Install (Static IP) + menu default + kernel vmlinuz + append initrd=initrd.img net.ifnames=0 biosdevname=0 ks=hd:sr0:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: dns1=10.20.0.1 selinux=0 showmenu=yes + +label nailgunifname + menu label ^2. Fuel Advanced Install (Static IP) + kernel vmlinuz + append initrd=initrd.img ks=hd:sr0:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: dns1=10.20.0.1 selinux=0 ifname=adminif:XX:XX:XX:XX:XX:XX showmenu=yes + +label usbboot + menu label ^3. USB Fuel Install (Static IP) + kernel vmlinuz + append initrd=initrd.img biosdevname=0 repo=hd:LABEL=OpenStack_Fuel:/ ks=hd:LABEL=OpenStack_Fuel:/ks.cfg ip=10.20.0.2 gw=10.20.0.1 dns1=10.20.0.1 netmask=255.255.255.0 hostname=fuel.domain.tld showmenu=yes diff --git a/build/f_isoroot/f_isolinux/isolinux.cfg.orig b/build/f_isoroot/f_isolinux/isolinux.cfg.orig new file mode 100644 index 000000000..2b3e7e307 --- /dev/null +++ b/build/f_isoroot/f_isolinux/isolinux.cfg.orig @@ -0,0 +1,32 @@ +default vesamenu.c32 +#prompt 1 +timeout 300 + +display boot.msg + +menu background splash.jpg +menu title Welcome to Fuel Installer (version: 8.0) +menu color border 0 #ffffffff #00000000 +menu color sel 7 #ffffffff #ff000000 +menu color title 0 #ffffffff #00000000 +menu color tabmsg 0 #ffffffff #00000000 +menu color unsel 0 #ffffffff #00000000 +menu color hotsel 0 #ff000000 #ffffffff +menu color hotkey 7 #ffffffff #ff000000 +menu color scrollbar 0 #ffffffff #00000000 + +label nailgun + menu label ^1. Fuel Install (Static IP) + menu default + kernel vmlinuz + append initrd=initrd.img net.ifnames=0 biosdevname=0 ks=hd:sr0:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:eth0:off::: dns1=10.20.0.1 selinux=0 + +label nailgunifname + menu label ^2. Fuel Advanced Install (Static IP) + kernel vmlinuz + append initrd=initrd.img ks=hd:sr0:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: dns1=10.20.0.1 selinux=0 ifname=adminif:XX:XX:XX:XX:XX:XX + +label usbboot + menu label ^3. USB Fuel Install (Static IP) + kernel vmlinuz + append initrd=initrd.img biosdevname=0 repo=hd:LABEL=OpenStack_Fuel:/ ks=hd:LABEL=OpenStack_Fuel:/ks.cfg ip=10.20.0.2 gw=10.20.0.1 dns1=10.20.0.1 netmask=255.255.255.0 hostname=fuel.domain.tld showmenu=yes diff --git a/build/f_isoroot/f_kscfg/Makefile b/build/f_isoroot/f_kscfg/Makefile index fe740418d..2a82a1803 100644 --- a/build/f_isoroot/f_kscfg/Makefile +++ b/build/f_isoroot/f_kscfg/Makefile @@ -13,12 +13,14 @@ TOP := $(shell pwd) .PHONY: all all: @mkdir -p release - @cp ks.cfg release + grep -q OpenStack_Fuel ks.cfg + sed "s/OpenStack_Fuel/$(PRODNO)_$(REVSTATE)/g" ks.cfg > ks.cfg.patched + @cp ks.cfg.patched release/ks.cfg @cp ks.cfg.orig release .PHONY: clean clean: - @rm -rf release + @rm -rf release ks.cfg.patched .PHONY: release release: all diff --git a/build/f_isoroot/f_kscfg/ks.cfg b/build/f_isoroot/f_kscfg/ks.cfg index 8c20971f8..e16139a86 100644 --- a/build/f_isoroot/f_kscfg/ks.cfg +++ b/build/f_isoroot/f_kscfg/ks.cfg @@ -36,9 +36,15 @@ for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do done default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'` -installdrive="undefined" -forceformat="no" -for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done +installdrive=${installdrive:-undefined} +forceformat=${forceformat:-no} +for I in $(cat /proc/cmdline); do + case "$I" in + *=*) + if ! [[ "${I}" =~ "." ]]; then eval "$I"; fi + ;; + esac +done set ${drives} ${removable_drives} numdrives=`echo $#` @@ -607,3 +613,18 @@ cp -f /etc/skel/.bash* /root/ [[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf %end + + +%post --nochroot --log=/mnt/sysimage/root/anaconda-post-interface-settings.log +#!/bin/bash +set -x + +source "/mnt/sysimage/root/anaconda.cmdline.vars" + +if [[ ! -z $adminif ]]; then + rm -f /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-${ifname%%:*} + sed "s/${ifname%%:*}/${adminif}/g" \ + /etc/sysconfig/network-scripts/ifcfg-${ifname%%:*} > \ + /mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-${adminif} +fi +%end diff --git a/build/f_isoroot/f_kscfg/ks.cfg.orig b/build/f_isoroot/f_kscfg/ks.cfg.orig index 148ef9908..41a475bbe 100644 --- a/build/f_isoroot/f_kscfg/ks.cfg.orig +++ b/build/f_isoroot/f_kscfg/ks.cfg.orig @@ -36,9 +36,15 @@ for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do done default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'` -installdrive="undefined" -forceformat="no" -for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done +installdrive=${installdrive:-undefined} +forceformat=${forceformat:-no} +for I in $(cat /proc/cmdline); do + case "$I" in + *=*) + if ! [[ "${I}" =~ "." ]]; then eval "$I"; fi + ;; + esac +done set ${drives} ${removable_drives} numdrives=`echo $#` diff --git a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile index 6b76fbe50..70fd22409 100644 --- a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile +++ b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile @@ -37,15 +37,16 @@ release:.ovsnfvbuild @rm -rf fuel-plugin-ovsnfv sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev sudo pip install fuel-plugin-builder - git clone $(OVSNFV_DPDK_REPO) - cd fuel-plugin-ovsnfv; \ + git clone $(OVSNFV_DPDK_REPO) ovsnfv + cd ovsnfv; \ git checkout $(OVSNFV_DPDK_BRANCH); \ if [ ! -z $(OVSNFV_DPDK_CHANGE) ]; then \ git fetch $(OVSNFV_DPDK_REPO) $(OVSNFV_DPDK_CHANGE); \ git checkout FETCH_HEAD; \ fi - INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin-ovsnfv/ - @mv fuel-plugin-ovsnfv/fuel-plugin-ovsnfv*.rpm . + cd ovsnfv; \ + INCLUDE_DEPENDENCIES=true fpb --debug --build $(OVSNFV_DPDK_DIR) + @mv ovsnfv/$(OVSNFV_DPDK_DIR)/fuel-plugin-ovsnfv*.rpm . $(REPOINFO) -r . > gitinfo_ovsnfv-dpdk-plugin.txt @rm -rf fuel-plugin-ovsnfv @touch .ovsnfvbuild diff --git a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/config.mk b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/config.mk index cfaa4f723..1893fce4a 100644 --- a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/config.mk +++ b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/config.mk @@ -7,6 +7,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -OVSNFV_DPDK_BRANCH=d13417a93c4df1d4db8f86f23ae4d42a056b5de8 -OVSNFV_DPDK_REPO=https://github.com/mrmarkgray/fuel-plugin-ovsnfv +OVSNFV_DPDK_BRANCH=stable/brahmaputra +OVSNFV_DPDK_REPO=https://gerrit.opnfv.org/gerrit/p/ovsnfv.git +OVSNFV_DPDK_DIR=fuel-plugin-ovsnfv OVSNFV_DPDK_CHANGE= diff --git a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh index cb05fe136..992359afd 100755 --- a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh +++ b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh @@ -11,6 +11,19 @@ RSYNC="rsync -4 --contimeout 5 --no-motd --list-only" # local mirror can be found after four attempts, the default archive # is returned instead. +return_url=0 + +while [ "$1" != "" ]; do + case $1 in + -u | --url ) shift + return_url=1 + ;; + # Shift all the parameters down by one + esac + shift +done + + cnt=0 while [ $cnt -lt 4 ] do @@ -21,13 +34,22 @@ do then if ! $RSYNC "${host}::ubuntu/Archive-Update-in-Progress*" &> /dev/null then - echo "$host" - exit 0 + if [ "$return_url" = "1" ]; then + echo "$url" + exit 0 + else + echo "$host" + exit 0 + fi fi fi done cnt=$[cnt + 1] sleep 15 done -echo "archive.ubuntu.com" +if [ "$return_url" = "1" ]; then + echo "http://archive.ubuntu.com/ubuntu/" +else + echo "archive.ubuntu.com" +fi |