aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/Makefile31
-rw-r--r--build/docker/Dockerfile3
-rwxr-xr-xbuild/docker/runcontext2
-rw-r--r--build/f_isoroot/Makefile8
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/bootstrap_admin_node.sh5
-rw-r--r--build/f_isoroot/f_isolinux/Makefile46
-rw-r--r--build/f_isoroot/f_isolinux/isolinux.cfg32
-rw-r--r--build/f_isoroot/f_isolinux/isolinux.cfg.orig32
-rw-r--r--build/f_isoroot/f_kscfg/Makefile6
-rw-r--r--build/f_isoroot/f_kscfg/ks.cfg6
-rw-r--r--build/f_isoroot/f_kscfg/ks.cfg.orig4
-rwxr-xr-xbuild/f_isoroot/f_repobuild/select_ubuntu_repo.sh28
-rwxr-xr-xbuild/fuel_build_loop32
-rwxr-xr-xbuild/install/install.sh2
14 files changed, 214 insertions, 23 deletions
diff --git a/build/Makefile b/build/Makefile
index 6d252ce2b..1d28db329 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -20,14 +20,14 @@ SHELL = /bin/bash
#Input args
export ISOSRC = file:$(shell pwd)/fuel-8.0.iso
export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
-export PRODNO = "OPNFV_BGS"
+export PRODNO = "OPNFV_FUEL"
export REVSTATE = "P0000"
ifdef BUILD_FUEL_PLUGINS
$(warning Overriding plugin build selection to $(BUILD_FUEL_PLUGINS))
-export NEWISO = $(shell pwd)/release/unofficial-opnfv-${REVSTATE}.iso
+export NEWISO = $(shell pwd)/release/unofficial-opnfv-fuel-${REVSTATE}.iso
else
-export NEWISO = $(shell pwd)/release/opnfv-${REVSTATE}.iso
+export NEWISO = $(shell pwd)/release/opnfv-fuel-${REVSTATE}.iso
endif
# Note! Invoke with "make REVSTATE=RXXXX all" to make release build!
@@ -43,6 +43,24 @@ export DOCKERIMG = opnfv.org/ubuntu-builder:14.04
export TOPDIR := $(shell pwd)
export REPOINFO := $(BUILD_BASE)/repo_info.sh
+# Use snapshots
+# Use nearby repositories
+export MIRROR_UBUNTU_URL := $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh --url)
+export MIRROR_UBUNTU := $(shell echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f3 )
+export MIRROR_UBUNTU_ROOT := $(shell echo -n '/' ; echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f4-)
+
+export LATEST_MIRROR_ID_URL := http://mirror.seed-us1.fuel-infra.org
+
+export MIRROR_MOS_UBUNTU := $(shell echo "$(LATEST_MIRROR_ID_URL)" | cut -d'/' -f3)
+export LATEST_TARGET_UBUNTU := $(shell curl -sSf "$(MIRROR_MOS_UBUNTU)/mos-repos/ubuntu/8.0.target.txt" | head -1)
+export MIRROR_MOS_UBUNTU_ROOT := "/mos-repos/ubuntu/$(LATEST_TARGET_UBUNTU)"
+
+export LATEST_TARGET_CENTOS := $(shell curl -sSf "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos8.0-centos7-fuel/os.target.txt" | head -1)
+export MIRROR_FUEL := "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos8.0-centos7-fuel/$(LATEST_TARGET_CENTOS)/x86_64"
+
+# uncomment and use: make print-VARIABLE
+#print-% : ; @echo $* = $($*)
+
#Build subclasses
SUBDIRS := f_isoroot
@@ -97,8 +115,8 @@ $(ISOCACHE):
cd /tmp/fuel-main && ./prepare-build-env.sh
cd /tmp/fuel-main && make repos
$(REPOINFO) -r /tmp/fuel-main > gitinfo_fuel.txt
- #
- cd /tmp/fuel-main && sudo make iso
+ # Repeat build up to ten times
+ sudo ./fuel_build_loop
cp /tmp/fuel-main/build/artifacts/fuel*.iso .
.PHONY: mount-origiso umount-origiso
@@ -182,7 +200,8 @@ debug:
cd /tmp/fuel-main && git checkout $(FUEL_MAIN_TAG)
cd /tmp/fuel-main && make repos
$(REPOINFO) -r /tmp/fuel-main > .cachedata
- sha1sum fuel-main*.patch >> .cachedata
+ sha1sum *.patch >> .cachedata
+ sha1sum fuel_build_loop >> .cachedata
sha1sum config.mk >> .cachedata
sha1sum Makefile >> .cachedata
$(CACHETOOL) getbiweek >> .cachedata
diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile
index 9d1881c05..4ac51476e 100644
--- a/build/docker/Dockerfile
+++ b/build/docker/Dockerfile
@@ -24,9 +24,12 @@ RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies
# Keeping PWD is needed to build as root
RUN echo "Defaults env_keep += \"PWD\"" > /etc/sudoers.d/keep-pwd
+# Keeping variables for ISO build
+RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL\"" > /etc/sudoers.d/keep-mos
RUN chmod 0440 /etc/sudoers.d/open-sudo
RUN chmod 0440 /etc/sudoers.d/keep-proxies
RUN chmod 0440 /etc/sudoers.d/keep-pwd
+RUN chmod 0440 /etc/sudoers.d/keep-mos
RUN chmod 4755 /bin/fusermount
ADD ./setcontext /root/setcontext
diff --git a/build/docker/runcontext b/build/docker/runcontext
index 4ddd754f9..2df765868 100755
--- a/build/docker/runcontext
+++ b/build/docker/runcontext
@@ -111,7 +111,7 @@ if [ -n "$CACHEBASE" ]; then
fi
fi
-RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE -e BUILD_FUEL_PLUGINS -u $USER_ID:$GROUP_ID -w $PWD -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT"
+RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL -u $USER_ID:$GROUP_ID -w $PWD -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT"
# Passing "debug" puts up an interactive bash shell
if [ "$1" == "debug" ]; then
diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile
index 0f7f14fa0..bae2fe74d 100644
--- a/build/f_isoroot/Makefile
+++ b/build/f_isoroot/Makefile
@@ -16,12 +16,12 @@ PLUGINS = f_odlpluginbuild f_qemupluginbuild f_ovs-nsh-dpdk-pluginbuild f_onosfw
# Temporarilu disabling f_repobuild that currently have some issues on
# Fuel 8.
ifdef BUILD_FUEL_PLUGINS
-#SUBDIRS = f_kscfg f_bootstrap f_repobuild $(BUILD_FUEL_PLUGINS)
-SUBDIRS = f_kscfg f_bootstrap $(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 $(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 d057d0aee..184e5d942 100755
--- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
+++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
@@ -315,7 +315,10 @@ build_ubuntu_bootstrap () {
local ret=1
echo ${bs_progress_message} >&2
set_ui_bootstrap_error "${bs_progress_message}" >&2
- if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then
+# 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
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 c09a09be9..1787db8c9 100644
--- a/build/f_isoroot/f_kscfg/ks.cfg
+++ b/build/f_isoroot/f_kscfg/ks.cfg
@@ -97,8 +97,8 @@ 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"
+installdrive=${installdrive:-undefined}
+forceformat=${forceformat:-no}
for I in $(cat /proc/cmdline); do
case "$I" in
*=*)
@@ -628,4 +628,4 @@ if [[ ! -z $adminif ]]; then
/etc/sysconfig/network-scripts/ifcfg-${ifname%%:*} > \
/mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-${adminif}
fi
-%end \ No newline at end of file
+%end
diff --git a/build/f_isoroot/f_kscfg/ks.cfg.orig b/build/f_isoroot/f_kscfg/ks.cfg.orig
index a752dacac..60e124ae3 100644
--- a/build/f_isoroot/f_kscfg/ks.cfg.orig
+++ b/build/f_isoroot/f_kscfg/ks.cfg.orig
@@ -97,8 +97,8 @@ 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"
+installdrive=${installdrive:-undefined}
+forceformat=${forceformat:-no}
for I in $(cat /proc/cmdline); do
case "$I" in
*=*)
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
diff --git a/build/fuel_build_loop b/build/fuel_build_loop
new file mode 100755
index 000000000..7e26b98b8
--- /dev/null
+++ b/build/fuel_build_loop
@@ -0,0 +1,32 @@
+#!/bin/bash
+##############################################################################
+# 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
+##############################################################################
+
+echo "MIRROR_MOS_UBUNTU_ROOT=${MIRROR_MOS_UBUNTU_ROOT}"
+echo "MIRROR_FUEL=${MIRROR_FUEL}"
+
+maxcount=10
+cnt=0
+rc=1
+while [ $cnt -lt $maxcount ] && [ $rc -ne 0 ]
+do
+ cnt=$[cnt + 1]
+ echo -e "\n\n\n*** Starting build attempt # $cnt"
+ cd /tmp/fuel-main
+ make clean
+ make iso
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ echo "### Build failed with rc $rc ###"
+ else
+ echo "### Build successful at attempt # $cnt"
+ fi
+done
+exit $rc
diff --git a/build/install/install.sh b/build/install/install.sh
index 6155a4162..4e0389ed8 100755
--- a/build/install/install.sh
+++ b/build/install/install.sh
@@ -464,7 +464,7 @@ if [ $MODE = "iso" ]; then
TMP_ISOPUPPET=`mktemp -d /tmp/XXXXXXX`
ORIGISO=$2
NEWISO=$3
- VOLUMEID="$4 $5"
+ VOLUMEID="$4_$5"
REPORTFILE="${NEWISO}.txt"
echo "Opening reportfile at $REPORTFILE"
touch $REPORTFILE