summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Makefile9
-rwxr-xr-xbuild/cache.sh7
-rw-r--r--build/f_isoroot/Makefile3
-rw-r--r--build/f_isoroot/f_bgpvpn-pluginbuild/Makefile3
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/bootstrap_admin_node.sh108
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig94
-rw-r--r--build/f_isoroot/f_odlpluginbuild/Makefile6
-rw-r--r--build/f_isoroot/f_onosfwpluginbuild/Makefile3
-rw-r--r--build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile3
-rw-r--r--build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile3
-rw-r--r--build/f_isoroot/f_qemupluginbuild/Makefile3
-rw-r--r--build/f_isoroot/f_repobuild/Makefile3
-rw-r--r--build/f_isoroot/f_vsperfpluginbuild/Makefile3
13 files changed, 227 insertions, 21 deletions
diff --git a/build/Makefile b/build/Makefile
index 550f360f9..6c61714da 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -115,15 +115,16 @@ $(ISOCACHE):
# cd /tmp/fuel-main && patch -f -p0 < $(TOPDIR)/fuel-main_docker_dns.patch
#
cd /tmp/fuel-main && ./prepare-build-env.sh
+ # Verify that Docker is alive
+ sudo docker info
cd /tmp/fuel-main && make repos
$(REPOINFO) -r /tmp/fuel-main > gitinfo_fuel.txt
# Repeat build up to ten times
sudo ./fuel_build_loop
cp /tmp/fuel-main/build/artifacts/fuel*.iso .
-
- # Attempt to store ISO in cache to speed up the next
- # build attempt. If cache is not enabled no harm is done.
- $(MAKE) -f Makefile put-cache
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
.PHONY: mount-origiso umount-origiso
mount-origiso: $(ISOCACHE)
diff --git a/build/cache.sh b/build/cache.sh
index 07361d28a..7c2f2109c 100755
--- a/build/cache.sh
+++ b/build/cache.sh
@@ -19,7 +19,6 @@ exit_trap() {
trap exit_trap EXIT
CACHETRANSPORT=${CACHETRANSPORT:-"curl --silent"}
-CACHEBASE=${CACHEBASE:-"file://${HOME}/cache"}
CACHEMAXAGE=${CACHEMAXAGE:-$[14*24*3600]}
CACHEDEBUG=${CACHEDEBUG:-1}
@@ -132,6 +131,12 @@ getcommitid() {
fi
}
+
+
+if [ -z "$CACHEBASE" ]; then
+ errorexit "CACHEBASE not set - exiting..."
+fi
+
case $1 in
getcommitid)
if [ $# -ne 3 ]; then
diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile
index ec0db48a3..babb5d68d 100644
--- a/build/f_isoroot/Makefile
+++ b/build/f_isoroot/Makefile
@@ -9,7 +9,8 @@
##############################################################################
# Add Fuel plugin build targets here
-PLUGINS = f_odlpluginbuild f_qemupluginbuild f_ovs-nsh-dpdk-pluginbuild f_onosfwpluginbuild f_bgpvpn-pluginbuild f_ovsnfv-dpdk-pluginbuild f_vsperfpluginbuild
+PLUGINS = f_odlpluginbuild
+#NON_8-0_REBASED_PLUGINS = f_qemupluginbuild f_ovs-nsh-dpdk-pluginbuild f_onosfwpluginbuild f_bgpvpn-pluginbuild f_ovsnfv-dpdk-pluginbuild f_vsperfpluginbuild
# If the BUILD_FUEL_PLUGINS environment variable is set, only build the plugins
# indicated therein.
diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
index a99a426b6..71f2771a5 100644
--- a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
+++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
@@ -51,6 +51,9 @@ release:.bgpvpnbuild
$(REPOINFO) -r . > gitinfo_bgpvpnplugin.txt
rm -rf fuel-plugin-bgpvpn
touch .bgpvpnbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh
diff --git a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
index 6318c5d39..35d107ab4 100755
--- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
+++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
@@ -1,5 +1,56 @@
#!/bin/bash
-FUEL_RELEASE=$(grep release: /etc/fuel/version.yaml | cut -d: -f2 | tr -d '" ')
+mkdir -p /var/log/puppet
+exec > >(tee -i /var/log/puppet/bootstrap_admin_node.log)
+exec 2>&1
+
+FUEL_RELEASE=$(cat /etc/fuel_release)
+ASTUTE_YAML='/etc/fuel/astute.yaml'
+BOOTSTRAP_NODE_CONFIG="/etc/fuel/bootstrap_admin_node.conf"
+bs_build_log='/var/log/fuel-bootstrap-image-build.log'
+bs_status=0
+# Backup network configs to this folder. Folder will be created only if
+# backup process actually will be.
+bup_folder="/var/bootstrap_admin_node_bup_$(date +%Y-%m-%d-%H-%M-%S)/"
+### Long messages inside code makes them more complicated to read...
+# bootstrap messages
+# FIXME fix help links
+bs_skip_message="WARNING: Ubuntu bootstrap build has been skipped. \
+Please build and activate bootstrap manually with CLI command \
+\`fuel-bootstrap build --activate\`. \
+While you don't activate any bootstrap - new nodes cannot be discovered \
+and added to cluster. \
+For more information please visit \
+https://docs.mirantis.com/openstack/fuel/fuel-master/"
+bs_error_message="WARNING: Failed to build the bootstrap image, see $bs_build_log \
+for details. Perhaps your Internet connection is broken. Please fix the \
+problem and run \`fuel-bootstrap build --activate\`. \
+While you don\'t activate any bootstrap - new nodes cannot be discovered \
+and added to cluster. \
+For more information please visit \
+https://docs.mirantis.com/openstack/fuel/fuel-master/"
+bs_progress_message="There is no active bootstrap. Bootstrap image building \
+is in progress. Usually it takes 15-20 minutes. It depends on your internet \
+connection and hardware performance. Please reboot failed to discover nodes \
+after bootstrap image become available."
+bs_done_message="Default bootstrap image building done. Now you can boot new \
+nodes over PXE, they will be discovered and become available for installing \
+OpenStack on them"
+bs_centos_message="WARNING: Deprecated Centos bootstrap has been chosen \
+and activated. Now you can boot new nodes over PXE, they will be discovered \
+and become available for installing OpenStack on them."
+# Update issues messages
+update_warn_message="There is an issue connecting to the Fuel update repository. \
+Please fix your connection prior to applying any updates. \
+Once the connection is fixed, we recommend reviewing and applying \
+Maintenance Updates for this release of Mirantis OpenStack: \
+https://docs.mirantis.com/openstack/fuel/fuel-${FUEL_RELEASE}/\
+release-notes.html#maintenance-updates"
+update_done_message="We recommend reviewing and applying Maintenance Updates \
+for this release of Mirantis OpenStack: \
+https://docs.mirantis.com/openstack/fuel/fuel-${FUEL_RELEASE}/\
+release-notes.html#maintenance-updates"
+fuelmenu_fail_message="Fuelmenu was not able to generate '/etc/fuel/astute.yaml' file! \
+Please, restart it manualy using 'fuelmenu' command."
function countdown() {
local i
@@ -40,6 +91,10 @@ done
shopt -u nullglob
### OPNFV addition END
+# Enable sshd
+systemctl enable sshd
+systemctl start sshd
+
if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
fuelmenu
else
@@ -61,6 +116,25 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
fi
fi
+systemctl reload sshd
+
+# Enable iptables
+systemctl enable iptables.service
+systemctl start iptables.service
+
+
+if [ ! -f "${ASTUTE_YAML}" ]; then
+ echo ${fuelmenu_fail_message}
+ fail
+fi
+
+systemctl reload sshd
+
+# Enable iptables
+systemctl enable iptables.service
+systemctl start iptables.service
+
+
if [ "$wait_for_external_config" == "yes" ]; then
wait_timeout=3000
pidfile=/var/lock/wait_for_external_config
@@ -101,11 +175,30 @@ make_ubuntu_bootstrap_stub () {
}
get_bootstrap_flavor () {
- local ASTUTE_YAML='/etc/fuel/astute.yaml'
python <<-EOF
- from fuelmenu.fuelmenu import Settings
- conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {})
- print(conf.get('flavor', 'centos'))
+ from yaml import safe_load
+ with open("$ASTUTE_YAML", 'r') as f:
+ conf = safe_load(f).get('BOOTSTRAP', {})
+ print(conf.get('flavor', 'centos').lower())
+ EOF
+}
+
+get_bootstrap_skip () {
+ python <<-EOF
+ from yaml import safe_load
+ with open("$ASTUTE_YAML", 'r') as f:
+ conf = safe_load(f).get('BOOTSTRAP', {})
+ print(conf.get('skip_default_img_build', False))
+ EOF
+}
+
+set_ui_bootstrap_error () {
+ # This notify can't be closed or removed by user.
+ # For remove notify - send empty string.
+ local message=$1
+ python <<-EOF
+ from fuel_bootstrap.utils import notifier
+ notifier.notify_webui('${message}')
EOF
}
@@ -114,10 +207,7 @@ build_ubuntu_bootstrap () {
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
+ if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then
ret=0
fuel notify --topic "done" --send "${bs_done_message}"
else
diff --git a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
index 1bc349314..e637c7b6d 100755
--- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
+++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig
@@ -1,5 +1,56 @@
#!/bin/bash
-FUEL_RELEASE=$(grep release: /etc/fuel/version.yaml | cut -d: -f2 | tr -d '" ')
+mkdir -p /var/log/puppet
+exec > >(tee -i /var/log/puppet/bootstrap_admin_node.log)
+exec 2>&1
+
+FUEL_RELEASE=$(cat /etc/fuel_release)
+ASTUTE_YAML='/etc/fuel/astute.yaml'
+BOOTSTRAP_NODE_CONFIG="/etc/fuel/bootstrap_admin_node.conf"
+bs_build_log='/var/log/fuel-bootstrap-image-build.log'
+bs_status=0
+# Backup network configs to this folder. Folder will be created only if
+# backup process actually will be.
+bup_folder="/var/bootstrap_admin_node_bup_$(date +%Y-%m-%d-%H-%M-%S)/"
+### Long messages inside code makes them more complicated to read...
+# bootstrap messages
+# FIXME fix help links
+bs_skip_message="WARNING: Ubuntu bootstrap build has been skipped. \
+Please build and activate bootstrap manually with CLI command \
+\`fuel-bootstrap build --activate\`. \
+While you don't activate any bootstrap - new nodes cannot be discovered \
+and added to cluster. \
+For more information please visit \
+https://docs.mirantis.com/openstack/fuel/fuel-master/"
+bs_error_message="WARNING: Failed to build the bootstrap image, see $bs_build_log \
+for details. Perhaps your Internet connection is broken. Please fix the \
+problem and run \`fuel-bootstrap build --activate\`. \
+While you don\'t activate any bootstrap - new nodes cannot be discovered \
+and added to cluster. \
+For more information please visit \
+https://docs.mirantis.com/openstack/fuel/fuel-master/"
+bs_progress_message="There is no active bootstrap. Bootstrap image building \
+is in progress. Usually it takes 15-20 minutes. It depends on your internet \
+connection and hardware performance. Please reboot failed to discover nodes \
+after bootstrap image become available."
+bs_done_message="Default bootstrap image building done. Now you can boot new \
+nodes over PXE, they will be discovered and become available for installing \
+OpenStack on them"
+bs_centos_message="WARNING: Deprecated Centos bootstrap has been chosen \
+and activated. Now you can boot new nodes over PXE, they will be discovered \
+and become available for installing OpenStack on them."
+# Update issues messages
+update_warn_message="There is an issue connecting to the Fuel update repository. \
+Please fix your connection prior to applying any updates. \
+Once the connection is fixed, we recommend reviewing and applying \
+Maintenance Updates for this release of Mirantis OpenStack: \
+https://docs.mirantis.com/openstack/fuel/fuel-${FUEL_RELEASE}/\
+release-notes.html#maintenance-updates"
+update_done_message="We recommend reviewing and applying Maintenance Updates \
+for this release of Mirantis OpenStack: \
+https://docs.mirantis.com/openstack/fuel/fuel-${FUEL_RELEASE}/\
+release-notes.html#maintenance-updates"
+fuelmenu_fail_message="Fuelmenu was not able to generate '/etc/fuel/astute.yaml' file! \
+Please, restart it manualy using 'fuelmenu' command."
function countdown() {
local i
@@ -51,6 +102,20 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
fi
fi
+if [ ! -f "${ASTUTE_YAML}" ]; then
+ echo ${fuelmenu_fail_message}
+ fail
+fi
+
+# Enable sshd
+systemctl enable sshd
+systemctl start sshd
+
+# Enable iptables
+systemctl enable iptables.service
+systemctl start iptables.service
+
+
if [ "$wait_for_external_config" == "yes" ]; then
wait_timeout=3000
pidfile=/var/lock/wait_for_external_config
@@ -91,11 +156,30 @@ make_ubuntu_bootstrap_stub () {
}
get_bootstrap_flavor () {
- local ASTUTE_YAML='/etc/fuel/astute.yaml'
python <<-EOF
- from fuelmenu.fuelmenu import Settings
- conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {})
- print(conf.get('flavor', 'centos'))
+ from yaml import safe_load
+ with open("$ASTUTE_YAML", 'r') as f:
+ conf = safe_load(f).get('BOOTSTRAP', {})
+ print(conf.get('flavor', 'centos').lower())
+ EOF
+}
+
+get_bootstrap_skip () {
+ python <<-EOF
+ from yaml import safe_load
+ with open("$ASTUTE_YAML", 'r') as f:
+ conf = safe_load(f).get('BOOTSTRAP', {})
+ print(conf.get('skip_default_img_build', False))
+ EOF
+}
+
+set_ui_bootstrap_error () {
+ # This notify can't be closed or removed by user.
+ # For remove notify - send empty string.
+ local message=$1
+ python <<-EOF
+ from fuel_bootstrap.utils import notifier
+ notifier.notify_webui('${message}')
EOF
}
diff --git a/build/f_isoroot/f_odlpluginbuild/Makefile b/build/f_isoroot/f_odlpluginbuild/Makefile
index 18fbb9e60..024cd4a50 100644
--- a/build/f_isoroot/f_odlpluginbuild/Makefile
+++ b/build/f_isoroot/f_odlpluginbuild/Makefile
@@ -32,11 +32,15 @@ release:.odlbuild
sudo gem install fpm
sudo pip install fuel-plugin-builder
git clone -b $(ODL_BRANCH) $(ODL_REPO)
- fpb --debug --build fuel-plugin-opendaylight/
+ # Temporary location of working Be snapshot
+ ODL_TARBALL_LOCATION=http://devel.opt.im/distribution-karaf-0.4.0-20160118.091622-3555.tar.gz fpb --debug --build fuel-plugin-opendaylight/
mv fuel-plugin-opendaylight/opendaylight*.rpm .
$(REPOINFO) -r . > gitinfo_odlplugin.txt
rm -rf fuel-plugin-opendaylight
touch .odlbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh
diff --git a/build/f_isoroot/f_onosfwpluginbuild/Makefile b/build/f_isoroot/f_onosfwpluginbuild/Makefile
index 0cf290c1c..9516e3d46 100644
--- a/build/f_isoroot/f_onosfwpluginbuild/Makefile
+++ b/build/f_isoroot/f_onosfwpluginbuild/Makefile
@@ -49,6 +49,9 @@ release:.onosbuild
$(REPOINFO) -r . > gitinfo_onos-plugin.txt
@rm -rf fuel-plugin-onos
@touch .onosbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh
diff --git a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile
index 700a93c0d..f89f8d980 100644
--- a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile
+++ b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile
@@ -50,6 +50,9 @@ release:.ovsbuild
$(REPOINFO) -r . > gitinfo_ovs-nsh-dpdk-plugin.txt
@rm -rf fuel-plugin-ovs
@touch .ovsbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh
diff --git a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile
index 70fd22409..a74687307 100644
--- a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile
+++ b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile
@@ -50,6 +50,9 @@ release:.ovsnfvbuild
$(REPOINFO) -r . > gitinfo_ovsnfv-dpdk-plugin.txt
@rm -rf fuel-plugin-ovsnfv
@touch .ovsnfvbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh
diff --git a/build/f_isoroot/f_qemupluginbuild/Makefile b/build/f_isoroot/f_qemupluginbuild/Makefile
index 126e20549..0f245aec3 100644
--- a/build/f_isoroot/f_qemupluginbuild/Makefile
+++ b/build/f_isoroot/f_qemupluginbuild/Makefile
@@ -50,6 +50,9 @@ release:.qemubuild
$(REPOINFO) -r . > gitinfo_qemu-plugin.txt
@rm -rf fuel-plugin-qemu
@touch .qemubuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh
diff --git a/build/f_isoroot/f_repobuild/Makefile b/build/f_isoroot/f_repobuild/Makefile
index 522722e66..1fc703031 100644
--- a/build/f_isoroot/f_repobuild/Makefile
+++ b/build/f_isoroot/f_repobuild/Makefile
@@ -45,6 +45,9 @@ nailgun:
sudo su - -c /opt/fuel-createmirror-*/fuel-createmirror
sudo chmod -R 755 /var/www/nailgun
cp -Rp /var/www/nailgun .
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
.PHONY: clean
clean:
diff --git a/build/f_isoroot/f_vsperfpluginbuild/Makefile b/build/f_isoroot/f_vsperfpluginbuild/Makefile
index ccf596a14..c9653d785 100644
--- a/build/f_isoroot/f_vsperfpluginbuild/Makefile
+++ b/build/f_isoroot/f_vsperfpluginbuild/Makefile
@@ -50,6 +50,9 @@ release:.vsperfbuild
$(REPOINFO) -r . > gitinfo_vsperf-plugin.txt
@rm -rf fuel-plugin-vsperf
@touch .vsperfbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
#############################################################################
# Cache operations - only used when building through ci/build.sh