diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-06-28 20:48:38 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-06-28 20:51:14 +0200 |
commit | a0805a01542505301918cacb5db6216814c40023 (patch) | |
tree | dcc125fa94cbacdac6f30bea2d6ebc59ad335598 /patches/opnfv-fuel | |
parent | be00c803bcefb56ad9f690ae1509d3dcae7e9d9b (diff) |
MCP: Remove all Fuel patches and plugins
Chances are none of the old patches / plugins can be reused as-is,
so remove all of them and prepare for the switch to MCP.
Change-Id: I999927a43b438d9bda9ff118731e2af4b1fa8caa
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/opnfv-fuel')
22 files changed, 0 insertions, 3560 deletions
diff --git a/patches/opnfv-fuel/0000-f_odlpluginbuild-Armband-prereq-in-packages.yaml.patch b/patches/opnfv-fuel/0000-f_odlpluginbuild-Armband-prereq-in-packages.yaml.patch deleted file mode 100644 index dcf3b15f..00000000 --- a/patches/opnfv-fuel/0000-f_odlpluginbuild-Armband-prereq-in-packages.yaml.patch +++ /dev/null @@ -1,47 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Sat, 19 Nov 2016 20:39:35 +0100 -Subject: [PATCH] f_odlpluginbuild: Armband prereq in packages.yaml - -We need to explicitily add our Armband leveldb patching prereq to -the ODL plugin's packages.yaml, so they are included in the -offline Ubuntu/MOS mirrors. - -After ARMBAND-114 was implemented, the dependency list is only: -- armband-odl-leveldb-fix (for patching leveldbjni); -- libasound2 (openjdk-8-jre amos version additional dep); - -Note: armband-odl-leveldb-fix MUST be also added to MOS mirror -package list, since it's not present in Ubuntu repos. - -JIRA: ARMBAND-167 -JIRA: ARMBAND-114 - -FIXME: These are only required for arm64, so maybe later we could -filter out other archs by extending the packages.yaml with an <arch> -field. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/f_isoroot/f_odlpluginbuild/packages.yaml | 5 +++++ - 1 file changed, 5 insertions(+) - create mode 100644 build/f_isoroot/f_odlpluginbuild/packages.yaml - -diff --git a/build/f_isoroot/f_odlpluginbuild/packages.yaml b/build/f_isoroot/f_odlpluginbuild/packages.yaml -new file mode 100644 -index 0000000..b1bf086 ---- /dev/null -+++ b/build/f_isoroot/f_odlpluginbuild/packages.yaml -@@ -0,0 +1,5 @@ -+# Armband: openjdk-8-jre depends on libasound2 -+# Armband: leveldb patching requires armband-odl-leveldb-fix -+packages: -+ - armband-odl-leveldb-fix -+ - libasound2 diff --git a/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch b/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch deleted file mode 100644 index c320a8ca..00000000 --- a/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch +++ /dev/null @@ -1,78 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Thu, 11 Aug 2016 15:34:32 +0200 -Subject: [PATCH] build: Add ARMBAND_BASE support - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/Makefile | 10 ++++++++++ - build/docker/Dockerfile | 2 +- - build/docker/runcontext | 6 +++++- - 3 files changed, 18 insertions(+), 2 deletions(-) - -diff --git a/build/Makefile b/build/Makefile -index 4454c35..377ecc6 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -14,4 +14,9 @@ SHELL = /bin/bash - -+# Only configure Armband specific stuff when ARMBAND_BASE is set -+ifdef ARMBAND_BASE -+ include ${ARMBAND_BASE}/armband-fuel-config.mk -+endif -+ - ############################################################################ - # BEGIN of variables to customize - # -@@ -140,6 +140,7 @@ $(ISOCACHE): - # fuel-main Makefiles do not like `make -C` - cd $(FUEL_MAIN_DIR) && make repos - cp f_repos/.cachefuelinfo gitinfo_fuel.txt -+ test -z $(ARMBAND_BASE) || $(REPOINFO) $(ARMBAND_BASE) >> gitinfo_fuel.txt - - # Repeat build up to three times - sudo -E ./fuel_build_loop -diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile -index b38ea4c..624f233 100644 ---- a/build/docker/Dockerfile -+++ b/build/docker/Dockerfile -@@ -30,7 +30,7 @@ RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC - # 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 LATEST_TARGET_UBUNTU UBUNTU_ARCH\"" > /etc/sudoers.d/keep-mos -+RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH ARMBAND_BASE\"" > /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 -diff --git a/build/docker/runcontext b/build/docker/runcontext -index daad663..e4874df 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -42,6 +42,10 @@ GITROOT=`git rev-parse --show-toplevel` - CID_FILE=`mktemp -u -t runcontext.XXXXXXXXXX` - CONTEXT_DIR=`mktemp -d ${GITROOT}/.docker_contextXXXXXX` - -+if [[ $ARMBAND_BASE ]]; then -+ GITROOT=$ARMBAND_BASE -+fi -+ - # If RSYNC_CONNECT_PROG is used, we need to copy all of - # the SSH structure, should one of the keys need to be - # used. -@@ -115,7 +119,7 @@ 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 \ -- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA \ -+ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA -e ARMBAND_BASE \ - -u $USER_ID:$GROUP_ID -w $PWD \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - diff --git a/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch b/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch deleted file mode 100644 index e06e69e6..00000000 --- a/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch +++ /dev/null @@ -1,28 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Josep Puigdemont <josep.puigdemont@enea.com> -Date: Mon, 11 Jul 2016 15:21:56 +0200 -Subject: [PATCH] dea_base: replace grub-pc by grub-efi-arm64 - -Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> ---- - deploy/config/dea_base.yaml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml -index 0b8485b..658b328 100644 ---- a/deploy/config/dea_base.yaml -+++ b/deploy/config/dea_base.yaml -@@ -462,5 +462,5 @@ settings: - - gdisk - -- grub-pc -+ grub-efi-arm64 - diff --git a/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch b/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch deleted file mode 100644 index 157299de..00000000 --- a/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch +++ /dev/null @@ -1,55 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Tue, 12 Jul 2016 16:12:25 +0200 -Subject: [PATCH] post-scripts: Allow SSH on non-admin ifaces. - -By default, Fuel 9.0 configures iptables to only accept SSH connections -on admin interface. - -If more than the admin interface is configured (e.g. by transplant script -or manually in fuel menu), whitelist SSH connections on all ifaces. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - .../post-scripts/10_accept_ssh_all_ifaces.sh | 25 ++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh -new file mode 100755 -index 0000000..b551516 ---- /dev/null -+++ b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh -@@ -0,0 +1,25 @@ -+#/bin/sh -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.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 -+############################################################################## -+ -+# Only mess with iptables if we have additional interfaces configured -+if grep -q "DEFROUTE=no" "/etc/sysconfig/network-scripts/ifcfg-eth0"; then -+ echo "iptables: Allow SSH connections on all interfaces" -+ # By default, Fuel 9.0 configures iptables to only accept SSH connections -+ # on admin interface. Whitelist SSH connections on all ifaces. -+ while [ $? -eq 0 ]; do -+ # First, try removing the rule we want to add to prevent duplicates -+ iptables -D INPUT -p tcp --dport ssh -j ACCEPT > /dev/null 2>&1; -+ done -+ iptables -A INPUT -p tcp --dport ssh -j ACCEPT -+ service iptables save -+ echo "iptables: Done configuring SSH" -+else -+ echo "iptables: Skipping configuring SSH for non-admin ifaces" -+fi diff --git a/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch b/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch deleted file mode 100644 index d8717156..00000000 --- a/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch +++ /dev/null @@ -1,47 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Josep Puigdemont <josep.puigdemont@enea.com> -Date: Tue, 17 May 2016 14:40:48 +0200 -Subject: [PATCH] deploy.py: add a time stamp to the new ISO image - -Add a time stamp to the newly create ISO image. This is to prevent name -collisions with other ISO images from earlier deploy jobs. - -Ideally this will only be a temporary need, and releng will provide with -unique IDs for each job that we can use to this effect. - -Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> ---- - deploy/deploy.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/deploy/deploy.py b/deploy/deploy.py -index 041ba2f..cebef97 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -13,6 +13,7 @@ import os - import io - import re - import sys -+import time - import yaml - import signal - import netaddr -@@ -100,8 +101,9 @@ class AutoDeploy(object): - - def install_fuel_master(self): - log('Install Fuel Master') -- new_iso = ('%s/deploy-%s' -- % (self.tmp_dir, os.path.basename(self.iso_file))) -+ stamp = time.strftime("%Y%m%d%H%M%S") -+ new_iso = ('%s/deploy-%s-%s' -+ % (self.tmp_dir, stamp, os.path.basename(self.iso_file))) - self.patch_iso(new_iso) - self.iso_file = new_iso - self.install_iso() diff --git a/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch b/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch deleted file mode 100644 index bf52fc23..00000000 --- a/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch +++ /dev/null @@ -1,36 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Mon, 29 Aug 2016 22:58:49 +0200 -Subject: [PATCH] build: docker: Use host's /etc/hosts - -The original motivation was pointing to local mirrors via host's -"/etc/hosts", for which an alternative solution tested was -"--net=host" (see [1] for full description), but lead to wierd -loss of connectivity after a few builds. - -[1] https://docs.docker.com/v1.8/articles/networking/ - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/docker/runcontext | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/docker/runcontext b/build/docker/runcontext -index 07b0dc1..b0d6d37 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -121,6 +121,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm --net=host \ - -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ - -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA -e ARMBAND_BASE \ - -u $USER_ID:$GROUP_ID -w $PWD \ -+ -v /etc/hosts:/etc/hosts \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - - # Passing "debug" puts up an interactive bash shell diff --git a/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch b/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch deleted file mode 100644 index 84ede48d..00000000 --- a/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch +++ /dev/null @@ -1,40 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Wed, 17 Aug 2016 16:18:26 +0200 -Subject: [PATCH] deploy: Fix/add bootstrap DEA override delay - -Previous change adding support for DEA to override bootstrap config -did not account for slow execution on remote servers, so add a -one minute sleep before checking for completition of fuel install. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - deploy/install_fuel_master.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py -index 808d0b1..1a7685a 100644 ---- a/deploy/install_fuel_master.py -+++ b/deploy/install_fuel_master.py -@@ -196,11 +196,13 @@ class InstallFuelMaster(object): - self.work_dir, os.path.basename(self.dea_file))) - - def wait_until_installation_completed(self): -- WAIT_LOOP = 360 -+ WAIT_LOOP = 720 - SLEEP_TIME = 10 - CMD = 'pgrep -f %s' % BOOTSTRAP_ADMIN - - install_completed = False -+ time.sleep(60) -+ self.wait_for_node_up() - with self.ssh: - for i in range(WAIT_LOOP): - ret = self.ssh.exec_cmd(CMD) diff --git a/patches/opnfv-fuel/0008-build-docker-Import-Enea-Armband-keys.patch b/patches/opnfv-fuel/0008-build-docker-Import-Enea-Armband-keys.patch deleted file mode 100644 index fbbaca3b..00000000 --- a/patches/opnfv-fuel/0008-build-docker-Import-Enea-Armband-keys.patch +++ /dev/null @@ -1,31 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Fri, 28 Oct 2016 16:06:20 +0200 -Subject: [PATCH] build/docker: Import Enea Armband keys - -JIRA: ARMBAND-96 - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/docker/Dockerfile | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile -index 4beb560..04c4d2b 100644 ---- a/build/docker/Dockerfile -+++ b/build/docker/Dockerfile -@@ -33,5 +33,7 @@ RUN git clone -b INSERT_FPB_BRANCH INSERT_FPB_REPO && cd fuel-plugins && \ - # fuel-infra key - RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BCE5CC461FA22B08 -+# Enea Armband key -+RUN apt-key adv --keyserver keys.gnupg.net --recv-keys DEAB90BA798AB1D1 - - 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 diff --git a/patches/opnfv-fuel/0009-f_odlpluginbuild-Always-inherit-Armband-settings.patch b/patches/opnfv-fuel/0009-f_odlpluginbuild-Always-inherit-Armband-settings.patch deleted file mode 100644 index 724ee9c4..00000000 --- a/patches/opnfv-fuel/0009-f_odlpluginbuild-Always-inherit-Armband-settings.patch +++ /dev/null @@ -1,38 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Tue, 24 Jan 2017 19:59:52 +0100 -Subject: [PATCH] f_odlpluginbuild: Always inherit Armband settings - -This should eliminate any possible confusion when building the -ODL plugin manually (outside OPNFV ISO build), which used to -require setting up some additional enviroment variables, like -UBUNTU_ARCH. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/f_isoroot/f_odlpluginbuild/Makefile | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/build/f_isoroot/f_odlpluginbuild/Makefile b/build/f_isoroot/f_odlpluginbuild/Makefile -index d3a7ea8..4c77abc 100644 ---- a/build/f_isoroot/f_odlpluginbuild/Makefile -+++ b/build/f_isoroot/f_odlpluginbuild/Makefile -@@ -9,6 +9,11 @@ - - TOP := $(shell pwd) - -+# Configure Armband specific stuff when ARMBAND_BASE is set -+ifdef ARMBAND_BASE -+ include ${ARMBAND_BASE}/armband-fuel-config.mk -+endif -+ - include config.mk - - .PHONY: all diff --git a/patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch b/patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch deleted file mode 100644 index c55824bd..00000000 --- a/patches/opnfv-fuel/0010-reap.py-Support-reading-MTU-values.patch +++ /dev/null @@ -1,104 +0,0 @@ --:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --: Copyright (c) 2017 Enea AB and others. --: --: 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 --:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Catalina Focsa <catalina.focsa@enea.com> -Date: Wed, 3 May 2017 14:53:30 +0200 -Subject: [PATCH] reap.py: Support reading MTU values - -Add an interfaces_properties list containing -mtu data for each interface - -JIRA: ARMBAND-251 - -Signed-off-by: Catalina Focsa <catalina.focsa@enea.com> ---- - deploy/reap.py | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/deploy/reap.py b/deploy/reap.py -index be72918..fe6bebf 100644 ---- a/deploy/reap.py -+++ b/deploy/reap.py -@@ -143,6 +143,31 @@ class Reap(object): - interfaces[if_name] = interface - return if_name, mac - -+ def reap_properties(self, node_id, properties): -+ properties_name = None -+ node_file = glob.glob('%s/deployment_%s/%s.yaml' -+ % (self.temp_dir, self.env_id, node_id)) -+ with open(node_file[0]) as f: -+ node_config = yaml.load(f) -+ -+ interface = {'interfaces': node_config['network_scheme']['interfaces']} -+ interface_properties = {k:v for k, v in interface['interfaces'].items()} -+ -+ mtu_properties = {} -+ for k, v in interface_properties.items(): -+ if 'mtu' in v: -+ mtu_properties[k]={'mtu':v['mtu']} -+ else: -+ mtu_properties[k] = 'null' -+ interface_properties = mtu_properties -+ -+ properties_name = self.check_dict_exists(properties, interface) if properties else None -+ if not properties_name: -+ properties_name = 'interfaces_properties' -+ properties[properties_name] = interface_properties -+ return properties_name, interface_properties -+ -+ - def reap_transformation(self, node_id, roles, transformations): - main_role = 'controller' if 'controller' in roles else 'compute' - node_file = glob.glob('%s/deployment_%s/%s.yaml' -@@ -172,8 +197,10 @@ class Reap(object): - min_node = min(real_node_ids) - interfaces = {} - transformations = {} -+ properties = {} - dea_nodes = [] - dha_nodes = [] -+ properties_nodes = [] - - for real_node_id in real_node_ids: - node_id = real_node_id - min_node + 1 -@@ -185,14 +212,19 @@ class Reap(object): - dea_node = {'id': node_id, - 'role': roles} - dha_node = {'id': node_id} -+ properties_node = {'id': node_id} - if_name, mac = self.reap_interface(real_node_id, interfaces) - log('reap transformation for node %s' % real_node_id) -+ pr_name, interface_properties = self.reap_properties(real_node_id, properties) - tr_name = self.reap_transformation(real_node_id, roles, - transformations) - dea_node.update( - {'interfaces': if_name, -+ 'properties': pr_name, - 'transformations': tr_name}) - -+ properties_node.update({'interface_configuration': interface_properties}) -+ - dha_node.update( - {'pxeMac': mac if mac else None, - 'ipmiIp': None, -@@ -203,10 +235,12 @@ class Reap(object): - - dea_nodes.append(dea_node) - dha_nodes.append(dha_node) -+ properties_nodes.append(properties_node) - - self.write_yaml(self.dha_file, {'nodes': dha_nodes}, False) - self.write_yaml(self.dea_file, {'nodes': dea_nodes}) - self.write_yaml(self.dea_file, interfaces) -+ self.write_yaml(self.dea_file, {'interfaces_properties': properties_nodes}) - self.write_yaml(self.dea_file, transformations) - self.reap_fuel_node_info() - self.write_yaml(self.dha_file, {'disks': DISKS}) --- -1.9.1 diff --git a/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch deleted file mode 100644 index bc88e124..00000000 --- a/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch +++ /dev/null @@ -1,46 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Mon, 9 May 2016 17:05:53 +0200 -Subject: [PATCH] UX: Update bootstrap/target build time estimate. - -While building for a different architecture (e.g. AArch64 on x86_64), -the bootstrap/target image build may take longer, due to latency -introduced by using qemu-user-static. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - .../0001-Patches-for-OPNFV.patch | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch b/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -index 446d0b6..c2e664c 100644 ---- a/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -+++ b/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -@@ -10,5 +10,20 @@ diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh - --- a/iso/bootstrap_admin_node.sh - +++ b/iso/bootstrap_admin_node.sh -+@@ -86,9 +86,11 @@ -+ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ -+ bootstrap_troubleshoot.html" -+ 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. After bootstrap image becomes available, \ -+-reboot nodes that failed to be discovered." -++is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \ -++and/or 30-45 minutes for each cross-build (e.g. AArch64). \ -++It depends on your internet connection, hardware performance and selected \ -++bootstrap architecture(s). This ISO supports AArch64 only. After bootstrap \ -++image becomes available, reboot nodes that failed to be discovered." -+ 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" - @@ -347,8 +347,23 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail - set +x - echo "Done!" diff --git a/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch b/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch deleted file mode 100644 index ae7de06a..00000000 --- a/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch +++ /dev/null @@ -1,35 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB, Cavium and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Stanislaw Kardach <stanislaw.kardach@cavium.com> -Date: Thu, 3 Mar 2016 19:04:07 +0100 -Subject: [PATCH] Build bootstrap image for arm64 - -For now the arch is hardcoded for simplicity. We should detect this -but how? If we're multi-arch then one bootstrap image should be built -per supported arch. This requires Fuel refactoring. ---- - .../0001-Patches-for-OPNFV.patch | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch b/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch ---- a/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -+++ b/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -@@ -45,3 +45,12 @@ - # Enable iptables - systemctl enable iptables.service -+@@ -484,7 +490,7 @@ -+ 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 -++ if fuel-bootstrap -v --debug build --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then -+ ret=0 -+ fuel notify --topic "done" --send "${bs_done_message}" -+ else - @@ -546,6 +560,16 @@ systemctl start ntpd diff --git a/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch b/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch deleted file mode 100644 index 7158e3ab..00000000 --- a/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch +++ /dev/null @@ -1,101 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Thu, 9 Jun 2016 19:46:56 +0200 -Subject: [PATCH] post-scripts: Enable systemd-binfmt for first boot. - -IMPORTANT: -This commit introduces the following file on Fuel Master, -containing the list of arch supported for target nodes: -</etc/fuel_openstack_arch>. - -This file is created AFTER pre.d OPNFV scripts are ran, also by -bootstrap_admin_node.sh, BEFORE the post.d scripts are executed. -NOTE: Arch format is the same used by dpkg (e.g.: "amd64 arm64") - -Based on the number of foreign architectures we should support -(the list of archs in /etc/fuel_openstack_arch minus native arch), -we determine whether cross-builds are expected, in which case -binfmt support should be functional during first Fuel Master boot. - -Since systemd-binfmt service has a series of preconditions for -starting, which are tested early during first boot, some of them -are NOT YET true (e.g. no binfmt handlers are present before -qemu-user-static package is installed), so the service is not -automatically started. Of course, this only affects the first boot. - -Finally, this commit adds an OPNFV post-install script in -/opt/opnfv/bootstrap/post.d, which starts systemd-binfmt service. ---- - .../post-scripts/80_prepare_cross_builds.sh | 32 ++++++++++++++++++++++ - ...PNFV-Additions-to-bootstrap_admin_node.sh.patch | 13 +++++++++ - 2 files changed, 45 insertions(+) - create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -new file mode 100755 -index 0000000..01eb2e2 ---- /dev/null -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -0,0 +1,32 @@ -+#/bin/sh -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.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 "Preparing for cross-building bootstrap/target images" -+ -+# Fmt handlers are set up by qemu-user-static (after systemd-binfmt -+# prerequisites are checked during first boot of Fuel Master node). -+ -+# Cross-building support provides dpkg, as a fuel-agent dependency -+if which dpkg > /dev/null 2>&1; then -+ # /etc/fuel_openstack_arch is created by bootstrap_admin_node.sh -+ FOREIGN_ARCH_CNT=$(sed -e "s/$(dpkg --print-architecture)//" \ -+ /etc/fuel_openstack_arch | wc -w) -+ if [ ${FOREIGN_ARCH_CNT} -gt 0 ]; then -+ # If no fmt handlers are configured, the service is not started, -+ # so request it explicitly (only necessary for the first boot). -+ systemctl start systemd-binfmt -+ if [ $? -ne 0 ]; then -+ echo "Error starting systemd-binfmt!" -+ exit 1 -+ fi -+ fi -+fi -+ -+echo "Done preparing cross-building" -diff --git a/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch b/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -index 12d0dfb..81d196b 100644 ---- a/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -+++ b/build/f_repos/patch/fuel-main/0001-Patches-for-OPNFV.patch -@@ -25,6 +25,18 @@ index 3197c91..db3123d 100755 - 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" -+@@ -239,5 +239,11 @@ -+ # /etc/fuel_openstack_version is provided by 'fuel-openstack-metadata' package -+ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) -+ -++# FIXME(armband): This part might be moved to an earlier stage later -++# /etc/fuel_openstack_arch is constructed based on local mirror metadata -++grep -oP "^Architectures: \K.*$" \ -++ ${wwwdir}/${OPENSTACK_VERSION}/ubuntu/x86_64/dists/mos${FUEL_RELEASE}/Release > \ -++ /etc/fuel_openstack_arch -++ -+ -+ touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml - @@ -347,8 +347,23 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail - set +x - echo "Done!" diff --git a/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch b/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch deleted file mode 100644 index 74713638..00000000 --- a/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch +++ /dev/null @@ -1,57 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB, Cavium and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Thu, 9 Jun 2016 21:37:48 +0200 -Subject: [PATCH] mcagent: Increase max shell command timeout to 2h - -Since `execute_shell_command` mcagent is used for building the target -image and the timeout provided in the astute task is just respected on -the Astute level (on mcollective level this timeout is actually a -minumum between value provided and ddl value) we need to increase it -for Armband operation. - -Because Armband builds the target image via `qemu-debootstrap`, it can -take more than 1 hour to finish the building. Therefore aside of -increasing the timeout in the Astute task, the maximum timeout value -for mcagent has to be increased. - -[ Alexandru Avadanii ] -Repackaged, based on Stan's `fuel-astute` patch. - -Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com> -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 01eb2e2..12f66e6 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -26,6 +26,20 @@ if which dpkg > /dev/null 2>&1; then - echo "Error starting systemd-binfmt!" - exit 1 - fi -+ -+ # Cross-build timeout adjustments -+ # -+ # Since `execute_shell_command` mcagent is used for building the target -+ # image and the timeout provided in the astute task is just respected on -+ # the Astute level (on mcollective level this timeout is actually a -+ # minumum between value provided and ddl value) we need to increase it -+ # for cross-build operations. -+ -+ # Building the target image via `qemu-debootstrap` can take more than -+ # 1 hour. Therefore aside of increasing the timeout in the Astute task, -+ # the maximum timeout value for mcagent has to be increased (use 2h). -+ sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ -+ /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl - fi - fi - diff --git a/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch b/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch deleted file mode 100644 index a906a7a2..00000000 --- a/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch +++ /dev/null @@ -1,60 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Fri, 10 Jun 2016 22:30:29 +0200 -Subject: [PATCH] bootstrap: Use gzip instead of xz compression. - -bootstrap mksquashfs using qemu-user-static is extremely slow, -taking up to one hour. gzip, on the other hand, is reasonably fast. -According to [1], xz is slower, with not much size gain. - -[1] https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - .../post-scripts/80_prepare_cross_builds.sh | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 12f66e6..3cb22f3 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -27,6 +27,11 @@ if which dpkg > /dev/null 2>&1; then - exit 1 - fi - -+ # Determine python site-packages directory location -+ PYTHON_SITEPKGS_DIR=$(python -c \ -+ "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -+ [ -d ${PYTHON_SITEPKGS_DIR} ] || exit 1 -+ - # Cross-build timeout adjustments - # - # Since `execute_shell_command` mcagent is used for building the target -@@ -40,6 +45,20 @@ if which dpkg > /dev/null 2>&1; then - # the maximum timeout value for mcagent has to be increased (use 2h). - sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ - /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl -+ -+ # Bootstrap: Use gzip instead of xz compression. -+ # -+ # bootstrap mksquashfs via `qemu-user-static` is extremely slow, -+ # taking up to one hour. gzip, on the other hand, is reasonably fast. -+ -+ # See the following article for a comparison between gzip and xz -+ # https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ -+ # xz is slower, with very little size gain. -+ if [ -f ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py ]; then -+ sed -i.bak -r "s/^(\s+'compress_format'\s*:\s*').*?('.*)$/\1gzip\2/g" \ -+ ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py -+ echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." -+ fi - fi - fi - diff --git a/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch b/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch deleted file mode 100644 index c762fabd..00000000 --- a/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch +++ /dev/null @@ -1,44 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB, Cavium and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Sat, 11 Jun 2016 21:37:29 +0200 -Subject: [PATCH] Nailgun: Increase target image build timeout - -Currently we're close to 40 minutes of image building (thanks to -qemu-debootstrap). If network connectivity is a bit slow (happened to -me) it's easy to go over 1h limit. Therefore let's push this to 2 hours -to be safer. - -[ Alexandru Avadanii ] -Moved original patch wrote by Stan to post-install. - -Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com> -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - .../f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 3cb22f3..c106bc3 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -45,6 +45,13 @@ if which dpkg > /dev/null 2>&1; then - # the maximum timeout value for mcagent has to be increased (use 2h). - sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ - /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl -+ # Update nailgun timeout setting (2h) -+ if [ -f ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml ]; then -+ sed -i.bak -r \ -+ 's/^(PROVISIONING_IMAGES_BUILD_TIMEOUT:)\s*[[:digit:]]+$/\1 7200/' \ -+ ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml -+ echo "INFO: [1h] => [2h] updated nailgun image build timeout." -+ fi - - # Bootstrap: Use gzip instead of xz compression. - # diff --git a/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-256MB.patch b/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-256MB.patch deleted file mode 100644 index de115457..00000000 --- a/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-256MB.patch +++ /dev/null @@ -1,46 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Sat, 11 Jun 2016 23:34:48 +0200 -Subject: [PATCH] m1.micro: Increase profile RAM size to 256MB. - -TestVM (cirros) on aarch64 requires more than 64MB RAM. -Keep profiles uniform across all archs. - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index c106bc3..0b48ca2 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -66,6 +66,21 @@ if which dpkg > /dev/null 2>&1; then - ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py - echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." - fi -+ -+ # TestVM (cirros) adjustments for cross-arch -+ # -+ # TestVM (cirros) on aarch64 requires more than 64MB RAM. -+ # Keep profiles uniform across all archs by bumping micro flavor specs. -+ # m1.micro: Increase profile RAM size to 256MB. -+ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) -+ CONTROLLER_PP="/etc/puppet/${OPENSTACK_VERSION}/modules/openstack_tasks" -+ CONTROLLER_PP+="/manifests/roles/controller.pp" -+ if [ -f ${CONTROLLER_PP} ]; then -+ sed -i.bak -r \ -+ 's/^(.*ram.*=>)\s+[[:digit:]]+(.*)$/\1 256\2/' \ -+ ${CONTROLLER_PP} -+ echo "INFO: [64] => [256] updated m1.micro profile RAM size (MB)." -+ fi - fi - fi - diff --git a/patches/opnfv-fuel/kernel-bump/0001-dea_base-Pin-kernel-to-4.8.0-9944.patch b/patches/opnfv-fuel/kernel-bump/0001-dea_base-Pin-kernel-to-4.8.0-9944.patch deleted file mode 100644 index 7c38caee..00000000 --- a/patches/opnfv-fuel/kernel-bump/0001-dea_base-Pin-kernel-to-4.8.0-9944.patch +++ /dev/null @@ -1,56 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Tue, 14 Mar 2017 19:56:50 +0100 -Subject: [PATCH] dea_base: Pin kernel to 4.8.0-9944 - -Since newer kernels have issues with AAVMF + vhost_net, -we need to also temporarily blacklist vhost_net. - -TODO: Remove vhost_net blacklist (later). - -JIRA: https://jira.opnfv.org/browse/ARMBAND-161 -JIRA: https://jira.opnfv.org/browse/ARMBAND-171 -JIRA: https://jira.opnfv.org/browse/ARMBAND-227 -JIRA: https://jira.opnfv.org/browse/ARMBAND-230 -JIRA: https://jira.opnfv.org/browse/ARMBAND-239 -JIRA: https://jira.opnfv.org/browse/ARMBAND-244 - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - deploy/config/dea_base.yaml | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml -index 386686f..2a5928e 100644 ---- a/deploy/config/dea_base.yaml -+++ b/deploy/config/dea_base.yaml -@@ -534,6 +534,8 @@ settings: - - anacron - -+ armband-vhost-net-blacklist -+ - bash-completion - - bridge-utils -@@ -560,9 +562,11 @@ settings: - - linux-firmware - -- linux-headers-generic-lts-xenial -+ linux-image-4.8.0-9944-generic -+ -+ linux-image-extra-4.8.0-9944-generic - -- linux-image-generic-lts-xenial -+ linux-headers-4.8.0-9944-generic - - lvm2 - diff --git a/patches/opnfv-fuel/multiarch-mirrors/0001-build-install-Add-arm64-deb-repositories-setup.patch b/patches/opnfv-fuel/multiarch-mirrors/0001-build-install-Add-arm64-deb-repositories-setup.patch deleted file mode 100644 index e6182278..00000000 --- a/patches/opnfv-fuel/multiarch-mirrors/0001-build-install-Add-arm64-deb-repositories-setup.patch +++ /dev/null @@ -1,190 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB, Cavium and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Stanislaw Kardach <stanislaw.kardach@cavium.com> -Date: Wed, 24 Feb 2016 20:04:03 +0100 -Subject: [PATCH] build/install: Add arm64 deb repositories setup - -If local MOS mirror patching is enabled, we need to regenerate the -repo metadata using apt-ftparchive. - -[ Alexandru Avadanii ] -Fixed non-existing paths for deb files, slightly refactoring our -approach. - -FIXME: Use UBUNTU_ARCH env var instead of hardcoding the arch list. -While fixing that, also take care of missed s/trusty/mos9.0/g -and/or s/xenial/mos10.0/g in {un,}install.sh. - -Closes-bug: ARMBAND-163 - -Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com> -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++ - build/install/apt-ftparchive-deb.conf | 9 ++++----- - build/install/apt-ftparchive-release.conf | 2 +- - build/install/apt-ftparchive-udeb.conf | 10 ++++------ - build/install/install.sh | 22 ++++++++++++++++++---- - build/install/uninstall.sh | 18 ++++++++++-------- - 6 files changed, 47 insertions(+), 24 deletions(-) - -diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch -index a6840e4..84a241f 100644 ---- a/build/f_isoroot/f_kscfg/ks.cfg.patch -+++ b/build/f_isoroot/f_kscfg/ks.cfg.patch -@@ -1,5 +1,15 @@ - *** /dev/null 2016-04-26 10:10:11.481587709 +0200 - --- ks.cfg 2016-04-26 10:10:11.481587709 +0200 - *************** -+*** 448,453 **** -+--- 448,454 ---- -+ cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64 -+ -+ # Copying Ubuntu files -++ # FIXME: This is missleading as dist/pool may contain multiple arch! -+ mkdir -p ${repodir}/ubuntu/x86_64/images -+ cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64 -+ cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64 -+*************** - *** 579,584 **** - --- 579,592 ---- -diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf -index edcb1f2..81ead2b 100644 ---- a/build/install/apt-ftparchive-deb.conf -+++ b/build/install/apt-ftparchive-deb.conf -@@ -10,14 +10,13 @@ - - Dir { - ArchiveDir "."; -+ CacheDir "/tmp"; - }; - --TreeDefault { -+Tree "dists/mos10.0" { -+ Architectures "amd64 arm64"; - Directory "pool"; --}; -- --BinDirectory "pool/main" { -- Packages "dists/mos10.0/main/binary-amd64/Packages"; -+ Sections "main"; - }; - - Default { -diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf -index e40ff68..ceaf71a 100644 ---- a/build/install/apt-ftparchive-release.conf -+++ b/build/install/apt-ftparchive-release.conf -@@ -13,6 +13,7 @@ APT::FTPArchive::Release::Label "mos10.0"; - APT::FTPArchive::Release::Suite "mos10.0"; - APT::FTPArchive::Release::Version "16.04"; - APT::FTPArchive::Release::Codename "mos10.0"; --APT::FTPArchive::Release::Architectures "amd64"; -+APT::FTPArchive::Release::Architectures "amd64 arm64"; - APT::FTPArchive::Release::Components "main"; - APT::FTPArchive::Release::Description "Ubuntu 16.04.1 LTS"; -+APT::FTPArchive::Contents "no"; -diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf -index 3b5b239..8852db7 100644 ---- a/build/install/apt-ftparchive-udeb.conf -+++ b/build/install/apt-ftparchive-udeb.conf -@@ -10,15 +10,13 @@ - - Dir { - ArchiveDir "."; -+ CacheDir "/tmp"; - }; - --TreeDefault { -+Tree "dists/mos10.0" { -+ Architectures "amd64 arm64"; - Directory "pool"; --}; -- --BinDirectory "pool/debian-installer" { -- Packages "dists/xenial/main/debian-installer/binary-amd64/Packages"; -- BinOverride "./indices/override.xenial.main.debian-installer"; -+ Sections "main"; - }; - - Default { -diff --git a/build/install/install.sh b/build/install/install.sh -index d1a49f3..0561207 100755 ---- a/build/install/install.sh -+++ b/build/install/install.sh -@@ -122,12 +122,24 @@ prep_make_live() { - ssh-copy-id root@$FUELHOST - sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT - -- if [ -f $REPO/dists/xenial/main/binary-amd64/Packages.backup ]; then -+ for arch in arm64 amd64; do -+ if [ -f $REPO/dists/xenial/main/binary-${arch}/Packages.backup ]; then -+ echo "Error - found backup file for Packages for ${arch}!" -+ exit 1 -+ fi -+ -+ if [ -f $REPO/dists/xenial/main/binary-${arch}/Packages.gz.backup ]; then -+ echo "Error - found backup file for Packages.gz for ${arch}!" -+ exit 1 -+ fi -+ done -+ -+ if [ -f $REPO/dists/xenial/main/binary-arm64/Packages.backup ]; then - echo "Error - found backup file for Packages!" - exit 1 - fi - -- if [ -f $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup ]; then -+ if [ -f $REPO/dists/xenial/main/binary-arm64/Packages.gz.backup ]; then - echo "Error - found backup file for Packages.gz!" - exit 1 - fi -@@ -142,8 +154,10 @@ prep_make_live() { - exit 1 - fi - -- cp $REPO/dists/xenial/main/binary-amd64/Packages $REPO/dists/xenial/main/binary-amd64/Packages.backup -- cp $REPO/dists/xenial/main/binary-amd64/Packages.gz $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup -+ for arch in arm64 amd64; do -+ cp $REPO/dists/xenial/main/binary-${arch}/Packages $REPO/dists/xenial/main/binary-${arch}/Packages.backup -+ cp $REPO/dists/xenial/main/binary-${arch}/Packages.gz $REPO/dists/xenial/main/binary-${arch}/Packages.gz.backup -+ done - cp $REPO/dists/xenial/Release $REPO/dists/xenial/Release.backup - cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup - } -diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh -index a9e74bc..e90c632 100755 ---- a/build/install/uninstall.sh -+++ b/build/install/uninstall.sh -@@ -31,15 +31,17 @@ DEST=$MOUNT - REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64 - - cd $REPO --if [ ! -f $REPO/dists/xenial/main/binary-amd64/Packages.backup ]; then -- echo "Error - didn't find backup file for Packages!" -- exit 1 --fi -+for arch in arm64 amd64; do -+ if [ ! -f $REPO/dists/xenial/main/binary-${arch}/Packages.backup ]; then -+ echo "Error - didn't find backup file for Packages for ${arch}!" -+ exit 1 -+ fi - --if [ ! -f $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup ]; then -- echo "Error - didn't find backup file for Packages.gz!" -- exit 1 --fi -+ if [ ! -f $REPO/dists/xenial/main/binary-${arch}/Packages.gz.backup ]; then -+ echo "Error - didn't find backup file for Packages.gz for ${arch}!" -+ exit 1 -+ fi -+done - - if [ ! -f $REPO/dists/xenial/Release.backup ]; then - echo "Error - didn't find backup file for Release!" diff --git a/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch b/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch deleted file mode 100644 index dcb47a7d..00000000 --- a/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch +++ /dev/null @@ -1,102 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Fri, 6 May 2016 03:07:40 +0200 -Subject: [PATCH] deploy.sh: Remove check for root (rm umask 0000) - -Patch(es) by Josep, signed by Alex only for upstreaming. - -[Alexandru Avadanii] -Squashed two atomic commits into one change. - -Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - ci/deploy.sh | 11 ----------- - deploy/deploy-config.py | 1 - - deploy/deploy.py | 2 -- - deploy/environments/virtual_fuel.py | 2 -- - 4 files changed, 16 deletions(-) - -diff --git a/ci/deploy.sh b/ci/deploy.sh -index 8411714..081806c 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -84,9 +84,6 @@ Input parameters to the build script is: - -i .iso image to be deployed (needs to be provided in a URI - style, it can be a local resource: file:// or a remote resource http(s)://) - --NOTE: Root priviledges are needed for this script to run -- -- - Examples: - sudo `basename $0` -b file:///home/jenkins/lab-config -l lf -p pod1 -s ha_odl-l3_heat_ceilometer -i file:///home/jenkins/myiso.iso - EOF -@@ -212,11 +209,6 @@ do - esac - done - --if [[ $EUID -ne 0 ]]; then -- echo "This script must be run as root" 1>&2 -- exit 1 --fi -- - if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \ - [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \ - [ -z $ISO ]; then -@@ -231,9 +223,6 @@ fi - # Enable the automatic exit trap - trap do_exit SIGINT SIGTERM EXIT - --# Set no restrictive umask so that Jenkins can removeeee any residuals --umask 0000 -- - clean - - pushd ${DEPLOY_DIR} > /dev/null -diff --git a/deploy/deploy.py b/deploy/deploy.py -index fe213e5..08702d2 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -34,7 +34,6 @@ from common import ( - check_dir_exists, - create_dir_if_not_exists, - delete, -- check_if_root, - ArgParser, - ) - -@@ -252,7 +251,6 @@ class AutoDeploy(object): - return 0 - - def run(self): -- check_if_root() - if self.cleanup_only: - self.cleanup_execution_environment() - else: -diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py -index b1a76e4..4ff68f6 100644 ---- a/deploy/environments/virtual_fuel.py -+++ b/deploy/environments/virtual_fuel.py -@@ -18,7 +18,6 @@ import time - from common import ( - exec_cmd, - check_file_exists, -- check_if_root, - delete, - log, - ) -@@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment): - vm_definition_overwrite) - - def setup_environment(self): -- check_if_root() - self.cleanup_environment() - self.create_vm() - diff --git a/patches/opnfv-fuel/upstream-backports/0004-Fuel-rework-for-multiple-libvirt.patch b/patches/opnfv-fuel/upstream-backports/0004-Fuel-rework-for-multiple-libvirt.patch deleted file mode 100644 index e9c8e2ce..00000000 --- a/patches/opnfv-fuel/upstream-backports/0004-Fuel-rework-for-multiple-libvirt.patch +++ /dev/null @@ -1,1533 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: cristinapauna <cristina.pauna@enea.com> -Date: Fri, 25 Nov 2016 16:38:46 +0200 -Subject: [PATCH] Fuel rework for multiple libvirt - -The current fuel arhitecture assumes that all the VMs -(Jenkins slave, Fuel master and Target nodes) are all on -the same server. There is code that allows the Fuel master -to be on a different machine, but nothing for the Target nodes. -In Enea-Arm lab we have a different server for each. - -This commit also adds specific templates for a virtual pod in -the Enea-Arm lab. - -Therefore, the following changes are done: -- The default libvirt URI is the machine on which the Target nodes are -- The parameter libvirtUri was added in the dha.yaml file for fuel master -- All virsh calls have "-c" option to explicitly specify the uri; this parameter - is set only when libvirtUri is explicitly set in the yaml file -- The scenarios dha override now point to the arm template files -- The network templates are not needed for ARM, as the network infra is provided - by the server on which the Target node VMs reside; the folder is added here - just for consistency -- The target nodes are created with virsh rather than quemu when the nodes are - not on the same machine as Jenkins slave (similar logic to what is done for - remote Fuel master) - -Initially only ha scenarios were successfully deployed on virtual pods -The default configuration is for ha scenarios and those have 5 target nodes -while on the noha scenarios there are 4. The noha scenarios failed because -it was trying to parse one extra node. - -The dea and dha files need to be modified for each noha scenario so that the -nodes are properly configured. - -Signed-off-by: cristinapauna <cristina.pauna@enea.com> ---- - deploy/dha_adapters/hardware_adapter.py | 5 ++ - deploy/dha_adapters/libvirt_adapter.py | 42 ++++----- - deploy/environments/execution_environment.py | 19 +++-- - deploy/environments/libvirt_environment.py | 59 ++++++++++++- - deploy/environments/virtual_fuel.py | 8 +- - deploy/install_fuel_master.py | 2 +- - deploy/scenario/ha_heat_ceilometer_scenario.yaml | 13 +-- - .../ha_nfv-kvm_heat_ceilometer_scenario.yaml | 13 +-- - .../ha_nfv-ovs_heat_ceilometer_scenario.yaml | 13 +-- - deploy/scenario/ha_odl-bgpvpn_scenario.yaml | 13 +-- - .../ha_odl-l2_heat_ceilometer_scenario.yaml | 13 +-- - .../ha_odl-l2_sfc_heat_ceilometer_scenario.yaml | 13 +-- - .../ha_odl-l3_heat_ceilometer_scenario.yaml | 13 +-- - ...ha_onos_nofeature_heat_ceilometer_scenario.yaml | 13 +-- - .../ha_onos_sfc_heat_ceilometer_scenario.yaml | 13 +-- - .../scenario/ha_vlan_heat_ceilometer_scenario.yaml | 13 +-- - .../scenario/no-ha_heat_ceilometer_scenario.yaml | 25 ++++++ - .../no-ha_nfv-kvm_heat_ceilometer_scenario.yaml | 25 ++++++ - ...a_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml | 25 ++++++ - .../no-ha_nfv-ovs_heat_ceilometer_scenario.yaml | 26 +++++- - deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml | 25 ++++++ - .../no-ha_odl-l2_heat_ceilometer_scenario.yaml | 25 ++++++ - .../no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml | 25 ++++++ - .../no-ha_odl-l3_heat_ceilometer_scenario.yaml | 25 ++++++ - ...ha_onos_nofeature_heat_ceilometer_scenario.yaml | 26 ++++++ - .../no-ha_onos_sfc_heat_ceilometer_scenario.yaml | 25 ++++++ - .../no-ha_vlan_heat_ceilometer_scenario.yaml | 25 ++++++ - .../arm/virtual_environment/networks/.gitkeep | 0 - .../arm/virtual_environment/vms/compute.xml | 57 +++++++++++++ - .../arm/virtual_environment/vms/controller.xml | 57 +++++++++++++ - .../templates/arm/virtual_environment/vms/fuel.xml | 99 ++++++++++++++++++++++ - 31 files changed, 658 insertions(+), 97 deletions(-) - create mode 100644 deploy/templates/arm/virtual_environment/networks/.gitkeep - create mode 100644 deploy/templates/arm/virtual_environment/vms/compute.xml - create mode 100644 deploy/templates/arm/virtual_environment/vms/controller.xml - create mode 100644 deploy/templates/arm/virtual_environment/vms/fuel.xml - -diff --git a/deploy/dha_adapters/hardware_adapter.py b/deploy/dha_adapters/hardware_adapter.py -index aa59581..cf3d77a 100644 ---- a/deploy/dha_adapters/hardware_adapter.py -+++ b/deploy/dha_adapters/hardware_adapter.py -@@ -63,3 +63,8 @@ class HardwareAdapter(object): - vm_definition = self.dha_struct.get('define_vms') - if vm_definition: - return vm_definition.get(role) -+ def get_node_uri(self, node_id): -+ vm_libvirt_uri = self.get_node_property(node_id, 'libvirtUri') -+ if vm_libvirt_uri: -+ return '-c %s' % vm_libvirt_uri -+ return '' -diff --git a/deploy/dha_adapters/libvirt_adapter.py b/deploy/dha_adapters/libvirt_adapter.py -index a00f091..34535d1 100644 ---- a/deploy/dha_adapters/libvirt_adapter.py -+++ b/deploy/dha_adapters/libvirt_adapter.py -@@ -43,21 +43,21 @@ class LibvirtAdapter(HardwareAdapter): - def node_power_off(self, node_id): - vm_name = self.get_node_property(node_id, 'libvirtName') - log('Power OFF Node %s' % vm_name) -- state = exec_cmd('virsh domstate %s' % vm_name) -+ state = exec_cmd('virsh %s domstate %s' % (self.get_node_uri(node_id), vm_name)) - if state == 'running': -- exec_cmd('virsh destroy %s' % vm_name, False) -+ exec_cmd('virsh %s destroy %s' % (self.get_node_uri(node_id), vm_name), False) - - def node_power_on(self, node_id): - vm_name = self.get_node_property(node_id, 'libvirtName') - log('Power ON Node %s' % vm_name) -- state = exec_cmd('virsh domstate %s' % vm_name) -+ state = exec_cmd('virsh %s domstate %s' % (self.get_node_uri(node_id), vm_name)) - if state == 'shut off': -- exec_cmd('virsh start %s' % vm_name) -+ exec_cmd('virsh %s start %s' % (self.get_node_uri(node_id), vm_name)) - - def node_reset(self, node_id): - vm_name = self.get_node_property(node_id, 'libvirtName') - log('Reset Node %s' % vm_name) -- exec_cmd('virsh reset %s' % vm_name) -+ exec_cmd('virsh %s reset %s' % (self.get_node_uri(node_id), vm_name)) - - def translate(self, boot_order_list): - translated = [] -@@ -73,7 +73,7 @@ class LibvirtAdapter(HardwareAdapter): - vm_name = self.get_node_property(node_id, 'libvirtName') - temp_dir = tempfile.mkdtemp() - log('Set boot order %s on Node %s' % (boot_order_list, vm_name)) -- resp = exec_cmd('virsh dumpxml %s' % vm_name) -+ resp = exec_cmd('virsh %s dumpxml %s' % (self.get_node_uri(node_id), vm_name)) - xml_dump = etree.fromstring(resp, self.parser) - os = xml_dump.xpath('/domain/os') - for o in os: -@@ -92,12 +92,12 @@ class LibvirtAdapter(HardwareAdapter): - xml_file = temp_dir + '/%s.xml' % vm_name - with open(xml_file, 'w') as f: - tree.write(f, pretty_print=True, xml_declaration=True) -- exec_cmd('virsh define %s' % xml_file) -+ exec_cmd('virsh %s define %s' % (self.get_node_uri(node_id), xml_file)) - delete(temp_dir) - - def node_zero_mbr(self, node_id): - vm_name = self.get_node_property(node_id, 'libvirtName') -- resp = exec_cmd('virsh dumpxml %s' % vm_name) -+ resp = exec_cmd('virsh %s dumpxml %s' % (self.get_node_uri(node_id), vm_name)) - xml_dump = etree.fromstring(resp) - disks = xml_dump.xpath('/domain/devices/disk') - for disk in disks: -@@ -114,20 +114,20 @@ class LibvirtAdapter(HardwareAdapter): - - def node_eject_iso(self, node_id): - vm_name = self.get_node_property(node_id, 'libvirtName') -- device = self.get_name_of_device(vm_name, 'cdrom') -- exec_cmd('virsh change-media %s --eject %s --config --live' -- % (vm_name, device), False) -+ device = self.get_name_of_device(vm_name, 'cdrom', node_id) -+ exec_cmd('virsh %s change-media %s --eject %s --config --live' -+ % (self.get_node_uri(node_id), vm_name, device), False) - - def node_insert_iso(self, node_id, iso_file): - vm_name = self.get_node_property(node_id, 'libvirtName') -- device = self.get_name_of_device(vm_name, 'cdrom') -- exec_cmd('virsh change-media %s --insert %s %s' -- % (vm_name, device, iso_file)) -+ device = self.get_name_of_device(vm_name, 'cdrom', node_id) -+ exec_cmd('virsh %s change-media %s --insert %s %s' -+ % (self.get_node_uri(node_id), vm_name, device, iso_file)) - - def get_node_pxe_mac(self, node_id): - mac_list = [] - vm_name = self.get_node_property(node_id, 'libvirtName') -- resp = exec_cmd('virsh dumpxml %s' % vm_name) -+ resp = exec_cmd('virsh %s dumpxml %s' % (self.get_node_uri(node_id), vm_name)) - xml_dump = etree.fromstring(resp) - interfaces = xml_dump.xpath('/domain/devices/interface') - for interface in interfaces: -@@ -136,8 +136,8 @@ class LibvirtAdapter(HardwareAdapter): - mac_list.append(mac.get('address').lower()) - return mac_list - -- def get_name_of_device(self, vm_name, device_type): -- resp = exec_cmd('virsh dumpxml %s' % vm_name) -+ def get_name_of_device(self, vm_name, device_type, node_id): -+ resp = exec_cmd('virsh %s dumpxml %s' % (self.get_node_uri(node_id), vm_name)) - xml_dump = etree.fromstring(resp) - disks = xml_dump.xpath('/domain/devices/disk') - for disk in disks: -@@ -151,7 +151,7 @@ class LibvirtAdapter(HardwareAdapter): - def get_virt_net_conf_dir(self): - return self.dha_struct['virtNetConfDir'] - -- def upload_iso(self, iso_file): -+ def upload_iso(self, node_id, iso_file): - size = os.path.getsize(iso_file) - vol_name = os.path.basename(iso_file) - vol_xml = VOL_XML_TEMPLATE.format(name=vol_name, unit='bytes', -@@ -162,10 +162,10 @@ class LibvirtAdapter(HardwareAdapter): - - log(vol_xml) - pool = DEFAULT_POOL # FIXME -- exec_cmd('virsh vol-create --pool %s %s' % (pool, fname)) -- vol_path = exec_cmd('virsh vol-path --pool %s %s' % (pool, vol_name)) -+ exec_cmd('virsh %s vol-create --pool %s %s' % (self.get_node_uri(node_id), pool, fname)) -+ vol_path = exec_cmd('virsh %s vol-path --pool %s %s' % (self.get_node_uri(node_id), pool, vol_name)) - -- exec_cmd('virsh vol-upload %s %s' % (vol_path, iso_file), -+ exec_cmd('virsh %s vol-upload %s %s' % (self.get_node_uri(node_id), vol_path, iso_file), - attempts=5, delay=10, verbose=True) - - delete(fname) -diff --git a/deploy/environments/execution_environment.py b/deploy/environments/execution_environment.py -index 7a0b474..db25229 100644 ---- a/deploy/environments/execution_environment.py -+++ b/deploy/environments/execution_environment.py -@@ -29,12 +29,12 @@ class ExecutionEnvironment(object): - - def delete_vm(self, node_id): - vm_name = self.dha.get_node_property(node_id, 'libvirtName') -- r, c = exec_cmd('virsh dumpxml %s' % vm_name, False) -+ r, c = exec_cmd('virsh %s dumpxml %s' % (self.dha.get_node_uri(node_id), vm_name), False) - if c: - return -- self.undefine_vm_delete_disk(r, vm_name) -+ self.undefine_vm_delete_disk(r, vm_name, node_id) - -- def undefine_vm_delete_disk(self, printout, vm_name): -+ def undefine_vm_delete_disk(self, printout, vm_name, node_id): - disk_files = [] - xml_dump = etree.fromstring(printout, self.parser) - disks = xml_dump.xpath('/domain/devices/disk') -@@ -45,8 +45,13 @@ class ExecutionEnvironment(object): - if source_file: - disk_files.append(source_file) - log('Deleting VM %s with disks %s' % (vm_name, disk_files)) -- exec_cmd('virsh destroy %s' % vm_name, False) -- exec_cmd('virsh undefine --managed-save --remove-all-storage %s' % vm_name, False) -+ exec_cmd('virsh %s destroy %s' % (self.dha.get_node_uri(node_id), vm_name), False) -+ r, c = exec_cmd('virsh %s undefine --managed-save --remove-all-storage %s' % -+ (self.dha.get_node_uri(node_id), vm_name), False) -+ if c: -+ exec_cmd('virsh %s undefine --managed-save --remove-all-storage --nvram %s' % -+ (self.dha.get_node_uri(node_id), vm_name), False) -+ - for file in disk_files: - delete(file) - -@@ -75,7 +80,7 @@ class ExecutionEnvironment(object): - self.overwrite_xml(xml_element, value) - - def define_vm(self, vm_name, temp_vm_file, disk_path, -- vm_definition_overwrite): -+ vm_definition_overwrite, node_id): - log('Creating VM %s with disks %s' % (vm_name, disk_path)) - with open(temp_vm_file) as f: - vm_xml = etree.parse(f) -@@ -99,4 +104,4 @@ class ExecutionEnvironment(object): - disk.append(source) - with open(temp_vm_file, 'w') as f: - vm_xml.write(f, pretty_print=True, xml_declaration=True) -- exec_cmd('virsh define %s' % temp_vm_file) -+ exec_cmd('virsh %s define %s' % (self.dha.get_node_uri(node_id), temp_vm_file)) -diff --git a/deploy/environments/libvirt_environment.py b/deploy/environments/libvirt_environment.py -index 07a47fd..08d669b 100644 ---- a/deploy/environments/libvirt_environment.py -+++ b/deploy/environments/libvirt_environment.py -@@ -12,6 +12,9 @@ from lxml import etree - import glob - from execution_environment import ExecutionEnvironment - import tempfile -+import os -+import re -+import time - - from common import ( - exec_cmd, -@@ -21,6 +24,25 @@ from common import ( - delete, - ) - -+VOL_XML_TEMPLATE = '''<volume type='file'> -+ <name>{name}</name> -+ <capacity unit='{unit}'>{size!s}</capacity> -+ <target> -+ <format type='{format_type}'/> -+ </target> -+</volume>''' -+ -+DEFAULT_POOL = 'jenkins' -+ -+def get_size_and_unit(s): -+ p = re.compile('^(\d+)\s*(\D+)') -+ m = p.match(s) -+ if m == None: -+ return None, None -+ size = m.groups()[0] -+ unit = m.groups()[1] -+ return size, unit -+ - - class LibvirtEnvironment(ExecutionEnvironment): - -@@ -33,10 +55,39 @@ class LibvirtEnvironment(ExecutionEnvironment): - self.node_ids = self.dha.get_all_node_ids() - self.net_names = self.collect_net_names() - -- def create_storage(self, node_id, disk_path, disk_sizes): -+ def create_volume(self, pool, name, su, node_id, temp_dir, img_type='raw'): -+ log('Creating image using Libvirt volumes in pool %s, name: %s, uri: %s' % -+ (pool, name, self.dha.get_node_uri(node_id))) -+ size, unit = get_size_and_unit(su) -+ if size == None: -+ err('Could not determine size and unit of %s' % s) -+ -+ vol_xml = VOL_XML_TEMPLATE.format(name=name, unit=unit, size=size, -+ format_type=img_type) -+ fname = os.path.join(temp_dir, '%s_vol.xml' % name) -+ with file(fname, 'w') as f: -+ f.write(vol_xml) -+ -+ exec_cmd('virsh %s vol-create --pool %s %s' % -+ (self.dha.get_node_uri(node_id), pool, fname)) -+ vol_path = exec_cmd('virsh %s vol-path --pool %s %s' % -+ (self.dha.get_node_uri(node_id), pool, name)) -+ -+ delete(fname) -+ return vol_path -+ -+ -+ def create_storage(self, node_id, disk_path, disk_sizes, temp_dir): - role = self.dea.get_node_main_role(node_id, self.fuel_node_id) - disk_size = disk_sizes[role] -- exec_cmd('qemu-img create -f raw %s %s' % (disk_path, disk_size)) -+ if os.environ.get('LIBVIRT_DEFAULT_URI') == None: -+ exec_cmd('qemu-img create -f raw %s %s' % (disk_path, disk_size)) -+ else: -+ pool = DEFAULT_POOL # FIXME -+ name = os.path.basename(disk_path) -+ disk_path = self.create_volume(pool, name, disk_size, node_id, temp_dir) -+ return disk_path -+ - - def create_vms(self): - temp_dir = tempfile.mkdtemp() -@@ -48,13 +99,13 @@ class LibvirtEnvironment(ExecutionEnvironment): - node_id, 'libvirtTemplate')) - check_file_exists(vm_template) - disk_path = '%s/%s.raw' % (self.storage_dir, vm_name) -- self.create_storage(node_id, disk_path, disk_sizes) -+ disk_path = self.create_storage(node_id, disk_path, disk_sizes, temp_dir) - temp_vm_file = '%s/%s' % (temp_dir, vm_name) - exec_cmd('cp %s %s' % (vm_template, temp_vm_file)) - vm_definition_overwrite = self.dha.get_vm_definition( - self.dea.get_node_main_role(node_id, self.fuel_node_id)) - self.define_vm(vm_name, temp_vm_file, disk_path, -- vm_definition_overwrite) -+ vm_definition_overwrite, node_id) - delete(temp_dir) - - def start_vms(self): -diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py -index fcfa532..5f50f40 100644 ---- a/deploy/environments/virtual_fuel.py -+++ b/deploy/environments/virtual_fuel.py -@@ -99,8 +99,10 @@ class VirtualFuel(ExecutionEnvironment): - with file(fname, 'w') as f: - f.write(vol_xml) - -- exec_cmd('virsh vol-create --pool %s %s' % (pool, fname)) -- vol_path = exec_cmd('virsh vol-path --pool %s %s' % (pool, name)) -+ exec_cmd('virsh %s vol-create --pool %s %s' % -+ (self.dha.get_node_uri(self.fuel_node_id), pool, fname)) -+ vol_path = exec_cmd('virsh %s vol-path --pool %s %s' % -+ (self.dha.get_node_uri(self.fuel_node_id), pool, name)) - - delete(fname) - -@@ -131,7 +133,7 @@ class VirtualFuel(ExecutionEnvironment): - vm_definition_overwrite = self.dha.get_vm_definition('fuel') - - self.define_vm(self.vm_name, self.temp_vm_file, disk_path, -- vm_definition_overwrite) -+ vm_definition_overwrite, self.fuel_node_id) - - def setup_environment(self): - self.cleanup_environment() -diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py -index 2d89c8e..2615818 100644 ---- a/deploy/install_fuel_master.py -+++ b/deploy/install_fuel_master.py -@@ -59,7 +59,7 @@ class InstallFuelMaster(object): - - if os.environ.get('LIBVIRT_DEFAULT_URI'): - log('Upload ISO to pool') -- self.iso_file = self.dha.upload_iso(self.iso_file) -+ self.iso_file = self.dha.upload_iso(self.fuel_node_id, self.iso_file) - else: - log('Zero the MBR') - self.dha.node_zero_mbr(self.fuel_node_id) -diff --git a/deploy/scenario/ha_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_heat_ceilometer_scenario.yaml -index 4051c47..78fa80d 100644 ---- a/deploy/scenario/ha_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_heat_ceilometer_scenario.yaml -@@ -58,22 +58,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml -index 1217f72..bcdda61 100644 ---- a/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml -@@ -145,22 +145,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml -index 51deb4e..bee2d1a 100644 ---- a/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml -@@ -107,22 +107,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_odl-bgpvpn_scenario.yaml b/deploy/scenario/ha_odl-bgpvpn_scenario.yaml -index 7d52e77..46efc4b 100644 ---- a/deploy/scenario/ha_odl-bgpvpn_scenario.yaml -+++ b/deploy/scenario/ha_odl-bgpvpn_scenario.yaml -@@ -77,22 +77,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml -index 90c89ae..50dde30 100644 ---- a/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml -@@ -77,22 +77,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml -index c478948..e20ec1a 100644 ---- a/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml -@@ -95,22 +95,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml -index 967e7d2..322dd27 100644 ---- a/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml -@@ -93,22 +93,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml -index f813458..88b8f6b 100644 ---- a/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml -@@ -88,22 +88,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml -index 32fbfcf..c390172 100644 ---- a/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml -@@ -68,22 +68,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml -index d1d5191..65b8b20 100644 ---- a/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml -@@ -102,22 +102,23 @@ dha-override-config: - nodes: - - id: 1 - libvirtName: controller1 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 2 - libvirtName: controller2 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 3 - libvirtName: controller3 -- libvirtTemplate: templates/virtual_environment/vms/controller.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml - - id: 4 - libvirtName: compute1 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 5 - libvirtName: compute2 -- libvirtTemplate: templates/virtual_environment/vms/compute.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml - - id: 6 - libvirtName: fuel-master -- libvirtTemplate: templates/virtual_environment/vms/fuel.xml -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system - isFuel: yes - username: root - password: r00tme -diff --git a/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml -index 3dd5f84..d738154 100644 ---- a/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml -@@ -41,17 +41,42 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller,congress -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml -index 4661a26..7ade095 100644 ---- a/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml -@@ -48,15 +48,19 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: compute -+ transformations: transformations_2 - - settings: - editable: -@@ -141,6 +145,27 @@ dea-override-config: - weight: 10 - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml -index 87364e8..a3f0864 100644 ---- a/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml -@@ -55,15 +55,19 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - settings: - editable: - additional_components: -@@ -104,6 +108,27 @@ dea-override-config: - weight: 30 - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml -index 7ab76cb..f4e0adc 100644 ---- a/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml -@@ -56,19 +56,22 @@ dea-override-config: - - id: 1 - interfaces: interfaces_vlan - role: mongo,controller -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_dpdk - role: ceph-osd,compute - attributes: attributes_1 -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_dpdk - role: ceph-osd,compute - attributes: attributes_1 -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_dpdk - role: ceph-osd,compute - attributes: attributes_1 -- -+ transformations: transformations_2 - attributes_1: - hugepages: - dpdk: -@@ -102,6 +105,27 @@ dea-override-config: - vlan_start: null - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml b/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml -index 6f21ea2..e92a741 100644 ---- a/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml -+++ b/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml -@@ -60,22 +60,47 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,opendaylight -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - settings: - editable: - public_network_assignment: - assign_to_all_nodes: - value: true - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml -index f8787d7..1efa89a 100644 ---- a/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml -@@ -61,17 +61,42 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,opendaylight -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml -index 90a45d5..b1fe773 100644 ---- a/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml -@@ -80,17 +80,42 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller,tacker -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,opendaylight -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml -index 0c8415f..b59a049 100644 ---- a/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml -@@ -71,15 +71,19 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,opendaylight -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - settings: - editable: - public_network_assignment: -@@ -87,6 +91,27 @@ dea-override-config: - value: true - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml -index f5c00f0..e51dd56 100644 ---- a/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml -@@ -68,21 +68,47 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller,onos -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - settings: - editable: - public_network_assignment: - assign_to_all_nodes: - value: true -+ - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml -index 587346e..21a2be2 100644 ---- a/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml -@@ -48,21 +48,46 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller,onos -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - settings: - editable: - public_network_assignment: - assign_to_all_nodes: - value: true - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # disks: - # contrail: 500G - -diff --git a/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml -index 567ea98..ada5b7e 100644 ---- a/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml -+++ b/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml -@@ -45,15 +45,19 @@ dea-override-config: - - id: 1 - interfaces: interfaces_1 - role: mongo,controller -+ transformations: transformations_1 - - id: 2 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 3 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - - id: 4 - interfaces: interfaces_1 - role: ceph-osd,compute -+ transformations: transformations_2 - settings: - editable: - additional_components: -@@ -94,6 +98,27 @@ dea-override-config: - weight: 30 - - dha-override-config: -+ nodes: -+ - id: 1 -+ libvirtName: controller1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/controller.xml -+ - id: 2 -+ libvirtName: compute1 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 3 -+ libvirtName: compute2 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 4 -+ libvirtName: compute3 -+ libvirtTemplate: templates/arm/virtual_environment/vms/compute.xml -+ - id: 5 -+ libvirtName: fuel-master -+ libvirtTemplate: templates/arm/virtual_environment/vms/fuel.xml -+ libvirtUri: qemu+ssh://jenkins@10.0.2.5/system -+ isFuel: yes -+ username: root -+ password: r00tme -+ - # These overrides only take effect for virtual deployment scenarios - - ############################################################################## -diff --git a/deploy/templates/arm/virtual_environment/networks/.gitkeep b/deploy/templates/arm/virtual_environment/networks/.gitkeep -new file mode 100644 -index 0000000..e69de29 -diff --git a/deploy/templates/arm/virtual_environment/vms/compute.xml b/deploy/templates/arm/virtual_environment/vms/compute.xml -new file mode 100644 -index 0000000..db3ba29 ---- /dev/null -+++ b/deploy/templates/arm/virtual_environment/vms/compute.xml -@@ -0,0 +1,57 @@ -+<domain type='kvm'> -+ <name>compute</name> -+ <memory unit='KiB'>8392704</memory> -+ <currentMemory unit='KiB'>8392704</currentMemory> -+ <vcpu placement='static'>6</vcpu> -+ <os> -+ <type arch='aarch64' machine='virt-2.6'>hvm</type> -+ <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> -+ </os> -+ <features> -+ <gic version='3'/> -+ </features> -+ <cpu mode='host-model'> -+ <model fallback='allow'/> -+ </cpu> -+ <clock offset='utc'/> -+ <on_poweroff>destroy</on_poweroff> -+ <on_reboot>restart</on_reboot> -+ <on_crash>restart</on_crash> -+ <devices> -+ <emulator>/usr/bin/kvm</emulator> -+ <disk type='file' device='disk'> -+ <driver name='qemu' type='raw' cache='none' io='native'/> -+ <source file='disk.raw'/> -+ <target dev='vda' bus='virtio'/> -+ <boot order='2'/> -+ <address type='virtio-mmio'/> -+ </disk> -+ <controller type='scsi' index='0' model='virtio-scsi'> -+ <address type='virtio-mmio'/> -+ </controller> -+ <controller type='pci' index='0' model='pcie-root'/> -+ <interface type='bridge'> -+ <source bridge='admin8_br'/> -+ <model type='virtio'/> -+ <boot order='1'/> -+ <address type='virtio-mmio'/> -+ </interface> -+ <interface type='bridge'> -+ <source bridge='public8_br'/> -+ <model type='virtio'/> -+ <address type='virtio-mmio'/> -+ </interface> -+ <interface type='bridge'> -+ <source bridge='trunk8_br'/> -+ <model type='virtio'/> -+ <address type='virtio-mmio'/> -+ </interface> -+ <serial type='pty'> -+ <target port='0'/> -+ </serial> -+ <console type='pty'> -+ <target type='serial' port='0'/> -+ </console> -+ </devices> -+</domain> -+ -diff --git a/deploy/templates/arm/virtual_environment/vms/controller.xml b/deploy/templates/arm/virtual_environment/vms/controller.xml -new file mode 100644 -index 0000000..6bd0385 ---- /dev/null -+++ b/deploy/templates/arm/virtual_environment/vms/controller.xml -@@ -0,0 +1,57 @@ -+<domain type='kvm'> -+ <name>controller</name> -+ <memory unit='KiB'>8392704</memory> -+ <currentMemory unit='KiB'>8392704</currentMemory> -+ <vcpu placement='static'>6</vcpu> -+ <os> -+ <type arch='aarch64' machine='virt-2.6'>hvm</type> -+ <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> -+ </os> -+ <features> -+ <gic version='3'/> -+ </features> -+ <cpu mode='host-model'> -+ <model fallback='allow'/> -+ </cpu> -+ <clock offset='utc'/> -+ <on_poweroff>destroy</on_poweroff> -+ <on_reboot>restart</on_reboot> -+ <on_crash>restart</on_crash> -+ <devices> -+ <emulator>/usr/bin/kvm</emulator> -+ <disk type='file' device='disk'> -+ <driver name='qemu' type='raw' cache='none' io='native'/> -+ <source file='disk.raw'/> -+ <target dev='vda' bus='virtio'/> -+ <boot order='2'/> -+ <address type='virtio-mmio'/> -+ </disk> -+ <controller type='scsi' index='0' model='virtio-scsi'> -+ <address type='virtio-mmio'/> -+ </controller> -+ <controller type='pci' index='0' model='pcie-root'/> -+ <interface type='bridge'> -+ <source bridge='admin8_br'/> -+ <model type='virtio'/> -+ <boot order='1'/> -+ <address type='virtio-mmio'/> -+ </interface> -+ <interface type='bridge'> -+ <source bridge='public8_br'/> -+ <model type='virtio'/> -+ <address type='virtio-mmio'/> -+ </interface> -+ <interface type='bridge'> -+ <source bridge='trunk8_br'/> -+ <model type='virtio'/> -+ <address type='virtio-mmio'/> -+ </interface> -+ <serial type='pty'> -+ <target port='0'/> -+ </serial> -+ <console type='pty'> -+ <target type='serial' port='0'/> -+ </console> -+ </devices> -+</domain> -+ -diff --git a/deploy/templates/arm/virtual_environment/vms/fuel.xml b/deploy/templates/arm/virtual_environment/vms/fuel.xml -new file mode 100644 -index 0000000..ad7c67f ---- /dev/null -+++ b/deploy/templates/arm/virtual_environment/vms/fuel.xml -@@ -0,0 +1,99 @@ -+<domain type='kvm'> -+ <name>fuel</name> -+ <memory unit='KiB'>8290304</memory> -+ <currentMemory unit='KiB'>8290304</currentMemory> -+ <vcpu placement='static'>4</vcpu> -+ <resource> -+ <partition>/machine</partition> -+ </resource> -+ <os> -+ <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type> -+ <boot dev='hd'/> -+ <boot dev='cdrom'/> -+ <bootmenu enable='no'/> -+ </os> -+ <features> -+ <acpi/> -+ <apic/> -+ <pae/> -+ </features> -+ <cpu mode='host-model'> -+ <model fallback='allow'/> -+ </cpu> -+ <clock offset='utc'> -+ <timer name='rtc' tickpolicy='catchup'/> -+ <timer name='pit' tickpolicy='delay'/> -+ <timer name='hpet' present='no'/> -+ </clock> -+ <on_poweroff>destroy</on_poweroff> -+ <on_reboot>restart</on_reboot> -+ <on_crash>restart</on_crash> -+ <pm> -+ <suspend-to-mem enabled='no'/> -+ <suspend-to-disk enabled='no'/> -+ </pm> -+ <devices> -+ <emulator>/usr/libexec/qemu-kvm</emulator> -+ <disk type='block' device='cdrom'> -+ <driver name='qemu' type='raw'/> -+ <target dev='hdc' bus='ide'/> -+ <readonly/> -+ </disk> -+ <disk type='file' device='disk'> -+ <driver name='qemu' type='raw' cache='none' io='native'/> -+ <source file='disk.raw'/> -+ <target dev='vda' bus='virtio'/> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> -+ </disk> -+ <controller type='usb' index='0' model='ich9-ehci1'> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/> -+ </controller> -+ <controller type='usb' index='0' model='ich9-uhci1'> -+ <master startport='0'/> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/> -+ </controller> -+ <controller type='usb' index='0' model='ich9-uhci2'> -+ <master startport='2'/> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/> -+ </controller> -+ <controller type='usb' index='0' model='ich9-uhci3'> -+ <master startport='4'/> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/> -+ </controller> -+ <controller type='pci' index='0' model='pci-root'/> -+ <controller type='ide' index='0'> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> -+ </controller> -+ <controller type='virtio-serial' index='0'> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> -+ </controller> -+ <interface type='bridge'> -+ <source bridge='admin8_br0'/> -+ <model type='virtio'/> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> -+ </interface> -+ <interface type='bridge'> -+ <source bridge='public8_br0'/> -+ <model type='virtio'/> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> -+ </interface> -+ <serial type='pty'> -+ <target port='0'/> -+ </serial> -+ <console type='pty'> -+ <target type='serial' port='0'/> -+ </console> -+ <input type='mouse' bus='ps2'/> -+ <input type='keyboard' bus='ps2'/> -+ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> -+ <listen type='address' address='127.0.0.1'/> -+ </graphics> -+ <video> -+ <model type='vga' vram='16384' heads='1'/> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> -+ </video> -+ <memballoon model='virtio'> -+ <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> -+ </memballoon> -+ </devices> -+</domain> diff --git a/patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch b/patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch deleted file mode 100644 index 9997dedf..00000000 --- a/patches/opnfv-fuel/upstream-backports/0005-CI-deploy-cache-Store-and-reuse-deploy-artifacts.patch +++ /dev/null @@ -1,786 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: 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 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Thu, 24 Nov 2016 23:02:04 +0100 -Subject: [PATCH] CI: deploy-cache: Store and reuse deploy artifacts - -Add support for caching deploy artifacts, like bootstraps and -target images, which take a lot of time at each deploy to be built, -considering it requires a cross-debootstrap via qemu-user-static and -binfmt. - -For OPNFV CI, the cache will piggy back on the <iso_mount> mechanism, -and be located at: -/iso_mount/opnfv_ci/<branch>/deploy-cache - -TODO: Use dea interface adapter in target images fingerprinting. -TODO: remote fingerprinting -TODO: differentiate between bootstraps and targetimages, so we don't -end up trying to use one cache artifact type as the other. -TODO: implement sanity checks for bootstrap and target images; -TODO: switch `exec_cmd('mkdir ...')` to `create_dir_if_not_exists`; - -JIRA: ARMBAND-172 -JIRA: ARMBAND-242 - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - ...p_admin_node.sh-deploy_cache-install-hook.patch | 90 ++++++ - ci/deploy.sh | 14 +- - deploy/cloud/configure_settings.py | 4 + - deploy/cloud/deployment.py | 12 + - deploy/deploy.py | 25 +- - deploy/deploy_cache.py | 314 +++++++++++++++++++++ - deploy/deploy_env.py | 13 +- - deploy/install_fuel_master.py | 9 +- - 8 files changed, 472 insertions(+), 9 deletions(-) - create mode 100644 build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch - create mode 100644 deploy/deploy_cache.py - -diff --git a/build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch b/build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch -new file mode 100644 -index 0000000..7acb746 ---- /dev/null -+++ b/build/f_repos/patch/fuel-main/0006-bootstrap_admin_node.sh-deploy_cache-install-hook.patch -@@ -0,0 +1,90 @@ -+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -+Date: Mon, 28 Nov 2016 14:27:48 +0100 -+Subject: [PATCH] bootstrap_admin_node.sh: deploy_cache install hook -+ -+Tooling on the automatic deploy side was updated to support deploy -+caching of artifacts like bootstrap (and id_rsa keypair), target -+images etc. -+ -+Add installation hook that calls `fuel-bootstrap import` instead of -+`build` when a bootstrap tar is available in the agreed location, -+/var/lib/opnfv/cache/bootstraps/. -+ -+Temporary until Fuel@Openstack fixes Master key propagation to nodes' -+authorized_keys, use Mcollective remote shell execute to add it -+during deployment. -+This might duplicate the entry in authorized_keys during re-deploys. -+ -+JIRA: ARMBAND-172 -+JIRA: ARMBAND-242 -+ -+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -+--- -+ iso/bootstrap_admin_node.sh | 35 ++++++++++++++++++++++++++++++++++- -+ 1 file changed, 34 insertions(+), 1 deletion(-) -+ -+diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh -+index 4f5ce4e..4c79552 100755 -+--- a/iso/bootstrap_admin_node.sh -++++ b/iso/bootstrap_admin_node.sh -+@@ -64,6 +64,8 @@ wget \ -+ ASTUTE_YAML='/etc/fuel/astute.yaml' -+ BOOTSTRAP_NODE_CONFIG="/etc/fuel/bootstrap_admin_node.conf" -+ CUSTOM_REPOS="/root/default_deb_repos.yaml" -++OPNFV_CACHE_PATH="/var/cache/opnfv/bootstraps" -++OPNFV_CACHE_TAR="opnfv-bootstraps-cache.tar" -+ 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 -+@@ -97,6 +99,7 @@ image becomes available, reboot nodes that failed to be discovered." -+ 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_cache_message="OPNFV deploy cache: bootstrap image injected." -+ # Update issues messages -+ update_warn_message="There is an issue connecting to update repository of \ -+ your distributions of OpenStack. \ -+@@ -509,12 +512,42 @@ set_ui_bootstrap_error () { -+ EOF -+ } -+ -++function inject_cached_ssh_key () { -++ # FIXME(armband): Propagate master ssh key to nodes' -++ # authorized_keys, until upstream fixes this for image build. -++ local moddir="/etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/modular" -++ cat >> "${moddir}/astute/generate_keys.sh" <<-EOF -++ mco rpc execute_shell_command execute \\ -++ cmd="echo $(cat /root/.ssh/id_rsa.pub) >> /root/.ssh/authorized_keys" -++ EOF -++} -++ -++function inject_cached_ubuntu_bootstrap () { -++ if [ -f "${OPNFV_CACHE_PATH}/${OPNFV_CACHE_TAR}" -a \ -++ -f "${OPNFV_CACHE_PATH}/id_rsa.pub" -a \ -++ -f "${OPNFV_CACHE_PATH}/id_rsa" ]; then -++ if cp "${OPNFV_CACHE_PATH}/id_rsa"* "/root/.ssh/" && \ -++ cp "/root/.ssh/id_rsa.pub" "/root/.ssh/authorized_keys" && \ -++ cp "/root/.ssh/id_rsa.pub" "/etc/cobbler/authorized_keys" && \ -++ sed -i -e "s|\"ssh-rsa .*\"|\"$(cat /root/.ssh/id_rsa.pub)\"|g" \ -++ /etc/nailgun/settings.yaml && \ -++ fuel-bootstrap -v --debug import --activate \ -++ "${OPNFV_CACHE_PATH}/${OPNFV_CACHE_TAR}" >>"$bs_build_log" 2>&1; then -++ inject_cached_ssh_key -++ fuel notify --topic "done" --send "${bs_cache_message}" -++ return 0 -++ fi -++ fi -++ return 1 -++} -++ -+ # Actually build the bootstrap image -+ 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 --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then -++ if inject_cached_ubuntu_bootstrap || fuel-bootstrap -v --debug \ -++ build --activate --target_arch arm64 >>"$bs_build_log" 2>&1; then -+ ret=0 -+ fuel notify --topic "done" --send "${bs_done_message}" -+ else -diff --git a/ci/deploy.sh b/ci/deploy.sh -index 081806c..4b1ae0e 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -29,7 +29,7 @@ cat << EOF - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - `basename $0`: Deploys the Fuel@OPNFV stack - --usage: `basename $0` -b base-uri [-B PXE Bridge] [-f] [-F] [-H] -l lab-name -p pod-name -s deploy-scenario [-S image-dir] [-T timeout] -i iso -+usage: `basename $0` -b base-uri [-B PXE Bridge] [-f] [-F] [-H] -l lab-name -p pod-name -s deploy-scenario [-S image-dir] [-C deploy-cache-dir] [-T timeout] -i iso - -s deployment-scenario [-S optional Deploy-scenario path URI] - [-R optional local relen repo (containing deployment Scenarios] - -@@ -47,6 +47,7 @@ OPTIONS: - -p Pod-name - -s Deploy-scenario short-name/base-file-name - -S Storage dir for VM images -+ -C Deploy cache dir for storing image artifacts - -T Timeout, in minutes, for the deploy. - -i iso url - -@@ -79,6 +80,7 @@ Input parameters to the build script is: - or a deployment short-name as defined by scenario.yaml in the deployment - scenario path. - -S Storage dir for VM images, default is fuel/deploy/images -+-C Deploy cache dir for bootstrap and target image artifacts, optional - -T Timeout, in minutes, for the deploy. It defaults to using the DEPLOY_TIMEOUT - environment variable when defined, or to the default in deploy.py otherwise - -i .iso image to be deployed (needs to be provided in a URI -@@ -116,6 +118,7 @@ FUEL_CREATION_ONLY='' - NO_DEPLOY_ENVIRONMENT='' - STORAGE_DIR='' - DRY_RUN=0 -+DEPLOY_CACHE_DIR='' - if ! [ -z $DEPLOY_TIMEOUT ]; then - DEPLOY_TIMEOUT="-dt $DEPLOY_TIMEOUT" - else -@@ -128,7 +131,7 @@ fi - ############################################################################ - # BEGIN of main - # --while getopts "b:B:dfFHl:L:p:s:S:T:i:he" OPTION -+while getopts "b:B:dfFHl:L:p:s:S:C:T:i:he" OPTION - do - case $OPTION in - b) -@@ -179,6 +182,9 @@ do - STORAGE_DIR="-s ${OPTARG}" - fi - ;; -+ C) -+ DEPLOY_CACHE_DIR="-dc ${OPTARG}" -+ ;; - T) - DEPLOY_TIMEOUT="-dt ${OPTARG}" - ;; -@@ -243,8 +249,8 @@ if [ $DRY_RUN -eq 0 ]; then - ISO=${SCRIPT_PATH}/ISO/image.iso - fi - # Start deployment -- echo "python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT" -- python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT -+ echo "python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT $DEPLOY_CACHE_DIR" -+ python deploy.py $DEPLOY_LOG $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO $DEPLOY_TIMEOUT $DEPLOY_CACHE_DIR - fi - popd > /dev/null - -diff --git a/deploy/cloud/configure_settings.py b/deploy/cloud/configure_settings.py -index b60a60f..4e007e1 100644 ---- a/deploy/cloud/configure_settings.py -+++ b/deploy/cloud/configure_settings.py -@@ -71,5 +71,9 @@ class ConfigureSettings(object): - settings['editable'][plugin]['metadata']['chosen_id'] = orig_dea['editable'][plugin]['metadata']['chosen_id'] - settings['editable'][plugin]['metadata']['versions'][0]['metadata']['plugin_id'] = orig_dea['editable'][plugin]['metadata']['versions'][0]['metadata']['plugin_id'] - -+ # deploy-cache req: pass master id_rsa.pub as authorized key -+ with io.open('/root/.ssh/id_rsa.pub', 'r') as pkey: -+ settings['editable']['operator_user']['authkeys']['value'] = pkey.read() -+ - with io.open(settings_yaml, 'w') as stream: - yaml.dump(settings, stream, default_flow_style=False) -diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py -index 4329a4c..a84d46c 100644 ---- a/deploy/cloud/deployment.py -+++ b/deploy/cloud/deployment.py -@@ -19,6 +19,8 @@ from common import ( - log, - ) - -+from deploy_cache import DeployCache -+ - SEARCH_TEXT = '(err)' - LOG_FILE = '/var/log/puppet.log' - GREP_LINES_OF_LEADING_CONTEXT = 100 -@@ -51,6 +53,14 @@ class Deployment(object): - self.pattern = re.compile( - '\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d') - -+ def deploy_cache_install_targetimages(self): -+ log('Using target images from deploy cache') -+ DeployCache.install_targetimages_for_env(self.env_id) -+ -+ def deploy_cache_extract_targetimages(self): -+ log('Collecting Fuel target image files for deploy cache') -+ DeployCache.extract_targetimages_from_env(self.env_id) -+ - def collect_error_logs(self): - for node_id, roles_blade in self.node_id_roles_dict.iteritems(): - log_list = [] -@@ -112,6 +122,7 @@ class Deployment(object): - start = time.time() - - log('Starting deployment of environment %s' % self.env_id) -+ self.deploy_cache_install_targetimages() - deploy_id = None - ready = False - timeout = False -@@ -144,6 +155,7 @@ class Deployment(object): - err('Deployment timed out, environment %s is not operational, ' - 'snapshot will not be performed' - % self.env_id) -+ self.deploy_cache_extract_targetimages() - if ready: - log('Environment %s successfully deployed' - % self.env_id) -diff --git a/deploy/deploy.py b/deploy/deploy.py -index 7648baf..ee3cb7a 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -22,6 +22,7 @@ from dea import DeploymentEnvironmentAdapter - from dha import DeploymentHardwareAdapter - from install_fuel_master import InstallFuelMaster - from deploy_env import CloudDeploy -+from deploy_cache import DeployCache - from execution_environment import ExecutionEnvironment - - from common import ( -@@ -61,7 +62,8 @@ class AutoDeploy(object): - def __init__(self, no_fuel, fuel_only, no_health_check, cleanup_only, - cleanup, storage_dir, pxe_bridge, iso_file, dea_file, - dha_file, fuel_plugins_dir, fuel_plugins_conf_dir, -- no_plugins, deploy_timeout, no_deploy_environment, deploy_log): -+ no_plugins, deploy_cache_dir, deploy_timeout, -+ no_deploy_environment, deploy_log): - self.no_fuel = no_fuel - self.fuel_only = fuel_only - self.no_health_check = no_health_check -@@ -75,6 +77,7 @@ class AutoDeploy(object): - self.fuel_plugins_dir = fuel_plugins_dir - self.fuel_plugins_conf_dir = fuel_plugins_conf_dir - self.no_plugins = no_plugins -+ self.deploy_cache_dir = deploy_cache_dir - self.deploy_timeout = deploy_timeout - self.no_deploy_environment = no_deploy_environment - self.deploy_log = deploy_log -@@ -116,7 +119,7 @@ class AutoDeploy(object): - self.fuel_username, self.fuel_password, - self.dea_file, self.fuel_plugins_conf_dir, - WORK_DIR, self.no_health_check, -- self.deploy_timeout, -+ self.deploy_cache_dir, self.deploy_timeout, - self.no_deploy_environment, self.deploy_log) - with old_dep.ssh: - old_dep.check_previous_installation() -@@ -128,6 +131,7 @@ class AutoDeploy(object): - self.fuel_conf['ip'], self.fuel_username, - self.fuel_password, self.fuel_node_id, - self.iso_file, WORK_DIR, -+ self.deploy_cache_dir, - self.fuel_plugins_dir, self.no_plugins) - fuel.install() - -@@ -136,6 +140,7 @@ class AutoDeploy(object): - tmp_new_dir = '%s/newiso' % self.tmp_dir - try: - self.copy(tmp_orig_dir, tmp_new_dir) -+ self.deploy_cache_fingerprints(tmp_new_dir) - self.patch(tmp_new_dir, new_iso) - except Exception as e: - exec_cmd('fusermount -u %s' % tmp_orig_dir, False) -@@ -156,6 +161,12 @@ class AutoDeploy(object): - delete(tmp_orig_dir) - exec_cmd('chmod -R 755 %s' % tmp_new_dir) - -+ def deploy_cache_fingerprints(self, tmp_new_dir): -+ if self.deploy_cache_dir: -+ log('Deploy cache: Collecting fingerprints...') -+ deploy_cache = DeployCache(self.deploy_cache_dir) -+ deploy_cache.do_fingerprints(tmp_new_dir, self.dea_file) -+ - def patch(self, tmp_new_dir, new_iso): - log('Patching...') - patch_dir = '%s/%s' % (CWD, PATCH_DIR) -@@ -218,7 +229,8 @@ class AutoDeploy(object): - dep = CloudDeploy(self.dea, self.dha, self.fuel_conf['ip'], - self.fuel_username, self.fuel_password, - self.dea_file, self.fuel_plugins_conf_dir, -- WORK_DIR, self.no_health_check, self.deploy_timeout, -+ WORK_DIR, self.no_health_check, -+ self.deploy_cache_dir, self.deploy_timeout, - self.no_deploy_environment, self.deploy_log) - return dep.deploy() - -@@ -343,6 +355,8 @@ def parse_arguments(): - help='Fuel Plugins Configuration directory') - parser.add_argument('-np', dest='no_plugins', action='store_true', - default=False, help='Do not install Fuel Plugins') -+ parser.add_argument('-dc', dest='deploy_cache_dir', action='store', -+ help='Deploy Cache Directory') - parser.add_argument('-dt', dest='deploy_timeout', action='store', - default=240, help='Deployment timeout (in minutes) ' - '[default: 240]') -@@ -376,6 +390,10 @@ def parse_arguments(): - for bridge in args.pxe_bridge: - check_bridge(bridge, args.dha_file) - -+ if args.deploy_cache_dir: -+ log('Using deploy cache directory: %s' % args.deploy_cache_dir) -+ create_dir_if_not_exists(args.deploy_cache_dir) -+ - - kwargs = {'no_fuel': args.no_fuel, 'fuel_only': args.fuel_only, - 'no_health_check': args.no_health_check, -@@ -386,6 +404,7 @@ def parse_arguments(): - 'fuel_plugins_dir': args.fuel_plugins_dir, - 'fuel_plugins_conf_dir': args.fuel_plugins_conf_dir, - 'no_plugins': args.no_plugins, -+ 'deploy_cache_dir': args.deploy_cache_dir, - 'deploy_timeout': args.deploy_timeout, - 'no_deploy_environment': args.no_deploy_environment, - 'deploy_log': args.deploy_log} -diff --git a/deploy/deploy_cache.py b/deploy/deploy_cache.py -new file mode 100644 -index 0000000..30bfe30 ---- /dev/null -+++ b/deploy/deploy_cache.py -@@ -0,0 +1,314 @@ -+############################################################################### -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.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 -+############################################################################### -+ -+import glob -+import hashlib -+import io -+import json -+import os -+import shutil -+import yaml -+ -+from common import ( -+ exec_cmd, -+ log, -+) -+ -+############################################################################### -+# Deploy Cache Flow Overview -+############################################################################### -+# 1. do_fingerprints -+# Can be called as soon as a Fuel Master ISO chroot is available. -+# This will gather all required information for uniquely identifying the -+# objects in cache (bootstraps, targetimages). -+# 2. inject_cache -+# Can be called as soon as we have a steady SSH connection to the Fuel -+# Master node. It will inject cached artifacts over SSH, for later install. -+# 3. (external, async) install cached bootstrap instead of building a new one -+# /sbin/bootstrap_admin_node.sh will check for cached bootstrap images -+# (with id_rsa, id_rsa.pub attached) and will install those via -+# $ fuel-bootstrap import opfnv-bootstraps-cache.tar -+# 4. install_targetimages_for_env -+# Should be called before cloud deploy is started, to install env-generic -+# 'env_X_...' cached images for the current environment ID. -+# Static method, to be used on the remote Fuel Master node; does not require -+# access to the deploy cache, it only moves around some local files. -+# 5. extract_targetimages_from_env -+# Should be called at env deploy finish, to prepare artifacts for caching. -+# Static method, same observations as above apply. -+# 6. collect_artifacts -+# Call last, to collect all artifacts. -+############################################################################### -+ -+############################################################################### -+# Deploy cache artifacts: -+# - id_rsa -+# - bootstrap image (Ubuntu) -+# - environment target image (Ubuntu) -+############################################################################### -+# Cache fingerprint covers: -+# - bootstrap: -+# - local mirror contents -+# - FIXME(armband): [disabled] package list (old fuel_bootstrap_cli.yaml) -+# - target image: -+# - local mirror contents -+# - package list (determined from DEA) -+############################################################################### -+# WARN: Cache fingerprint does NOT yet cover: -+# - image_data (always assume the default /boot, /); -+# - output_dir (always assume the default /var/www/nailgun/targetimages; -+# - codename (always assume the default, currently 'trusty'); -+# - extra_dirs: /usr/share/fuel_bootstrap_cli/files/trusty -+# - root_ssh_authorized_file, inluding the contents of /root/.ssh/id_rsa.pub -+# - Auxiliary repo .../mitaka-9.0/ubuntu/auxiliary -+# If the above change without triggering a cache miss, try clearing the cache. -+############################################################################### -+# WARN: Bootstrap caching implies RSA keypair to be reused! -+############################################################################### -+ -+# Local mirrros will be used on Fuel Master for both bootstrap and target image -+# build, from `http://127.0.0.1:8080/...` or `http://10.20.0.2:8080/...`: -+# - MOS .../mitaka-9.0/ubuntu/x86_64 -+# - Ubuntu .../mirrors/ubuntu/ -+# All these reside on Fuel Master at local path: -+NAILGUN_PATH = '/var/www/nailgun/' -+ -+# Artifact names (corresponding to nailgun subdirs) -+MIRRORS = 'mirrors' -+BOOTSTRAPS = 'bootstraps' -+TARGETIMAGES = 'targetimages' -+ -+# Info for collecting RSA keypair -+RSA_KEYPAIR_PATH = '/root/.ssh' -+RSA_KEYPAIR_FILES = ['id_rsa', 'id_rsa.pub'] -+ -+# Relative path for collecting the active bootstrap image(s) after env deploy -+NAILGUN_ACT_BOOTSTRAP_SUBDIR = '%s/active_bootstrap' % BOOTSTRAPS -+ -+# Relative path for collecting target image(s) for deployed enviroment -+NAILGUN_TIMAGES_SUBDIR = TARGETIMAGES -+ -+# FIXME(armband): re-include package list (old fuel_bootstrap_cli.yaml) -+# ISO_BOOTSTRAP_CLI_YAML = '/opnfv/fuel_bootstrap_cli.yaml' -+ -+# OPNFV Deploy Cache path on Fuel Master, where artifacts will be injected -+REMOTE_CACHE_PATH = '/var/cache/opnfv' -+ -+# OPNFV Bootstrap Cache tar archive name, to be used by bootstrap_admin_node.sh -+BOOTSTRAP_ARCHIVE = 'opnfv-bootstraps-cache.tar' -+ -+# Env-ID indep prefix -+ENVX = 'env_X_' -+ -+class DeployCache(object): -+ """OPNFV Deploy Cache - managed storage for cacheable artifacts""" -+ -+ def __init__(self, cache_dir, -+ fingerprints_yaml='deploy_cache_fingerprints.yaml'): -+ self.cache_dir = cache_dir -+ self.fingerprints_yaml = fingerprints_yaml -+ self.fingerprints = {BOOTSTRAPS: None, -+ MIRRORS: None, -+ TARGETIMAGES: None} -+ -+ def __load_fingerprints(self): -+ """Load deploy cache yaml config holding fingerprints""" -+ if os.path.isfile(self.fingerprints_yaml): -+ cache_fingerprints = open(self.fingerprints_yaml).read() -+ self.fingerprints = yaml.load(cache_fingerprints) -+ -+ def __save_fingerprints(self): -+ """Update deploy cache yaml config holding fingerprints""" -+ with open(self.fingerprints_yaml, 'w') as outfile: -+ outfile.write(yaml.safe_dump(self.fingerprints, -+ default_flow_style=False)) -+ -+ def __fingerprint_mirrors(self, chroot_path): -+ """Collect repo mirror fingerprints""" -+ deb_packages = list() -+ # Scan ISO for deb files (MOS mirror + Ubuntu mirror, no plugins) -+ for repo_dir in ['ubuntu', 'opnfv/nailgun/mirrors/ubuntu']: -+ for _, _, files in os.walk(os.path.join(chroot_path, repo_dir)): -+ for fdeb in files: -+ if fdeb.endswith(".deb"): -+ deb_packages.append(fdeb) -+ sorted_debs = json.dumps(deb_packages, sort_keys=True) -+ self.fingerprints[MIRRORS] = hashlib.sha1(sorted_debs).hexdigest() -+ -+ def __fingerprint_bootstrap(self, chroot_path): -+ """Collect bootstrap image metadata fingerprints""" -+ # FIXME(armband): include 'extra_dirs' contents -+ sorted_data = '' -+ # FIXME(armband): re-include package list (old fuel_bootstrap_cli.yaml) -+ # cli_yaml_path = os.path.join(chroot_path, ISO_BOOTSTRAP_CLI_YAML[1:]) -+ # bootstrap_cli_yaml = open(cli_yaml_path).read() -+ # bootstrap_data = yaml.load(bootstrap_cli_yaml) -+ # sorted_data = json.dumps(bootstrap_data, sort_keys=True) -+ self.fingerprints[BOOTSTRAPS] = hashlib.sha1(sorted_data).hexdigest() -+ -+ def __fingerprint_target(self, dea_file): -+ """Collect target image metadata fingerprints""" -+ # FIXME(armband): include 'image_data', 'codename', 'output' -+ with io.open(dea_file) as stream: -+ dea = yaml.load(stream) -+ editable = dea['settings']['editable'] -+ target_data = {'packages': editable['provision']['packages'], -+ 'repos': editable['repo_setup']['repos']} -+ s_data = json.dumps(target_data, sort_keys=True) -+ self.fingerprints[TARGETIMAGES] = hashlib.sha1(s_data).hexdigest() -+ -+ def do_fingerprints(self, chroot_path, dea_file): -+ """Collect SHA1 fingerprints based on chroot contents, DEA settings""" -+ try: -+ self.__load_fingerprints() -+ self.__fingerprint_mirrors(chroot_path) -+ self.__fingerprint_bootstrap(chroot_path) -+ self.__fingerprint_target(dea_file) -+ self.__save_fingerprints() -+ except Exception as ex: -+ log('Failed to get cache fingerprint: %s' % str(ex)) -+ -+ def __lookup_cache(self, sha): -+ """Search for object in cache based on SHA fingerprint""" -+ cache_sha_dir = os.path.join(self.cache_dir, sha) -+ if not os.path.isdir(cache_sha_dir) or not os.listdir(cache_sha_dir): -+ return None -+ return cache_sha_dir -+ -+ def __inject_cache_dir(self, ssh, sha, artifact): -+ """Stage cached object (dir) in Fuel Master OPNFV local cache""" -+ local_path = self.__lookup_cache(sha) -+ if local_path: -+ remote_path = os.path.join(REMOTE_CACHE_PATH, artifact) -+ with ssh: -+ ssh.exec_cmd('mkdir -p %s' % remote_path) -+ for cachedfile in glob.glob('%s/*' % local_path): -+ ssh.scp_put(cachedfile, remote_path) -+ return local_path -+ -+ def __mix_fingerprints(self, f1, f2): -+ """Compute composite fingerprint""" -+ if self.fingerprints[f1] is None or self.fingerprints[f2] is None: -+ return None -+ return hashlib.sha1('%s%s' % -+ (self.fingerprints[f1], self.fingerprints[f2])).hexdigest() -+ -+ def inject_cache(self, ssh): -+ """Lookup artifacts in cache and inject them over SSH/SCP into Fuel""" -+ try: -+ self.__load_fingerprints() -+ for artifact in [BOOTSTRAPS, TARGETIMAGES]: -+ sha = self.__mix_fingerprints(MIRRORS, artifact) -+ if sha is None: -+ log('Missing fingerprint for: %s' % artifact) -+ continue -+ if not self.__inject_cache_dir(ssh, sha, artifact): -+ log('SHA1 not in cache: %s (%s)' % (str(sha), artifact)) -+ else: -+ log('SHA1 injected: %s (%s)' % (str(sha), artifact)) -+ except Exception as ex: -+ log('Failed to inject cached artifacts into Fuel: %s' % str(ex)) -+ -+ def __extract_bootstraps(self, ssh, cache_sha_dir): -+ """Collect bootstrap artifacts from Fuel over SSH/SCP""" -+ remote_tar = os.path.join(REMOTE_CACHE_PATH, BOOTSTRAP_ARCHIVE) -+ local_tar = os.path.join(cache_sha_dir, BOOTSTRAP_ARCHIVE) -+ with ssh: -+ for k in RSA_KEYPAIR_FILES: -+ ssh.scp_get(os.path.join(RSA_KEYPAIR_PATH, k), -+ local=os.path.join(cache_sha_dir, k)) -+ ssh.exec_cmd('mkdir -p %s && cd %s && tar cf %s *' % -+ (REMOTE_CACHE_PATH, -+ os.path.join(NAILGUN_PATH, NAILGUN_ACT_BOOTSTRAP_SUBDIR), -+ remote_tar)) -+ ssh.scp_get(remote_tar, local=local_tar) -+ ssh.exec_cmd('rm -f %s' % remote_tar) -+ -+ def __extract_targetimages(self, ssh, cache_sha_dir): -+ """Collect target image artifacts from Fuel over SSH/SCP""" -+ cti_path = os.path.join(REMOTE_CACHE_PATH, TARGETIMAGES) -+ with ssh: -+ ssh.scp_get('%s/%s*' % (cti_path, ENVX), local=cache_sha_dir) -+ -+ def collect_artifacts(self, ssh): -+ """Collect artifacts from Fuel over SSH/SCP and add them to cache""" -+ try: -+ self.__load_fingerprints() -+ for artifact, func in { -+ BOOTSTRAPS: self.__extract_bootstraps, -+ TARGETIMAGES: self.__extract_targetimages -+ }.iteritems(): -+ sha = self.__mix_fingerprints(MIRRORS, artifact) -+ if sha is None: -+ log('WARN: Skip caching, NO fingerprint: %s' % artifact) -+ continue -+ local_path = self.__lookup_cache(sha) -+ if local_path: -+ log('SHA1 already in cache: %s (%s)' % (str(sha), artifact)) -+ else: -+ log('New cache SHA1: %s (%s)' % (str(sha), artifact)) -+ cache_sha_dir = os.path.join(self.cache_dir, sha) -+ exec_cmd('mkdir -p %s' % cache_sha_dir) -+ func(ssh, cache_sha_dir) -+ except Exception as ex: -+ log('Failed to extract artifacts from Fuel: %s' % str(ex)) -+ -+ @staticmethod -+ def extract_targetimages_from_env(env_id): -+ """Prepare targetimages from env ID for storage in deploy cache -+ -+ NOTE: This method should be executed locally ON the Fuel Master node. -+ WARN: This method overwrites targetimages cache on Fuel Master node. -+ """ -+ env_n = 'env_%s_' % str(env_id) -+ cti_path = os.path.join(REMOTE_CACHE_PATH, TARGETIMAGES) -+ ti_path = os.path.join(NAILGUN_PATH, NAILGUN_TIMAGES_SUBDIR) -+ try: -+ exec_cmd('rm -rf %s && mkdir -p %s' % (cti_path, cti_path)) -+ for root, _, files in os.walk(ti_path): -+ for tif in files: -+ if tif.startswith(env_n): -+ src = os.path.join(root, tif) -+ dest = os.path.join(cti_path, tif.replace(env_n, ENVX)) -+ if tif.endswith('.yaml'): -+ shutil.copy(src, dest) -+ exec_cmd('sed -i "s|%s|%s|g" %s' % -+ (env_n, ENVX, dest)) -+ else: -+ os.link(src, dest) -+ except Exception as ex: -+ log('Failed to extract targetimages artifacts from env %s: %s' % -+ (str(env_id), str(ex))) -+ -+ @staticmethod -+ def install_targetimages_for_env(env_id): -+ """Install targetimages artifacts for a specific env ID -+ -+ NOTE: This method should be executed locally ON the Fuel Master node. -+ """ -+ env_n = 'env_%s_' % str(env_id) -+ cti_path = os.path.join(REMOTE_CACHE_PATH, TARGETIMAGES) -+ ti_path = os.path.join(NAILGUN_PATH, NAILGUN_TIMAGES_SUBDIR) -+ if not os.path.isdir(cti_path): -+ log('%s cache dir not found: %s' % (TARGETIMAGES, cti_path)) -+ else: -+ try: -+ for root, _, files in os.walk(cti_path): -+ for tif in files: -+ src = os.path.join(root, tif) -+ dest = os.path.join(ti_path, tif.replace(ENVX, env_n)) -+ if tif.endswith('.yaml'): -+ shutil.copy(src, dest) -+ exec_cmd('sed -i "s|%s|%s|g" %s' % -+ (ENVX, env_n, dest)) -+ else: -+ os.link(src, dest) -+ except Exception as ex: -+ log('Failed to install targetimages for env %s: %s' % -+ (str(env_id), str(ex))) -diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py -index d374cce..445070a 100644 ---- a/deploy/deploy_env.py -+++ b/deploy/deploy_env.py -@@ -15,6 +15,7 @@ import glob - import time - import shutil - -+from deploy_cache import DeployCache - from ssh_client import SSHClient - - from common import ( -@@ -35,7 +36,8 @@ class CloudDeploy(object): - - def __init__(self, dea, dha, fuel_ip, fuel_username, fuel_password, - dea_file, fuel_plugins_conf_dir, work_dir, no_health_check, -- deploy_timeout, no_deploy_environment, deploy_log): -+ deploy_cache_dir, deploy_timeout, -+ no_deploy_environment, deploy_log): - self.dea = dea - self.dha = dha - self.fuel_ip = fuel_ip -@@ -49,6 +51,8 @@ class CloudDeploy(object): - self.fuel_plugins_conf_dir = fuel_plugins_conf_dir - self.work_dir = work_dir - self.no_health_check = no_health_check -+ self.deploy_cache = ( DeployCache(deploy_cache_dir) -+ if deploy_cache_dir else None ) - self.deploy_timeout = deploy_timeout - self.no_deploy_environment = no_deploy_environment - self.deploy_log = deploy_log -@@ -82,9 +86,14 @@ class CloudDeploy(object): - self.work_dir, os.path.basename(self.dea_file))) - s.scp_put('%s/common.py' % self.file_dir, self.work_dir) - s.scp_put('%s/dea.py' % self.file_dir, self.work_dir) -+ s.scp_put('%s/deploy_cache.py' % self.file_dir, self.work_dir) - for f in glob.glob('%s/cloud/*' % self.file_dir): - s.scp_put(f, self.work_dir) - -+ def deploy_cache_collect_artifacts(self): -+ if self.deploy_cache: -+ self.deploy_cache.collect_artifacts(self.ssh) -+ - def power_off_nodes(self): - for node_id in self.node_ids: - self.dha.node_power_off(node_id) -@@ -281,4 +290,6 @@ class CloudDeploy(object): - - self.get_put_deploy_log() - -+ self.deploy_cache_collect_artifacts() -+ - return rc -diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py -index b731c6b..83d31fb 100644 ---- a/deploy/install_fuel_master.py -+++ b/deploy/install_fuel_master.py -@@ -10,6 +10,7 @@ - import time - import os - import glob -+from deploy_cache import DeployCache - from ssh_client import SSHClient - from dha_adapters.libvirt_adapter import LibvirtAdapter - -@@ -32,7 +33,7 @@ class InstallFuelMaster(object): - - def __init__(self, dea_file, dha_file, fuel_ip, fuel_username, - fuel_password, fuel_node_id, iso_file, work_dir, -- fuel_plugins_dir, no_plugins): -+ deploy_cache_dir, fuel_plugins_dir, no_plugins): - self.dea_file = dea_file - self.dha = LibvirtAdapter(dha_file) - self.fuel_ip = fuel_ip -@@ -42,6 +43,8 @@ class InstallFuelMaster(object): - self.iso_file = iso_file - self.iso_dir = os.path.dirname(self.iso_file) - self.work_dir = work_dir -+ self.deploy_cache = ( DeployCache(deploy_cache_dir) -+ if deploy_cache_dir else None ) - self.fuel_plugins_dir = fuel_plugins_dir - self.no_plugins = no_plugins - self.file_dir = os.path.dirname(os.path.realpath(__file__)) -@@ -83,6 +86,10 @@ class InstallFuelMaster(object): - log('Wait until Fuel menu is up') - fuel_menu_pid = self.wait_until_fuel_menu_up() - -+ if self.deploy_cache: -+ log('Deploy cache: Injecting bootstraps and targetimages') -+ self.deploy_cache.inject_cache(self.ssh) -+ - log('Inject our own astute.yaml and fuel_bootstrap_cli.yaml settings') - self.inject_own_astute_and_bootstrap_yaml() - |