aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/cache.mk2
-rw-r--r--build/docker/.gitignore2
-rw-r--r--build/docker/Makefile73
-rw-r--r--build/f_isoroot/Makefile2
-rw-r--r--build/f_isoroot/f_kvm-pluginbuild/config.mk4
-rw-r--r--build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk2
-rw-r--r--build/f_isoroot/f_tacker-pluginbuild/Makefile91
-rw-r--r--build/f_isoroot/f_tacker-pluginbuild/config.mk12
-rw-r--r--build/f_isoroot/f_tacker-pluginbuild/packages.yaml3
-rw-r--r--build/patch-repos/0040-xorriso-fails-to-add-files-with-path-longer-then-240.patch24
-rw-r--r--build/patch-repos/build/repos/fuel-library/0001-Disable-token-revoke-to-increase-keystone-performanc.patch44
-rw-r--r--deploy/cloud/deployment.py116
-rw-r--r--deploy/common.py3
-rw-r--r--deploy/config/dea_base.yaml24
-rw-r--r--deploy/config/plugins/fuel-tacker_0.9.0.yaml48
-rw-r--r--deploy/deploy-config.py1
-rw-r--r--deploy/environments/execution_environment.py2
-rw-r--r--deploy/reap.py9
-rw-r--r--deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml9
-rw-r--r--deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml9
20 files changed, 400 insertions, 80 deletions
diff --git a/build/cache.mk b/build/cache.mk
index f6db01797..a65f310d0 100644
--- a/build/cache.mk
+++ b/build/cache.mk
@@ -51,5 +51,5 @@ cache:
exit 1; \
fi
@docker version >/dev/null 2>&1 || (echo 'No Docker installation available'; exit 1)
- @make -C docker
+ @make -C docker get-cache all
docker/runcontext $(DOCKERIMG) $(MAKE) $(MAKEFLAGS) cached-all
diff --git a/build/docker/.gitignore b/build/docker/.gitignore
new file mode 100644
index 000000000..2585910ce
--- /dev/null
+++ b/build/docker/.gitignore
@@ -0,0 +1,2 @@
+.docker*
+ubuntu-builder/Dockerfile
diff --git a/build/docker/Makefile b/build/docker/Makefile
index d4423b0a2..783881e8d 100644
--- a/build/docker/Makefile
+++ b/build/docker/Makefile
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2015 Ericsson AB and others.
+# Copyright (c) 2015,2016 Ericsson AB and others.
# stefan.k.berg@ericsson.com
# jonas.bjurel@ericsson.com
# All rights reserved. This program and the accompanying materials
@@ -12,6 +12,15 @@ SHELL = /bin/bash
FILES = $(wildcard ubuntu-builder/*) runcontext
DOCKER_VER := $(shell [[ "$$(docker version --format '{{.Client.Version}}')" =~ ([0-9]+)\.([0-9]+) ]] && echo $$(( $${BASH_REMATCH[1]} * 100 + $${BASH_REMATCH[2]} )))
+# Builder tag lifespan, force container rebuild X days after tag creation
+DOCKER_KEEP = 1 days
+DOCKER_IMG = opnfv.org/ubuntu-builder
+DOCKER_TAG = ${DOCKER_IMG}:14.04
+# Shell contruct for checking our tag object did not expire
+DOCKER_EXPIRED = D_TAG_BIRTH=`docker inspect --format="{{.Created}}" \
+ ${DOCKER_TAG} 2>/dev/null`; test -z "$$D_TAG_BIRTH" -o `date +%s` -gt \
+ `date -d "$$D_TAG_BIRTH +${DOCKER_KEEP}" +%s`; echo $$?
+
# Don't use -f flag when docker is newer than 1.9
# https://docs.docker.com/engine/deprecated/#/f-flag-on-docker-tag
ifeq ($(shell echo "$(DOCKER_VER)>109" | bc), 1)
@@ -23,7 +32,7 @@ endif
.PHONY: all
all: .docker
-.docker: $(FILES)
+.dockercfg: $(FILES)
cp Dockerfile ubuntu-builder/Dockerfile
# Only add proxy ENVs where set in host - needed to pull the base Ubuntu image
test -n "${http_proxy}" && sed -i "s;INSERT_HTTP_PROXY;${http_proxy};" ubuntu-builder/Dockerfile || exit 0
@@ -33,10 +42,62 @@ all: .docker
test -n "${HTTPS_PROXY}" && sed -i "s;INSERT_HTTPS_PROXY;${HTTPS_PROXY};" ubuntu-builder/Dockerfile || exit 0
test -n "${NO_PROXY}" && sed -i "s;INSERT_NO_PROXY;${NO_PROXY};" ubuntu-builder/Dockerfile || exit 0
sed -i '/INSERT_/d' ubuntu-builder/Dockerfile
- /usr/bin/docker build --rm=true --no-cache=true -t opnfv.org/ubuntu-builder:14.04 ubuntu-builder
- /usr/bin/docker tag ${tag_flags} opnfv.org/ubuntu-builder:14.04 opnfv.org/ubuntu-builder
- touch .docker
+ touch $@
+
+.docker: .dockercfg
+ @if test -f .cacheid -o "$(shell ${DOCKER_EXPIRED})" -eq "0"; then \
+ /usr/bin/docker build --rm=true --no-cache=true \
+ -t ${DOCKER_TAG} ubuntu-builder && \
+ /usr/bin/docker tag ${tag_flags} ${DOCKER_TAG} ${DOCKER_IMG}; \
+ else \
+ echo "Docker: Tag '${DOCKER_TAG}' was created less than" \
+ "${DOCKER_KEEP} ago, skipping re-build."; \
+ fi
+ touch $@
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
.PHONY: clean
clean:
- rm -f .docker ubuntu-builder/Dockerfile
+ rm -f .docker* ubuntu-builder/Dockerfile
+
+.PHONY: deepclean
+deepclean: clean clean-cache
+
+##############################################################################
+# Cache operations - only used when building through ci/build.sh
+##############################################################################
+
+# NOTE: For docker, we only get/put cache to fingerprint build scripts and
+# env vars, its cached data holds only an empty .docker file.
+
+# Create a unique hash to be used for getting and putting cache, based on:
+# - ubuntu-builder Dockerfile (includes eventual proxy env vars), runcontext;
+# - The contents of this Makefile
+.cacheid: .dockercfg
+ sha1sum Makefile runcontext $(wildcard ubuntu-builder/*) > .cachedata
+ cat .cachedata | $(CACHETOOL) getid > .cacheid
+
+# Clean local data related to caching - called prior to ordinary build
+.PHONY: clean-cache
+clean-cache:
+ rm -f .cachedata .cacheid
+
+# Try to download cache - called prior to ordinary build
+.PHONY: get-cache
+get-cache: .cacheid
+ @if $(CACHETOOL) check $(shell cat .cacheid); then \
+ if test "$(shell ${DOCKER_EXPIRED})" -eq "0"; then \
+ echo "Docker: Tag '${DOCKER_TAG}' missing" \
+ "or older than ${DOCKER_KEEP}, not using it."; \
+ else \
+ touch .docker; \
+ fi; \
+ else \
+ echo "No cache item found for $(shell cat .cacheid)" ;\
+ exit 0;\
+ fi
+
+# Store cache if not already stored - called after ordinary build
+.PHONY: put-cache
+put-cache: .cacheid
+ @tar cf - .docker | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile
index 448f4158c..1539783c9 100644
--- a/build/f_isoroot/Makefile
+++ b/build/f_isoroot/Makefile
@@ -11,7 +11,7 @@
# Add Fuel plugin build targets here
# Plugins disabled for the Fuel Mitaka uplift. Please re-enable your plugin as you have
# verified it!
-PLUGINS ?= f_odlpluginbuild f_onosfwpluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_yardstick-pluginbuild f_kvm-pluginbuild f_bgpvpn-pluginbuild f_collectd-ceilometer-pluginbuild
+PLUGINS ?= f_odlpluginbuild f_onosfwpluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_yardstick-pluginbuild f_kvm-pluginbuild f_bgpvpn-pluginbuild f_collectd-ceilometer-pluginbuild f_tacker-pluginbuild
#PLUGINS = f_odlpluginbuild f_onosfwpluginbuild f_ovsnfv-dpdk-pluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_bgpvpn-pluginbuild
export PLUGINS
#NON_8-0_REBASED_PLUGINS = f_bgpvpn-pluginbuild
diff --git a/build/f_isoroot/f_kvm-pluginbuild/config.mk b/build/f_isoroot/f_kvm-pluginbuild/config.mk
index 9fb2f9283..eaef3d414 100644
--- a/build/f_isoroot/f_kvm-pluginbuild/config.mk
+++ b/build/f_isoroot/f_kvm-pluginbuild/config.mk
@@ -7,6 +7,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-KVMFORNFV_BRANCH=b1c117f1c8414bddbe4370414590f5f0b62ae4d1
+KVMFORNFV_BRANCH=stable/colorado
KVMFORNFV_REPO=https://gerrit.opnfv.org/gerrit/kvmfornfv
-KVMFORNFV_CHANGE=
+KVMFORNFV_CHANGE=e6588d1d59d7ac24f25f644650e6845561dd441b
diff --git a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk
index ec67666dc..8effbd26b 100644
--- a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk
+++ b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk
@@ -7,6 +7,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-OVS_NSH_DPDK_BRANCH?=42160542e6e9151f5f44b738d8d76e88911cd07f
+OVS_NSH_DPDK_BRANCH?=074aadce66ef3cf322a00a3cff5c57deb84088b5
OVS_NSH_DPDK_REPO?=https://review.openstack.org/openstack/fuel-plugin-ovs
OVS_NSH_DPDK_CHANGE?=
diff --git a/build/f_isoroot/f_tacker-pluginbuild/Makefile b/build/f_isoroot/f_tacker-pluginbuild/Makefile
new file mode 100644
index 000000000..997430de1
--- /dev/null
+++ b/build/f_isoroot/f_tacker-pluginbuild/Makefile
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# geopar@intracom-telecom.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+TOP := $(shell pwd)
+
+############################################################################
+# BEGIN of Include definitions
+#
+include config.mk
+#
+# END Include definitions
+#############################################################################
+
+
+.PHONY: all
+all: .tackerbuild
+
+.PHONY: clean
+clean:
+ @rm -f .tackerbuild ../release/opnfv/tacker*.rpm tacker*.rpm
+ @rm -f $(BUILD_BASE)/gitinfo_tackerplugin.txt gitinfo_tackerplugin.txt
+
+.PHONY: release
+release:.tackerbuild
+ @rm -f ../release/opnfv/tacker*.rpm
+ @mkdir -p ../release/tacker
+ @cp tacker*.rpm ../release/opnfv/
+ cp gitinfo_tackerplugin.txt $(BUILD_BASE)
+
+.tackerbuild:
+ rm -rf fuel-plugin-tacker
+ git clone $(TACKER_REPO)
+ cd fuel-plugin-tacker; \
+ git checkout $(TACKER_BRANCH); \
+ if [ ! -z $(TACKER_CHANGE) ]; then \
+ git fetch $(TACKER_REPO) $(TACKER_CHANGE); \
+ git checkout FETCH_HEAD; \
+ fi
+ fpb --debug --build fuel-plugin-tacker/
+ @mv fuel-plugin-tacker/tacker*.rpm .
+ $(REPOINFO) -r . > gitinfo_tackerplugin.txt
+ @rm -rf fuel-plugin-tacker
+ @touch .tackerbuild
+ # Store artifact in cache straight away if caching is enabled
+ # (no .cacheid will be present unless this is a cached build)
+ test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
+
+#############################################################################
+# Cache operations - only used when building through ci/build.sh
+#############################################################################
+
+
+# Create a unique hash to be used for getting and putting cache, based on:
+# - The SHA1 hash of the HEAD on the plugin repo's $(TACKER_BRANCH)
+# - The contents of this Makefile
+.cacheid:
+ @if [ ! -z $(TACKER_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(TACKER_REPO) $(TACKER_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(TACKER_REPO) $(TACKER_BRANCH) > .cachedata; \
+ fi
+ @sha1sum Makefile | awk {'print $$1'} >> .cachedata
+ @sha1sum config.mk | awk {'print $$1'} >> .cachedata
+ @echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata
+ @cat .cachedata | $(CACHETOOL) getid > .cacheid
+
+# Clean local data related to caching - called prior to ordinary build
+.PHONY: clean-cache
+clean-cache: clean
+ @rm -f .cachedata .cacheid
+
+# Try to download cache - called prior to ordinary build
+.PHONY: get-cache
+get-cache: .cacheid
+ @if $(CACHETOOL) check $(shell cat .cacheid); then \
+ $(CACHETOOL) get $(shell cat .cacheid) | tar xf -;\
+ else \
+ echo "No cache item found for $(shell cat .cacheid)" ;\
+ exit 0;\
+ fi
+
+# Store cache if not already stored - called after ordinary build
+.PHONY: put-cache
+put-cache: .cacheid
+ @tar cf - .tackerbuild tacker*.rpm gitinfo_tackerplugin.txt | $(CACHETOOL) put $(shell cat .cacheid)
diff --git a/build/f_isoroot/f_tacker-pluginbuild/config.mk b/build/f_isoroot/f_tacker-pluginbuild/config.mk
new file mode 100644
index 000000000..2de94d57e
--- /dev/null
+++ b/build/f_isoroot/f_tacker-pluginbuild/config.mk
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# geopar@intracom-telecom.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
+##############################################################################
+
+TACKER_BRANCH?=master
+TACKER_REPO?="https://github.com/openstack/fuel-plugin-tacker"
+TACKER_CHANGE?=e49db23fa2392e2cc42ac15ce22e869ff9cb0e0c
diff --git a/build/f_isoroot/f_tacker-pluginbuild/packages.yaml b/build/f_isoroot/f_tacker-pluginbuild/packages.yaml
new file mode 100644
index 000000000..c7775d120
--- /dev/null
+++ b/build/f_isoroot/f_tacker-pluginbuild/packages.yaml
@@ -0,0 +1,3 @@
+packages:
+ - python-jsonrpclib
+
diff --git a/build/patch-repos/0040-xorriso-fails-to-add-files-with-path-longer-then-240.patch b/build/patch-repos/0040-xorriso-fails-to-add-files-with-path-longer-then-240.patch
new file mode 100644
index 000000000..734523040
--- /dev/null
+++ b/build/patch-repos/0040-xorriso-fails-to-add-files-with-path-longer-then-240.patch
@@ -0,0 +1,24 @@
+From: Artem Silenkov <asilenkov@mirantis.com>
+Date: Tue, 22 Sep 2015 21:54:44 +0300
+Subject: [PATCH] xorriso fails to add files with path longer then 240
+
+joliet-long option added to xorriso command line
+
+Change-Id: I97016cf3e6a554f44d839740ba7d210337435cdc
+Related-Bug: #1498619
+---
+ iso/module.mk | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/iso/module.mk b/iso/module.mk
+index 8995378..0073068 100644
+--- a/iso/module.mk
++++ b/iso/module.mk
+@@ -174,6 +174,7 @@ $(ISO_PATH): $(BUILD_DIR)/iso/isoroot.done
+ -V $(ISO_VOLUME_ID) -p $(ISO_VOLUME_PREP) \
+ -J -R \
+ -graft-points \
++ -joliet-long \
+ -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
+ -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
+ -eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
diff --git a/build/patch-repos/build/repos/fuel-library/0001-Disable-token-revoke-to-increase-keystone-performanc.patch b/build/patch-repos/build/repos/fuel-library/0001-Disable-token-revoke-to-increase-keystone-performanc.patch
new file mode 100644
index 000000000..4d5be493b
--- /dev/null
+++ b/build/patch-repos/build/repos/fuel-library/0001-Disable-token-revoke-to-increase-keystone-performanc.patch
@@ -0,0 +1,44 @@
+From ba542dde34743b276547b7ca3c6591feb9000877 Mon Sep 17 00:00:00 2001
+From: iberezovskiy <iberezovskiy@mirantis.com>
+Date: Mon, 19 Sep 2016 12:35:05 +0300
+Subject: [PATCH] Disable token revoke to increase keystone performance
+
+Change-Id: I4df816369093908ad1eac372f38c92155efbe8e0
+Closes-bug: #1625077
+---
+ .../openstack_tasks/manifests/keystone/keystone.pp | 2 ++
+ tests/noop/spec/hosts/keystone/keystone_spec.rb | 5 +++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/deployment/puppet/openstack_tasks/manifests/keystone/keystone.pp b/deployment/puppet/openstack_tasks/manifests/keystone/keystone.pp
+index 3162287..ba9d7df 100644
+--- a/deployment/puppet/openstack_tasks/manifests/keystone/keystone.pp
++++ b/deployment/puppet/openstack_tasks/manifests/keystone/keystone.pp
+@@ -327,6 +327,8 @@ class openstack_tasks::keystone::keystone {
+ memcache_pool_unused_timeout => '60',
+ cache_memcache_servers => $memcache_servers,
+ policy_driver => 'keystone.policy.backends.sql.Policy',
++ # Set revoke_by_id to false according to LP #1625077
++ revoke_by_id => false,
+ }
+
+ Package<| title == 'keystone'|> ~> Service<| title == 'keystone'|>
+diff --git a/tests/noop/spec/hosts/keystone/keystone_spec.rb b/tests/noop/spec/hosts/keystone/keystone_spec.rb
+index b29e691..3c0f847 100644
+--- a/tests/noop/spec/hosts/keystone/keystone_spec.rb
++++ b/tests/noop/spec/hosts/keystone/keystone_spec.rb
+@@ -176,6 +176,11 @@ describe manifest do
+ should contain_class('keystone').with('sync_db' => primary_controller)
+ end
+
++ it 'should declare keystone class with revoke_by_id set to false' do
++ # Set revoke_by_id to false according to LP #1625077
++ should contain_class('keystone').with('revoke_by_id' => false)
++ end
++
+ it 'should configure keystone with paramters' do
+ should contain_keystone_config('token/caching').with(:value => 'false')
+ should contain_keystone_config('cache/enabled').with(:value => 'true')
+--
+1.7.9.5
+
diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py
index 4a9fcd9a8..ecccc241f 100644
--- a/deploy/cloud/deployment.py
+++ b/deploy/cloud/deployment.py
@@ -9,6 +9,7 @@
import time
import re
+import json
from common import (
N,
@@ -29,8 +30,16 @@ GREP_LINES_OF_LEADING_CONTEXT = 100
GREP_LINES_OF_TRAILING_CONTEXT = 100
LIST_OF_CHAR_TO_BE_ESCAPED = ['[', ']', '"']
-class Deployment(object):
+class DeployNotStart(Exception):
+ """Unable to start deployment"""
+
+
+class NodesGoOffline(Exception):
+ """Nodes goes offline during deployment"""
+
+
+class Deployment(object):
def __init__(self, dea, yaml_config_dir, env_id, node_id_roles_dict,
no_health_check, deploy_timeout):
@@ -43,7 +52,6 @@ class Deployment(object):
self.pattern = re.compile(
'\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d')
-
def collect_error_logs(self):
for node_id, roles_blade in self.node_id_roles_dict.iteritems():
log_list = []
@@ -89,7 +97,7 @@ class Deployment(object):
log_msg += details
if log_msg:
- log_list.append(log_msg)
+ log_list.append(log_msg)
if log_list:
role = ('controller' if 'controller' in roles_blade[0]
@@ -99,47 +107,88 @@ class Deployment(object):
for log_msg in log_list:
print(log_msg + '\n')
-
def run_deploy(self):
SLEEP_TIME = 60
- LOG_FILE = 'cloud.log'
+ abort_after = 60 * int(self.deploy_timeout)
+ start = time.time()
log('Starting deployment of environment %s' % self.env_id)
- deploy_proc = run_proc('fuel --env %s deploy-changes | strings > %s'
- % (self.env_id, LOG_FILE))
-
+ deploy_id = None
ready = False
- for i in range(int(self.deploy_timeout)):
- env = parse(exec_cmd('fuel env --env %s' % self.env_id))
- log('Environment status: %s' % env[0][E['status']])
- r, _ = exec_cmd('tail -2 %s | head -1' % LOG_FILE, False)
- if r:
- log(r)
- if env[0][E['status']] == 'operational':
- ready = True
- break
- elif (env[0][E['status']] == 'error'
- or env[0][E['status']] == 'stopped'):
- break
- else:
+ timeout = False
+
+ attempts = 0
+ while attempts < 3:
+ try:
+ if time.time() > start + abort_after:
+ timeout = True
+ break
+ if not deploy_id:
+ deploy_id = self._start_deploy_task()
+ sts, prg, msg = self._deployment_status(deploy_id)
+ if sts == 'error':
+ log('Error during deployment: {}'.format(msg))
+ break
+ if sts == 'running':
+ log('Environmnent deploymnet progress: {}%'.format(prg))
+ elif sts == 'ready':
+ ready = True
+ break
time.sleep(SLEEP_TIME)
-
- if (env[0][E['status']] <> 'operational'
- and env[0][E['status']] <> 'error'
- and env[0][E['status']] <> 'stopped'):
- err('Deployment timed out, environment %s is not operational, snapshot will not be performed'
- % self.env_id, self.collect_logs)
-
- run_proc_wait_terminated(deploy_proc)
- delete(LOG_FILE)
-
+ except (DeployNotStart, NodesGoOffline) as e:
+ log(e)
+ attempts += 1
+ deploy_id = None
+ time.sleep(SLEEP_TIME * attempts)
+
+ if timeout:
+ err('Deployment timed out, environment %s is not operational, '
+ 'snapshot will not be performed'
+ % self.env_id)
if ready:
- log('Environment %s successfully deployed' % self.env_id)
+ log('Environment %s successfully deployed'
+ % self.env_id)
else:
self.collect_error_logs()
err('Deployment failed, environment %s is not operational'
% self.env_id, self.collect_logs)
+ def _start_deploy_task(self):
+ out, _ = exec_cmd('fuel2 env deploy {}'.format(self.env_id), False)
+ id = self._deployment_task_id(out)
+ return id
+
+ def _deployment_task_id(self, response):
+ response = str(response)
+ if response.startswith('Deployment task with id'):
+ for s in response.split():
+ if s.isdigit():
+ return int(s)
+ raise DeployNotStart('Unable to start deployment: {}'.format(response))
+
+ def _deployment_status(self, id):
+ task = self._task_fields(id)
+ if task['status'] == 'error':
+ if task['message'].endswith(
+ 'offline. Remove them from environment and try again.'):
+ raise NodesGoOffline(task['message'])
+ return task['status'], task['progress'], task['message']
+
+ def _task_fields(self, id):
+ try:
+ out, _ = exec_cmd('fuel2 task show {} -f json'.format(id), False)
+ task_info = json.loads(out)
+ properties = {}
+ # for 9.0 this can be list of dicts or dict
+ # see https://bugs.launchpad.net/fuel/+bug/1625518
+ if isinstance(task_info, list):
+ for d in task_info:
+ properties.update({d['Field']: d['Value']})
+ else:
+ return task_info
+ return properties
+ except ValueError as e:
+ err('Unable to fetch task info: {}'.format(e))
def collect_logs(self):
log('Cleaning out any previous deployment logs')
@@ -155,7 +204,6 @@ class Deployment(object):
r, _ = exec_cmd('tar -czhf /root/deploy-%s.log.tar.gz /var/log/remote' % time.strftime("%Y%m%d-%H%M%S"), False)
log(r)
-
def verify_node_status(self):
node_list = parse(exec_cmd('fuel --env %s node' % self.env_id))
failed_nodes = []
@@ -169,7 +217,6 @@ class Deployment(object):
summary += '[node %s, status %s]\n' % (node, status)
err('Deployment failed: %s' % summary, self.collect_logs)
-
def health_check(self):
log('Now running sanity and smoke health checks')
r = exec_cmd('fuel health --env %s --check sanity,smoke --force' % self.env_id)
@@ -177,7 +224,6 @@ class Deployment(object):
if 'failure' in r:
err('Healthcheck failed!', self.collect_logs)
-
def deploy(self):
self.run_deploy()
self.verify_node_status()
diff --git a/deploy/common.py b/deploy/common.py
index 353045867..80832e201 100644
--- a/deploy/common.py
+++ b/deploy/common.py
@@ -18,6 +18,7 @@ import shutil
import stat
import errno
import time
+import shlex
N = {'id': 0, 'status': 1, 'name': 2, 'cluster': 3, 'ip': 4, 'mac': 5,
'roles': 6, 'pending_roles': 7, 'online': 8, 'group_id': 9}
@@ -41,7 +42,7 @@ os.chmod(LOGFILE, 0664)
def mask_arguments(cmd, mask_args, mask_str):
- cmd_line = cmd.split()
+ cmd_line = shlex.split(cmd)
for pos in mask_args:
# Don't mask the actual command; also check if we don't reference
# beyond bounds
diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml
index 0b8485ba0..c1a0606bc 100644
--- a/deploy/config/dea_base.yaml
+++ b/deploy/config/dea_base.yaml
@@ -636,43 +636,25 @@ settings:
section: main universe multiverse
suite: trusty
type: deb
- uri: http://archive.ubuntu.com/ubuntu/
+ uri: http://10.20.0.2:8080/mirrors/ubuntu/
- name: ubuntu-updates
priority: null
section: main universe multiverse
suite: trusty-updates
type: deb
- uri: http://archive.ubuntu.com/ubuntu/
+ uri: http://10.20.0.2:8080/mirrors/ubuntu/
- name: ubuntu-security
priority: null
section: main universe multiverse
suite: trusty-security
type: deb
- uri: http://archive.ubuntu.com/ubuntu/
+ uri: http://10.20.0.2:8080/mirrors/ubuntu/
- name: mos
priority: 1050
section: main restricted
suite: mos9.0
type: deb
uri: http://10.20.0.2:8080/mitaka-9.0/ubuntu/x86_64
- - name: mos-updates
- priority: 1050
- section: main restricted
- suite: mos9.0-updates
- type: deb
- uri: http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/
- - name: mos-security
- priority: 1050
- section: main restricted
- suite: mos9.0-security
- type: deb
- uri: http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/
- - name: mos-holdback
- priority: 1100
- section: main restricted
- suite: mos9.0-holdback
- type: deb
- uri: http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/
- name: Auxiliary
priority: 1150
section: main restricted
diff --git a/deploy/config/plugins/fuel-tacker_0.9.0.yaml b/deploy/config/plugins/fuel-tacker_0.9.0.yaml
new file mode 100644
index 000000000..71e028ffd
--- /dev/null
+++ b/deploy/config/plugins/fuel-tacker_0.9.0.yaml
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2015,2016 Ericsson AB and others.
+# mskalski@mirantis.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
+##############################################################################
+
+plugin-config-metadata:
+ title: Tacker fuel plugin configuration template
+ version: 0.1
+ created: 03.10.2016
+ comment: None
+tacker:
+ metadata:
+ #chosen_id: Assigned during installation
+ class: plugin
+ default: false
+ enabled: true
+ label: Tacker VNF manager
+ toggleable: true
+ versions:
+ - metadata:
+ group: 'openstack_services'
+ db_password:
+ generator: 'password'
+ user_password:
+ generator: 'password'
+ user: 'tacker'
+ port: 8889
+ service: 'tacker-server'
+ restrictions:
+ - condition: "settings:opendaylight == null or settings:opendaylight.metadata.enabled == false or settings:opendaylight.enable_sfc.value == false"
+ strict: false
+ message: "Please install OpenDaylight Plugin with SFC features enabled"
+ - condition: "settings:fuel-plugin-ovs == null or settings:fuel-plugin-ovs.metadata.enabled == false"
+ strict: false
+ message: "Please install and enable Openvswitch plugin with NSH support."
+ #plugin_id: Assigned during installation
+ plugin_version: 0.2.0
+ debug:
+ value: false
+ label: 'Debug logging'
+ description: 'Debug logging mode provides more information, but requires more disk space.'
+ weight: 25
+ type: "checkbox"
+ weight: 70
diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py
index 436002d36..8896080db 100644
--- a/deploy/deploy-config.py
+++ b/deploy/deploy-config.py
@@ -137,7 +137,6 @@ def merge_networks(list_1, list_2):
return [new_nets.get(net.get('name'), net) for net in list_1]
-
def merge_dicts(dict1, dict2):
for k in set(dict1).union(dict2):
if k in dict1 and k in dict2:
diff --git a/deploy/environments/execution_environment.py b/deploy/environments/execution_environment.py
index af0e130dd..7a0b4744e 100644
--- a/deploy/environments/execution_environment.py
+++ b/deploy/environments/execution_environment.py
@@ -46,7 +46,7 @@ class ExecutionEnvironment(object):
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 %s' % vm_name, False)
+ exec_cmd('virsh undefine --managed-save --remove-all-storage %s' % vm_name, False)
for file in disk_files:
delete(file)
diff --git a/deploy/reap.py b/deploy/reap.py
index eb02fe25d..69c98d10c 100644
--- a/deploy/reap.py
+++ b/deploy/reap.py
@@ -18,6 +18,7 @@ import shutil
import tempfile
import re
import netaddr
+import templater
from common import (
N,
@@ -79,8 +80,6 @@ DHA_2 = '''
# which may not be correct - please adjust as needed.
'''
-TEMPLATER = 'templater.py'
-
DISKS = {'fuel': '100G',
'controller': '100G',
'compute': '100G'}
@@ -353,8 +352,10 @@ class Reap(object):
self.download_config('network')
def create_base_dea(self):
- exec_cmd('python %s %s %s %s'
- % (TEMPLATER, self.dea_file, self.template, self.base_dea))
+ templater = templater.Templater(self.dea_file,
+ self.template,
+ self.base_dea)
+ templater.run()
def finale(self):
log('DEA file is available at %s' % self.dea_file)
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 e6aef2aba..c4789484c 100644
--- a/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml
+++ b/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2015 Ericsson AB and others.
+# Copyright (c) 2015,2016 Ericsson AB and others.
# jonas.bjurel@ericsson.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -22,7 +22,7 @@
# deployment configuration meta-data
deployment-scenario-metadata:
title: ODL-L2 SFC HA deployment
- version: 0.0.1
+ version: 0.0.2
created: Feb 10 2016
comment: Rebased to Fuel9
@@ -52,6 +52,9 @@ stack-extensions:
value: true
metadata:
plugin_version: 0.9.0
+ - module: tacker
+ module-config-name: fuel-tacker
+ module-config-version: 0.9.0
# Note that the module substitionion does not support arrays
# This is a quick fix
# - module: opendaylight
@@ -78,7 +81,7 @@ dea-override-config:
role: controller,opendaylight
- id: 2
interfaces: interfaces_1
- role: mongo,controller
+ role: mongo,controller,tacker
- id: 3
interfaces: interfaces_1
role: ceph-osd,controller
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 a8d9ed848..90a45d577 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
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2015 Ericsson AB and others.
+# Copyright (c) 2015,2016 Ericsson AB and others.
# jonas.bjurel@ericsson.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -22,7 +22,7 @@
# deployment configuration meta-data
deployment-scenario-metadata:
title: ODL-L2-SFC No-HA deployment
- version: 0.0.2
+ version: 0.0.3
created: Feb 10 2016
comment: Fuel ODL-L2 SFC No HA with Ceph, Ceilometer and Heat Rebased for Fuel9
@@ -52,6 +52,9 @@ stack-extensions:
value: true
metadata:
plugin_version: 0.9.0
+ - module: tacker
+ module-config-name: fuel-tacker
+ module-config-version: 0.9.0
# Note that the module substitionion does not support arrays
# This is a quick fix
@@ -76,7 +79,7 @@ dea-override-config:
nodes:
- id: 1
interfaces: interfaces_1
- role: mongo,controller
+ role: mongo,controller,tacker
- id: 2
interfaces: interfaces_1
role: ceph-osd,opendaylight